stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Linus Walleij <linus.walleij@linaro.org>,
	Kees Cook <kees@kernel.org>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.15 03/24] seccomp: Stub for !CONFIG_SECCOMP
Date: Thu, 30 Jan 2025 15:01:55 +0100	[thread overview]
Message-ID: <20250130140127.433034470@linuxfoundation.org> (raw)
In-Reply-To: <20250130140127.295114276@linuxfoundation.org>

5.15-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Linus Walleij <linus.walleij@linaro.org>

[ 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h
index 0c564e5d40ff2..15dee3991f11b 100644
--- a/include/linux/seccomp.h
+++ b/include/linux/seccomp.h
@@ -68,10 +68,10 @@ struct seccomp_data;
 
 #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
 static inline int secure_computing(void) { return 0; }
-static inline int __secure_computing(const struct seccomp_data *sd) { return 0; }
 #else
 static inline void secure_computing_strict(int this_syscall) { return; }
 #endif
+static inline int __secure_computing(const struct seccomp_data *sd) { return 0; }
 
 static inline long prctl_get_seccomp(void)
 {
-- 
2.39.5




  parent reply	other threads:[~2025-01-30 14:28 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-30 14:01 [PATCH 5.15 00/24] 5.15.178-rc1 review Greg Kroah-Hartman
2025-01-30 14:01 ` [PATCH 5.15 01/24] ASoC: wm8994: Add depends on MFD core Greg Kroah-Hartman
2025-01-30 14:01 ` [PATCH 5.15 02/24] ASoC: samsung: Add missing selects for MFD_WM8994 Greg Kroah-Hartman
2025-01-30 14:01 ` Greg Kroah-Hartman [this message]
2025-01-30 14:01 ` [PATCH 5.15 04/24] scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request Greg Kroah-Hartman
2025-01-30 14:01 ` [PATCH 5.15 05/24] irqchip/sunxi-nmi: Add missing SKIP_WAKE flag Greg Kroah-Hartman
2025-01-30 14:01 ` [PATCH 5.15 06/24] ASoC: samsung: Add missing depends on I2C Greg Kroah-Hartman
2025-01-30 14:01 ` [PATCH 5.15 07/24] regmap: detach regmap from dev on regmap_exit Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 08/24] mptcp: dont always assume copied data in mptcp_cleanup_rbuf() Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 09/24] gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 10/24] net: sched: fix ets qdisc OOB Indexing Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 11/24] vfio/platform: check the bounds of read/write syscalls Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 12/24] Bluetooth: SCO: Fix not validating setsockopt user input Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 13/24] Bluetooth: RFCOMM: " Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 14/24] fs/ntfs3: Additional check in ntfs_file_release Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 15/24] platform/chrome: cros_ec_typec: Check for EC driver Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 16/24] ipv4: ip_tunnel: Fix suspicious RCU usage warning in ip_tunnel_find() Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 17/24] scsi: storvsc: Ratelimit warning logs to prevent VM denial of service Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 18/24] wifi: iwlwifi: add a few rate index validity checks Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 19/24] USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb() Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 20/24] Revert "usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null" Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 21/24] ALSA: usb-audio: Add delay quirk for USB Audio Device Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 22/24] Input: atkbd - map F23 key to support default copilot shortcut Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 23/24] Input: xpad - add unofficial Xbox 360 wireless receiver clone Greg Kroah-Hartman
2025-01-30 14:02 ` [PATCH 5.15 24/24] Input: xpad - add support for wooting two he (arm) Greg Kroah-Hartman
2025-01-30 18:47 ` [PATCH 5.15 00/24] 5.15.178-rc1 review Mark Brown
2025-01-30 21:11 ` Florian Fainelli
2025-01-31  5:38 ` Jon Hunter
2025-01-31 14:04 ` Ron Economos
2025-01-31 15:23 ` Naresh Kamboju
2025-01-31 17:01 ` Muhammad Usama Anjum
2025-02-01  6:30 ` Vijayendra Suman
2025-02-01  8:14 ` [PATCH 5.15] " Hardik Garg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250130140127.433034470@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=kees@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=patches@lists.linux.dev \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).