Messages in this thread | | | From | (Eric W. Biederman) | Date | Wed, 10 Dec 2014 20:14:44 -0600 | Subject | Re: [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
| |