History

mpx: Extend siginfo structure to include bound violation information

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.

Qiaowei Ren committed 12 years ago

Commit ee1b58d1 parent 62e77592 files · +12 −1Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/asm-generic/siginfo.h+8−1
@@ -91,6 +91,10 @@ typedef struct siginfo { · 90 unmodified lines
9191 int _trapno; /* TRAP # which caused the signal */
9292 #endif
9393 short _addr_lsb; /* LSB of the reported address */
94+ struct {
95+ void __user *_lower;
96+ void __user *_upper;
97+ } _addr_bnd;
9498 } _sigfault;
9599
96100 /* SIGPOLL */
@@ -131,6 +135,8 @@ typedef struct siginfo { · 34 unmodified lines
131135 #define si_trapno _sifields._sigfault._trapno
132136 #endif
133137 #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
134140 #define si_band _sifields._sigpoll._band
135141 #define si_fd _sifields._sigpoll._fd
136142 #ifdef __ARCH_SIGSYS
@@ -199,7 +205,8 @@ typedef struct siginfo { · 62 unmodified lines
199205 */
200206 #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */
201207 #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
203210
204211 /*
205212 * SIGBUS si_codes

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t