]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/ibt: Optimize the FineIBT instruction sequence
authorPeter Zijlstra <peterz@infradead.org>
Mon, 24 Feb 2025 12:37:08 +0000 (13:37 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 26 Feb 2025 11:24:09 +0000 (12:24 +0100)
commit06926c6cdb955bf24521d4e13af95b4d062d02d0
treeba8f9d9d2c26983f3b3968d8e7ff22776e3057cd
parente33d805a1005bf7b8a5a53559c81a8e17f0b981b
x86/ibt: Optimize the FineIBT instruction sequence

Scott notes that non-taken branches are faster. Abuse overlapping code
that traps instead of explicit UD2 instructions.

And LEA does not modify flags and will have less dependencies.

Suggested-by: Scott Constable <scott.d.constable@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/r/20250224124200.371942555@infradead.org
arch/x86/kernel/alternative.c
arch/x86/net/bpf_jit_comp.c