public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/30999] New: _kretprobe_data needs to be adjusted to support changes in the kernel's struct kretprobe_instance
@ 2023-10-24 18:20 wcohen at redhat dot com
  2023-12-06 15:39 ` [Bug runtime/30999] " wcohen at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: wcohen at redhat dot com @ 2023-10-24 18:20 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 30999
           Summary: _kretprobe_data needs to be adjusted to support
                    changes in the kernel's struct kretprobe_instance
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: wcohen at redhat dot com
  Target Milestone: ---

On RHEL9 and various Fedora machine have systemtap.base/kretprobe-vars.stp fail
to build because of kernel git commit d741bf41d7c7db4898bacfcb020353cddc032fd8:

    kprobes: Remove kretprobe hash

    The kretprobe hash is mostly superfluous, replace it with a per-task
    variable.

    This gets rid of the task hash and it's related locking.

    Note that this may change the kprobes module-exported API for kretprobe
    handlers. If any out-of-tree kretprobe user uses ri->rp, use
    get_kretprobe(ri) instead.

    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link:
https://lore.kernel.org/r/159870620431.1229682.16325792502413731312.stgit@devnote2

When the test attempts to run will see the following in systemtap.log:

Running
/root/systemtap_write/systemtap/testsuite/systemtap.base/kretprobe-vars.exp ...
executing: stap -v -c {cat /dev/null} -w
/root/systemtap_write/systemtap/testsuite/systemtap.base/kretprobe-vars.stp
spawn stap -v -c cat /dev/null -w
/root/systemtap_write/systemtap/testsuite/systemtap.base/kretprobe-vars.stp^M
Pass 1: parsed user script and 466 library scripts using
119104virt/89268res/13444shr/75648data kb, in 130usr/30sys/17\
2real ms.^M
Pass 2: analyzed script: 5 probes, 15 functions, 1 embed, 7 globals using
187148virt/158660res/14612shr/143692data kb,\
 in 1270usr/110sys/1368real ms.^M
Pass 3: translated to C into
"/tmp/stap9WEX7h/stap_b1f325e4c83bee966f3421ee4b0c9033_8031_src.c" using
187148virt/16052\
4res/16468shr/143692data kb, in 0usr/80sys/96real ms.^M
/tmp/stap9WEX7h/stap_b1f325e4c83bee966f3421ee4b0c9033_8031_src.c: In function
'_kretprobe_data':^M
/tmp/stap9WEX7h/stap_b1f325e4c83bee966f3421ee4b0c9033_8031_src.c:31:46: error:
'struct kretprobe_instance' has no memb\
er named 'rp'; did you mean 'rph'?^M
   31 |         if (end > offset && pi && end <= pi->rp->data_size)^M
      |                                              ^~^M
      |                                              rph^M
/tmp/stap9WEX7h/stap_b1f325e4c83bee966f3421ee4b0c9033_8031_src.c: At top
level:^M
cc1: note: unrecognized command-line option '-Wno-infinite-recursion' may have
been intended to silence earlier diagno\
stics^M
make[4]: *** [scripts/Makefile.build:299:
/tmp/stap9WEX7h/stap_b1f325e4c83bee966f3421ee4b0c9033_8031_src.o] Error 1^M
make[3]: *** [Makefile:1928: /tmp/stap9WEX7h] Error 2^M
WARNING: kbuild exited with status: 2^M
Pass 4: compiled C into "stap_b1f325e4c83bee966f3421ee4b0c9033_8031.ko" in
1120usr/210sys/1028real ms.^M
Pass 4: compilation failed.  [man error::pass4]^M
Kernel version 5.14.0 is within tested range 2.6.32 ... 6.5^M
FAIL: kretprobe-vars startup (eof)

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug runtime/30999] _kretprobe_data needs to be adjusted to support changes in the kernel's struct kretprobe_instance
  2023-10-24 18:20 [Bug runtime/30999] New: _kretprobe_data needs to be adjusted to support changes in the kernel's struct kretprobe_instance wcohen at redhat dot com
@ 2023-12-06 15:39 ` wcohen at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: wcohen at redhat dot com @ 2023-12-06 15:39 UTC (permalink / raw)
  To: systemtap

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

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
This issue is addressed by 

ommit caea38e701923ec78622746d428e87d1c3899d9e (HEAD -> master, origin/master,
origin/HEAD)
Author: William Cohen <wcohen@redhat.com>
Date:   Tue Dec 5 09:55:30 2023 -0500

    Support kretprobe ABI change in Linux 5.11 kernels

    Linux git commit d741bf41d7 changed how to access information
    associated with a kretprobe instance.  Code should use the
    get_kretprobe function to get that information.  For older kernels
    just define an equivalent get_kretprobe define.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-06 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-24 18:20 [Bug runtime/30999] New: _kretprobe_data needs to be adjusted to support changes in the kernel's struct kretprobe_instance wcohen at redhat dot com
2023-12-06 15:39 ` [Bug runtime/30999] " wcohen at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).