lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2409271438130.15317@pobox.suse.cz>
Date: Fri, 27 Sep 2024 14:49:01 +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 v3 2/3] selftests: livepatch: save and restore kprobe
 state

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@...e.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ