From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4701E1DE3C7 for ; Tue, 7 Jan 2025 08:46:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736239616; cv=none; b=dMOCIxoWypn87cURPqWbrHiX5KLtqpQ1/WOTdQa5ql4/56xk50se1cpXNV0cf7P/YQGpRBnLtdUDiVvjIaLdseeFSustTFtSJd5NIZ1OeQaQfJpZKtwAvyrNIVo0Fdm2sG21aGbaGxMOnU52xTAdHe9BfsbzEIbv6ulXngDLDWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736239616; c=relaxed/simple; bh=LQEEGG13yNkc/XR3VWYq0PB5Yy7Kdbd8wkBQvOl4Oqc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=FPpxu9vBbNELZk6GFHtGL1vvBbpXBFDe30MK819m03tHZOm6fGzMsJ7XSbyhKo/pJlE8YaG+ub39W19gtdjHuuF5raShsMLV24+tQKq5JLvgrIJzHNfX9+oRU+sBz1zDqvU5ddhNxIwO25czeeXhKJUwqfctjiA/LzU73lMon2Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hm+hSeew; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hm+hSeew" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a9e44654ae3so2547396966b.1 for ; Tue, 07 Jan 2025 00:46:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736239610; x=1736844410; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=kzJ5eNY5ggnvhoxVWptw7lE9JWaEOObFBn9FARn4ETE=; b=hm+hSeew5OSsj1I50/a8vLORB4V4xSJbZdHZtngpdefInFAZ/52lumdXcoKgALo6gF VlQoGoScTxlkvHlahpHv9fKCgSMX5QELG/PxNO2fxKgcYDq7NquND5FHGfKRiQC4ai7t x2XZr2w8JOn24VSA0dHXr70FpaNZzlmkfulq2tfoOrjtEVHaHj9bvCnJN7ONej2EpeKT Kt3jbLOJjSa+iPb2nZB1vo8b/zZMmG9vB/kHrIZ0YsG+3WwnWAj3NYyHoR29rrUzB2Uk b0mj9EKkHapLNeGTAVdfLNtzbsAvzZH9wRqancn8Jd56c4h8NvmrCR8A8eoLS5wIFWtP ZGtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736239610; x=1736844410; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kzJ5eNY5ggnvhoxVWptw7lE9JWaEOObFBn9FARn4ETE=; b=KdPmMINmnwql954ZfYJXznQ+wIB+EAEwW5TkNZcaf93vE5xcL5HLsq1qbXJGykUQ97 6MyPCOZy6vh4M3v/s8D9iNx1zFdJ1DFOlnMpbMM4WuMRy1tm3Ia+xCbf6Euz4DFHPmMF pWY5c65OM2K/g3uW7HeYeTJCEDNlfpbfPjYRFaOhcPchR9iihYRA+GFyxumiYAT9+Gp5 Ht6d909YhxHPizIKYwo20JNxXApeBtnpDjF1QwrFkXS3s7ZFvNfExKNGfe6ACaEHYLoG yEKucs0FIfw6YhJyx7NNf78yqcC+NGE/n6TfjxKJ4q1O+uWcq5UPXYzHRf+R20+1SKIv pV2g== X-Gm-Message-State: AOJu0YwR7eJZUWD1YuQgTML9HztE7OnGDX4gLoJPLCXtrGTHKbzRJn8A wZfiNlAwOxDe5p+SGVusSG1WYbMLd+C9wNqjyy3M9kjD9XgjI7yCiYSt2FDWDdWhLRFd1lbAPJU 0glE= X-Gm-Gg: ASbGncuA7/u8CNWvk8Tv9/rLnV2RFJLZxVwz7bsgP++vGBFvwuNSTrJicfaHbY9VzGx nWBUtEP5rqyEEtFoZud/603yNzW4VrbvtxVfr9tHCLMfw383SS99XgD1Wha+nqE28xs/FMoGy6u MV2XKfUXEvfj66nr/MDOB0dv2ElBOmHzjAHn8p5bpFOY5h0biguQ1braCjyu2Wj48E540HL4d7E SgLWQ57eag3/gc81fgPXf4EEouG/nR9qcrI8PVwby7vZxkev4eRaOJEW4rdA2HQ4LE= X-Google-Smtp-Source: AGHT+IHiKho6e34fEB+UO+VoGQ4mPUOGpREINdmWMon3HhcfMiyReaU+6oFh4aZT4rdZTTmj9dQz6g== X-Received: by 2002:a17:906:f59c:b0:aae:f645:8ba4 with SMTP id a640c23a62f3a-aaef6459431mr3745960866b.9.1736239610045; Tue, 07 Jan 2025 00:46:50 -0800 (PST) Received: from [192.168.1.140] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82f178sm2336747866b.38.2025.01.07.00.46.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 00:46:49 -0800 (PST) From: Linus Walleij Date: Tue, 07 Jan 2025 09:46:48 +0100 Subject: [PATCH] seccomp: Stub for !CONFIG_SECCOMP Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250107-seccomp-stub-2-v1-1-fd43bcee2560@linaro.org> X-B4-Tracking: v=1; b=H4sIAPfpfGcC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI1MDQwNz3eLU5OT83ALd4pLSJF0j3USjVIvkpFTDNEsTSyWgpoKi1LTMCrC B0bG1tQCq7YhBYAAAAA== X-Change-ID: 20250107-seccomp-stub-2-a2e8cbe1f949 To: Kees Cook , Andy Lutomirski , Will Drewry Cc: linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.14.2 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 adding another static inline stub. Link: https://lore.kernel.org/oe-kbuild-all/202501061240.Fzk9qiFZ-lkp@intel.com/ Signed-off-by: Linus Walleij --- include/linux/seccomp.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 341980599c71242d3bb95b544c954278efcc65b9..622a8d8899085b204c449e101de7fe59e26e15a2 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -58,6 +58,10 @@ 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; } +static inline int __secure_computing(const struct seccomp_data *sd) +{ + return 0; +} #endif static inline long prctl_get_seccomp(void) --- base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37 change-id: 20250107-seccomp-stub-2-a2e8cbe1f949 Best regards, -- Linus Walleij