x86/ibt: use noinstr for is_endbr()
PATCH 1/1 x86/ibt: use noinstr for is_endbr()
Make is_endbr() invisible to tracing, which has security benefits, as we discussed in [1].
Signed-off-by Menglong Dong <[email protected]>
--- arch/x86/include/asm/ibt.h | 2 +- arch/x86/kernel/alternative.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/include/asm/ibt.h +1 -1
@@ -65,7 +65,7 @@ static __always_inline __attribute_const__ u32 gen_endbr_poison(void)return 0xd6401f0f ;/* nopl -42(%rax) */ } -static inline bool __is_endbr (u32 val) +static __always_inline bool __is_endbr(u32 val) {if (val ==gen_endbr_poison ())return true;
arch/x86/kernel/alternative.c +1 -1
@@ -1108,7 +1108,7 @@ void __init_or_module noinline apply_returns(s32 *start, s32 *end) { }#ifdef CONFIG_X86_KERNEL_IBT -__noendbr bool is_endbr(u32 *val) +__noendbr noinstr bool is_endbr(u32 *val) {u32 endbr;
Signature · 1 line
2.51.0