Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-10-26 Thread Sean Christopherson
On Mon, Oct 26, 2020 at 03:59:35PM -0700, Andy Lutomirski wrote: > > On Oct 26, 2020, at 3:51 AM, Dr. Greg wrote: > > The open question in all of this is that the EDMM paper, as well as > > the SDM, indicate the effects of an ENCLU[EMODPE] are immediate inside > > of a running enclave. I'm

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-10-26 Thread Andy Lutomirski
> On Oct 26, 2020, at 3:51 AM, Dr. Greg wrote: > > On Sat, Oct 24, 2020 at 08:33:21AM -0700, Andy Lutomirski wrote: > > The easiest way to generically block dynamic code loading is to not > allow the ENCLS[EAUG] instruction to be executed, the purpose of which > is to augment a defined but

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-10-26 Thread Dr. Greg
On Sat, Oct 24, 2020 at 08:33:21AM -0700, Andy Lutomirski wrote: Good morning, I hope the week is starting well for everyone. > > On Oct 24, 2020, at 7:38 AM, Dr. Greg wrote: > > I can't bring myself to believe that LSM's are going to be written > > that will be making enclave security

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-10-24 Thread Andy Lutomirski
> On Oct 24, 2020, at 7:38 AM, Dr. Greg wrote: > > > I can't bring myself to believe that LSM's are going to be written > that will be making enclave security decisions on a page by page > basis. Given what I have written above, I think all of this comes > down to giving platform

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-10-24 Thread Dr. Greg
On Tue, Oct 20, 2020 at 09:40:00AM -0700, Sean Christopherson wrote: Good morning, I hope the week has gone well for everyone. > On Tue, Oct 20, 2020 at 05:01:18AM -0500, Dr. Greg wrote: > > > > With respect to the security issue at hand, the only relevant issue > > would seem to be if a page

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-10-20 Thread Sean Christopherson
On Tue, Oct 20, 2020 at 05:01:18AM -0500, Dr. Greg wrote: > On Mon, Oct 19, 2020 at 02:31:05PM -0700, Sean Christopherson wrote: > > Good morning, I hope the day is starting well for everyone. > > > On Sun, Oct 18, 2020 at 03:49:20AM -0500, Dr. Greg wrote: > > > Is this even a relevant control

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-10-20 Thread Dr. Greg
On Mon, Oct 19, 2020 at 02:31:05PM -0700, Sean Christopherson wrote: Good morning, I hope the day is starting well for everyone. > On Sun, Oct 18, 2020 at 03:49:20AM -0500, Dr. Greg wrote: > > Is this even a relevant control if we cede the notion of dynamically > > loadable enclave code, which

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-10-19 Thread Sean Christopherson
On Sun, Oct 18, 2020 at 03:49:20AM -0500, Dr. Greg wrote: > Is this even a relevant control if we cede the notion of dynamically > loadable enclave code, which is the objective of SGX2 hardware, which > will in all likelihood be the only relevant hardware implementation in > the future? Yes, it's

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-10-18 Thread Dr. Greg
On Mon, Sep 28, 2020 at 07:04:38AM -0700, Dave Hansen wrote: Good morning, I hope the weekend is going well for everyone. > On 9/27/20 5:53 PM, Jarkko Sakkinen wrote: > > On Fri, Sep 25, 2020 at 12:53:35PM -0700, Dave Hansen wrote: > >> On 9/25/20 12:43 PM, Sean Christopherson wrote: > That

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-30 Thread Dave Hansen
On 9/29/20 5:20 PM, Jarkko Sakkinen wrote: > On Tue, Sep 29, 2020 at 07:24:24AM -0700, Dave Hansen wrote: >> On 9/28/20 9:05 PM, Jarkko Sakkinen wrote: >>> On Mon, Sep 28, 2020 at 06:37:54PM -0700, Andy Lutomirski wrote: I don’t personally care that much about EMODPE but, you could probably

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-29 Thread Jarkko Sakkinen
On Tue, Sep 29, 2020 at 07:24:24AM -0700, Dave Hansen wrote: > On 9/28/20 9:05 PM, Jarkko Sakkinen wrote: > > On Mon, Sep 28, 2020 at 06:37:54PM -0700, Andy Lutomirski wrote: > >> I don’t personally care that much about EMODPE but, you could probably > >> get the point across with something like:

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-29 Thread Dave Hansen
On 9/28/20 9:05 PM, Jarkko Sakkinen wrote: > On Mon, Sep 28, 2020 at 06:37:54PM -0700, Andy Lutomirski wrote: >> I don’t personally care that much about EMODPE but, you could probably >> get the point across with something like: >> >> SGX’s EPCM permission bits do not obviate the need to enforce

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 06:37:54PM -0700, Andy Lutomirski wrote: > I don’t personally care that much about EMODPE but, you could probably > get the point across with something like: > > SGX’s EPCM permission bits do not obviate the need to enforce these > rules in the PTEs because enclaves can

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Andy Lutomirski
> On Sep 28, 2020, at 1:20 PM, Jarkko Sakkinen > wrote: > > On Mon, Sep 28, 2020 at 12:45:27PM -0700, Dave Hansen wrote: >>> On 9/28/20 12:32 PM, Jarkko Sakkinen wrote: >>> My problem is that I fully agree what you say in your description but >>> disagree on that EMODPE should not be

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 09:48:10AM -0700, Dave Hansen wrote: > On 9/28/20 9:19 AM, Jarkko Sakkinen wrote: > > On Mon, Sep 28, 2020 at 07:04:38AM -0700, Dave Hansen wrote: > >> EMODPE is virtually irrelevant for this whole thing. The x86 PTE > >> permissions still specify the most restrictive

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 12:45:27PM -0700, Dave Hansen wrote: > On 9/28/20 12:32 PM, Jarkko Sakkinen wrote: > > My problem is that I fully agree what you say in your description but > > disagree on that EMODPE should not be mentioned. > > I'll just be very clear: I'm not willing to ack any patch

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 09:48:10AM -0700, Dave Hansen wrote: > On 9/28/20 9:19 AM, Jarkko Sakkinen wrote: > > On Mon, Sep 28, 2020 at 07:04:38AM -0700, Dave Hansen wrote: > >> EMODPE is virtually irrelevant for this whole thing. The x86 PTE > >> permissions still specify the most restrictive

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Dave Hansen
On 9/28/20 12:32 PM, Jarkko Sakkinen wrote: > My problem is that I fully agree what you say in your description but > disagree on that EMODPE should not be mentioned. I'll just be very clear: I'm not willing to ack any patch with a changelog that has more than a passing mention of EMODPE. Do

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Dave Hansen
On 9/28/20 9:19 AM, Jarkko Sakkinen wrote: > On Mon, Sep 28, 2020 at 07:04:38AM -0700, Dave Hansen wrote: >> EMODPE is virtually irrelevant for this whole thing. The x86 PTE >> permissions still specify the most restrictive permissions, which is >> what matters the most. >> >> We care about the

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 07:04:38AM -0700, Dave Hansen wrote: > On 9/27/20 5:53 PM, Jarkko Sakkinen wrote: > > On Fri, Sep 25, 2020 at 12:53:35PM -0700, Dave Hansen wrote: > >> On 9/25/20 12:43 PM, Sean Christopherson wrote: > That means that the intent argument (SGX_PROT_*) is currently

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-28 Thread Dave Hansen
On 9/27/20 5:53 PM, Jarkko Sakkinen wrote: > On Fri, Sep 25, 2020 at 12:53:35PM -0700, Dave Hansen wrote: >> On 9/25/20 12:43 PM, Sean Christopherson wrote: That means that the intent argument (SGX_PROT_*) is currently unused. >>> No, the intent argument is used (eventually) by SGX's

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-27 Thread Jarkko Sakkinen
On Fri, Sep 25, 2020 at 12:53:35PM -0700, Dave Hansen wrote: > On 9/25/20 12:43 PM, Sean Christopherson wrote: > >> That means that the intent argument (SGX_PROT_*) is currently unused. > > No, the intent argument is used (eventually) by SGX's ->mprotect() > > implementation, i.e. sgx_mprotect()

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-25 Thread Andy Lutomirski
> On Sep 25, 2020, at 12:53 PM, Dave Hansen wrote: > > On 9/25/20 12:43 PM, Sean Christopherson wrote: >>> That means that the intent argument (SGX_PROT_*) is currently unused. >> No, the intent argument is used (eventually) by SGX's ->mprotect() >> implementation, i.e. sgx_mprotect()

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-25 Thread Sean Christopherson
On Fri, Sep 25, 2020 at 10:18:28AM -0700, Dave Hansen wrote: > Thanks for the walkthrough. The thing that clicked for me seeing those > examples was how the earlier ioctl(ADD_PAGE) is "bound" to later > enforcement actions at enclave PTE creation time. > > On 9/24/20 5:00 PM, Sean Christopherson

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-25 Thread Dave Hansen
On 9/25/20 12:43 PM, Sean Christopherson wrote: >> That means that the intent argument (SGX_PROT_*) is currently unused. > No, the intent argument is used (eventually) by SGX's ->mprotect() > implementation, i.e. sgx_mprotect() enforces that the actual protections are a > subset of the

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-25 Thread Dave Hansen
Thanks for the walkthrough. The thing that clicked for me seeing those examples was how the earlier ioctl(ADD_PAGE) is "bound" to later enforcement actions at enclave PTE creation time. On 9/24/20 5:00 PM, Sean Christopherson wrote: > My concern is that if we merge this > >

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Sean Christopherson
On Thu, Sep 24, 2020 at 04:09:25PM -0700, Dave Hansen wrote: > On 9/24/20 4:05 PM, Sean Christopherson wrote: > > The problem is that enforcing permissions via mprotect() needs to be done > > unconditionally, otherwise we end up with weird behavior where the existence > > of an LSM will change

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Dave Hansen
On 9/24/20 4:05 PM, Sean Christopherson wrote: > The problem is that enforcing permissions via mprotect() needs to be done > unconditionally, otherwise we end up with weird behavior where the existence > of an LSM will change what is/isn't allowed, even if the LSM(s) has no SGX > policy whatsover.

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Sean Christopherson
On Thu, Sep 24, 2020 at 01:54:09PM -0700, Dave Hansen wrote: > On 9/24/20 1:25 PM, Sean Christopherson wrote: > ... > >> Why don't we just declare enclave memory as "out of scope for noexec" in > >> the same way that anonymous memory is, and just discard this patch? > >> That doesn't seem too much

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Jarkko Sakkinen
On Thu, Sep 24, 2020 at 01:10:31PM -0700, Dave Hansen wrote: > On 9/24/20 1:01 PM, Sean Christopherson wrote: > >> In pseudo-C, it's something logically like this for the "nice" case: > >> > >>ptr = mmap("/some/executable", PROT_EXEC); > >>ioctl(sgx_fd, ADD_ENCLAVE_PAGE, SGX_PROT_EXEC,

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Jarkko Sakkinen
On Thu, Sep 24, 2020 at 12:28:54PM -0700, Sean Christopherson wrote: > On Thu, Sep 24, 2020 at 02:11:37PM -0500, Haitao Huang wrote: > > On Wed, 23 Sep 2020 08:50:56 -0500, Jarkko Sakkinen > > wrote: > > >I'll categorically deny noexec in the next patch set version. > > > > > >/Jarkko > > > >

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Jarkko Sakkinen
On Thu, Sep 24, 2020 at 02:11:37PM -0500, Haitao Huang wrote: > > For me this has caused months of confusion and misunderstanding of this > > feature. I only recently realized that "oh, right, we invented this". > > > > They are contrived scenarios enough that they should be considered when > >

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Dave Hansen
On 9/24/20 1:25 PM, Sean Christopherson wrote: ... >> Why don't we just declare enclave memory as "out of scope for noexec" in >> the same way that anonymous memory is, and just discard this patch? >> That doesn't seem too much of a stretch. > > Because we lose line of sight to LSM support.

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Sean Christopherson
On Thu, Sep 24, 2020 at 01:10:31PM -0700, Dave Hansen wrote: > On 9/24/20 1:01 PM, Sean Christopherson wrote: > >> In pseudo-C, it's something logically like this for the "nice" case: > >> > >>ptr = mmap("/some/executable", PROT_EXEC); > >>ioctl(sgx_fd, ADD_ENCLAVE_PAGE, SGX_PROT_EXEC,

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Dave Hansen
On 9/24/20 1:01 PM, Sean Christopherson wrote: >> In pseudo-C, it's something logically like this for the "nice" case: >> >> ptr = mmap("/some/executable", PROT_EXEC); >> ioctl(sgx_fd, ADD_ENCLAVE_PAGE, SGX_PROT_EXEC, ptr, size); >> mmap(sgx_fd); >> EENTER; >> >> And we're

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Sean Christopherson
On Thu, Sep 24, 2020 at 12:39:24PM -0700, Dave Hansen wrote: > On 9/24/20 12:28 PM, Sean Christopherson wrote: > > On Thu, Sep 24, 2020 at 02:11:37PM -0500, Haitao Huang wrote: > >> On Wed, 23 Sep 2020 08:50:56 -0500, Jarkko Sakkinen > >> wrote: > >>> I'll categorically deny noexec in the next

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Dave Hansen
On 9/24/20 12:28 PM, Sean Christopherson wrote: > On Thu, Sep 24, 2020 at 02:11:37PM -0500, Haitao Huang wrote: >> On Wed, 23 Sep 2020 08:50:56 -0500, Jarkko Sakkinen >> wrote: >>> I'll categorically deny noexec in the next patch set version. >>> >>> /Jarkko >> There are use cases supported

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Sean Christopherson
On Thu, Sep 24, 2020 at 02:11:37PM -0500, Haitao Huang wrote: > On Wed, 23 Sep 2020 08:50:56 -0500, Jarkko Sakkinen > wrote: > >I'll categorically deny noexec in the next patch set version. > > > >/Jarkko > > There are use cases supported currently in which enclave binary is received > via

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Haitao Huang
On Wed, 23 Sep 2020 08:50:56 -0500, Jarkko Sakkinen wrote: On Tue, Sep 22, 2020 at 09:43:02AM -0700, Sean Christopherson wrote: On Tue, Sep 22, 2020 at 08:35:15AM +0300, Jarkko Sakkinen wrote: > On Tue, Sep 22, 2020 at 08:30:06AM +0300, Jarkko Sakkinen wrote: > > On Mon, Sep 21, 2020 at

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Sean Christopherson
On Thu, Sep 24, 2020 at 07:50:15AM -0700, Dave Hansen wrote: > On 9/23/20 7:33 AM, Jarkko Sakkinen wrote: > > The consequence is that enclaves are best created with an ioctl API and the > > access control can be based only to the origin of the source file for the > > enclave data, i.e. on VMA file

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-24 Thread Dave Hansen
On 9/23/20 7:33 AM, Jarkko Sakkinen wrote: > The consequence is that enclaves are best created with an ioctl API and the > access control can be based only to the origin of the source file for the > enclave data, i.e. on VMA file pointer and page permissions. For example, > this could be done with

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-23 Thread Jarkko Sakkinen
On Tue, Sep 22, 2020 at 08:11:14AM -0700, Dave Hansen wrote: > Now I'm confused. I actually don't think I have a strong understanding > of how an enclave actually gets loaded, how mmap() and mprotect() are > normally used and what this hook is intended to thwart. You saw my other comments. I

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-23 Thread Jarkko Sakkinen
On Tue, Sep 22, 2020 at 09:43:02AM -0700, Sean Christopherson wrote: > On Tue, Sep 22, 2020 at 08:35:15AM +0300, Jarkko Sakkinen wrote: > > On Tue, Sep 22, 2020 at 08:30:06AM +0300, Jarkko Sakkinen wrote: > > > On Mon, Sep 21, 2020 at 02:18:49PM -0700, Sean Christopherson wrote: > > > > Userspace

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-23 Thread Jarkko Sakkinen
On Tue, Sep 22, 2020 at 08:11:14AM -0700, Dave Hansen wrote: > On 9/22/20 5:58 AM, Jarkko Sakkinen wrote: > > Intel Sofware Guard eXtensions (SGX) allows creation of executable blobs > > called enclaves, of which page permissions are defined when the enclave > > "of which" => "for which" > > >

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-23 Thread Jarkko Sakkinen
On Tue, Sep 22, 2020 at 08:11:14AM -0700, Dave Hansen wrote: > > Enclave permissions can be dynamically modified by using ENCLS[EMODPE] > > I'm not sure this sentence matters. I'm not sure why I care what the > instruction is named that does this. But, it _sounds_ here like an > enclave can

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-22 Thread Sean Christopherson
On Tue, Sep 22, 2020 at 08:35:15AM +0300, Jarkko Sakkinen wrote: > On Tue, Sep 22, 2020 at 08:30:06AM +0300, Jarkko Sakkinen wrote: > > On Mon, Sep 21, 2020 at 02:18:49PM -0700, Sean Christopherson wrote: > > > Userspace can add the page without EXEC permissions in the EPCM, and thus > > > avoid

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-22 Thread Dave Hansen
On 9/22/20 5:58 AM, Jarkko Sakkinen wrote: > Intel Sofware Guard eXtensions (SGX) allows creation of executable blobs > called enclaves, of which page permissions are defined when the enclave "of which" => "for which" > is first loaded. Once an enclave is loaded and initialized, it can be >

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-21 Thread Jarkko Sakkinen
On Tue, Sep 22, 2020 at 08:30:06AM +0300, Jarkko Sakkinen wrote: > On Mon, Sep 21, 2020 at 02:18:49PM -0700, Sean Christopherson wrote: > > On Tue, Sep 22, 2020 at 12:07:36AM +0300, Jarkko Sakkinen wrote: > > > On Mon, Sep 21, 2020 at 09:57:58AM -0700, Sean Christopherson wrote: > > > > On Mon,

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-21 Thread Jarkko Sakkinen
On Mon, Sep 21, 2020 at 02:18:49PM -0700, Sean Christopherson wrote: > On Tue, Sep 22, 2020 at 12:07:36AM +0300, Jarkko Sakkinen wrote: > > On Mon, Sep 21, 2020 at 09:57:58AM -0700, Sean Christopherson wrote: > > > On Mon, Sep 21, 2020 at 03:49:46PM +0300, Jarkko Sakkinen wrote: > > > > On Fri,

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-21 Thread Sean Christopherson
On Tue, Sep 22, 2020 at 12:07:36AM +0300, Jarkko Sakkinen wrote: > On Mon, Sep 21, 2020 at 09:57:58AM -0700, Sean Christopherson wrote: > > On Mon, Sep 21, 2020 at 03:49:46PM +0300, Jarkko Sakkinen wrote: > > > On Fri, Sep 18, 2020 at 04:53:37PM -0700, Sean Christopherson wrote: > > > > a noexec

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-21 Thread Jarkko Sakkinen
On Mon, Sep 21, 2020 at 09:57:58AM -0700, Sean Christopherson wrote: > On Mon, Sep 21, 2020 at 03:49:46PM +0300, Jarkko Sakkinen wrote: > > On Fri, Sep 18, 2020 at 04:53:37PM -0700, Sean Christopherson wrote: > > > a noexec filesystem by loading code into an enclave, and to give the > > > kernel

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-21 Thread Jarkko Sakkinen
On Mon, Sep 21, 2020 at 03:49:56PM +0300, Jarkko Sakkinen wrote: > The 2nd part of the answer is the answer to the question: why we want to > feed LSM hooks enclaves exactly in this state. The question can be further refined as why: why this is the best possible set of substates to filter in?

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-21 Thread Jarkko Sakkinen
On Mon, Sep 21, 2020 at 03:49:56PM +0300, Jarkko Sakkinen wrote: > What really should be documented is to answer why we consider an enclave ~~ the (editing mistake) /Jarkko

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-18 Thread Andy Lutomirski
> On Sep 18, 2020, at 4:53 PM, Sean Christopherson > wrote: > > On Fri, Sep 18, 2020 at 08:09:04AM -0700, Andy Lutomirski wrote: >>> On Tue, Sep 15, 2020 at 4:28 AM Jarkko Sakkinen >>> wrote: >>> >>> From: Sean Christopherson >>> >>> Add vm_ops()->mprotect() for additional constraints

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-18 Thread Sean Christopherson
On Fri, Sep 18, 2020 at 08:09:04AM -0700, Andy Lutomirski wrote: > On Tue, Sep 15, 2020 at 4:28 AM Jarkko Sakkinen > wrote: > > > > From: Sean Christopherson > > > > Add vm_ops()->mprotect() for additional constraints for a VMA. > > > > Intel Software Guard eXtensions (SGX) will use this

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()'

2020-09-18 Thread Jarkko Sakkinen
On Fri, Sep 18, 2020 at 08:09:04AM -0700, Andy Lutomirski wrote: > On Tue, Sep 15, 2020 at 4:28 AM Jarkko Sakkinen > wrote: > > > > From: Sean Christopherson > > > > Add vm_ops()->mprotect() for additional constraints for a VMA. > > > > Intel Software Guard eXtensions (SGX) will use this

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-18 Thread Andy Lutomirski
On Tue, Sep 15, 2020 at 4:28 AM Jarkko Sakkinen wrote: > > From: Sean Christopherson > > Add vm_ops()->mprotect() for additional constraints for a VMA. > > Intel Software Guard eXtensions (SGX) will use this callback to add two > constraints: > > 1. Verify that the address range does not have

Re: [PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-18 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 02:28:28PM +0300, Jarkko Sakkinen wrote: > From: Sean Christopherson > > Add vm_ops()->mprotect() for additional constraints for a VMA. > > Intel Software Guard eXtensions (SGX) will use this callback to add two > constraints: > > 1. Verify that the address range does

[PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-15 Thread Jarkko Sakkinen
From: Sean Christopherson Add vm_ops()->mprotect() for additional constraints for a VMA. Intel Software Guard eXtensions (SGX) will use this callback to add two constraints: 1. Verify that the address range does not have holes: each page address must be filled with an enclave page. 2.

[PATCH v38 10/24] mm: Add vm_ops->mprotect()

2020-09-15 Thread Jarkko Sakkinen
From: Sean Christopherson Add vm_ops()->mprotect() for additional constraints for a VMA. Intel Software Guard eXtensions (SGX) will use this callback to add two constraints: 1. Verify that the address range does not have holes: each page address must be filled with an enclave page. 2.