History log of /linux-6.15/tools/testing/selftests/livepatch/test-kprobe.sh (Results 1 – 2 of 2)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14
# 59481b8b 18-Mar-2025 Song Liu <[email protected]>

selftest/livepatch: Only run test-kprobe with CONFIG_KPROBES_ON_FTRACE

CONFIG_KPROBES_ON_FTRACE is required for test-kprobe. Skip test-kprobe
when CONFIG_KPROBES_ON_FTRACE is not set. Since some ker

selftest/livepatch: Only run test-kprobe with CONFIG_KPROBES_ON_FTRACE

CONFIG_KPROBES_ON_FTRACE is required for test-kprobe. Skip test-kprobe
when CONFIG_KPROBES_ON_FTRACE is not set. Since some kernel may not have
/proc/config.gz, grep for kprobe_ftrace_ops from /proc/kallsyms to check
whether CONFIG_KPROBES_ON_FTRACE is enabled.

Signed-off-by: Song Liu <[email protected]>
Acked-by: Joe Lawrence <[email protected]>
Acked-by: Miroslav Benes <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[[email protected]: Call grep with -q option.]
Reviewed-by: Petr Mladek <[email protected]>
Tested-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>

show more ...


Revision tags: v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4
# 62597edf 17-Oct-2024 Michael Vetter <[email protected]>

selftests: livepatch: test livepatching a kprobed function

The test proves that a function that is being kprobed and uses a
post_handler cannot be livepatched.

Only one ftrace_ops with FTRACE_OPS_F

selftests: livepatch: test livepatching a kprobed function

The test proves that a function that is being kprobed and uses a
post_handler cannot be livepatched.

Only one ftrace_ops with FTRACE_OPS_FL_IPMODIFY set may be registered
to any given function at a time.

Note that the conflicting kprobe could not be created using the
tracefs interface, see Documentation/trace/kprobetrace.rst.
This interface uses only the pre_handler(), see alloc_trace_kprobe().
But FTRACE_OPS_FL_IPMODIFY is used only when the kprobe is using a
post_handler, see arm_kprobe_ftrace().

Signed-off-by: Michael Vetter <[email protected]>
Reviewed-by: Miroslav Benes <[email protected]>
Reviewed-by: Joe Lawrence <[email protected]>
Tested-by: Marcos Paulo de Souza <[email protected]>
Reviewed-by: Marcos Paulo de Souza <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Tested-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Petr Mladek <[email protected]>

show more ...