RE: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-16 Thread Ren, Qiaowei
On 2014-09-16, Hansen, Dave wrote: > On 09/11/2014 01:46 AM, Qiaowei Ren wrote: >> +/* >> + * Free the backing physical pages of bounds table 'bt_addr'. >> + * Assume start...end is within that bounds table. >> + */ >> +static int __must_check zap_bt_entries(struct mm_struct *mm, >> +

RE: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-16 Thread Ren, Qiaowei
On 2014-09-16, Hansen, Dave wrote: On 09/11/2014 01:46 AM, Qiaowei Ren wrote: +/* + * Free the backing physical pages of bounds table 'bt_addr'. + * Assume start...end is within that bounds table. + */ +static int __must_check zap_bt_entries(struct mm_struct *mm, +unsigned

Re: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-15 Thread Dave Hansen
On 09/11/2014 01:46 AM, Qiaowei Ren wrote: > +static int get_bt_addr(long __user *bd_entry, unsigned long *bt_addr) > +{ > + int valid; > + > + if (!access_ok(VERIFY_READ, (bd_entry), sizeof(*(bd_entry > + return -EFAULT; Nit: get rid of unnecessary parenthesis. > +

Re: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-15 Thread Dave Hansen
On 09/11/2014 01:46 AM, Qiaowei Ren wrote: +static int get_bt_addr(long __user *bd_entry, unsigned long *bt_addr) +{ + int valid; + + if (!access_ok(VERIFY_READ, (bd_entry), sizeof(*(bd_entry + return -EFAULT; Nit: get rid of unnecessary parenthesis. +

Re: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-11 Thread Dave Hansen
On 09/11/2014 08:02 PM, Ren, Qiaowei wrote: > On 2014-09-11, Hansen, Dave wrote: >> On 09/11/2014 01:46 AM, Qiaowei Ren wrote: >>> + * This function will be called by do_munmap(), and the VMAs >>> + covering >>> + * the virtual address region start...end have already been split >>> + if >>> + *

RE: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-11 Thread Ren, Qiaowei
On 2014-09-11, Hansen, Dave wrote: > On 09/11/2014 01:46 AM, Qiaowei Ren wrote: >> + * This function will be called by do_munmap(), and the VMAs >> + covering >> + * the virtual address region start...end have already been split >> + if >> + * necessary and remvoed from the VMA list. > >

Re: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-11 Thread Dave Hansen
On 09/11/2014 01:46 AM, Qiaowei Ren wrote: > + * This function will be called by do_munmap(), and the VMAs covering > + * the virtual address region start...end have already been split if > + * necessary and remvoed from the VMA list. "remvoed" -> "removed" > +void mpx_unmap(struct mm_struct

RE: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-11 Thread Ren, Qiaowei
On 2014-09-11, Hansen, Dave wrote: On 09/11/2014 01:46 AM, Qiaowei Ren wrote: + * This function will be called by do_munmap(), and the VMAs + covering + * the virtual address region start...end have already been split + if + * necessary and remvoed from the VMA list. remvoed - removed

Re: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-11 Thread Dave Hansen
On 09/11/2014 08:02 PM, Ren, Qiaowei wrote: On 2014-09-11, Hansen, Dave wrote: On 09/11/2014 01:46 AM, Qiaowei Ren wrote: + * This function will be called by do_munmap(), and the VMAs + covering + * the virtual address region start...end have already been split + if + * necessary and

Re: [PATCH v8 09/10] x86, mpx: cleanup unused bound tables

2014-09-11 Thread Dave Hansen
On 09/11/2014 01:46 AM, Qiaowei Ren wrote: + * This function will be called by do_munmap(), and the VMAs covering + * the virtual address region start...end have already been split if + * necessary and remvoed from the VMA list. remvoed - removed +void mpx_unmap(struct mm_struct *mm, +