]> git.baikalelectronics.ru Git - kernel.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)
commite631695e630412efda15126cd4b372c218a9287a
tree4e429b976672a1634463f7792a84604a80a63d82
parent512c1a4d6474a7f27ea0796fcdd9a7f4cb75a549
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]