diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2018-01-03 19:22:04 -0600 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-09-19 15:53:11 +0200 |
commit | 8d68fa0e083995b48be6b66e04afe746d4654b0c (patch) | |
tree | 6c939685f89f57cbc13b178c0310c79b98db4072 /arch/x86/include | |
parent | 8a35eb22c02baf0c58b44ba28fc163270ef147f8 (diff) | |
download | blackbird-obmc-linux-8d68fa0e083995b48be6b66e04afe746d4654b0c.tar.gz blackbird-obmc-linux-8d68fa0e083995b48be6b66e04afe746d4654b0c.zip |
signal/x86: Move mpx siginfo generation into do_bounds
This separates the logic of generating the signal from the logic of
gathering the information about the bounds violation.
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/mpx.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/include/asm/mpx.h b/arch/x86/include/asm/mpx.h index 61eb4b63c5ec..d0b1434fb0b6 100644 --- a/arch/x86/include/asm/mpx.h +++ b/arch/x86/include/asm/mpx.h @@ -57,8 +57,14 @@ #define MPX_BNDCFG_ADDR_MASK (~((1UL<<MPX_BNDCFG_TAIL)-1)) #define MPX_BNDSTA_ERROR_CODE 0x3 +struct mpx_fault_info { + void __user *addr; + void __user *lower; + void __user *upper; +}; + #ifdef CONFIG_X86_INTEL_MPX -siginfo_t *mpx_generate_siginfo(struct pt_regs *regs); +int mpx_fault_info(struct mpx_fault_info *info, struct pt_regs *regs); int mpx_handle_bd_fault(void); static inline int kernel_managing_mpx_tables(struct mm_struct *mm) { @@ -78,9 +84,9 @@ void mpx_notify_unmap(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long mpx_unmapped_area_check(unsigned long addr, unsigned long len, unsigned long flags); #else -static inline siginfo_t *mpx_generate_siginfo(struct pt_regs *regs) +static inline int mpx_fault_info(struct mpx_fault_info *info, struct pt_regs *regs) { - return NULL; + return -EINVAL; } static inline int mpx_handle_bd_fault(void) { |