summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/mpx.h
diff options
context:
space:
mode:
authorEric W. Biederman2018-01-04 02:22:04 +0100
committerEric W. Biederman2018-09-19 15:53:11 +0200
commit8d68fa0e083995b48be6b66e04afe746d4654b0c (patch)
tree6c939685f89f57cbc13b178c0310c79b98db4072 /arch/x86/include/asm/mpx.h
parentsignal/x86: In trace_mpx_bounds_register_exception add __user annotations (diff)
downloadkernel-qcow2-linux-8d68fa0e083995b48be6b66e04afe746d4654b0c.tar.gz
kernel-qcow2-linux-8d68fa0e083995b48be6b66e04afe746d4654b0c.tar.xz
kernel-qcow2-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/asm/mpx.h')
-rw-r--r--arch/x86/include/asm/mpx.h12
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)
{