]> Gentwo Git Trees - linux/.git/commit
selftests: livepatch: save and restore kprobe state
authorMichael Vetter <mvetter@suse.com>
Thu, 17 Oct 2024 20:01:31 +0000 (22:01 +0200)
committerPetr Mladek <pmladek@suse.com>
Tue, 22 Oct 2024 15:13:11 +0000 (17:13 +0200)
commit59766286b6e54f8ad334dcef7d2e743b7550df0e
treeeb98479ec72253fc8d7890e214c969abdd5ed47a
parent637c730998b8f440dc5d0c6bae254fbf19143ea4
selftests: livepatch: save and restore kprobe state

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@suse.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Joe Lawrence <joe.lawrence@redhat.com>
Tested-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20241017200132.21946-3-mvetter@suse.com
[pmladek@suse.com: Added few more substitutions in test-syscall.sh]
Signed-off-by: Petr Mladek <pmladek@suse.com>
tools/testing/selftests/livepatch/functions.sh
tools/testing/selftests/livepatch/test-syscall.sh