Re: [PATCH v2 0/4] Intel MPX support
From: David Rientjes
Date: Wed Jan 22 2014 - 03:00:51 EST
On Wed, 22 Jan 2014, Qiaowei Ren wrote:
> Changes since v1:
> * check to see if #BR occurred in userspace or kernel space.
> * use generic structure and macro as much as possible when
> decode mpx instructions.
>
> Qiaowei Ren (4):
> x86, mpx: add documentation on Intel MPX
> x86, mpx: hook #BR exception handler to allocate bound tables
> x86, mpx: add prctl commands PR_MPX_INIT, PR_MPX_RELEASE
> x86, mpx: extend siginfo structure to include bound violation
> information
>
> Documentation/x86/intel_mpx.txt | 76 +++++++
> arch/x86/Kconfig | 4 +
> arch/x86/include/asm/mpx.h | 63 ++++++
> arch/x86/include/asm/processor.h | 16 ++
> arch/x86/kernel/Makefile | 1 +
> arch/x86/kernel/mpx.c | 417 ++++++++++++++++++++++++++++++++++++
> arch/x86/kernel/traps.c | 61 +++++-
> include/uapi/asm-generic/siginfo.h | 9 +-
> include/uapi/linux/prctl.h | 6 +
> kernel/signal.c | 4 +
> kernel/sys.c | 12 +
> 11 files changed, 667 insertions(+), 2 deletions(-)
> create mode 100644 Documentation/x86/intel_mpx.txt
> create mode 100644 arch/x86/include/asm/mpx.h
> create mode 100644 arch/x86/kernel/mpx.c
>
There's compiler warnings spread amongst the various patches with x86_64
defconfig:
arch/x86/kernel/mpx.c: In function âdo_mpx_boundsâ:
arch/x86/kernel/mpx.c:415:2: warning: format â%lxâ expects argument of type âlong unsigned intâ, but argument 3 has type âvoid *â [-Wformat]
arch/x86/kernel/mpx.c:415:2: warning: format â%lxâ expects argument of type âlong unsigned intâ, but argument 4 has type âvoid *â [-Wformat]
arch/x86/kernel/mpx.c: In function âdo_mpx_bt_faultâ:
arch/x86/kernel/mpx.c:373:5: warning: âold_valâ may be used uninitialized in this function [-Wuninitialized]
arch/x86/kernel/mpx.c:360:25: note: âold_valâ was declared here
and I had to resolve the second patch manually because of "x86/traps:
Clean up error exception handler definitions" in the x86 tree.
With 32-bit, we get casting warnings:
arch/x86/kernel/mpx.c: In function âdo_mpx_boundsâ:
arch/x86/kernel/mpx.c:407:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
arch/x86/kernel/mpx.c:409:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
and I'm pretty sure you want this to be available for such a config.
There's also whitespace in the fourth patch.