File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919#include <linux/mutex_types.h>
2020#include <linux/plist_types.h>
2121#include <linux/hrtimer_types.h>
22- #include <linux/seccomp .h>
22+ #include <linux/seccomp_types .h>
2323#include <linux/nodemask_types.h>
2424#include <linux/rcupdate.h>
2525#include <linux/refcount_types.h>
Original file line number Diff line number Diff line change 33#define _LINUX_SECCOMP_H
44
55#include <uapi/linux/seccomp.h>
6+ #include <linux/seccomp_types.h>
67
78#define SECCOMP_FILTER_FLAG_MASK (SECCOMP_FILTER_FLAG_TSYNC | \
89 SECCOMP_FILTER_FLAG_LOG | \
2122#include <linux/atomic.h>
2223#include <asm/seccomp.h>
2324
24- struct seccomp_filter ;
25- /**
26- * struct seccomp - the state of a seccomp'ed process
27- *
28- * @mode: indicates one of the valid values above for controlled
29- * system calls available to a process.
30- * @filter_count: number of seccomp filters
31- * @filter: must always point to a valid seccomp-filter or NULL as it is
32- * accessed without locking during system call entry.
33- *
34- * @filter must only be accessed from the context of current as there
35- * is no read locking.
36- */
37- struct seccomp {
38- int mode ;
39- atomic_t filter_count ;
40- struct seccomp_filter * filter ;
41- };
42-
4325#ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
4426extern int __secure_computing (const struct seccomp_data * sd );
4527static inline int secure_computing (void )
@@ -64,8 +46,6 @@ static inline int seccomp_mode(struct seccomp *s)
6446
6547#include <linux/errno.h>
6648
67- struct seccomp { };
68- struct seccomp_filter { };
6949struct seccomp_data ;
7050
7151#ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
Original file line number Diff line number Diff line change 1+ /* SPDX-License-Identifier: GPL-2.0 */
2+ #ifndef _LINUX_SECCOMP_TYPES_H
3+ #define _LINUX_SECCOMP_TYPES_H
4+
5+ #include <linux/types.h>
6+
7+ #ifdef CONFIG_SECCOMP
8+
9+ struct seccomp_filter ;
10+ /**
11+ * struct seccomp - the state of a seccomp'ed process
12+ *
13+ * @mode: indicates one of the valid values above for controlled
14+ * system calls available to a process.
15+ * @filter_count: number of seccomp filters
16+ * @filter: must always point to a valid seccomp-filter or NULL as it is
17+ * accessed without locking during system call entry.
18+ *
19+ * @filter must only be accessed from the context of current as there
20+ * is no read locking.
21+ */
22+ struct seccomp {
23+ int mode ;
24+ atomic_t filter_count ;
25+ struct seccomp_filter * filter ;
26+ };
27+
28+ #else
29+
30+ struct seccomp { };
31+ struct seccomp_filter { };
32+
33+ #endif
34+
35+ #endif /* _LINUX_SECCOMP_TYPES_H */
You can’t perform that action at this time.
0 commit comments