lkml.org 
[lkml]   [2014]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT pull] x86 mpx support for 3.19
Thomas Gleixner <tglx@linutronix.de> writes:

> Linus,
>
> please pull the latest x86-mpx-for-linus git tree from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-mpx-for-linus
>
> 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.

I some really dumb questions.

Given that mpx is both architecture and cpu specific why use prctl?
I would think arch_prctl would be a much more appropriate place to
expose this logic.

Why don't you have a call to let an application query to see if mpx
management is enabled? I am trying to imagine how checkpoint/restart is
going to be supported for mpx applications. If I can't even query if
mpx is enabled I don't have a clue how we could save this state and
duplicate it in another process on another machine.

> +Adding new prctl commands
> +-------------------------
> +
> +Two new prctl commands are added to enable and disable MPX bounds tables
> +management in kernel.
> +
> +155 #define PR_MPX_ENABLE_MANAGEMENT 43
> +156 #define PR_MPX_DISABLE_MANAGEMENT 44
> +
> +Runtime library in userspace is responsible for allocation of bounds
> +directory. So kernel have to use XSAVE instruction to get the base
> +of bounds directory from BNDCFG register.
> +
> +But XSAVE is expected to be very expensive. In order to do performance
> +optimization, we have to get the base of bounds directory and save it
> +into struct mm_struct to be used in future during PR_MPX_ENABLE_MANAGEMENT
> +command execution.
> +


Eric


\
 
 \ /
  Last update: 2014-12-11 03:41    [W:0.240 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site