Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp7106275rdb; Fri, 15 Dec 2023 19:36:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHBT2xqXDG9g/YbONoOKRVGr4Qe/fuRMdpm8eNCaO0152j7tmKy3avAvLLfHQJ0anG/RaA2 X-Received: by 2002:ac8:590f:0:b0:425:4043:29eb with SMTP id 15-20020ac8590f000000b00425404329ebmr16418606qty.102.1702697782852; Fri, 15 Dec 2023 19:36:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697782; cv=none; d=google.com; s=arc-20160816; b=NDkqLN3qHRi0CLXtPpvRK/hjTo4rIPlXifU9W4YKzA/Apaq2CYtFaoNFXgGfg8fO2b PVecilSWIgykGPkdF6EOmsmLASdGdk9MBOWcxKcfvPLKe2JoRX9u1ffpfgvKOeF6M/cK W4RbAsUnecvldGLSEu78HkG885tNSubbInzslHvCd6gLBU47Z4p8JmcVp+jPVpb+C2eV SaEjdtZB0ZC681i01hk5aI++MGd0TLjxnuzcu7Rt2LdxbVU5OCxcNabeUXlVYdJp2EqO Ox+olgkpgVrDD5JOs8W4E5RhQLRaHfW7wz1a8Jh8yNmq8FgEAwZ2qSwDFCpkq1DzvHHf +v6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=H50Z0kSGEyOHKjuvYlMoEObUuyeC38rfMHKwdLte1so=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=ABHgmLmfjX3peBsMic8QANIZZG6L4nrgm5ICpZsfUfPF15pbhT1ZX+ZvJM5u9qIJjg jopwyZgU3ND4rIt+huQo3h8nNXVQ3/QjpaW78WpCGr4bEshSV4hYzXlpmlhxkTF9Mp+j dbMWaSUOH2p2DKseHKpnuIDdnCgKPUZy3X+e0jhkcPD45rkyMV1Vqd9baH6NS+6Rud5f pjqINSMkxuJmaUNX+YFMVtCpqbSywGge3nvYKWP0C+aAm8yelQqwVnSxjKWkoQjz2DQW rKtZSDqjpUkv00waF8xxI1Xi3eWbeaXiDILLdMIRSp319t2702TOIDCHAzYc7sIi8HeM lhCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=M1Je6O36; spf=pass (google.com: domain of linux-kernel+bounces-2019-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2019-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e15-20020a05622a110f00b00425f146bdb7si7790557qty.613.2023.12.15.19.36.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:36:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2019-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=M1Je6O36; spf=pass (google.com: domain of linux-kernel+bounces-2019-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2019-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9BC371C246A9 for ; Sat, 16 Dec 2023 03:36:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8206240BF8; Sat, 16 Dec 2023 03:33:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="M1Je6O36" X-Original-To: linux-kernel@vger.kernel.org Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 472E93EA87 for ; Sat, 16 Dec 2023 03:33:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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 */ -- 2.43.0