]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/bhi: Add BHI stubs
authorPeter Zijlstra <peterz@infradead.org>
Mon, 24 Feb 2025 12:37:11 +0000 (13:37 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 26 Feb 2025 12:48:52 +0000 (13:48 +0100)
commitb815f6877d8063482fe745f098eeef632679aa8a
tree2317f3d3986ea9a7cd5c4cf6e23157cd8b01776e
parent97e59672a9d2aec0c27f6cd6a6b0edfdd6e5a85c
x86/bhi: Add BHI stubs

Add an array of code thunks, to be called from the FineIBT preamble,
clobbering the first 'n' argument registers for speculative execution.

Notably the 0th entry will clobber no argument registers and will never
be used, it exists so the array can be naturally indexed, while the 7th
entry will clobber all the 6 argument registers and also RSP in order to
mess up stack based arguments.

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.717378681@infradead.org
arch/x86/include/asm/cfi.h
arch/x86/lib/Makefile
arch/x86/lib/bhi.S [new file with mode: 0644]