]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/alternative: Refactor INT3 call emulation selftest
authorJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 17 Sep 2025 16:03:18 +0000 (09:03 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 14 Oct 2025 21:45:22 +0000 (14:45 -0700)
commit3049fc4b5f1d2320a84e2902b3ac5a735f60ca04
treef91d7614bd3a4d89fb010fd2d861586c04f8defd
parent4109043bff31f95d3da9ace33eb3c1925fd62cbd
x86/alternative: Refactor INT3 call emulation selftest

The INT3 call emulation selftest is a bit fragile as it relies on the
compiler not inserting any extra instructions before the
int3_selftest_ip() definition.

Also, the int3_selftest_ip() symbol overlaps with the int3_selftest
symbol(), which can confuse objtool.

Fix those issues by slightly reworking the functionality and moving
int3_selftest_ip() to a separate asm function.  While at it, improve the
naming.

Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
arch/x86/kernel/alternative.c