Re: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-28 Thread Ren Qiaowei
On 10/28/2014 04:38 AM, Thomas Gleixner wrote: On Mon, 27 Oct 2014, Ren, Qiaowei wrote: On 2014-10-24, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: +int mpx_enable_management(struct task_struct *tsk) { + struct mm_struct *mm = tsk->mm; + void __user *bd_base =

Re: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-28 Thread Ren Qiaowei
On 10/28/2014 04:38 AM, Thomas Gleixner wrote: On Mon, 27 Oct 2014, Ren, Qiaowei wrote: On 2014-10-24, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: +int mpx_enable_management(struct task_struct *tsk) { + struct mm_struct *mm = tsk-mm; + void __user *bd_base =

RE: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-27 Thread Thomas Gleixner
On Mon, 27 Oct 2014, Ren, Qiaowei wrote: > On 2014-10-24, Thomas Gleixner wrote: > > On Sun, 12 Oct 2014, Qiaowei Ren wrote: > >> +int mpx_enable_management(struct task_struct *tsk) { > >> + struct mm_struct *mm = tsk->mm; > >> + void __user *bd_base = MPX_INVALID_BOUNDS_DIR; > > > > What's the

RE: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-27 Thread Thomas Gleixner
On Mon, 27 Oct 2014, Ren, Qiaowei wrote: On 2014-10-24, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: +int mpx_enable_management(struct task_struct *tsk) { + struct mm_struct *mm = tsk-mm; + void __user *bd_base = MPX_INVALID_BOUNDS_DIR; What's the point of

RE: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-26 Thread Ren, Qiaowei
On 2014-10-24, Thomas Gleixner wrote: > On Sun, 12 Oct 2014, Qiaowei Ren wrote: >> +int mpx_enable_management(struct task_struct *tsk) { >> +struct mm_struct *mm = tsk->mm; >> +void __user *bd_base = MPX_INVALID_BOUNDS_DIR; > > What's the point of initializing bd_base here. I had to

RE: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-26 Thread Ren, Qiaowei
On 2014-10-24, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: +int mpx_enable_management(struct task_struct *tsk) { +struct mm_struct *mm = tsk-mm; +void __user *bd_base = MPX_INVALID_BOUNDS_DIR; What's the point of initializing bd_base here. I had to look twice to

Re: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-24 Thread Thomas Gleixner
On Fri, 24 Oct 2014, Thomas Gleixner wrote: > On Sun, 12 Oct 2014, Qiaowei Ren wrote: > > +int mpx_enable_management(struct task_struct *tsk) > > +{ > > + struct mm_struct *mm = tsk->mm; > > + void __user *bd_base = MPX_INVALID_BOUNDS_DIR; > > What's the point of initializing bd_base here. I

Re: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-24 Thread Thomas Gleixner
On Sun, 12 Oct 2014, Qiaowei Ren wrote: > +int mpx_enable_management(struct task_struct *tsk) > +{ > + struct mm_struct *mm = tsk->mm; > + void __user *bd_base = MPX_INVALID_BOUNDS_DIR; What's the point of initializing bd_base here. I had to look twice to figure out that it gets

Re: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-24 Thread Thomas Gleixner
On Sun, 12 Oct 2014, Qiaowei Ren wrote: +int mpx_enable_management(struct task_struct *tsk) +{ + struct mm_struct *mm = tsk-mm; + void __user *bd_base = MPX_INVALID_BOUNDS_DIR; What's the point of initializing bd_base here. I had to look twice to figure out that it gets overwritten by

Re: [PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-24 Thread Thomas Gleixner
On Fri, 24 Oct 2014, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: +int mpx_enable_management(struct task_struct *tsk) +{ + struct mm_struct *mm = tsk-mm; + void __user *bd_base = MPX_INVALID_BOUNDS_DIR; What's the point of initializing bd_base here. I had to look

[PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-11 Thread Qiaowei Ren
This patch adds two prctl() commands to provide one explicit interaction mechanism to enable or disable the management of bounds tables in kernel, including on-demand kernel allocation (See the patch "on-demand kernel allocation of bounds tables") and cleanup (See the patch "cleanup unused bound

[PATCH v9 10/12] x86, mpx: add prctl commands PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT

2014-10-11 Thread Qiaowei Ren
This patch adds two prctl() commands to provide one explicit interaction mechanism to enable or disable the management of bounds tables in kernel, including on-demand kernel allocation (See the patch on-demand kernel allocation of bounds tables) and cleanup (See the patch cleanup unused bound