| 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_SYSCALL_H__ | 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ |
| 6 #define SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ | 6 #define SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ |
| 7 | 7 |
| 8 #include <signal.h> | 8 #include <signal.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "sandbox/linux/system_headers/linux_signal.h" |
| 12 #include "sandbox/sandbox_export.h" | 13 #include "sandbox/sandbox_export.h" |
| 13 | 14 |
| 14 // Android's signal.h doesn't define ucontext etc. | |
| 15 #if defined(OS_ANDROID) | |
| 16 #include "sandbox/linux/system_headers/android_ucontext.h" | |
| 17 #endif | |
| 18 | |
| 19 namespace sandbox { | 15 namespace sandbox { |
| 20 | 16 |
| 21 // This purely static class can be used to perform system calls with some | 17 // This purely static class can be used to perform system calls with some |
| 22 // low-level control. | 18 // low-level control. |
| 23 class SANDBOX_EXPORT Syscall { | 19 class SANDBOX_EXPORT Syscall { |
| 24 public: | 20 public: |
| 25 // InvalidCall() invokes Call() with a platform-appropriate syscall | 21 // InvalidCall() invokes Call() with a platform-appropriate syscall |
| 26 // number that is guaranteed to not be implemented (i.e., normally | 22 // number that is guaranteed to not be implemented (i.e., normally |
| 27 // returns -ENOSYS). | 23 // returns -ENOSYS). |
| 28 // This is primarily meant to be useful for writing sandbox policy | 24 // This is primarily meant to be useful for writing sandbox policy |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 const intptr_t* args, | 157 const intptr_t* args, |
| 162 intptr_t* err_stat); | 158 intptr_t* err_stat); |
| 163 #endif // defined(__mips__) | 159 #endif // defined(__mips__) |
| 164 | 160 |
| 165 DISALLOW_IMPLICIT_CONSTRUCTORS(Syscall); | 161 DISALLOW_IMPLICIT_CONSTRUCTORS(Syscall); |
| 166 }; | 162 }; |
| 167 | 163 |
| 168 } // namespace sandbox | 164 } // namespace sandbox |
| 169 | 165 |
| 170 #endif // SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ | 166 #endif // SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ |
| OLD | NEW |