From: Joe Lawrence <joe.lawrence@redhat.com>
To: Song Liu <song@kernel.org>, live-patching@vger.kernel.org
Cc: jpoimboe@kernel.org, kernel-team@meta.com, jikos@kernel.org,
mbenes@suse.cz, pmladek@suse.com
Subject: Re: [PATCH] selftest/livepatch: Only run test-kprobe with CONFIG_KPROBES_ON_FTRACE
Date: Mon, 17 Mar 2025 17:00:51 -0400 [thread overview]
Message-ID: <86e20ddb-5d1c-8b52-c5dd-3cc33b54828c@redhat.com> (raw)
In-Reply-To: <2862567f-e380-a580-c3be-08bd768384f9@redhat.com>
On 3/17/25 14:59, Joe Lawrence 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@kernel.org>
>> ---
>> 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).
>
> Is there a dynamic way to figure out CONFIG_KPROBES_ON_FTRACE support?
> Without looking into it very long, maybe test_klp_kprobe.c's call to
> register_kprobe() could fail with -ENOTSUPP and the test script could
> gracefully skip the test?
>
Ugh, n/m, looking at the code now I see it already does return
-EOPNOTSUPP, but insmod throws out the code (if it even gets that far)
and so it only reports success or failure. Graceful handling will have
to be more clever than that.
--
Joe
next prev parent reply other threads:[~2025-03-17 21:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 16:51 [PATCH] selftest/livepatch: Only run test-kprobe with CONFIG_KPROBES_ON_FTRACE Song Liu
2025-03-17 18:59 ` Joe Lawrence
2025-03-17 21:00 ` Joe Lawrence [this message]
2025-03-17 22:10 ` Song Liu
2025-03-18 10:14 ` Miroslav Benes
2025-03-18 13:44 ` Joe Lawrence
2025-03-18 16:25 ` Song Liu
2025-03-18 17:18 ` Joe Lawrence
2025-03-18 17:49 ` Song Liu
2025-03-18 17:54 ` Song Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86e20ddb-5d1c-8b52-c5dd-3cc33b54828c@redhat.com \
--to=joe.lawrence@redhat.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=kernel-team@meta.com \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.