From: Miroslav Benes <mbenes@suse.cz>
To: Michael Vetter <mvetter@suse.com>
Cc: linux-kselftest@vger.kernel.org, live-patching@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] selftests: livepatch: save and restore kprobe state
Date: Fri, 27 Sep 2024 14:49:01 +0200 (CEST) [thread overview]
Message-ID: <alpine.LSU.2.21.2409271438130.15317@pobox.suse.cz> (raw)
In-Reply-To: <20240920115631.54142-3-mvetter@suse.com>
Hi,
On Fri, 20 Sep 2024, Michael Vetter wrote:
> Save the state of /sys/kernel/livepatch/debug/kprobes/enabled
I believe it is /sys/kernel/debug/kprobes/enabled.
> during setup_config() and restore it during cleanup().
>
> This is in preparation for a future commit that will add a test
> that should confirm that we cannot livepatch a kprobed function
> if that kprobe has a post handler.
>
> Signed-off-by: Michael Vetter <mvetter@suse.com>
> ---
> tools/testing/selftests/livepatch/functions.sh | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
> index 50361fceff06..6684c01c0567 100644
> --- a/tools/testing/selftests/livepatch/functions.sh
> +++ b/tools/testing/selftests/livepatch/functions.sh
> @@ -6,7 +6,10 @@
>
> MAX_RETRIES=600
> RETRY_INTERVAL=".1" # seconds
> -SYSFS_KLP_DIR="/sys/kernel/livepatch"
> +SYSFS_KERNEL_DIR="/sys/kernel"
> +SYSFS_KLP_DIR="$SYSFS_KERNEL_DIR/livepatch"
> +SYSFS_DEBUG_DIR="$SYSFS_KERNEL_DIR/debug"
> +SYSFS_KPROBES_DIR="$SYSFS_DEBUG_DIR/kprobes"
Personally I find this harder to read but it is a nit and Petr asked you
to do it, but
> # Kselftest framework requirement - SKIP code is 4
> ksft_skip=4
> @@ -58,6 +61,7 @@ function push_config() {
> DYNAMIC_DEBUG=$(grep '^kernel/livepatch' /sys/kernel/debug/dynamic_debug/control | \
it stays opencoded here and also elsewhere which is not great. Could it be
consistent, please?
Otherwise I would just squash the patch to the next one.
Thank you,
Miroslav
next prev parent reply other threads:[~2024-09-27 12:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 11:56 [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function Michael Vetter
2024-09-20 11:56 ` [PATCH v3 1/3] selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR Michael Vetter
2024-09-27 12:41 ` Miroslav Benes
2024-09-20 11:56 ` [PATCH v3 2/3] selftests: livepatch: save and restore kprobe state Michael Vetter
2024-09-27 12:49 ` Miroslav Benes [this message]
2024-09-20 11:56 ` [PATCH v3 3/3] selftests: livepatch: test livepatching a kprobed function Michael Vetter
2024-09-27 12:54 ` Miroslav Benes
2024-09-23 14:45 ` [PATCH v3 0/3] " Marcos Paulo de Souza
2024-09-23 16:16 ` Shuah Khan
2024-09-24 9:21 ` Petr Mladek
2024-09-24 9:17 ` Petr Mladek
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=alpine.LSU.2.21.2409271438130.15317@pobox.suse.cz \
--to=mbenes@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mvetter@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®