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
91 int _trapno; /* TRAP # which caused the signal */91 int _trapno; /* TRAP # which caused the signal */
92#endif92#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._trapno135#define si_trapno _sifields._sigfault._trapno
132#endif136#endif
133#define si_addr_lsb _sifields._sigfault._addr_lsb137#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._band140#define si_band _sifields._sigpoll._band
135#define si_fd _sifields._sigpoll._fd141#define si_fd _sifields._sigpoll._fd
136#ifdef __ARCH_SIGSYS142#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 2208#define SEGV_BNDERR (__SI_FAULT|3) /* failed address bound checks */
209#define NSIGSEGV 3
203 210
204/*211/*
205 * SIGBUS si_codes212 * 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