OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__ | 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__ |
6 #define SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__ | 6 #define SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__ |
7 | 7 |
8 // The Seccomp2 kernel ABI is not part of older versions of glibc. | 8 // The Seccomp2 kernel ABI is not part of older versions of glibc. |
9 // As we can't break compilation with these versions of the library, | 9 // As we can't break compilation with these versions of the library, |
10 // we explicitly define all missing symbols. | 10 // we explicitly define all missing symbols. |
11 // If we ever decide that we can now rely on system headers, the following | 11 // If we ever decide that we can now rely on system headers, the following |
12 // include files should be enabled: | 12 // include files should be enabled: |
13 // #include <linux/audit.h> | 13 // #include <linux/audit.h> |
14 // #include <linux/seccomp.h> | 14 // #include <linux/seccomp.h> |
15 | 15 |
16 #include <asm/unistd.h> | 16 #include <asm/unistd.h> |
17 #include <linux/filter.h> | 17 #include <linux/filter.h> |
18 | 18 |
19 // Old Bionic versions do not have sys/user.h. The if can be removed once we no | 19 // Old Bionic versions do not have sys/user.h. The if can be removed once we no |
20 // longer need to support these old Bionic versions. | 20 // longer need to support these old Bionic versions. |
21 #include <sys/cdefs.h> | 21 #include <sys/cdefs.h> |
22 #if !defined(__BIONIC__) | 22 #if !defined(__BIONIC__) || defined(__x86_64__) |
23 #include <sys/user.h> | 23 #include <sys/user.h> |
24 #endif | 24 #endif |
25 | 25 |
26 // For audit.h | 26 // For audit.h |
27 #ifndef EM_ARM | 27 #ifndef EM_ARM |
28 #define EM_ARM 40 | 28 #define EM_ARM 40 |
29 #endif | 29 #endif |
30 #ifndef EM_386 | 30 #ifndef EM_386 |
31 #define EM_386 3 | 31 #define EM_386 3 |
32 #endif | 32 #endif |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 #define SECCOMP_PT_PARM4(_regs) (_regs).REG_r3 | 257 #define SECCOMP_PT_PARM4(_regs) (_regs).REG_r3 |
258 #define SECCOMP_PT_PARM5(_regs) (_regs).REG_r4 | 258 #define SECCOMP_PT_PARM5(_regs) (_regs).REG_r4 |
259 #define SECCOMP_PT_PARM6(_regs) (_regs).REG_r5 | 259 #define SECCOMP_PT_PARM6(_regs) (_regs).REG_r5 |
260 | 260 |
261 #else | 261 #else |
262 #error Unsupported target platform | 262 #error Unsupported target platform |
263 | 263 |
264 #endif | 264 #endif |
265 | 265 |
266 #endif // SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__ | 266 #endif // SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__ |
OLD | NEW |