[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2410221402420.13912@pobox.suse.cz>
Date: Tue, 22 Oct 2024 14:06:03 +0200 (CEST)
From: Miroslav Benes <mbenes@...e.cz>
To: Michael Vetter <mvetter@...e.com>
cc: linux-kselftest@...r.kernel.org, live-patching@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/3] selftests: livepatch: save and restore kprobe
state
Hi,
On Thu, 17 Oct 2024, Michael Vetter wrote:
> Save the state of /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@...e.com>
> ---
> tools/testing/selftests/livepatch/functions.sh | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
> index e0e7f8db894c..e78e0e16ad4d 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"
there are still two occurrences of /sys/kernel/ in test-syscall.sh which
can be replaced with $SYSFS_KERNEL_DIR now. I suppose that Petr can fix
that when applying as well.
The patch also contains two separate things... the cleanup and the kprobe
state handling. Ideally, it should be split but unless someone else also
speaks up, I can certainly live with the current state.
With that
Reviewed-by: Miroslav Benes <mbenes@...e.cz>
M
Powered by blists - more mailing lists