<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/livepatch/test_modules/test_klp_kprobe.c, branch v6.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-10-22T15:13:11Z</updated>
<entry>
<title>selftests: livepatch: test livepatching a kprobed function</title>
<updated>2024-10-22T15:13:11Z</updated>
<author>
<name>Michael Vetter</name>
<email>mvetter@suse.com</email>
</author>
<published>2024-10-17T20:01:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62597edf6340191511bdf9a7f64fa315ddc58805'/>
<id>urn:sha1:62597edf6340191511bdf9a7f64fa315ddc58805</id>
<content type='text'>
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 &lt;mvetter@suse.com&gt;
Reviewed-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Reviewed-by: Joe Lawrence &lt;joe.lawrence@redhat.com&gt;
Tested-by: Marcos Paulo de Souza &lt;mpdesouza@suse.com&gt;
Reviewed-by: Marcos Paulo de Souza &lt;mpdesouza@suse.com&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Tested-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://lore.kernel.org/r/20241017200132.21946-4-mvetter@suse.com
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</content>
</entry>
</feed>
