diff options
author | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-09-04 22:04:53 -0700 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2023-10-20 11:46:59 +0200 |
commit | eeb9f34df065f42f0c9195b322ba6df420c9fc92 (patch) | |
tree | 36ec73110e040e9edefe75b083c43e8f38dc04ef /include/linux/objtool.h | |
parent | dc6306ad5b0dda040baf1fde3cfd458e6abfc4da (diff) | |
download | linux-eeb9f34df065f42f0c9195b322ba6df420c9fc92.tar.gz linux-eeb9f34df065f42f0c9195b322ba6df420c9fc92.tar.bz2 linux-eeb9f34df065f42f0c9195b322ba6df420c9fc92.zip |
x86/srso: Fix unret validation dependencies
CONFIG_CPU_SRSO isn't dependent on CONFIG_CPU_UNRET_ENTRY (AMD
Retbleed), so the two features are independently configurable. Fix
several issues for the (presumably rare) case where CONFIG_CPU_SRSO is
enabled but CONFIG_CPU_UNRET_ENTRY isn't.
Fixes: fb3bd914b3ec ("x86/srso: Add a Speculative RAS Overflow mitigation")
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/299fb7740174d0f2335e91c58af0e9c242b4bac1.1693889988.git.jpoimboe@kernel.org
Diffstat (limited to 'include/linux/objtool.h')
-rw-r--r-- | include/linux/objtool.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/objtool.h b/include/linux/objtool.h index 03f82c2c2ebf..b5440e7da55b 100644 --- a/include/linux/objtool.h +++ b/include/linux/objtool.h @@ -130,7 +130,8 @@ * it will be ignored. */ .macro VALIDATE_UNRET_BEGIN -#if defined(CONFIG_NOINSTR_VALIDATION) && defined(CONFIG_CPU_UNRET_ENTRY) +#if defined(CONFIG_NOINSTR_VALIDATION) && \ + (defined(CONFIG_CPU_UNRET_ENTRY) || defined(CONFIG_CPU_SRSO)) .Lhere_\@: .pushsection .discard.validate_unret .long .Lhere_\@ - . |