Re: [PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-28 Thread Thomas Gleixner
On Tue, 28 Oct 2014, Dave Hansen wrote: > On 10/24/2014 05:08 AM, Thomas Gleixner wrote: > > On Sun, 12 Oct 2014, Qiaowei Ren wrote: > >> + /* > >> + * Go poke the address of the new bounds table in to the > >> + * bounds directory entry out in userspace memory. Note: > >> + * we may race

Re: [PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-28 Thread Dave Hansen
On 10/24/2014 05:08 AM, Thomas Gleixner wrote: > On Sun, 12 Oct 2014, Qiaowei Ren wrote: >> +/* >> + * Go poke the address of the new bounds table in to the >> + * bounds directory entry out in userspace memory. Note: >> + * we may race with another CPU instantiating the same

Re: [PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-28 Thread Dave Hansen
On 10/24/2014 05:08 AM, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: +/* + * Go poke the address of the new bounds table in to the + * bounds directory entry out in userspace memory. Note: + * we may race with another CPU instantiating the same table. +

Re: [PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-28 Thread Thomas Gleixner
On Tue, 28 Oct 2014, Dave Hansen wrote: On 10/24/2014 05:08 AM, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: + /* + * Go poke the address of the new bounds table in to the + * bounds directory entry out in userspace memory. Note: + * we may race with another

Re: [PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-26 Thread Ren Qiaowei
On 10/24/2014 08:08 PM, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: + /* +* Go poke the address of the new bounds table in to the +* bounds directory entry out in userspace memory. Note: +* we may race with another CPU instantiating the same

Re: [PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-26 Thread Ren Qiaowei
On 10/24/2014 08:08 PM, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: + /* +* Go poke the address of the new bounds table in to the +* bounds directory entry out in userspace memory. Note: +* we may race with another CPU instantiating the same

Re: [PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-24 Thread Thomas Gleixner
On Sun, 12 Oct 2014, Qiaowei Ren wrote: > + /* > + * Go poke the address of the new bounds table in to the > + * bounds directory entry out in userspace memory. Note: > + * we may race with another CPU instantiating the same table. > + * In that case the cmpxchg will see

Re: [PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-24 Thread Thomas Gleixner
On Sun, 12 Oct 2014, Qiaowei Ren wrote: + /* + * Go poke the address of the new bounds table in to the + * bounds directory entry out in userspace memory. Note: + * we may race with another CPU instantiating the same table. + * In that case the cmpxchg will see an

[PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-11 Thread Qiaowei Ren
MPX only has 4 hardware registers for storing bounds information. If MPX-enabled code needs more than these 4 registers, it needs to spill them somewhere. It has two special instructions for this which allow the bounds to be moved between the bounds registers and some new "bounds tables". They

[PATCH v9 05/12] x86, mpx: on-demand kernel allocation of bounds tables

2014-10-11 Thread Qiaowei Ren
MPX only has 4 hardware registers for storing bounds information. If MPX-enabled code needs more than these 4 registers, it needs to spill them somewhere. It has two special instructions for this which allow the bounds to be moved between the bounds registers and some new bounds tables. They are