Merge tag 'mvebu-fixes-4.14-1' of git://git.infradead.org/linux-mvebu into fixes
[linux-2.6-block.git] / security / apparmor / include / sig_names.h
1 #include <linux/signal.h>
2
3 #define SIGUNKNOWN 0
4 #define MAXMAPPED_SIG 35
5 /* provide a mapping of arch signal to internal signal # for mediation
6  * those that are always an alias SIGCLD for SIGCLHD and SIGPOLL for SIGIO
7  * map to the same entry those that may/or may not get a separate entry
8  */
9 static const int sig_map[MAXMAPPED_SIG] = {
10         [0] = MAXMAPPED_SIG,    /* existence test */
11         [SIGHUP] = 1,
12         [SIGINT] = 2,
13         [SIGQUIT] = 3,
14         [SIGILL] = 4,
15         [SIGTRAP] = 5,          /* -, 5, - */
16         [SIGABRT] = 6,          /*  SIGIOT: -, 6, - */
17         [SIGBUS] = 7,           /* 10, 7, 10 */
18         [SIGFPE] = 8,
19         [SIGKILL] = 9,
20         [SIGUSR1] = 10,         /* 30, 10, 16 */
21         [SIGSEGV] = 11,
22         [SIGUSR2] = 12,         /* 31, 12, 17 */
23         [SIGPIPE] = 13,
24         [SIGALRM] = 14,
25         [SIGTERM] = 15,
26 #ifdef SIGSTKFLT
27         [SIGSTKFLT] = 16,       /* -, 16, - */
28 #endif
29         [SIGCHLD] = 17,         /* 20, 17, 18.  SIGCHLD -, -, 18 */
30         [SIGCONT] = 18,         /* 19, 18, 25 */
31         [SIGSTOP] = 19,         /* 17, 19, 23 */
32         [SIGTSTP] = 20,         /* 18, 20, 24 */
33         [SIGTTIN] = 21,         /* 21, 21, 26 */
34         [SIGTTOU] = 22,         /* 22, 22, 27 */
35         [SIGURG] = 23,          /* 16, 23, 21 */
36         [SIGXCPU] = 24,         /* 24, 24, 30 */
37         [SIGXFSZ] = 25,         /* 25, 25, 31 */
38         [SIGVTALRM] = 26,       /* 26, 26, 28 */
39         [SIGPROF] = 27,         /* 27, 27, 29 */
40         [SIGWINCH] = 28,        /* 28, 28, 20 */
41         [SIGIO] = 29,           /* SIGPOLL: 23, 29, 22 */
42         [SIGPWR] = 30,          /* 29, 30, 19.  SIGINFO 29, -, - */
43 #ifdef SIGSYS
44         [SIGSYS] = 31,          /* 12, 31, 12. often SIG LOST/UNUSED */
45 #endif
46 #ifdef SIGEMT
47         [SIGEMT] = 32,          /* 7, - , 7 */
48 #endif
49 #if defined(SIGLOST) && SIGPWR != SIGLOST               /* sparc */
50         [SIGLOST] = 33,         /* unused on Linux */
51 #endif
52 #if defined(SIGUNUSED) && \
53     defined(SIGLOST) && defined(SIGSYS) && SIGLOST != SIGSYS
54         [SIGUNUSED] = 34,       /* -, 31, - */
55 #endif
56 };
57
58 /* this table is ordered post sig_map[sig] mapping */
59 static const char *const sig_names[MAXMAPPED_SIG + 1] = {
60         "unknown",
61         "hup",
62         "int",
63         "quit",
64         "ill",
65         "trap",
66         "abrt",
67         "bus",
68         "fpe",
69         "kill",
70         "usr1",
71         "segv",
72         "usr2",
73         "pipe",
74         "alrm",
75         "term",
76         "stkflt",
77         "chld",
78         "cont",
79         "stop",
80         "stp",
81         "ttin",
82         "ttou",
83         "urg",
84         "xcpu",
85         "xfsz",
86         "vtalrm",
87         "prof",
88         "winch",
89         "io",
90         "pwr",
91         "sys",
92         "emt",
93         "lost",
94         "unused",
95
96         "exists",       /* always last existence test mapped to MAXMAPPED_SIG */
97 };
98