[Bug translator/31404] Systemtap unable to find kernel.trace("*") probe points on Fedora rawhide Linux 6.8 kernels

wcohen at redhat dot com sourceware-bugzilla@sourceware.org
Wed Feb 28 14:49:28 GMT 2024


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

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
Was able to compare the tracequery_kmod_1 builds between fedora 39 and rawhide.
 The problem on rawhide is that the additional -Werror-missing-prototypes
option is being passed into rawhide build which causes:

$  ../install/bin/stap  --disable-cache -k -vvvvv -L
'kernel.trace("sys_enter")' >& rawhide_log
have /tmp/stapypAUhu
make -C /lib/modules/$(uname -r)/build M=/tmp/stapypAUhu/tracequery_kmod_1
modules
 make -C /lib/modules/$(uname -r)/build M=/tmp/stapypAUhu/tracequery_kmod_1
modules
make: Entering directory
'/usr/src/kernels/6.8.0-0.rc5.20240222git39133352cbed.44.fc41.x86_64'
  CC [M]  /tmp/stapypAUhu/tracequery_kmod_1/tracequery_kmod_1_2.o
/tmp/stapypAUhu/tracequery_kmod_1/tracequery_kmod_1_2.c:51:8: error: no
previous prototype for ‘stapprobe_read_msr’ [-Werror=missing-prototypes]
   51 |   void stapprobe_##name(proto) {}
      |        ^~~~~~~~~~
./include/linux/tracepoint.h:555:9: note: in expansion of macro ‘DECLARE_TRACE’
  555 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
      |         ^~~~~~~~~~~~~
./arch/x86/include/asm/msr-trace.h:40:1: note: in expansion of macro
‘DEFINE_EVENT’
   40 | DEFINE_EVENT(msr_trace_class, read_msr,
      | ^~~~~~~~~~~~
/tmp/stapypAUhu/tracequery_kmod_1/tracequery_kmod_1_2.c:51:8: error: no
previous prototype for ‘stapprobe_write_msr’ [-Werror=missing-prototypes]
   51 |   void stapprobe_##name(proto) {}
      |        ^~~~~~~~~~
./include/linux/tracepoint.h:555:9: note: in expansion of macro ‘DECLARE_TRACE’
  555 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
      |         ^~~~~~~~~~~~~
./arch/x86/include/asm/msr-trace.h:45:1: note: in expansion of macro
‘DEFINE_EVENT’
   45 | DEFINE_EVENT(msr_trace_class, write_msr,
      | ^~~~~~~~~~~~
/tmp/stapypAUhu/tracequery_kmod_1/tracequery_kmod_1_2.c:51:8: error: no
previous prototype for ‘stapprobe_rdpmc’ [-Werror=missing-prototypes]
   51 |   void stapprobe_##name(proto) {}
      |        ^~~~~~~~~~
./include/linux/tracepoint.h:555:9: note: in expansion of macro ‘DECLARE_TRACE’
  555 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
      |         ^~~~~~~~~~~~~
./arch/x86/include/asm/msr-trace.h:50:1: note: in expansion of macro
‘DEFINE_EVENT’
   50 | DEFINE_EVENT(msr_trace_class, rdpmc,
      | ^~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243:
/tmp/stapypAUhu/tracequery_kmod_1/tracequery_kmod_1_2.o] Error 1
make[1]: ***
[/usr/src/kernels/6.8.0-0.rc5.20240222git39133352cbed.44.fc41.x86_64/Makefile:1939:
/tmp/stapypAUhu/tracequery_kmod_1] Error 2
make: *** [Makefile:252: __sub-make] Error 2
make: Leaving directory
'/usr/src/kernels/6.8.0-0.rc5.20240222git39133352cbed.44.fc41.x86_64'

There looks to be a couple ways to fix this.

1) kernel git commit 1c57b9f63ab34f01b8c73731cc0efacb5a9a2f16 adds a "static"
before the function definition.

2) kernel git commit c97dac57c804b53eab492ca0230d86356729d633 adds following
line to Kbuild to remove the -Wmissing-prototypes:

+KBUILD_CFLAGS := $(filter-out -Wmissing-prototypes -Wmissing-declarations,
$(KBUILD_CFLAGS))
+

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


More information about the Systemtap mailing list