This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/19069] New: task_euid() doesn't compile on aarch64


https://sourceware.org/bugzilla/show_bug.cgi?id=19069

            Bug ID: 19069
           Summary: task_euid() doesn't compile on aarch64
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

Created attachment 8682
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8682&action=edit
proposed patch

The task_euid() fails to compile on aarch64:

=======
S aarch64 # stap -ge 'probe oneshot {println(task_euid(0))}'
In file included from
/root/mcermak-systemtap/systemtap-build/share/systemtap/runtime/linux/runtime.h:202:0,
                 from
/root/mcermak-systemtap/systemtap-build/share/systemtap/runtime/runtime.h:24,
                 from
/tmp/stapebySbl/stap_2743b3ed18883ca134e63feb36e2bc0e_2431_src.c:25:
/tmp/stapebySbl/stap_2743b3ed18883ca134e63feb36e2bc0e_2431_src.c: In function
âfunction_task_euidâ:
/tmp/stapebySbl/stap_2743b3ed18883ca134e63feb36e2bc0e_2431_src.c:231:47: error:
invalid application of âsizeofâ to incomplete type âstruct user_namespaceâ
     (void)kderef_buffer(NULL, user_ns, sizeof(struct user_namespace));
                                               ^
/root/mcermak-systemtap/systemtap-build/share/systemtap/runtime/linux/loc2c-runtime.h:909:18:
note: in definition of macro âkderef_bufferâ
     for (_len = (maxbytes), _addr = (uintptr_t)(addr);         \
                  ^
make[1]: *** [/tmp/stapebySbl/stap_2743b3ed18883ca134e63feb36e2bc0e_2431_src.o]
Error 1
make: *** [_module_/tmp/stapebySbl] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]
S aarch64 #
=======

On aarch64 struct user_namespace is defined within
include/linux/user_namespace.h which got added in kernel commit
acce292c82d4d82d35553b928df2b0597c3a9c78. The `git describe --contains
acce292c82d4d82d35553b928df2b0597c3a9c78` points to 'v2.6.23-rc1~870'. Attached
patch fixes the issue for me on aarch64 and seems not to break other supported
environments.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]