| .. | .. |
|---|
| 10 | 10 | void __user *sival_ptr; |
|---|
| 11 | 11 | } sigval_t; |
|---|
| 12 | 12 | |
|---|
| 13 | | -/* |
|---|
| 14 | | - * This is the size (including padding) of the part of the |
|---|
| 15 | | - * struct siginfo that is before the union. |
|---|
| 16 | | - */ |
|---|
| 17 | | -#ifndef __ARCH_SI_PREAMBLE_SIZE |
|---|
| 18 | | -#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) |
|---|
| 19 | | -#endif |
|---|
| 20 | | - |
|---|
| 21 | 13 | #define SI_MAX_SIZE 128 |
|---|
| 22 | | -#ifndef SI_PAD_SIZE |
|---|
| 23 | | -#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int)) |
|---|
| 24 | | -#endif |
|---|
| 25 | 14 | |
|---|
| 26 | 15 | /* |
|---|
| 27 | 16 | * The default "si_band" type is "long", as specified by POSIX. |
|---|
| .. | .. |
|---|
| 40 | 29 | #define __ARCH_SI_ATTRIBUTES |
|---|
| 41 | 30 | #endif |
|---|
| 42 | 31 | |
|---|
| 43 | | -typedef struct siginfo { |
|---|
| 44 | | - int si_signo; |
|---|
| 45 | | -#ifndef __ARCH_HAS_SWAPPED_SIGINFO |
|---|
| 46 | | - int si_errno; |
|---|
| 47 | | - int si_code; |
|---|
| 48 | | -#else |
|---|
| 49 | | - int si_code; |
|---|
| 50 | | - int si_errno; |
|---|
| 51 | | -#endif |
|---|
| 32 | +union __sifields { |
|---|
| 33 | + /* kill() */ |
|---|
| 34 | + struct { |
|---|
| 35 | + __kernel_pid_t _pid; /* sender's pid */ |
|---|
| 36 | + __kernel_uid32_t _uid; /* sender's uid */ |
|---|
| 37 | + } _kill; |
|---|
| 52 | 38 | |
|---|
| 53 | | - union { |
|---|
| 54 | | - int _pad[SI_PAD_SIZE]; |
|---|
| 39 | + /* POSIX.1b timers */ |
|---|
| 40 | + struct { |
|---|
| 41 | + __kernel_timer_t _tid; /* timer id */ |
|---|
| 42 | + int _overrun; /* overrun count */ |
|---|
| 43 | + sigval_t _sigval; /* same as below */ |
|---|
| 44 | + int _sys_private; /* not to be passed to user */ |
|---|
| 45 | + } _timer; |
|---|
| 55 | 46 | |
|---|
| 56 | | - /* kill() */ |
|---|
| 57 | | - struct { |
|---|
| 58 | | - __kernel_pid_t _pid; /* sender's pid */ |
|---|
| 59 | | - __kernel_uid32_t _uid; /* sender's uid */ |
|---|
| 60 | | - } _kill; |
|---|
| 47 | + /* POSIX.1b signals */ |
|---|
| 48 | + struct { |
|---|
| 49 | + __kernel_pid_t _pid; /* sender's pid */ |
|---|
| 50 | + __kernel_uid32_t _uid; /* sender's uid */ |
|---|
| 51 | + sigval_t _sigval; |
|---|
| 52 | + } _rt; |
|---|
| 61 | 53 | |
|---|
| 62 | | - /* POSIX.1b timers */ |
|---|
| 63 | | - struct { |
|---|
| 64 | | - __kernel_timer_t _tid; /* timer id */ |
|---|
| 65 | | - int _overrun; /* overrun count */ |
|---|
| 66 | | - sigval_t _sigval; /* same as below */ |
|---|
| 67 | | - int _sys_private; /* not to be passed to user */ |
|---|
| 68 | | - } _timer; |
|---|
| 54 | + /* SIGCHLD */ |
|---|
| 55 | + struct { |
|---|
| 56 | + __kernel_pid_t _pid; /* which child */ |
|---|
| 57 | + __kernel_uid32_t _uid; /* sender's uid */ |
|---|
| 58 | + int _status; /* exit code */ |
|---|
| 59 | + __ARCH_SI_CLOCK_T _utime; |
|---|
| 60 | + __ARCH_SI_CLOCK_T _stime; |
|---|
| 61 | + } _sigchld; |
|---|
| 69 | 62 | |
|---|
| 70 | | - /* POSIX.1b signals */ |
|---|
| 71 | | - struct { |
|---|
| 72 | | - __kernel_pid_t _pid; /* sender's pid */ |
|---|
| 73 | | - __kernel_uid32_t _uid; /* sender's uid */ |
|---|
| 74 | | - sigval_t _sigval; |
|---|
| 75 | | - } _rt; |
|---|
| 76 | | - |
|---|
| 77 | | - /* SIGCHLD */ |
|---|
| 78 | | - struct { |
|---|
| 79 | | - __kernel_pid_t _pid; /* which child */ |
|---|
| 80 | | - __kernel_uid32_t _uid; /* sender's uid */ |
|---|
| 81 | | - int _status; /* exit code */ |
|---|
| 82 | | - __ARCH_SI_CLOCK_T _utime; |
|---|
| 83 | | - __ARCH_SI_CLOCK_T _stime; |
|---|
| 84 | | - } _sigchld; |
|---|
| 85 | | - |
|---|
| 86 | | - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ |
|---|
| 87 | | - struct { |
|---|
| 88 | | - void __user *_addr; /* faulting insn/memory ref. */ |
|---|
| 63 | + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ |
|---|
| 64 | + struct { |
|---|
| 65 | + void __user *_addr; /* faulting insn/memory ref. */ |
|---|
| 89 | 66 | #ifdef __ARCH_SI_TRAPNO |
|---|
| 90 | | - int _trapno; /* TRAP # which caused the signal */ |
|---|
| 67 | + int _trapno; /* TRAP # which caused the signal */ |
|---|
| 91 | 68 | #endif |
|---|
| 92 | 69 | #ifdef __ia64__ |
|---|
| 93 | | - int _imm; /* immediate value for "break" */ |
|---|
| 94 | | - unsigned int _flags; /* see ia64 si_flags */ |
|---|
| 95 | | - unsigned long _isr; /* isr */ |
|---|
| 70 | + int _imm; /* immediate value for "break" */ |
|---|
| 71 | + unsigned int _flags; /* see ia64 si_flags */ |
|---|
| 72 | + unsigned long _isr; /* isr */ |
|---|
| 96 | 73 | #endif |
|---|
| 97 | 74 | |
|---|
| 98 | 75 | #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ |
|---|
| 99 | 76 | sizeof(short) : __alignof__(void *)) |
|---|
| 100 | | - union { |
|---|
| 101 | | - /* |
|---|
| 102 | | - * used when si_code=BUS_MCEERR_AR or |
|---|
| 103 | | - * used when si_code=BUS_MCEERR_AO |
|---|
| 104 | | - */ |
|---|
| 105 | | - short _addr_lsb; /* LSB of the reported address */ |
|---|
| 106 | | - /* used when si_code=SEGV_BNDERR */ |
|---|
| 107 | | - struct { |
|---|
| 108 | | - char _dummy_bnd[__ADDR_BND_PKEY_PAD]; |
|---|
| 109 | | - void __user *_lower; |
|---|
| 110 | | - void __user *_upper; |
|---|
| 111 | | - } _addr_bnd; |
|---|
| 112 | | - /* used when si_code=SEGV_PKUERR */ |
|---|
| 113 | | - struct { |
|---|
| 114 | | - char _dummy_pkey[__ADDR_BND_PKEY_PAD]; |
|---|
| 115 | | - __u32 _pkey; |
|---|
| 116 | | - } _addr_pkey; |
|---|
| 117 | | - }; |
|---|
| 118 | | - } _sigfault; |
|---|
| 77 | + union { |
|---|
| 78 | + /* |
|---|
| 79 | + * used when si_code=BUS_MCEERR_AR or |
|---|
| 80 | + * used when si_code=BUS_MCEERR_AO |
|---|
| 81 | + */ |
|---|
| 82 | + short _addr_lsb; /* LSB of the reported address */ |
|---|
| 83 | + /* used when si_code=SEGV_BNDERR */ |
|---|
| 84 | + struct { |
|---|
| 85 | + char _dummy_bnd[__ADDR_BND_PKEY_PAD]; |
|---|
| 86 | + void __user *_lower; |
|---|
| 87 | + void __user *_upper; |
|---|
| 88 | + } _addr_bnd; |
|---|
| 89 | + /* used when si_code=SEGV_PKUERR */ |
|---|
| 90 | + struct { |
|---|
| 91 | + char _dummy_pkey[__ADDR_BND_PKEY_PAD]; |
|---|
| 92 | + __u32 _pkey; |
|---|
| 93 | + } _addr_pkey; |
|---|
| 94 | + }; |
|---|
| 95 | + } _sigfault; |
|---|
| 119 | 96 | |
|---|
| 120 | | - /* SIGPOLL */ |
|---|
| 121 | | - struct { |
|---|
| 122 | | - __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
|---|
| 123 | | - int _fd; |
|---|
| 124 | | - } _sigpoll; |
|---|
| 97 | + /* SIGPOLL */ |
|---|
| 98 | + struct { |
|---|
| 99 | + __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
|---|
| 100 | + int _fd; |
|---|
| 101 | + } _sigpoll; |
|---|
| 125 | 102 | |
|---|
| 126 | | - /* SIGSYS */ |
|---|
| 127 | | - struct { |
|---|
| 128 | | - void __user *_call_addr; /* calling user insn */ |
|---|
| 129 | | - int _syscall; /* triggering system call number */ |
|---|
| 130 | | - unsigned int _arch; /* AUDIT_ARCH_* of syscall */ |
|---|
| 131 | | - } _sigsys; |
|---|
| 132 | | - } _sifields; |
|---|
| 103 | + /* SIGSYS */ |
|---|
| 104 | + struct { |
|---|
| 105 | + void __user *_call_addr; /* calling user insn */ |
|---|
| 106 | + int _syscall; /* triggering system call number */ |
|---|
| 107 | + unsigned int _arch; /* AUDIT_ARCH_* of syscall */ |
|---|
| 108 | + } _sigsys; |
|---|
| 109 | +}; |
|---|
| 110 | + |
|---|
| 111 | +#ifndef __ARCH_HAS_SWAPPED_SIGINFO |
|---|
| 112 | +#define __SIGINFO \ |
|---|
| 113 | +struct { \ |
|---|
| 114 | + int si_signo; \ |
|---|
| 115 | + int si_errno; \ |
|---|
| 116 | + int si_code; \ |
|---|
| 117 | + union __sifields _sifields; \ |
|---|
| 118 | +} |
|---|
| 119 | +#else |
|---|
| 120 | +#define __SIGINFO \ |
|---|
| 121 | +struct { \ |
|---|
| 122 | + int si_signo; \ |
|---|
| 123 | + int si_code; \ |
|---|
| 124 | + int si_errno; \ |
|---|
| 125 | + union __sifields _sifields; \ |
|---|
| 126 | +} |
|---|
| 127 | +#endif /* __ARCH_HAS_SWAPPED_SIGINFO */ |
|---|
| 128 | + |
|---|
| 129 | +typedef struct siginfo { |
|---|
| 130 | + union { |
|---|
| 131 | + __SIGINFO; |
|---|
| 132 | + int _si_pad[SI_MAX_SIZE/sizeof(int)]; |
|---|
| 133 | + }; |
|---|
| 133 | 134 | } __ARCH_SI_ATTRIBUTES siginfo_t; |
|---|
| 134 | 135 | |
|---|
| 135 | 136 | /* |
|---|
| .. | .. |
|---|
| 228 | 229 | #define SEGV_ACCADI 5 /* ADI not enabled for mapped object */ |
|---|
| 229 | 230 | #define SEGV_ADIDERR 6 /* Disrupting MCD error */ |
|---|
| 230 | 231 | #define SEGV_ADIPERR 7 /* Precise MCD exception */ |
|---|
| 231 | | -#define NSIGSEGV 7 |
|---|
| 232 | +#define SEGV_MTEAERR 8 /* Asynchronous ARM MTE error */ |
|---|
| 233 | +#define SEGV_MTESERR 9 /* Synchronous ARM MTE exception */ |
|---|
| 234 | +#define NSIGSEGV 9 |
|---|
| 232 | 235 | |
|---|
| 233 | 236 | /* |
|---|
| 234 | 237 | * SIGBUS si_codes |
|---|
| .. | .. |
|---|
| 286 | 289 | #define NSIGSYS 1 |
|---|
| 287 | 290 | |
|---|
| 288 | 291 | /* |
|---|
| 292 | + * SIGEMT si_codes |
|---|
| 293 | + */ |
|---|
| 294 | +#define EMT_TAGOVF 1 /* tag overflow */ |
|---|
| 295 | +#define NSIGEMT 1 |
|---|
| 296 | + |
|---|
| 297 | +/* |
|---|
| 289 | 298 | * sigevent definitions |
|---|
| 290 | 299 | * |
|---|
| 291 | 300 | * It seems likely that SIGEV_THREAD will have to be handled from |
|---|