File tree Expand file tree Collapse file tree 3 files changed +37
-22
lines changed Expand file tree Collapse file tree 3 files changed +37
-22
lines changed Original file line number Diff line number Diff line change 19
19
#include <linux/mutex_types.h>
20
20
#include <linux/plist_types.h>
21
21
#include <linux/hrtimer_types.h>
22
- #include <linux/seccomp .h>
22
+ #include <linux/seccomp_types .h>
23
23
#include <linux/nodemask_types.h>
24
24
#include <linux/rcupdate.h>
25
25
#include <linux/refcount_types.h>
Original file line number Diff line number Diff line change 3
3
#define _LINUX_SECCOMP_H
4
4
5
5
#include <uapi/linux/seccomp.h>
6
+ #include <linux/seccomp_types.h>
6
7
7
8
#define SECCOMP_FILTER_FLAG_MASK (SECCOMP_FILTER_FLAG_TSYNC | \
8
9
SECCOMP_FILTER_FLAG_LOG | \
21
22
#include <linux/atomic.h>
22
23
#include <asm/seccomp.h>
23
24
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
-
43
25
#ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
44
26
extern int __secure_computing (const struct seccomp_data * sd );
45
27
static inline int secure_computing (void )
@@ -64,8 +46,6 @@ static inline int seccomp_mode(struct seccomp *s)
64
46
65
47
#include <linux/errno.h>
66
48
67
- struct seccomp { };
68
- struct seccomp_filter { };
69
49
struct seccomp_data ;
70
50
71
51
#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