Greg Kroah-Hartman | 6f52b16 | 2017-11-01 15:08:43 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
David Howells | 43e40f2 | 2012-10-09 09:47:00 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Based on <asm-i386/siginfo.h>. |
| 4 | * |
| 5 | * Modified 1998-2002 |
| 6 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
| 7 | */ |
| 8 | #ifndef _UAPI_ASM_IA64_SIGINFO_H |
| 9 | #define _UAPI_ASM_IA64_SIGINFO_H |
| 10 | |
| 11 | |
| 12 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
| 13 | |
| 14 | #define HAVE_ARCH_SIGINFO_T |
David Howells | 43e40f2 | 2012-10-09 09:47:00 +0100 | [diff] [blame] | 15 | #define HAVE_ARCH_COPY_SIGINFO_TO_USER |
| 16 | |
| 17 | #include <asm-generic/siginfo.h> |
| 18 | |
| 19 | typedef struct siginfo { |
| 20 | int si_signo; |
| 21 | int si_errno; |
| 22 | int si_code; |
| 23 | int __pad0; |
| 24 | |
| 25 | union { |
| 26 | int _pad[SI_PAD_SIZE]; |
| 27 | |
| 28 | /* kill() */ |
| 29 | struct { |
| 30 | pid_t _pid; /* sender's pid */ |
| 31 | uid_t _uid; /* sender's uid */ |
| 32 | } _kill; |
| 33 | |
| 34 | /* POSIX.1b timers */ |
| 35 | struct { |
| 36 | timer_t _tid; /* timer id */ |
| 37 | int _overrun; /* overrun count */ |
| 38 | char _pad[sizeof(__ARCH_SI_UID_T) - sizeof(int)]; |
| 39 | sigval_t _sigval; /* must overlay ._rt._sigval! */ |
| 40 | int _sys_private; /* not to be passed to user */ |
| 41 | } _timer; |
| 42 | |
| 43 | /* POSIX.1b signals */ |
| 44 | struct { |
| 45 | pid_t _pid; /* sender's pid */ |
| 46 | uid_t _uid; /* sender's uid */ |
| 47 | sigval_t _sigval; |
| 48 | } _rt; |
| 49 | |
| 50 | /* SIGCHLD */ |
| 51 | struct { |
| 52 | pid_t _pid; /* which child */ |
| 53 | uid_t _uid; /* sender's uid */ |
| 54 | int _status; /* exit code */ |
| 55 | clock_t _utime; |
| 56 | clock_t _stime; |
| 57 | } _sigchld; |
| 58 | |
| 59 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ |
| 60 | struct { |
| 61 | void __user *_addr; /* faulting insn/memory ref. */ |
| 62 | int _imm; /* immediate value for "break" */ |
| 63 | unsigned int _flags; /* see below */ |
| 64 | unsigned long _isr; /* isr */ |
| 65 | short _addr_lsb; /* lsb of faulting address */ |
Dave Hansen | b376cd0 | 2016-02-17 10:17:03 -0800 | [diff] [blame] | 66 | union { |
| 67 | /* used when si_code=SEGV_BNDERR */ |
| 68 | struct { |
| 69 | void __user *_lower; |
| 70 | void __user *_upper; |
| 71 | } _addr_bnd; |
| 72 | /* used when si_code=SEGV_PKUERR */ |
Dave Hansen | 49cd53b | 2016-03-01 04:54:51 -0800 | [diff] [blame] | 73 | __u32 _pkey; |
Dave Hansen | b376cd0 | 2016-02-17 10:17:03 -0800 | [diff] [blame] | 74 | }; |
David Howells | 43e40f2 | 2012-10-09 09:47:00 +0100 | [diff] [blame] | 75 | } _sigfault; |
| 76 | |
| 77 | /* SIGPOLL */ |
| 78 | struct { |
| 79 | long _band; /* POLL_IN, POLL_OUT, POLL_MSG (XPG requires a "long") */ |
| 80 | int _fd; |
| 81 | } _sigpoll; |
| 82 | } _sifields; |
| 83 | } siginfo_t; |
| 84 | |
| 85 | #define si_imm _sifields._sigfault._imm /* as per UNIX SysV ABI spec */ |
| 86 | #define si_flags _sifields._sigfault._flags |
| 87 | /* |
| 88 | * si_isr is valid for SIGILL, SIGFPE, SIGSEGV, SIGBUS, and SIGTRAP provided that |
| 89 | * si_code is non-zero and __ISR_VALID is set in si_flags. |
| 90 | */ |
| 91 | #define si_isr _sifields._sigfault._isr |
| 92 | |
| 93 | /* |
| 94 | * Flag values for si_flags: |
| 95 | */ |
| 96 | #define __ISR_VALID_BIT 0 |
| 97 | #define __ISR_VALID (1 << __ISR_VALID_BIT) |
| 98 | |
| 99 | /* |
| 100 | * SIGILL si_codes |
| 101 | */ |
Eric W. Biederman | cc73152 | 2017-07-16 22:36:59 -0500 | [diff] [blame] | 102 | #define ILL_BADIADDR 9 /* unimplemented instruction address */ |
| 103 | #define __ILL_BREAK 10 /* illegal break */ |
| 104 | #define __ILL_BNDMOD 11 /* bundle-update (modification) in progress */ |
David Howells | 43e40f2 | 2012-10-09 09:47:00 +0100 | [diff] [blame] | 105 | #undef NSIGILL |
| 106 | #define NSIGILL 11 |
| 107 | |
| 108 | /* |
| 109 | * SIGFPE si_codes |
| 110 | */ |
Eric W. Biederman | 80dce5e | 2017-07-16 19:35:35 -0500 | [diff] [blame] | 111 | #ifdef __KERNEL__ |
Eric W. Biederman | cc73152 | 2017-07-16 22:36:59 -0500 | [diff] [blame] | 112 | #define FPE_FIXME 0 /* Broken dup of SI_USER */ |
Eric W. Biederman | 80dce5e | 2017-07-16 19:35:35 -0500 | [diff] [blame] | 113 | #endif /* __KERNEL__ */ |
Eric W. Biederman | cc73152 | 2017-07-16 22:36:59 -0500 | [diff] [blame] | 114 | #define __FPE_DECOVF 9 /* decimal overflow */ |
| 115 | #define __FPE_DECDIV 10 /* decimal division by zero */ |
| 116 | #define __FPE_DECERR 11 /* packed decimal error */ |
| 117 | #define __FPE_INVASC 12 /* invalid ASCII digit */ |
| 118 | #define __FPE_INVDEC 13 /* invalid decimal digit */ |
David Howells | 43e40f2 | 2012-10-09 09:47:00 +0100 | [diff] [blame] | 119 | #undef NSIGFPE |
| 120 | #define NSIGFPE 13 |
| 121 | |
| 122 | /* |
| 123 | * SIGSEGV si_codes |
| 124 | */ |
Eric W. Biederman | cc73152 | 2017-07-16 22:36:59 -0500 | [diff] [blame] | 125 | #define __SEGV_PSTKOVF 4 /* paragraph stack overflow */ |
David Howells | 43e40f2 | 2012-10-09 09:47:00 +0100 | [diff] [blame] | 126 | #undef NSIGSEGV |
Qiaowei Ren | 53f037b | 2014-11-14 07:18:22 -0800 | [diff] [blame] | 127 | #define NSIGSEGV 4 |
David Howells | 43e40f2 | 2012-10-09 09:47:00 +0100 | [diff] [blame] | 128 | |
| 129 | #undef NSIGTRAP |
| 130 | #define NSIGTRAP 4 |
| 131 | |
| 132 | |
| 133 | #endif /* _UAPI_ASM_IA64_SIGINFO_H */ |