Skip to contentSkip to conversation

kernel/entry/common.c:52:23: error: implicit declaration of function '__secure_computing'

PATCH kernel test robot 1 participant 1 message Jan 6, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git b4/arm-generic-entry-v6.13-rc1
head:   72565935c9fa6a95a0e09d94f3041e639828b28b
commit: 01bb4c148b36f75488ad6814f26e927881b969a8 [30/32] ARM: entry: Convert to generic entry
config: arm-randconfig-004-20250106 (https://download.01.org/0day-ci/archive/20250106/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250106/[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/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

kernel/entry/common.c: In function 'syscall_trace_enter':

>> kernel/entry/common.c:52:23: error: implicit declaration of function '__secure_computing' [-Wimplicit-function-declaration]
      52 |                 ret = __secure_computing(NULL);
         |                       ^~~~~~~~~~~~~~~~~~

vim +/__secure_computing +52 kernel/entry/common.c

142781e108b13b Thomas Gleixner         2020-07-22  27  
221a164035fd8b Sven Schnelle           2023-12-18  28  long syscall_trace_enter(struct pt_regs *regs, long syscall,
2991552447707d Gabriel Krisman Bertazi 2020-11-16  29  				unsigned long work)
142781e108b13b Thomas Gleixner         2020-07-22  30  {
142781e108b13b Thomas Gleixner         2020-07-22  31  	long ret = 0;
142781e108b13b Thomas Gleixner         2020-07-22  32  
11894468e39def Gabriel Krisman Bertazi 2020-11-27  33  	/*
11894468e39def Gabriel Krisman Bertazi 2020-11-27  34  	 * Handle Syscall User Dispatch.  This must comes first, since
11894468e39def Gabriel Krisman Bertazi 2020-11-27  35  	 * the ABI here can be something that doesn't make sense for
11894468e39def Gabriel Krisman Bertazi 2020-11-27  36  	 * other syscall_work features.
11894468e39def Gabriel Krisman Bertazi 2020-11-27  37  	 */
11894468e39def Gabriel Krisman Bertazi 2020-11-27  38  	if (work & SYSCALL_WORK_SYSCALL_USER_DISPATCH) {
11894468e39def Gabriel Krisman Bertazi 2020-11-27  39  		if (syscall_user_dispatch(regs))
11894468e39def Gabriel Krisman Bertazi 2020-11-27  40  			return -1L;
11894468e39def Gabriel Krisman Bertazi 2020-11-27  41  	}
11894468e39def Gabriel Krisman Bertazi 2020-11-27  42  
142781e108b13b Thomas Gleixner         2020-07-22  43  	/* Handle ptrace */
64eb35f701f04b Gabriel Krisman Bertazi 2020-11-16  44  	if (work & (SYSCALL_WORK_SYSCALL_TRACE | SYSCALL_WORK_SYSCALL_EMU)) {
0cfcb2b9ef48bb Eric W. Biederman       2022-01-27  45  		ret = ptrace_report_syscall_entry(regs);
64eb35f701f04b Gabriel Krisman Bertazi 2020-11-16  46  		if (ret || (work & SYSCALL_WORK_SYSCALL_EMU))
142781e108b13b Thomas Gleixner         2020-07-22  47  			return -1L;
142781e108b13b Thomas Gleixner         2020-07-22  48  	}
142781e108b13b Thomas Gleixner         2020-07-22  49  
142781e108b13b Thomas Gleixner         2020-07-22  50  	/* Do seccomp after ptrace, to catch any tracer changes. */
23d67a54857a76 Gabriel Krisman Bertazi 2020-11-16  51  	if (work & SYSCALL_WORK_SECCOMP) {
142781e108b13b Thomas Gleixner         2020-07-22 @52  		ret = __secure_computing(NULL);
142781e108b13b Thomas Gleixner         2020-07-22  53  		if (ret == -1L)
142781e108b13b Thomas Gleixner         2020-07-22  54  			return ret;
142781e108b13b Thomas Gleixner         2020-07-22  55  	}
142781e108b13b Thomas Gleixner         2020-07-22  56  
b6ec413461034d Kees Cook               2020-09-11  57  	/* Either of the above might have changed the syscall number */
b6ec413461034d Kees Cook               2020-09-11  58  	syscall = syscall_get_nr(current, regs);
b6ec413461034d Kees Cook               2020-09-11  59  
fb13b11d53875e André Rösti             2024-03-11  60  	if (unlikely(work & SYSCALL_WORK_SYSCALL_TRACEPOINT)) {
142781e108b13b Thomas Gleixner         2020-07-22  61  		trace_sys_enter(regs, syscall);
fb13b11d53875e André Rösti             2024-03-11  62  		/*
fb13b11d53875e André Rösti             2024-03-11  63  		 * Probes or BPF hooks in the tracepoint may have changed the
fb13b11d53875e André Rösti             2024-03-11  64  		 * system call number as well.
fb13b11d53875e André Rösti             2024-03-11  65  		 */
fb13b11d53875e André Rösti             2024-03-11  66  		syscall = syscall_get_nr(current, regs);
fb13b11d53875e André Rösti             2024-03-11  67  	}
142781e108b13b Thomas Gleixner         2020-07-22  68  
142781e108b13b Thomas Gleixner         2020-07-22  69  	syscall_enter_audit(regs, syscall);
142781e108b13b Thomas Gleixner         2020-07-22  70  
142781e108b13b Thomas Gleixner         2020-07-22  71  	return ret ? : syscall;
142781e108b13b Thomas Gleixner         2020-07-22  72  }
142781e108b13b Thomas Gleixner         2020-07-22  73  

:::::: The code at line 52 was first introduced by commit
:::::: 142781e108b13b2b0e8f035cfb5bfbbc8f14d887 entry: Provide generic syscall entry functionality

:::::: TO: Thomas Gleixner <[email protected]>
:::::: CC: Thomas Gleixner <[email protected]>

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