RE: [RFC PATCH v2 1/5] mm: Introduce vm_ops->may_mprotect()

2019-06-10 Thread Xing, Cedric
> From: Christopherson, Sean J > Sent: Monday, June 10, 2019 12:50 PM > > On Mon, Jun 10, 2019 at 10:47:52AM -0700, Xing, Cedric wrote: > > > From: Christopherson, Sean J > > > Sent: Monday, June 10, 2019 8:56 AM > > > > > > > > As a result, LSM policies cannot be meaningfully applied, e.g. > > >

Re: [RFC PATCH v2 1/5] mm: Introduce vm_ops->may_mprotect()

2019-06-10 Thread Sean Christopherson
On Mon, Jun 10, 2019 at 10:47:52AM -0700, Xing, Cedric wrote: > > From: Christopherson, Sean J > > Sent: Monday, June 10, 2019 8:56 AM > > > > > > As a result, LSM policies cannot be meaningfully applied, e.g. an > > > > LSM can deny access to the EPC as a whole, but can't deny PROT_EXEC > > > > o

RE: [RFC PATCH v2 1/5] mm: Introduce vm_ops->may_mprotect()

2019-06-10 Thread Xing, Cedric
> From: Christopherson, Sean J > Sent: Monday, June 10, 2019 8:56 AM > > > > As a result, LSM policies cannot be meaningfully applied, e.g. an > > > LSM can deny access to the EPC as a whole, but can't deny PROT_EXEC > > > on page that originated in a non-EXECUTE file (which is long gone by > > >

Re: [RFC PATCH v2 1/5] mm: Introduce vm_ops->may_mprotect()

2019-06-10 Thread Sean Christopherson
On Mon, Jun 10, 2019 at 06:06:00PM +0300, Jarkko Sakkinen wrote: > On Wed, Jun 05, 2019 at 07:11:41PM -0700, Sean Christopherson wrote: > > SGX will use the may_mprotect() hook to prevent userspace from > > circumventing various security checks, e.g. Linux Security Modules. > > Naming it may_mprote

Re: [RFC PATCH v2 1/5] mm: Introduce vm_ops->may_mprotect()

2019-06-10 Thread Jarkko Sakkinen
On Wed, Jun 05, 2019 at 07:11:41PM -0700, Sean Christopherson wrote: > SGX will use the may_mprotect() hook to prevent userspace from > circumventing various security checks, e.g. Linux Security Modules. > Naming it may_mprotect() instead of simply mprotect() is intended to > reflect the hook's pur