Re: [PATCH] selftest/livepatch: Only run test-kprobe with CONFIG_KPROBES_ON_FTRACE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 17 Mar 2025, Song Liu wrote:

> On Mon, Mar 17, 2025 at 11:59 AM Joe Lawrence <joe.lawrence@xxxxxxxxxx> wrote:
> >
> > On 3/17/25 12:51, Song Liu wrote:
> > > CONFIG_KPROBES_ON_FTRACE is required for test-kprobe. Skip test-kprobe
> > > when CONFIG_KPROBES_ON_FTRACE is not set.
> > >
> > > Signed-off-by: Song Liu <song@xxxxxxxxxx>
> > > ---
> > >  tools/testing/selftests/livepatch/test-kprobe.sh | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/tools/testing/selftests/livepatch/test-kprobe.sh b/tools/testing/selftests/livepatch/test-kprobe.sh
> > > index 115065156016..fd823dd5dd7f 100755
> > > --- a/tools/testing/selftests/livepatch/test-kprobe.sh
> > > +++ b/tools/testing/selftests/livepatch/test-kprobe.sh
> > > @@ -5,6 +5,8 @@
> > >
> > >  . $(dirname $0)/functions.sh
> > >
> > > +zgrep KPROBES_ON_FTRACE /proc/config.gz || skip "test-kprobe requires CONFIG_KPROBES_ON_FTRACE"
> > > +
> >
> > Hi Song,
> >
> > This in turn depends on CONFIG_IKCONFIG_PROC for /proc/config.gz (not
> > set for RHEL distro kernels).
> 
> I was actually worrying about this when testing it.
> 
> > Is there a dynamic way to figure out CONFIG_KPROBES_ON_FTRACE support?
> 
> How about we grep kprobe_ftrace_ops from /proc/kallsyms?

which relies on having KALLSYMS_ALL enabled but since CONFIG_LIVEPATCH 
depends on it, we are good. So I would say yes, it is a better option. 
Please, add a comment around.

Thank you,
Miroslav

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux