Re: Reference to non-existing CONFIG_X86_FEATURE_CALL_DEPTH

From: Peter Zijlstra
Date: Mon Oct 31 2022 - 06:11:23 EST


On Mon, Oct 31, 2022 at 10:14:03AM +0100, Lukas Bulwahn wrote:
> Dear Thomas, dear Peter,
>
> in your work on call depth tracking mitigation, commit 5d8213864ade
> ("x86/retbleed: Add SKL return thunk") on linux-next references the
> configuration symbol CONFIG_X86_FEATURE_CALL_DEPTH, which is not
> introduced in any Kconfig file.
>
> Is this just some left-over from some previous iteration of this
> feature or is there still a patch to come that will introduce that
> configuration symbol in some Kconfig file?
>
> This issue was identified with ./scripts/checkkconfigsymbols.py.

Thanks!

---
Subject: x86: Unconfuse CONFIG_ and X86_FEATURE_ namespaces
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>

Lukas reported someone fat fingered the CONFIG_ symbol; fix er up.

Fixes: 5d8213864ade ("x86/retbleed: Add SKL return thunk")
Reported-by: Lukas Bulwahn <lukas.bulwahn@xxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---

diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index 82580adbca4b..3ab90f23e7f7 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -285,7 +285,7 @@
*/
.macro UNTRAIN_RET
#if defined(CONFIG_CPU_UNRET_ENTRY) || defined(CONFIG_CPU_IBPB_ENTRY) || \
- defined(CONFIG_X86_FEATURE_CALL_DEPTH)
+ defined(CONFIG_CALL_DEPTH_TRACKING)
ANNOTATE_UNRET_END
ALTERNATIVE_3 "", \
CALL_ZEN_UNTRAIN_RET, X86_FEATURE_UNRET, \
@@ -296,7 +296,7 @@

.macro UNTRAIN_RET_FROM_CALL
#if defined(CONFIG_CPU_UNRET_ENTRY) || defined(CONFIG_CPU_IBPB_ENTRY) || \
- defined(CONFIG_X86_FEATURE_CALL_DEPTH)
+ defined(CONFIG_CALL_DEPTH_TRACKING)
ANNOTATE_UNRET_END
ALTERNATIVE_3 "", \
CALL_ZEN_UNTRAIN_RET, X86_FEATURE_UNRET, \