Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: sandbox/linux/system_headers/linux_signal.h

Issue 1029283003: WIP: Implement seccomp-bpf sandbox for nacl_helper_nonsfi. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sandbox/linux/system_headers/linux_seccomp.h ('k') | sandbox/sandbox_nacl_nonsfi.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SIGNAL_H_
6 #define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SIGNAL_H_
7
8 // NOTE: On some toolchains, signal related ABI is incompatible with Linux's.
9 // So, here we declare necessary macros, structs and functions in Linux ABI.
10
11 #include <stdint.h>
12
13 #define LINUX_SIGBUS 7
14 #define LINUX_SIGSYS 31
15
16 #define LINUX_SIG_BLOCK 0
17 #define LINUX_SIG_UNBLOCK 1
18
19 #define LINUX_SA_SIGINFO 4
20 #define LINUX_SA_NODEFER 0x40000000
21
22 #define LINUX_SIG_DFL 0
23
24 struct arch_sigsys {
25 void* ip;
26 int nr;
27 unsigned int arch;
28 };
29
30 typedef struct {
31 int si_signo;
32 int si_errno;
33 int si_code;
34 struct {
35 struct arch_sigsys _sigsys;
36 } _sifields;
37 } linux_siginfo_t;
38
39 // Linux sigset_t is 64 bits.
40 typedef struct {
41 uint32_t sig[2];
42 } linux_sigset_t;
43
44 struct linux_sigaction {
45 // Traling '_' is to avoid name confliction defined by some toolchains.
46 union {
47 void (*sa_handler_)(int);
48 void (*sa_sigaction_)(int, linux_siginfo_t*, void*);
49 };
50 uint32_t sa_flags;
51 void (*sa_restorer)(void);
52 linux_sigset_t sa_mask;
53 };
54
55 #endif
OLDNEW
« no previous file with comments | « sandbox/linux/system_headers/linux_seccomp.h ('k') | sandbox/sandbox_nacl_nonsfi.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698