Re: [PATCH v33 10/21] mm: Introduce vm_ops->may_mprotect()

2020-06-25 Thread Jarkko Sakkinen
On Thu, Jun 25, 2020 at 11:06:46AM -0700, Sean Christopherson wrote: > On Thu, Jun 25, 2020 at 06:30:50PM +0100, Matthew Wilcox wrote: > > On Thu, Jun 25, 2020 at 07:14:16PM +0200, Borislav Petkov wrote: > > > On Thu, Jun 18, 2020 at 01:08:32AM +0300, Jarkko Sakkinen wrote: > > > > diff --git a/mm/

Re: [PATCH v33 10/21] mm: Introduce vm_ops->may_mprotect()

2020-06-25 Thread Jarkko Sakkinen
On Thu, Jun 25, 2020 at 07:14:16PM +0200, Borislav Petkov wrote: > On Thu, Jun 18, 2020 at 01:08:32AM +0300, Jarkko Sakkinen wrote: > > From: Sean Christopherson > > > > Add vm_ops()->may_mprotect() to check additional constraints. > > > > SGX uses this callback to add two constraints: > > > >

Re: [PATCH v33 10/21] mm: Introduce vm_ops->may_mprotect()

2020-06-25 Thread Sean Christopherson
On Thu, Jun 25, 2020 at 06:30:50PM +0100, Matthew Wilcox wrote: > On Thu, Jun 25, 2020 at 07:14:16PM +0200, Borislav Petkov wrote: > > On Thu, Jun 18, 2020 at 01:08:32AM +0300, Jarkko Sakkinen wrote: > > > diff --git a/mm/mprotect.c b/mm/mprotect.c > > > index ce8b8a5eacbb..f7731dc13ff0 100644 > >

Re: [PATCH v33 10/21] mm: Introduce vm_ops->may_mprotect()

2020-06-25 Thread Matthew Wilcox
On Thu, Jun 25, 2020 at 07:14:16PM +0200, Borislav Petkov wrote: > On Thu, Jun 18, 2020 at 01:08:32AM +0300, Jarkko Sakkinen wrote: > > From: Sean Christopherson > > Something ate the Cc:s. Lemme add the mm list, akpm is already on Cc. > > Leaving in the rest for mm folks. Thanks! > > diff --g

Re: [PATCH v33 10/21] mm: Introduce vm_ops->may_mprotect()

2020-06-25 Thread Borislav Petkov
On Thu, Jun 18, 2020 at 01:08:32AM +0300, Jarkko Sakkinen wrote: > From: Sean Christopherson > > Add vm_ops()->may_mprotect() to check additional constraints. > > SGX uses this callback to add two constraints: > > 1. Verify that the address range does not have holes: for each page >address,