Skip to contentSkip to conversation

tip:x86/entry: fix vdso build restructuring fallout

PATCH Applied H. Peter Anvin 3 participants 9 messages Jan 16 – Jan 18

Subsystems (5)
lore
Share & tools
lore

H. Peter Anvin

author reviewer
#0 lore raw

v2 cover tip:x86/entry: fix vdso build restructuring fallout

After integration in linux-next, the movement of files from the vdso restructuring broke "make vdso_install" and one of the kernel self tests. [Thorsten Leemhuis, kernel test robot]

It also contained an incorrect filtering pattern which although non-manifest at this point, is a forward compatibility bug [Chris Mason]

x86/entry/vdso, selftest: update location of vgetrandom-chacha.S x86/entry/vdso: x86/entry/vdso: fix filtering of compiler flags x86/entry/vdso: update the object paths for "make vdso_install"

---

 arch/x86/Makefile                                | 6 +++---
 arch/x86/entry/vdso/common/Makefile.include      | 6 +++---
 tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
arch/x86/Makefile +3 -3
index 9ab7522ced18..5f881460a8b5 100644
@@ -318,9 +318,9 @@ PHONY += install
 install:
 	$(call cmd,install)
 
-vdso-install-$(CONFIG_X86_64)		+= arch/x86/entry/vdso/vdso64.so.dbg
-vdso-install-$(CONFIG_X86_X32_ABI)	+= arch/x86/entry/vdso/vdsox32.so.dbg
-vdso-install-$(CONFIG_COMPAT_32)	+= arch/x86/entry/vdso/vdso32.so.dbg
+vdso-install-$(CONFIG_X86_64)	   += arch/x86/entry/vdso/vdso64/vdso64.so.dbg
+vdso-install-$(CONFIG_X86_X32_ABI) += arch/x86/entry/vdso/vdso64/vdsox32.so.dbg
+vdso-install-$(CONFIG_COMPAT_32)   += arch/x86/entry/vdso/vdso32/vdso32.so.dbg
 
 archprepare: checkbin
 checkbin:
arch/x86/entry/vdso/common/Makefile.include +3 -3
index 3514b4a6869b..bf5798cb6781 100644
@@ -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)
 
tools/testing/selftests/vDSO/vgetrandom-chacha.S +1 -1
index a4a82e1c28a9..10f982157a1f 100644
@@ -16,5 +16,5 @@
 #elif defined(__s390x__)
 #include "../../../../arch/s390/kernel/vdso64/vgetrandom-chacha.S"
 #elif defined(__x86_64__)
-#include "../../../../arch/x86/entry/vdso/vgetrandom-chacha.S"
+#include "../../../../arch/x86/entry/vdso/vdso64/vgetrandom-chacha.S"
 #endif
author reviewer
#1 lore raw

PATCH v2 1/3 x86/entry/vdso: update the object paths for "make vdso_install"

The location of the vdso binary files in the object tree has changed; update "make vdso_install" to match.

Fixes 693c819fedcd ("x86/entry/vdso: Refactor the vdso build")
---
 arch/x86/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/Makefile +3 -3
index 9ab7522ced18..5f881460a8b5 100644
@@ -318,9 +318,9 @@ PHONY += install
 install:
 	$(call cmd,install)
 
-vdso-install-$(CONFIG_X86_64)		+= arch/x86/entry/vdso/vdso64.so.dbg
-vdso-install-$(CONFIG_X86_X32_ABI)	+= arch/x86/entry/vdso/vdsox32.so.dbg
-vdso-install-$(CONFIG_COMPAT_32)	+= arch/x86/entry/vdso/vdso32.so.dbg
+vdso-install-$(CONFIG_X86_64)	   += arch/x86/entry/vdso/vdso64/vdso64.so.dbg
+vdso-install-$(CONFIG_X86_X32_ABI) += arch/x86/entry/vdso/vdso64/vdsox32.so.dbg
+vdso-install-$(CONFIG_COMPAT_32)   += arch/x86/entry/vdso/vdso32/vdso32.so.dbg
 
 archprepare: checkbin
 checkbin:
Signature · 1 line
2.52.0
merge bot Applied
#2 lore raw

[tip: x86/entry] x86/entry/vdso: Update the object paths for "make vdso_install"

The following commit has been merged into the x86/entry branch of tip:

The following commit has been merged into the x86/entry branch of tip:

Commit-ID:     b3683f3ba079940f91f4a26004250559f170eda9
Gitweb:        https://git.kernel.org/tip/b3683f3ba079940f91f4a26004250559f170eda9
Author:        H. Peter Anvin <[email protected]>
AuthorDate:    Fri, 16 Jan 2026 12:40:54 -08:00
Committer:     Dave Hansen <[email protected]>
CommitterDate: Fri, 16 Jan 2026 12:58:45 -08:00

x86/entry/vdso: Update the object paths for "make vdso_install"

The location of the vdso binary files in the object tree has changed; update "make vdso_install" to match.

---
 arch/x86/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/Makefile +3 -3
index 9ab7522..5f88146 100644
@@ -318,9 +318,9 @@ PHONY += install
 install:
 	$(call cmd,install)
 
-vdso-install-$(CONFIG_X86_64)		+= arch/x86/entry/vdso/vdso64.so.dbg
-vdso-install-$(CONFIG_X86_X32_ABI)	+= arch/x86/entry/vdso/vdsox32.so.dbg
-vdso-install-$(CONFIG_COMPAT_32)	+= arch/x86/entry/vdso/vdso32.so.dbg
+vdso-install-$(CONFIG_X86_64)	   += arch/x86/entry/vdso/vdso64/vdso64.so.dbg
+vdso-install-$(CONFIG_X86_X32_ABI) += arch/x86/entry/vdso/vdso64/vdsox32.so.dbg
+vdso-install-$(CONFIG_COMPAT_32)   += arch/x86/entry/vdso/vdso32/vdso32.so.dbg
 
 archprepare: checkbin
 checkbin:
author reviewer
#3 lore raw

PATCH v2 2/3 x86/entry/vdso: fix filtering of vdso compiler flags

In reply to H. Peter Anvin

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.

Fixes 693c819fedcd ("x86/entry/vdso: Refactor the vdso build")
---
 arch/x86/entry/vdso/common/Makefile.include | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/entry/vdso/common/Makefile.include +3 -3
index 3514b4a6869b..bf5798cb6781 100644
@@ -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)
 
Signature · 1 line
2.52.0
merge bot Applied
#4 lore raw

[tip: x86/entry] x86/entry/vdso: Fix filtering of vdso compiler flags

The following commit has been merged into the x86/entry branch of tip:

The following commit has been merged into the x86/entry branch of tip:

Commit-ID:     a48acbaf99d239e60a09a9e2b7d0f7e9feb62769
Gitweb:        https://git.kernel.org/tip/a48acbaf99d239e60a09a9e2b7d0f7e9feb62769
Author:        H. Peter Anvin <[email protected]>
AuthorDate:    Fri, 16 Jan 2026 12:40:55 -08:00
Committer:     Dave Hansen <[email protected]>
CommitterDate: Fri, 16 Jan 2026 13:25:33 -08:00

x86/entry/vdso: Fix filtering of vdso compiler flags

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"

To the best of my knowledge, none of these actually had any real impact on the build at this time but they are genuine bugs which could break things at any point in the future.

Chris's script also found that "CONFIG_X86_USER_SHADOW_STACK" was missing "CONFIG_", but it needs a different fix.

[ dhansen: remove CONFIG_X86_USER_SHADOW_STACK munging,
add mention in changelog. ]

---
 arch/x86/entry/vdso/common/Makefile.include | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/entry/vdso/common/Makefile.include +2 -2
index 3514b4a..687b3d8 100644
@@ -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)
 
#5 lore raw

Re: [PATCH v2 2/3] x86/entry/vdso: fix filtering of vdso compiler flags

In reply to H. Peter Anvin
First bad commit (maybe != root cause):

Hi Peter,

First bad commit (maybe != root cause):

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/master]
[also build test ERROR on next-20260116]
[cannot apply to tip/auto-latest linus/master v6.19-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/H-Peter-Anvin/x86-entry-vdso-update-the-object-paths-for-make-vdso_install/20260117-044522
base:   tip/master
patch link:    https://lore.kernel.org/r/20260116204057.386268-3-hpa%40zytor.com
patch subject: [PATCH v2 2/3] x86/entry/vdso: fix filtering of vdso compiler flags
config: x86_64-rhel-9.4-func (https://download.01.org/0day-ci/archive/20260118/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260118/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

All errors (new ones prefixed by >>):

In file included from include/linux/compiler_types.h:44,
from <command-line>:
include/linux/compiler-context-analysis.h: In function '_context_unsafe_alias':

>> include/linux/compiler-context-analysis.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     237 | static inline void _context_unsafe_alias(void **p) { }
         | ^~~~~~
   In file included from include/linux/export.h:5,
                    from include/linux/linkage.h:7,
                    from arch/x86/include/asm/cache.h:5,
                    from include/vdso/cache.h:5,
                    from include/linux/cache.h:6,
                    from include/linux/time.h:5,
                    from arch/x86/entry/vdso/vdso64/../common/vclock_gettime.c:11,
                    from arch/x86/entry/vdso/vdso64/vclock_gettime.c:1:
   include/linux/compiler.h: In function 'offset_to_ptr':
   include/linux/compiler.h:272:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     272 | {
         | ^
   In file included from include/asm-generic/rwonce.h:26,
                    from ./arch/x86/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:382:
   include/linux/kasan-checks.h: In function 'kasan_check_read':
   include/linux/kasan-checks.h:41:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
      41 | {
         | ^
   include/linux/kasan-checks.h: In function 'kasan_check_write':
   include/linux/kasan-checks.h:45:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
      45 | {
         | ^
   In file included from include/asm-generic/rwonce.h:27:
   include/linux/kcsan-checks.h: In function '__kcsan_check_access':
   include/linux/kcsan-checks.h:190:41: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     190 |                                         int type) { }
         |                                         ^~~
   include/linux/kcsan-checks.h: In function '__kcsan_mb':
   include/linux/kcsan-checks.h:192:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     192 | static inline void __kcsan_mb(void)                     { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function '__kcsan_wmb':
   include/linux/kcsan-checks.h:193:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     193 | static inline void __kcsan_wmb(void)                    { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function '__kcsan_rmb':
   include/linux/kcsan-checks.h:194:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     194 | static inline void __kcsan_rmb(void)                    { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function '__kcsan_release':
   include/linux/kcsan-checks.h:195:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     195 | static inline void __kcsan_release(void)                { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_disable_current':
   include/linux/kcsan-checks.h:196:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     196 | static inline void kcsan_disable_current(void)          { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_enable_current':
   include/linux/kcsan-checks.h:197:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     197 | static inline void kcsan_enable_current(void)           { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_enable_current_nowarn':
   include/linux/kcsan-checks.h:198:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     198 | static inline void kcsan_enable_current_nowarn(void)    { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_nestable_atomic_begin':
   include/linux/kcsan-checks.h:199:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     199 | static inline void kcsan_nestable_atomic_begin(void)    { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_nestable_atomic_end':
   include/linux/kcsan-checks.h:200:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     200 | static inline void kcsan_nestable_atomic_end(void)      { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_flat_atomic_begin':
   include/linux/kcsan-checks.h:201:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     201 | static inline void kcsan_flat_atomic_begin(void)        { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_flat_atomic_end':
   include/linux/kcsan-checks.h:202:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     202 | static inline void kcsan_flat_atomic_end(void)          { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_atomic_next':
   include/linux/kcsan-checks.h:203:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     203 | static inline void kcsan_atomic_next(int n)             { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_set_access_mask':
   include/linux/kcsan-checks.h:204:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     204 | static inline void kcsan_set_access_mask(unsigned long mask) { }
         | ^~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_begin_scoped_access':
   include/linux/kcsan-checks.h:210:34: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     210 |                           struct kcsan_scoped_access *sa) { return sa; }
         |                                  ^~~~~~~~~~~~~~~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_end_scoped_access':
   include/linux/kcsan-checks.h:211:51: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     211 | static inline void kcsan_end_scoped_access(struct kcsan_scoped_access *sa) { }
         |                                                   ^~~~~~~~~~~~~~~~~~~
   include/linux/kcsan-checks.h: In function 'kcsan_check_access':
   include/linux/kcsan-checks.h:230:39: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     230 |                                       int type) { }
         |                                       ^~~
   include/linux/kcsan-checks.h: In function '__kcsan_enable_current':
   include/linux/kcsan-checks.h:231:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     231 | static inline void __kcsan_enable_current(void)  { }
         | ^~~~~~

include/linux/kcsan-checks.h: In function '__kcsan_disable_current':
include/linux/kcsan-checks.h:232:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
--
include/linux/find.h: In function 'find_first_bit':
include/linux/find.h:207:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible

     207 | {
         | ^
   include/linux/find.h: In function 'find_nth_bit':
   include/linux/find.h:233:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     233 | {
         | ^
   include/linux/find.h: In function 'find_nth_and_bit':
   include/linux/find.h:259:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     259 | {
         | ^
   include/linux/find.h: In function 'find_nth_and_andnot_bit':
   include/linux/find.h:289:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     289 | {
         | ^
   include/linux/find.h: In function 'find_first_and_bit':
   include/linux/find.h:316:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     316 | {
         | ^
   include/linux/find.h: In function 'find_first_andnot_bit':
   include/linux/find.h:340:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     340 | {
         | ^
   include/linux/find.h: In function 'find_first_and_and_bit':
   include/linux/find.h:365:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     365 | {
         | ^
   include/linux/find.h: In function 'find_first_zero_bit':
   include/linux/find.h:386:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     386 | {
         | ^
   include/linux/find.h: In function 'find_last_bit':
   include/linux/find.h:407:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     407 | {
         | ^
   include/linux/find.h: In function 'find_next_and_bit_wrap':
   include/linux/find.h:432:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     432 | {
         | ^
   include/linux/find.h: In function 'find_next_bit_wrap':
   include/linux/find.h:454:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     454 | {
         | ^
   include/linux/find.h: In function '__for_each_wrap':
   include/linux/find.h:471:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     471 | {
         | ^
   include/linux/find.h: In function 'find_next_zero_bit_le':
   include/linux/find.h:511:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     511 | {
         | ^
   include/linux/find.h: In function 'find_next_bit_le':
   include/linux/find.h:517:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     517 | {
         | ^
   include/linux/find.h: In function 'find_first_zero_bit_le':
   include/linux/find.h:523:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     523 | {
         | ^
   In file included from include/linux/bitmap.h:13:
   include/linux/string.h: In function 'memdup_array_user':
   include/linux/string.h:33:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
      33 | {
         | ^
   include/linux/string.h: In function 'vmemdup_array_user':
   include/linux/string.h:53:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
      53 | {
         | ^
   include/linux/string.h: In function 'strstrip':
   include/linux/string.h:190:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     190 | {
         | ^
   include/linux/string.h: In function 'memset_l':
   include/linux/string.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     237 | {
         | ^
   include/linux/string.h: In function 'memset_p':
   include/linux/string.h:245:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     245 | {
         | ^
   include/linux/string.h: In function 'mem_is_zero':
   include/linux/string.h:295:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     295 | {
         | ^
   include/linux/string.h: In function '__free_argv_free':
   include/linux/string.h:316:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     316 | DEFINE_FREE(argv_free, char **, if (!IS_ERR_OR_NULL(_T)) argv_free(_T))
         | ^~~~~~~~~~~
   include/linux/string.h: In function 'memzero_explicit':
   include/linux/string.h:365:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     365 | {
         | ^
   include/linux/string.h: In function 'kbasename':
   include/linux/string.h:380:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     380 | {
         | ^
   In file included from include/linux/fortify-string.h:5,
                    from include/linux/string.h:386:
   include/linux/bitfield.h: In function 'field_multiplier':
>> include/linux/bitfield.h:202:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     202 | {
         | ^
   include/linux/bitfield.h: In function 'field_mask':
   include/linux/bitfield.h:208:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     208 | {
         | ^
   include/linux/bitfield.h: In function 'u8_encode_bits':
   include/linux/bitfield.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     237 | ____MAKE_OP(u8,u8,,)
         | ^~~~~~~~~~~
   include/linux/bitfield.h: In function 'u8_replace_bits':
   include/linux/bitfield.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u8p_replace_bits':
   include/linux/bitfield.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u8_get_bits':
   include/linux/bitfield.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'le16_encode_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     238 | __MAKE_OP(16)
         | ^~~~~~~~~
   include/linux/bitfield.h: In function 'le16_replace_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'le16p_replace_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'le16_get_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be16_encode_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be16_replace_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be16p_replace_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be16_get_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u16_encode_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u16_replace_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u16p_replace_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u16_get_bits':
   include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'le32_encode_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     239 | __MAKE_OP(32)
         | ^~~~~~~~~
   include/linux/bitfield.h: In function 'le32_replace_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'le32p_replace_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'le32_get_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be32_encode_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be32_replace_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be32p_replace_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be32_get_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u32_encode_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u32_replace_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u32p_replace_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u32_get_bits':
   include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'le64_encode_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     240 | __MAKE_OP(64)
         | ^~~~~~~~~
   include/linux/bitfield.h: In function 'le64_replace_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'le64p_replace_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'le64_get_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be64_encode_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be64_replace_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be64p_replace_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'be64_get_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u64_encode_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u64_replace_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u64p_replace_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/bitfield.h: In function 'u64_get_bits':
   include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
   include/linux/fortify-string.h: In function 'strncpy':
   include/linux/fortify-string.h:198:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     198 | {
         | ^

include/linux/fortify-string.h: In function 'strnlen':
include/linux/fortify-string.h:220:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
..

vim +237 include/linux/compiler-context-analysis.h

3269701cb25662 Marco Elver 2025-12-19  221  
3269701cb25662 Marco Elver 2025-12-19  222  /**
3269701cb25662 Marco Elver 2025-12-19  223   * context_unsafe_alias() - helper to insert a context lock "alias barrier"
3269701cb25662 Marco Elver 2025-12-19  224   * @p: pointer aliasing a context lock or object containing context locks
3269701cb25662 Marco Elver 2025-12-19  225   *
3269701cb25662 Marco Elver 2025-12-19  226   * No-op function that acts as a "context lock alias barrier", where the
3269701cb25662 Marco Elver 2025-12-19  227   * analysis rightfully detects that we're switching aliases, but the switch is
3269701cb25662 Marco Elver 2025-12-19  228   * considered safe but beyond the analysis reasoning abilities.
3269701cb25662 Marco Elver 2025-12-19  229   *
3269701cb25662 Marco Elver 2025-12-19  230   * This should be inserted before the first use of such an alias.
3269701cb25662 Marco Elver 2025-12-19  231   *
3269701cb25662 Marco Elver 2025-12-19  232   * Implementation Note: The compiler ignores aliases that may be reassigned but
3269701cb25662 Marco Elver 2025-12-19  233   * their value cannot be determined (e.g. when passing a non-const pointer to an
3269701cb25662 Marco Elver 2025-12-19  234   * alias as a function argument).
3269701cb25662 Marco Elver 2025-12-19  235   */
3269701cb25662 Marco Elver 2025-12-19  236  #define context_unsafe_alias(p) _context_unsafe_alias((void **)&(p))

3269701cb25662 Marco Elver 2025-12-19 @237 static inline void _context_unsafe_alias(void **p) { } 3269701cb25662 Marco Elver 2025-12-19 238

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
author reviewer
#6 lore raw

Re: [PATCH v2 2/3] x86/entry/vdso: fix filtering of vdso compiler flags

Quoted 355 lines · kernel test robot

Hi Peter,

First bad commit (maybe != root cause):

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/master]
[also build test ERROR on next-20260116]
[cannot apply to tip/auto-latest linus/master v6.19-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/H-Peter-Anvin/x86-entry-vdso-update-the-object-paths-for-make-vdso_install/20260117-044522
base:   tip/master
patch link:    https://lore.kernel.org/r/20260116204057.386268-3-hpa%40zytor.com
patch subject: [PATCH v2 2/3] x86/entry/vdso: fix filtering of vdso compiler flags
config: x86_64-rhel-9.4-func (https://download.01.org/0day-ci/archive/20260118/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260118/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

All errors (new ones prefixed by >>):

In file included from include/linux/compiler_types.h:44,
from <command-line>:
include/linux/compiler-context-analysis.h: In function '_context_unsafe_alias':

Quoted 1 line
Quoted 1 line

include/linux/compiler-context-analysis.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible

    237 | static inline void _context_unsafe_alias(void **p) { }
        | ^~~~~~
  In file included from include/linux/export.h:5,
                   from include/linux/linkage.h:7,
                   from arch/x86/include/asm/cache.h:5,
                   from include/vdso/cache.h:5,
                   from include/linux/cache.h:6,
                   from include/linux/time.h:5,
                   from arch/x86/entry/vdso/vdso64/../common/vclock_gettime.c:11,
                   from arch/x86/entry/vdso/vdso64/vclock_gettime.c:1:
  include/linux/compiler.h: In function 'offset_to_ptr':
  include/linux/compiler.h:272:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    272 | {
        | ^
  In file included from include/asm-generic/rwonce.h:26,
                   from ./arch/x86/include/generated/asm/rwonce.h:1,
                   from include/linux/compiler.h:382:
  include/linux/kasan-checks.h: In function 'kasan_check_read':
  include/linux/kasan-checks.h:41:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     41 | {
        | ^
  include/linux/kasan-checks.h: In function 'kasan_check_write':
  include/linux/kasan-checks.h:45:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     45 | {
        | ^
  In file included from include/asm-generic/rwonce.h:27:
  include/linux/kcsan-checks.h: In function '__kcsan_check_access':
  include/linux/kcsan-checks.h:190:41: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    190 |                                         int type) { }
        |                                         ^~~
  include/linux/kcsan-checks.h: In function '__kcsan_mb':
  include/linux/kcsan-checks.h:192:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    192 | static inline void __kcsan_mb(void)                     { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function '__kcsan_wmb':
  include/linux/kcsan-checks.h:193:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    193 | static inline void __kcsan_wmb(void)                    { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function '__kcsan_rmb':
  include/linux/kcsan-checks.h:194:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    194 | static inline void __kcsan_rmb(void)                    { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function '__kcsan_release':
  include/linux/kcsan-checks.h:195:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    195 | static inline void __kcsan_release(void)                { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_disable_current':
  include/linux/kcsan-checks.h:196:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    196 | static inline void kcsan_disable_current(void)          { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_enable_current':
  include/linux/kcsan-checks.h:197:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    197 | static inline void kcsan_enable_current(void)           { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_enable_current_nowarn':
  include/linux/kcsan-checks.h:198:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    198 | static inline void kcsan_enable_current_nowarn(void)    { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_nestable_atomic_begin':
  include/linux/kcsan-checks.h:199:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    199 | static inline void kcsan_nestable_atomic_begin(void)    { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_nestable_atomic_end':
  include/linux/kcsan-checks.h:200:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    200 | static inline void kcsan_nestable_atomic_end(void)      { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_flat_atomic_begin':
  include/linux/kcsan-checks.h:201:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    201 | static inline void kcsan_flat_atomic_begin(void)        { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_flat_atomic_end':
  include/linux/kcsan-checks.h:202:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    202 | static inline void kcsan_flat_atomic_end(void)          { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_atomic_next':
  include/linux/kcsan-checks.h:203:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    203 | static inline void kcsan_atomic_next(int n)             { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_set_access_mask':
  include/linux/kcsan-checks.h:204:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    204 | static inline void kcsan_set_access_mask(unsigned long mask) { }
        | ^~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_begin_scoped_access':
  include/linux/kcsan-checks.h:210:34: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    210 |                           struct kcsan_scoped_access *sa) { return sa; }
        |                                  ^~~~~~~~~~~~~~~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_end_scoped_access':
  include/linux/kcsan-checks.h:211:51: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    211 | static inline void kcsan_end_scoped_access(struct kcsan_scoped_access *sa) { }
        |                                                   ^~~~~~~~~~~~~~~~~~~
  include/linux/kcsan-checks.h: In function 'kcsan_check_access':
  include/linux/kcsan-checks.h:230:39: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    230 |                                       int type) { }
        |                                       ^~~
  include/linux/kcsan-checks.h: In function '__kcsan_enable_current':
  include/linux/kcsan-checks.h:231:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    231 | static inline void __kcsan_enable_current(void)  { }
        | ^~~~~~

include/linux/kcsan-checks.h: In function '__kcsan_disable_current':
include/linux/kcsan-checks.h:232:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
--
include/linux/find.h: In function 'find_first_bit':
include/linux/find.h:207:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible

    207 | {
        | ^
  include/linux/find.h: In function 'find_nth_bit':
  include/linux/find.h:233:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    233 | {
        | ^
  include/linux/find.h: In function 'find_nth_and_bit':
  include/linux/find.h:259:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    259 | {
        | ^
  include/linux/find.h: In function 'find_nth_and_andnot_bit':
  include/linux/find.h:289:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    289 | {
        | ^
  include/linux/find.h: In function 'find_first_and_bit':
  include/linux/find.h:316:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    316 | {
        | ^
  include/linux/find.h: In function 'find_first_andnot_bit':
  include/linux/find.h:340:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    340 | {
        | ^
  include/linux/find.h: In function 'find_first_and_and_bit':
  include/linux/find.h:365:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    365 | {
        | ^
  include/linux/find.h: In function 'find_first_zero_bit':
  include/linux/find.h:386:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    386 | {
        | ^
  include/linux/find.h: In function 'find_last_bit':
  include/linux/find.h:407:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    407 | {
        | ^
  include/linux/find.h: In function 'find_next_and_bit_wrap':
  include/linux/find.h:432:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    432 | {
        | ^
  include/linux/find.h: In function 'find_next_bit_wrap':
  include/linux/find.h:454:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    454 | {
        | ^
  include/linux/find.h: In function '__for_each_wrap':
  include/linux/find.h:471:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    471 | {
        | ^
  include/linux/find.h: In function 'find_next_zero_bit_le':
  include/linux/find.h:511:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    511 | {
        | ^
  include/linux/find.h: In function 'find_next_bit_le':
  include/linux/find.h:517:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    517 | {
        | ^
  include/linux/find.h: In function 'find_first_zero_bit_le':
  include/linux/find.h:523:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    523 | {
        | ^
  In file included from include/linux/bitmap.h:13:
  include/linux/string.h: In function 'memdup_array_user':
  include/linux/string.h:33:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     33 | {
        | ^
  include/linux/string.h: In function 'vmemdup_array_user':
  include/linux/string.h:53:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
     53 | {
        | ^
  include/linux/string.h: In function 'strstrip':
  include/linux/string.h:190:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    190 | {
        | ^
  include/linux/string.h: In function 'memset_l':
  include/linux/string.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    237 | {
        | ^
  include/linux/string.h: In function 'memset_p':
  include/linux/string.h:245:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    245 | {
        | ^
  include/linux/string.h: In function 'mem_is_zero':
  include/linux/string.h:295:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    295 | {
        | ^
  include/linux/string.h: In function '__free_argv_free':
  include/linux/string.h:316:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    316 | DEFINE_FREE(argv_free, char **, if (!IS_ERR_OR_NULL(_T)) argv_free(_T))
        | ^~~~~~~~~~~
  include/linux/string.h: In function 'memzero_explicit':
  include/linux/string.h:365:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    365 | {
        | ^
  include/linux/string.h: In function 'kbasename':
  include/linux/string.h:380:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    380 | {
        | ^

In file included from include/linux/fortify-string.h:5,
from include/linux/string.h:386:
include/linux/bitfield.h: In function 'field_multiplier':

Quoted 1 line
Quoted 1 line

include/linux/bitfield.h:202:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible

    202 | {
        | ^
  include/linux/bitfield.h: In function 'field_mask':
  include/linux/bitfield.h:208:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    208 | {
        | ^
  include/linux/bitfield.h: In function 'u8_encode_bits':
  include/linux/bitfield.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    237 | ____MAKE_OP(u8,u8,,)
        | ^~~~~~~~~~~
  include/linux/bitfield.h: In function 'u8_replace_bits':
  include/linux/bitfield.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u8p_replace_bits':
  include/linux/bitfield.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u8_get_bits':
  include/linux/bitfield.h:237:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'le16_encode_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    238 | __MAKE_OP(16)
        | ^~~~~~~~~
  include/linux/bitfield.h: In function 'le16_replace_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'le16p_replace_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'le16_get_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be16_encode_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be16_replace_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be16p_replace_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be16_get_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u16_encode_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u16_replace_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u16p_replace_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u16_get_bits':
  include/linux/bitfield.h:238:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'le32_encode_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    239 | __MAKE_OP(32)
        | ^~~~~~~~~
  include/linux/bitfield.h: In function 'le32_replace_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'le32p_replace_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'le32_get_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be32_encode_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be32_replace_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be32p_replace_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be32_get_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u32_encode_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u32_replace_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u32p_replace_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u32_get_bits':
  include/linux/bitfield.h:239:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'le64_encode_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    240 | __MAKE_OP(64)
        | ^~~~~~~~~
  include/linux/bitfield.h: In function 'le64_replace_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'le64p_replace_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'le64_get_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be64_encode_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be64_replace_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be64p_replace_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'be64_get_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u64_encode_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u64_replace_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u64p_replace_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/bitfield.h: In function 'u64_get_bits':
  include/linux/bitfield.h:240:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
  include/linux/fortify-string.h: In function 'strncpy':
  include/linux/fortify-string.h:198:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
    198 | {
        | ^

include/linux/fortify-string.h: In function 'strnlen':
include/linux/fortify-string.h:220:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible
..

vim +237 include/linux/compiler-context-analysis.h

3269701cb25662 Marco Elver 2025-12-19  221  
3269701cb25662 Marco Elver 2025-12-19  222  /**
3269701cb25662 Marco Elver 2025-12-19  223   * context_unsafe_alias() - helper to insert a context lock "alias barrier"
3269701cb25662 Marco Elver 2025-12-19  224   * @p: pointer aliasing a context lock or object containing context locks
3269701cb25662 Marco Elver 2025-12-19  225   *
3269701cb25662 Marco Elver 2025-12-19  226   * No-op function that acts as a "context lock alias barrier", where the
3269701cb25662 Marco Elver 2025-12-19  227   * analysis rightfully detects that we're switching aliases, but the switch is
3269701cb25662 Marco Elver 2025-12-19  228   * considered safe but beyond the analysis reasoning abilities.
3269701cb25662 Marco Elver 2025-12-19  229   *
3269701cb25662 Marco Elver 2025-12-19  230   * This should be inserted before the first use of such an alias.
3269701cb25662 Marco Elver 2025-12-19  231   *
3269701cb25662 Marco Elver 2025-12-19  232   * Implementation Note: The compiler ignores aliases that may be reassigned but
3269701cb25662 Marco Elver 2025-12-19  233   * their value cannot be determined (e.g. when passing a non-const pointer to an
3269701cb25662 Marco Elver 2025-12-19  234   * alias as a function argument).
3269701cb25662 Marco Elver 2025-12-19  235   */
3269701cb25662 Marco Elver 2025-12-19  236  #define context_unsafe_alias(p) _context_unsafe_alias((void **)&(p))
Quoted 3 lines

3269701cb25662 Marco Elver 2025-12-19 @237 static inline void _context_unsafe_alias(void **p) { } 3269701cb25662 Marco Elver 2025-12-19 238

For the record: already fixed.

author reviewer
#7 lore raw

PATCH v2 3/3 x86/entry/vdso, selftest: update location of vgetrandom-chacha.S

In reply to H. Peter Anvin

As part of the vdso build restructuring, vgetrandom-chacha.S moved into the vdso/vdso64 subdirectory. Update the selftest #include to match.

Fixes 693c819fedcd ("x86/entry/vdso: Refactor the vdso build")
---
 tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/vDSO/vgetrandom-chacha.S +1 -1
index a4a82e1c28a9..10f982157a1f 100644
@@ -16,5 +16,5 @@
 #elif defined(__s390x__)
 #include "../../../../arch/s390/kernel/vdso64/vgetrandom-chacha.S"
 #elif defined(__x86_64__)
-#include "../../../../arch/x86/entry/vdso/vgetrandom-chacha.S"
+#include "../../../../arch/x86/entry/vdso/vdso64/vgetrandom-chacha.S"
 #endif
Signature · 1 line
2.52.0
merge bot Applied
#8 lore raw

[tip: x86/entry] x86/entry/vdso/selftest: Update location of vgetrandom-chacha.S

The following commit has been merged into the x86/entry branch of tip:

The following commit has been merged into the x86/entry branch of tip:

Commit-ID:     db7855c96d4216b2ed45e2781fae9293b323c7ef
Gitweb:        https://git.kernel.org/tip/db7855c96d4216b2ed45e2781fae9293b323c7ef
Author:        H. Peter Anvin <[email protected]>
AuthorDate:    Fri, 16 Jan 2026 12:40:56 -08:00
Committer:     Dave Hansen <[email protected]>
CommitterDate: Fri, 16 Jan 2026 13:25:44 -08:00

x86/entry/vdso/selftest: Update location of vgetrandom-chacha.S

As part of the vdso build restructuring, vgetrandom-chacha.S moved into the vdso/vdso64 subdirectory. Update the selftest #include to match.

---
 tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/vDSO/vgetrandom-chacha.S +1 -1
index a4a82e1..10f9821 100644
@@ -16,5 +16,5 @@
 #elif defined(__s390x__)
 #include "../../../../arch/s390/kernel/vdso64/vgetrandom-chacha.S"
 #elif defined(__x86_64__)
-#include "../../../../arch/x86/entry/vdso/vgetrandom-chacha.S"
+#include "../../../../arch/x86/entry/vdso/vdso64/vgetrandom-chacha.S"
 #endif