public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [mark:randomize-kstack-siphash 1/1] arch/x86/include/asm/entry-common.h:95:2: error: call to undeclared function 'choose_random_kstack_offset'; ISO C99 and later do not support implicit function declarations
@ 2025-11-26  3:37 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-26  3:37 UTC (permalink / raw)
  To: Mark Rutland; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git randomize-kstack-siphash
head:   0783912db6e30339d55a5dc7eb6a696b440bedb3
commit: 0783912db6e30339d55a5dc7eb6a696b440bedb3 [1/1] HACK: use siphash to generate kstack offset per-task
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251126/202511260422.Q4byvNJU-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251126/202511260422.Q4byvNJU-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511260422.Q4byvNJU-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/x86/entry/syscall_64.c:8:
   In file included from include/linux/entry-common.h:5:
   In file included from include/linux/irq-entry-common.h:12:
>> arch/x86/include/asm/entry-common.h:95:2: error: call to undeclared function 'choose_random_kstack_offset'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      95 |         choose_random_kstack_offset(rdtsc());
         |         ^
>> arch/x86/entry/syscall_64.c:89:2: error: call to undeclared function 'add_random_kstack_offset'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      89 |         add_random_kstack_offset();
         |         ^
   2 errors generated.
--
   In file included from arch/x86/entry/entry_fred.c:12:
   In file included from arch/x86/include/asm/idtentry.h:11:
   In file included from include/linux/entry-common.h:5:
   In file included from include/linux/irq-entry-common.h:12:
>> arch/x86/include/asm/entry-common.h:95:2: error: call to undeclared function 'choose_random_kstack_offset'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      95 |         choose_random_kstack_offset(rdtsc());
         |         ^
   1 error generated.


vim +/choose_random_kstack_offset +95 arch/x86/include/asm/entry-common.h

fe950f6020338c Kees Cook       2021-04-01   84  
fe950f6020338c Kees Cook       2021-04-01   85  	/*
6db1208bf95b4c Kees Cook       2024-06-19   86  	 * This value will get limited by KSTACK_OFFSET_MAX(), which is 10
6db1208bf95b4c Kees Cook       2024-06-19   87  	 * bits. The actual entropy will be further reduced by the compiler
6db1208bf95b4c Kees Cook       2024-06-19   88  	 * when applying stack alignment constraints (see cc_stack_align4/8 in
fe950f6020338c Kees Cook       2021-04-01   89  	 * arch/x86/Makefile), which will remove the 3 (x86_64) or 2 (ia32)
fe950f6020338c Kees Cook       2021-04-01   90  	 * low bits from any entropy chosen here.
fe950f6020338c Kees Cook       2021-04-01   91  	 *
6db1208bf95b4c Kees Cook       2024-06-19   92  	 * Therefore, final stack offset entropy will be 7 (x86_64) or
6db1208bf95b4c Kees Cook       2024-06-19   93  	 * 8 (ia32) bits.
fe950f6020338c Kees Cook       2021-04-01   94  	 */
6db1208bf95b4c Kees Cook       2024-06-19  @95  	choose_random_kstack_offset(rdtsc());
2f8f173413f1cb Pawan Gupta     2025-08-14   96  
2f8f173413f1cb Pawan Gupta     2025-08-14   97  	/* Avoid unnecessary reads of 'x86_ibpb_exit_to_user' */
2f8f173413f1cb Pawan Gupta     2025-08-14   98  	if (cpu_feature_enabled(X86_FEATURE_IBPB_EXIT_TO_USER) &&
2f8f173413f1cb Pawan Gupta     2025-08-14   99  	    this_cpu_read(x86_ibpb_exit_to_user)) {
2f8f173413f1cb Pawan Gupta     2025-08-14  100  		indirect_branch_prediction_barrier();
2f8f173413f1cb Pawan Gupta     2025-08-14  101  		this_cpu_write(x86_ibpb_exit_to_user, false);
2f8f173413f1cb Pawan Gupta     2025-08-14  102  	}
167fd210ec0555 Thomas Gleixner 2020-07-23  103  }
167fd210ec0555 Thomas Gleixner 2020-07-23  104  #define arch_exit_to_user_mode_prepare arch_exit_to_user_mode_prepare
167fd210ec0555 Thomas Gleixner 2020-07-23  105  

:::::: The code at line 95 was first introduced by commit
:::::: 6db1208bf95b4c091897b597c415e11edeab2e2d randomize_kstack: Remove non-functional per-arch entropy filtering

:::::: TO: Kees Cook <kees@kernel.org>
:::::: CC: Kees Cook <kees@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-26  3:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26  3:37 [mark:randomize-kstack-siphash 1/1] arch/x86/include/asm/entry-common.h:95:2: error: call to undeclared function 'choose_random_kstack_offset'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox