From patchwork Sat Dec 16 03:32:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 13495434 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FE80C4332F for ; Sat, 16 Dec 2023 03:33:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2CBDC8D0158; Fri, 15 Dec 2023 22:33:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1DFED8D0153; Fri, 15 Dec 2023 22:33:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E15428D0158; Fri, 15 Dec 2023 22:33:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B687B8D0153 for ; Fri, 15 Dec 2023 22:33:36 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 03B131201A8 for ; Sat, 16 Dec 2023 03:33:35 +0000 (UTC) X-FDA: 81571261632.11.A4A320C Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) by imf17.hostedemail.com (Postfix) with ESMTP id 2478040006 for ; Sat, 16 Dec 2023 03:33:33 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=M1Je6O36; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf17.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.179 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702697614; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=H50Z0kSGEyOHKjuvYlMoEObUuyeC38rfMHKwdLte1so=; b=OVAerE7G7dbRe7BbhsYfk+vSHlJu52lgDS32u0KBHF9HeRRpo+EDntbtbHqZsZdLCtkdsD OO2sMjkEZZaGO8DwCcsMlAQra82XpIqeeamfSXuyMHl6ZyVCq/v+0qdSiuX9cBwBLIpEm/ DpIShtO88LeULE2raREKTBkWhHmF4rs= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=M1Je6O36; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf17.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.179 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702697614; a=rsa-sha256; cv=none; b=JuRm4sNGWY4dUkoH5PYThunZmFTT9swu56q7ByBkBCWM4fgcs4SixoZGM964l5PvNzqGG+ ZqQgK4EYHemDhRhYaPc4dbR1IS25Ovcpyyuz91B7h6HoadJ1HZdF/LsUAxR5CtkVImG5Qp 1mTq216TQ9ksFooI1/foOoD9sGRt8DI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1702697612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H50Z0kSGEyOHKjuvYlMoEObUuyeC38rfMHKwdLte1so=; b=M1Je6O36HQ5QIRvQAOQK7U/+LJOUwJxBcAvzS6QVZPFcMei3FP6V+VPGxf8RwjVwCutDXX LVnGA70HtCaiYKQUqI/J0w8za7YRSUh+eDptL1nlrCSTYkqJsJtd06zS/La04hgbvk79VN xmFlGBLX1P/18IRHlt+tjLYoG7a6y7M= From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: Kent Overstreet , tglx@linutronix.de, x86@kernel.org, tj@kernel.org, peterz@infradead.org, mathieu.desnoyers@efficios.com, paulmck@kernel.org, keescook@chromium.org, dave.hansen@linux.intel.com, mingo@redhat.com, will@kernel.org, longman@redhat.com, boqun.feng@gmail.com, brauner@kernel.org Subject: [PATCH 40/50] seccomp: Split out seccomp_types.h Date: Fri, 15 Dec 2023 22:32:46 -0500 Message-ID: <20231216033300.3553457-8-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-1-kent.overstreet@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 2478040006 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: qbtdo77oktyrizwygu88fmnrshqt3s1k X-HE-Tag: 1702697613-960246 X-HE-Meta: U2FsdGVkX19TYBfXfi33abmpY1REopx0HusZ1RXEdkT28JCRfwSwX6kJUMWQf1MlwUt5/iaezvz3smwAOclWvz1zoOX4L+AcB7XtAmvarTxirRhQgA8ef67zciVQhxTOyFZ9paAV1PMSURtGu0Ev36riL6Dcw1X2aE9/+QppzAPyZOQlYS0bF+Gez6ALoSrMGTuNh0RaOg7AjbOzS0FCxFkUQp9UKjiedHViR6dgrYYpXJaJ6MlITaQWaseyewtjWb7ZghyslnRllJTktq3hRFp6qxNIEsDTqKDyeZUMrdCpSULU2gwdHZ3SBB2wNudr6OE3xEq0GbvMoKSex8+bwUQARpIF2VxHNCfdpkJg4CRwGE4FPxR8IzyXZ4gFr+mdU9TDxZdf77ipTGh9fR+w5RrMDTNXbAVYe8eOzbW2eGrr/g4LOivCW7q6vemLpEXPuFMKlQeWQRX6QPXa4GmTxbTqR57xkP2qzpRIsEPSxxoH9mkx9uMDodjlDtk/2sOBSzY8dXVzxr++0A/QCvm5ga4wYg9GXAKK3BL3MOFOG3GEBxS7I1YqXnIB+rE/0aQSb2fJMOf1JIMRrknWJ1SkF3MHo+VISljSkAF+c7f9gOVmTTC5v+FzYGOSG0Ar8jZB5sMdchI4QyBls7gk8GsNvbqkDgxh7E5dArfRsT/2W3JK/2PY1yOueHo18rHrtBgJNusgMPlElqLLTpSX9NXWhNv+KNdu5XhUiGsS5QOLhwgf06B7OsHaBI/aY62MrEnhgy486peL6UmSxL1Bzl33C54dtgo78xggTCjk070/ZAi0tNFWRXGEzSJKQi+7TY6xb8EuBZ8pwU9Jl3pKXZunlNo2WQwKG9TZJ3V9gEpe2LDqxSJ6jjT2naFE0Z1VrdP+XFrlCt1QhW9Qg9LTzau/dpkF9NiNHH9xWwODObpoMhVWfan9l7DpJ/bfzWUn2ElW5hbjacEJj7tMZpU9eQC bbaKChKe S5bgKco6T0ie4VWSbHQri4ahR34Y8XEPT8wqwfykXHVkofU5l0kQFrZppfd+kd47rJw9vr4lz2IVIJHkPwGgbR/LdxRxm2d4j+obl0PGwBHWOKWOuQ/cdYEkGi46Y71gsZY0svDUp086Aei8p+82vT3IQvNdLBE9arQ8CMeXykqKT5it+xRdV+UN6KcfpeAMINtb9kkOfFTFxKog= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: More pruning of sched.h dependencies. Signed-off-by: Kent Overstreet --- include/linux/sched.h | 2 +- include/linux/seccomp.h | 20 +------------------- include/linux/seccomp_types.h | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 include/linux/seccomp_types.h diff --git a/include/linux/sched.h b/include/linux/sched.h index f52977af1511..9bfa61ab2750 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 1ec0d8dc4b69..26a53cea5761 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -19,27 +19,9 @@ #include #include +#include #include -struct seccomp_filter; -/** - * struct seccomp - the state of a seccomp'ed process - * - * @mode: indicates one of the valid values above for controlled - * system calls available to a process. - * @filter_count: number of seccomp filters - * @filter: must always point to a valid seccomp-filter or NULL as it is - * accessed without locking during system call entry. - * - * @filter must only be accessed from the context of current as there - * is no read locking. - */ -struct seccomp { - int mode; - atomic_t filter_count; - struct seccomp_filter *filter; -}; - #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER extern int __secure_computing(const struct seccomp_data *sd); static inline int secure_computing(void) diff --git a/include/linux/seccomp_types.h b/include/linux/seccomp_types.h new file mode 100644 index 000000000000..c6184582a0a0 --- /dev/null +++ b/include/linux/seccomp_types.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_SECCOMP_TYPES_H +#define _LINUX_SECCOMP_TYPES_H + +#include + +struct seccomp_filter; +/** + * struct seccomp - the state of a seccomp'ed process + * + * @mode: indicates one of the valid values above for controlled + * system calls available to a process. + * @filter_count: number of seccomp filters + * @filter: must always point to a valid seccomp-filter or NULL as it is + * accessed without locking during system call entry. + * + * @filter must only be accessed from the context of current as there + * is no read locking. + */ +struct seccomp { + int mode; + atomic_t filter_count; + struct seccomp_filter *filter; +}; + +#endif /* _LINUX_SECCOMP_TYPES_H */