[PATCH v2 2/3] x86/entry/vdso: fix filtering of vdso compiler flags
From: H. Peter Anvin
Date: Fri Jan 16 2026 - 15:41:42 EST
This fixes several typos in the filtering of compiler flags for vdso,
discovered by Chris Mason using an AI script:
1. "-fno-PIE" was written as "fno-PIE".
2. "CC_PLUGINS_FLAGS" was written as "CC_PLUGIN_FLAGS"
3. "CONFIG_X86_USER_SHADOW_STACK" was missing "CONFIG_".
To the best of my knowledge, none of these actually had any real
impact on the build at this time (the shadow stack option, in
particular, used happens to not generate any code), but they are
genuine bugs which could break things at any point in the future.
Reported-by: Chris Mason <clm@xxxxxxxx>
Closes: https://lore.kernel.org/20260116035807.2307742-1-clm@xxxxxxxx
Fixes: 693c819fedcd ("x86/entry/vdso: Refactor the vdso build")
Signed-off-by: H. Peter Anvin (Intel) <hpa@xxxxxxxxx>
---
arch/x86/entry/vdso/common/Makefile.include | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/entry/vdso/common/Makefile.include b/arch/x86/entry/vdso/common/Makefile.include
index 3514b4a6869b..bf5798cb6781 100644
--- a/arch/x86/entry/vdso/common/Makefile.include
+++ b/arch/x86/entry/vdso/common/Makefile.include
@@ -23,9 +23,9 @@ $(obj)/%.lds : KBUILD_CPPFLAGS += $(CPPFLAGS_VDSO_LDS)
#
flags-remove-y += \
-D__KERNEL__ -mcmodel=kernel -mregparm=3 \
- -fno-pic -fno-PIC -fno-pie fno-PIE \
+ -fno-pic -fno-PIC -fno-pie -fno-PIE \
-mfentry -pg \
- $(RANDSTRUCT_CFLAGS) $(GCC_PLUGIN_CFLAGS) $(KSTACK_ERASE_CFLAGS) \
+ $(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) $(KSTACK_ERASE_CFLAGS) \
$(RETPOLINE_CFLAGS) $(CC_FLAGS_LTO) $(CC_FLAGS_CFI) \
$(PADDING_CFLAGS)
@@ -45,7 +45,7 @@ flags-y += -fasynchronous-unwind-tables
# Reset cf protections enabled by compiler default
flags-y += $(call cc-option, -fcf-protection=none)
-flags-$(X86_USER_SHADOW_STACK) += $(call cc-option, -fcf-protection=return)
+flags-$(CONFIG_X86_USER_SHADOW_STACK) += $(call cc-option, -fcf-protection=return)
# When user space IBT is supported, enable this.
# flags-$(CONFIG_USER_IBT) += $(call cc-option, -fcf-protection=branch)
--
2.52.0