[PATCH 16/18] objtool: Add HAVE_NOINSTR_VALIDATION
From: Josh Poimboeuf
Date: Wed Apr 13 2022 - 19:21:20 EST
Remove CONFIG_NOINSTR_VALIDATION's dependency on HAVE_OBJTOOL, since
other arches might want to implement objtool without it.
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
arch/Kconfig | 3 +++
arch/x86/Kconfig | 1 +
lib/Kconfig.debug | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index cb5fc88cb996..d0c00564bbf8 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1031,6 +1031,9 @@ config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
config HAVE_OBJTOOL
bool
+config HAVE_NOINSTR_VALIDATION
+ bool
+
config HAVE_TOOLCHAIN_HACKS
bool
select OBJTOOL
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 410c4e2c7390..c73ca72f5d98 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -231,6 +231,7 @@ config X86
select HAVE_MOVE_PMD
select HAVE_MOVE_PUD
select HAVE_NMI
+ select HAVE_NOINSTR_VALIDATION if HAVE_OBJTOOL
select HAVE_OBJTOOL if X86_64
select HAVE_TOOLCHAIN_HACKS if HAVE_OBJTOOL
select HAVE_OPTPROBES
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index be6ca70d558a..b5fa86994fd3 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -502,7 +502,7 @@ config STACK_VALIDATION
config NOINSTR_VALIDATION
bool
- depends on HAVE_OBJTOOL && DEBUG_ENTRY
+ depends on HAVE_NOINSTR_VALIDATION && DEBUG_ENTRY
select OBJTOOL
default y
--
2.34.1