Re: [PATCH v6 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-07-11 Thread Dave Hansen
On 06/18/2014 02:44 AM, Qiaowei Ren wrote: > + bt_addr = mpx_mmap(MPX_BT_SIZE_BYTES); > + if (IS_ERR((void *)bt_addr)) { > + pr_err("Bounds table allocation failed at entry addr %p\n", > + bd_entry); > + return bt_addr; > + } Don't

Re: [PATCH v6 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-07-11 Thread Dave Hansen
On 06/18/2014 02:44 AM, Qiaowei Ren wrote: + bt_addr = mpx_mmap(MPX_BT_SIZE_BYTES); + if (IS_ERR((void *)bt_addr)) { + pr_err(Bounds table allocation failed at entry addr %p\n, + bd_entry); + return bt_addr; + } Don't forget to

RE: [PATCH v6 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-06-23 Thread Ren, Qiaowei
On 2014-06-24, Andy Lutomirski wrote: > On 06/18/2014 02:44 AM, Qiaowei Ren wrote: >> +/* >> + * The error code field of the BNDSTATUS register communicates status >> + * information of a bound range exception #BR or operation involving >> + * bound directory. >> + */ >> +

Re: [PATCH v6 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-06-23 Thread Andy Lutomirski
On 06/18/2014 02:44 AM, Qiaowei Ren wrote: > This patch handles a #BR exception for non-existent tables by > carving the space out of the normal processes address space > (essentially calling mmap() from inside the kernel) and then > pointing the bounds-directory over to it. > > The tables need

Re: [PATCH v6 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-06-23 Thread Andy Lutomirski
On 06/18/2014 02:44 AM, Qiaowei Ren wrote: This patch handles a #BR exception for non-existent tables by carving the space out of the normal processes address space (essentially calling mmap() from inside the kernel) and then pointing the bounds-directory over to it. The tables need to be

RE: [PATCH v6 04/10] x86, mpx: hook #BR exception handler to allocate bound tables

2014-06-23 Thread Ren, Qiaowei
On 2014-06-24, Andy Lutomirski wrote: On 06/18/2014 02:44 AM, Qiaowei Ren wrote: +/* + * The error code field of the BNDSTATUS register communicates status + * information of a bound range exception #BR or operation involving + * bound directory. + */ +switch (status