This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -91,6 +91,10 @@ typedef struct siginfo { · 90 unmodified lines | |||
| 91 | int _trapno; /* TRAP # which caused the signal */ | 91 | int _trapno; /* TRAP # which caused the signal */ |
| 92 | #endif | 92 | #endif |
| 93 | short _addr_lsb; /* LSB of the reported address */ | 93 | short _addr_lsb; /* LSB of the reported address */ |
| 94 | struct { | ||
| 95 | void __user *_lower; | ||
| 96 | void __user *_upper; | ||
| 97 | } _addr_bnd; | ||
| 94 | } _sigfault; | 98 | } _sigfault; |
| 95 | 99 | ||
| 96 | /* SIGPOLL */ | 100 | /* SIGPOLL */ |
| @@ -131,6 +135,8 @@ typedef struct siginfo { · 34 unmodified lines | |||
| 131 | #define si_trapno _sifields._sigfault._trapno | 135 | #define si_trapno _sifields._sigfault._trapno |
| 132 | #endif | 136 | #endif |
| 133 | #define si_addr_lsb _sifields._sigfault._addr_lsb | 137 | #define si_addr_lsb _sifields._sigfault._addr_lsb |
| 138 | #define si_lower _sifields._sigfault._addr_bnd._lower | ||
| 139 | #define si_upper _sifields._sigfault._addr_bnd._upper | ||
| 134 | #define si_band _sifields._sigpoll._band | 140 | #define si_band _sifields._sigpoll._band |
| 135 | #define si_fd _sifields._sigpoll._fd | 141 | #define si_fd _sifields._sigpoll._fd |
| 136 | #ifdef __ARCH_SIGSYS | 142 | #ifdef __ARCH_SIGSYS |
| @@ -199,7 +205,8 @@ typedef struct siginfo { · 62 unmodified lines | |||
| 199 | */ | 205 | */ |
| 200 | #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */ | 206 | #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */ |
| 201 | #define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */ | 207 | #define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */ |
| 202 | #define NSIGSEGV 2 | 208 | #define SEGV_BNDERR (__SI_FAULT|3) /* failed address bound checks */ |
| 209 | #define NSIGSEGV 3 | ||
| 203 | 210 | ||
| 204 | /* | 211 | /* |
| 205 | * SIGBUS si_codes | 212 | * SIGBUS si_codes |