]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
seccomp: Stub for !CONFIG_SECCOMP
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 8 Jan 2025 22:44:45 +0000 (23:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2025 17:23:59 +0000 (18:23 +0100)
commit318ebf85114383add0f83d2a48e3976ce7b0a937
tree679e6d0356a731f0fd186fe711137f31699ed154
parent42b4b670bd2305b47e7d03917fd10ed1ee8caf89
seccomp: Stub for !CONFIG_SECCOMP

[ Upstream commit f90877dd7fb5085dd9abd6399daf63dd2969fc90 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/seccomp.h