x86/asm: Avoid generating unused kprobe sections
When !CONFIG_KPROBES, do not generate kprobe sections. This makes sure there are no unexpected sections encountered by the linker scripts. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20200821194310.3089815-23-keescook@chromium.org
This commit is contained in:
parent
7e8c4ed263
commit
a850958c07
@ -138,11 +138,15 @@
|
||||
# define _ASM_EXTABLE_FAULT(from, to) \
|
||||
_ASM_EXTABLE_HANDLE(from, to, ex_handler_fault)
|
||||
|
||||
# define _ASM_NOKPROBE(entry) \
|
||||
# ifdef CONFIG_KPROBES
|
||||
# define _ASM_NOKPROBE(entry) \
|
||||
.pushsection "_kprobe_blacklist","aw" ; \
|
||||
_ASM_ALIGN ; \
|
||||
_ASM_PTR (entry); \
|
||||
.popsection
|
||||
# else
|
||||
# define _ASM_NOKPROBE(entry)
|
||||
# endif
|
||||
|
||||
#else /* ! __ASSEMBLY__ */
|
||||
# define _EXPAND_EXTABLE_HANDLE(x) #x
|
||||
|
Loading…
x
Reference in New Issue
Block a user