Merge branch 'x86-mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 MPX support from Thomas Gleixner: "This enables support for x86 MPX. MPX is a new debug feature for bound checking in user space. It requires kernel support to handle the bound tables and decode the bound violating instruction in the trap handler" * 'x86-mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: asm-generic: Remove asm-generic arch_bprm_mm_init() mm: Make arch_unmap()/bprm_mm_init() available to all architectures x86: Cleanly separate use of asm-generic/mm_hooks.h x86 mpx: Change return type of get_reg_offset() fs: Do not include mpx.h in exec.c x86, mpx: Add documentation on Intel MPX x86, mpx: Cleanup unused bound tables x86, mpx: On-demand kernel allocation of bounds tables x86, mpx: Decode MPX instruction to get bound violation information x86, mpx: Add MPX-specific mmap interface x86, mpx: Introduce VM_MPX to indicate that a VMA is MPX specific x86, mpx: Add MPX to disabled features ia64: Sync struct siginfo with general version mips: Sync struct siginfo with general version mpx: Extend siginfo structure to include bound violation information x86, mpx: Rename cfg_reg_u and status_reg x86: mpx: Give bndX registers actual names x86: Remove arbitrary instruction size limit in instruction decoder
This commit is contained in:
@@ -91,6 +91,10 @@ typedef struct siginfo {
|
||||
int _trapno; /* TRAP # which caused the signal */
|
||||
#endif
|
||||
short _addr_lsb; /* LSB of the reported address */
|
||||
struct {
|
||||
void __user *_lower;
|
||||
void __user *_upper;
|
||||
} _addr_bnd;
|
||||
} _sigfault;
|
||||
|
||||
/* SIGPOLL */
|
||||
@@ -131,6 +135,8 @@ typedef struct siginfo {
|
||||
#define si_trapno _sifields._sigfault._trapno
|
||||
#endif
|
||||
#define si_addr_lsb _sifields._sigfault._addr_lsb
|
||||
#define si_lower _sifields._sigfault._addr_bnd._lower
|
||||
#define si_upper _sifields._sigfault._addr_bnd._upper
|
||||
#define si_band _sifields._sigpoll._band
|
||||
#define si_fd _sifields._sigpoll._fd
|
||||
#ifdef __ARCH_SIGSYS
|
||||
@@ -199,7 +205,8 @@ typedef struct siginfo {
|
||||
*/
|
||||
#define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */
|
||||
#define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */
|
||||
#define NSIGSEGV 2
|
||||
#define SEGV_BNDERR (__SI_FAULT|3) /* failed address bound checks */
|
||||
#define NSIGSEGV 3
|
||||
|
||||
/*
|
||||
* SIGBUS si_codes
|
||||
|
||||
@@ -179,4 +179,10 @@ struct prctl_mm_map {
|
||||
#define PR_SET_THP_DISABLE 41
|
||||
#define PR_GET_THP_DISABLE 42
|
||||
|
||||
/*
|
||||
* Tell the kernel to start/stop helping userspace manage bounds tables.
|
||||
*/
|
||||
#define PR_MPX_ENABLE_MANAGEMENT 43
|
||||
#define PR_MPX_DISABLE_MANAGEMENT 44
|
||||
|
||||
#endif /* _LINUX_PRCTL_H */
|
||||
|
||||
Reference in New Issue
Block a user