Skip to content

Commit f90877d

Browse files
Linus Walleijkees
authored andcommitted
seccomp: Stub for !CONFIG_SECCOMP
When using !CONFIG_SECCOMP with CONFIG_GENERIC_ENTRY, the randconfig bots found the following snag: 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); | ^~~~~~~~~~~~~~~~~~ Since generic entry calls __secure_computing() unconditionally, fix this by moving the stub out of the ifdef clause for CONFIG_HAVE_ARCH_SECCOMP_FILTER so it's always available. Link: https://lore.kernel.org/oe-kbuild-all/202501061240.Fzk9qiFZ-lkp@intel.com/ Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250108-seccomp-stub-2-v2-1-74523d49420f@linaro.org Signed-off-by: Kees Cook <kees@kernel.org>
1 parent fac04ef commit f90877d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/seccomp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ struct seccomp_data;
5555

5656
#ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
5757
static inline int secure_computing(void) { return 0; }
58-
static inline int __secure_computing(const struct seccomp_data *sd) { return 0; }
5958
#else
6059
static inline void secure_computing_strict(int this_syscall) { return; }
6160
#endif
61+
static inline int __secure_computing(const struct seccomp_data *sd) { return 0; }
6262

6363
static inline long prctl_get_seccomp(void)
6464
{

0 commit comments

Comments
 (0)