diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2017-07-09 17:14:25 -0400 |
|---|---|---|
| committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-01-12 15:34:48 -0500 |
| commit | 09d1415d2454dbcd7cb2fc0b56da8afba8d03dc6 (patch) | |
| tree | 43359160002aa7834aa9fbbebef9648699344333 /arch/mips/include | |
| parent | 30073566ca64cbc005f4fbcc21f0af7db83940a2 (diff) | |
signal/mips: switch mips to generic siginfo
... having taught the latter that si_errno and si_code might be
swapped.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'arch/mips/include')
| -rw-r--r-- | arch/mips/include/uapi/asm/siginfo.h | 86 |
1 files changed, 1 insertions, 85 deletions
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h index f17d8163dec6..262504bd59a5 100644 --- a/arch/mips/include/uapi/asm/siginfo.h +++ b/arch/mips/include/uapi/asm/siginfo.h | |||
| @@ -14,8 +14,6 @@ | |||
| 14 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int)) | 14 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int)) |
| 15 | #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ | 15 | #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ |
| 16 | 16 | ||
| 17 | #define HAVE_ARCH_SIGINFO_T | ||
| 18 | |||
| 19 | /* | 17 | /* |
| 20 | * Careful to keep union _sifields from shifting ... | 18 | * Careful to keep union _sifields from shifting ... |
| 21 | */ | 19 | */ |
| @@ -27,92 +25,10 @@ | |||
| 27 | #error _MIPS_SZLONG neither 32 nor 64 | 25 | #error _MIPS_SZLONG neither 32 nor 64 |
| 28 | #endif | 26 | #endif |
| 29 | 27 | ||
| 30 | #define __ARCH_SIGSYS | 28 | #define __ARCH_HAS_SWAPPED_SIGINFO |
| 31 | 29 | ||
| 32 | #include <asm-generic/siginfo.h> | 30 | #include <asm-generic/siginfo.h> |
| 33 | 31 | ||
| 34 | /* We can't use generic siginfo_t, because our si_code and si_errno are swapped */ | ||
| 35 | typedef struct siginfo { | ||
| 36 | int si_signo; | ||
| 37 | int si_code; | ||
| 38 | int si_errno; | ||
| 39 | int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3]; | ||
| 40 | |||
| 41 | union { | ||
| 42 | int _pad[SI_PAD_SIZE]; | ||
| 43 | |||
| 44 | /* kill() */ | ||
| 45 | struct { | ||
| 46 | __kernel_pid_t _pid; /* sender's pid */ | ||
| 47 | __ARCH_SI_UID_T _uid; /* sender's uid */ | ||
| 48 | } _kill; | ||
| 49 | |||
| 50 | /* POSIX.1b timers */ | ||
| 51 | struct { | ||
| 52 | __kernel_timer_t _tid; /* timer id */ | ||
| 53 | int _overrun; /* overrun count */ | ||
| 54 | char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; | ||
| 55 | sigval_t _sigval; /* same as below */ | ||
| 56 | int _sys_private; /* not to be passed to user */ | ||
| 57 | } _timer; | ||
| 58 | |||
| 59 | /* POSIX.1b signals */ | ||
| 60 | struct { | ||
| 61 | __kernel_pid_t _pid; /* sender's pid */ | ||
| 62 | __ARCH_SI_UID_T _uid; /* sender's uid */ | ||
| 63 | sigval_t _sigval; | ||
| 64 | } _rt; | ||
| 65 | |||
| 66 | /* SIGCHLD */ | ||
| 67 | struct { | ||
| 68 | __kernel_pid_t _pid; /* which child */ | ||
| 69 | __ARCH_SI_UID_T _uid; /* sender's uid */ | ||
| 70 | int _status; /* exit code */ | ||
| 71 | __kernel_clock_t _utime; | ||
| 72 | __kernel_clock_t _stime; | ||
| 73 | } _sigchld; | ||
| 74 | |||
| 75 | /* IRIX SIGCHLD */ | ||
| 76 | struct { | ||
| 77 | __kernel_pid_t _pid; /* which child */ | ||
| 78 | __kernel_clock_t _utime; | ||
| 79 | int _status; /* exit code */ | ||
| 80 | __kernel_clock_t _stime; | ||
| 81 | } _irix_sigchld; | ||
| 82 | |||
| 83 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
| 84 | struct { | ||
| 85 | void __user *_addr; /* faulting insn/memory ref. */ | ||
| 86 | #ifdef __ARCH_SI_TRAPNO | ||
| 87 | int _trapno; /* TRAP # which caused the signal */ | ||
| 88 | #endif | ||
| 89 | short _addr_lsb; | ||
| 90 | union { | ||
| 91 | /* used when si_code=SEGV_BNDERR */ | ||
| 92 | struct { | ||
| 93 | void __user *_lower; | ||
| 94 | void __user *_upper; | ||
| 95 | } _addr_bnd; | ||
| 96 | /* used when si_code=SEGV_PKUERR */ | ||
| 97 | __u32 _pkey; | ||
| 98 | }; | ||
| 99 | } _sigfault; | ||
| 100 | |||
| 101 | /* SIGPOLL, SIGXFSZ (To do ...) */ | ||
| 102 | struct { | ||
| 103 | __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | ||
| 104 | int _fd; | ||
| 105 | } _sigpoll; | ||
| 106 | |||
| 107 | /* SIGSYS */ | ||
| 108 | struct { | ||
| 109 | void __user *_call_addr; /* calling user insn */ | ||
| 110 | int _syscall; /* triggering system call number */ | ||
| 111 | unsigned int _arch; /* AUDIT_ARCH_* of syscall */ | ||
| 112 | } _sigsys; | ||
| 113 | } _sifields; | ||
| 114 | } siginfo_t; | ||
| 115 | |||
| 116 | /* | 32 | /* |
| 117 | * si_code values | 33 | * si_code values |
| 118 | * Again these have been chosen to be IRIX compatible. | 34 | * Again these have been chosen to be IRIX compatible. |
