]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/ibt: Base IBT bits
authorPeter Zijlstra <peterz@infradead.org>
Tue, 8 Mar 2022 15:30:17 +0000 (16:30 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 15 Mar 2022 09:32:33 +0000 (10:32 +0100)
commit156ff4a544ae13c5fd6759a09ecb069f7059c1a1
tree4e429b976672a1634463f7792a84604a80a63d82
parent5cff2086b01526b8c7deacc86473ffbab0cddfa9
x86/ibt: Base IBT bits

Add Kconfig, Makefile and basic instruction support for x86 IBT.

(Ab)use __DISABLE_EXPORTS to disable IBT since it's already employed
to mark compressed and purgatory. Additionally mark realmode with it
as well to avoid inserting ENDBR instructions there. While ENDBR is
technically a NOP, inserting them was causing some grief due to code
growth. There's also a problem with using __noendbr in code compiled
without -fcf-protection=branch.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20220308154317.519875203@infradead.org
arch/x86/Kconfig
arch/x86/Makefile
arch/x86/include/asm/ibt.h [new file with mode: 0644]