projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e8c4ed
)
x86/asm: Avoid generating unused kprobe sections
author
Kees Cook
<keescook@chromium.org>
Fri, 21 Aug 2020 19:43:03 +0000
(12:43 -0700)
committer
Ingo Molnar
<mingo@kernel.org>
Tue, 1 Sep 2020 08:03:18 +0000
(10:03 +0200)
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
arch/x86/include/asm/asm.h
patch
|
blob
|
history
diff --git
a/arch/x86/include/asm/asm.h
b/arch/x86/include/asm/asm.h
index 5c15f95b1ba75a373ef1e6acfb726052d8e17e02..4712206c43259f243d2e7895f93a7b316fc8ab80 100644
(file)
--- a/
arch/x86/include/asm/asm.h
+++ b/
arch/x86/include/asm/asm.h
@@
-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