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 | 91 | int _trapno; /* TRAP # which caused the signal */ |
| 92 | 92 | #endif |
| 93 | 93 | short _addr_lsb; /* LSB of the reported address */ |
| 94 | + struct { | |
| 95 | + void __user *_lower; | |
| 96 | + void __user *_upper; | |
| 97 | + } _addr_bnd; | |
| 94 | 98 | } _sigfault; |
| 95 | 99 | |
| 96 | 100 | /* SIGPOLL */ |
| @@ -131,6 +135,8 @@ typedef struct siginfo { · 34 unmodified lines | ||
| 131 | 135 | #define si_trapno _sifields._sigfault._trapno |
| 132 | 136 | #endif |
| 133 | 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 | 140 | #define si_band _sifields._sigpoll._band |
| 135 | 141 | #define si_fd _sifields._sigpoll._fd |
| 136 | 142 | #ifdef __ARCH_SIGSYS |
| @@ -199,7 +205,8 @@ typedef struct siginfo { · 62 unmodified lines | ||
| 199 | 205 | */ |
| 200 | 206 | #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */ |
| 201 | 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 | 212 | * SIGBUS si_codes |