Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver'

2020-09-25 Thread Jarkko Sakkinen
On Fri, Sep 25, 2020 at 09:51:04AM +0200, Borislav Petkov wrote: > On Thu, Sep 24, 2020 at 11:38:59PM +0300, Jarkko Sakkinen wrote: > > I assume this is a rethorical question > > Of course - our text should not be write-only. > > > and I notice what I suggested > > looks as bad as my earlier

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver'

2020-09-25 Thread Jarkko Sakkinen
On Fri, Sep 25, 2020 at 09:53:01AM +0200, Borislav Petkov wrote: > On Thu, Sep 24, 2020 at 11:40:22PM +0300, Jarkko Sakkinen wrote: > > I'm not sure if I said it already but I also added cc to linux-mm (same > > CC's in the patch as with mprotect callback commit). This should also > > have mm ack

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver'

2020-09-25 Thread Borislav Petkov
On Thu, Sep 24, 2020 at 11:40:22PM +0300, Jarkko Sakkinen wrote: > I'm not sure if I said it already but I also added cc to linux-mm (same > CC's in the patch as with mprotect callback commit). This should also > have mm ack I think. Why? This is adding ptrace functionality to enclaves which is

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver'

2020-09-25 Thread Borislav Petkov
On Thu, Sep 24, 2020 at 11:38:59PM +0300, Jarkko Sakkinen wrote: > I assume this is a rethorical question Of course - our text should not be write-only. > and I notice what I suggested > looks as bad as my earlier commit message :-) > > So, I gave it some thought that and decided to "open code"

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver'

2020-09-24 Thread Jarkko Sakkinen
On Thu, Sep 24, 2020 at 11:39:07PM +0300, Jarkko Sakkinen wrote: > On Thu, Sep 24, 2020 at 05:57:51PM +0200, Borislav Petkov wrote: > > On Thu, Sep 24, 2020 at 02:51:28PM +0300, Jarkko Sakkinen wrote: > > > On Wed, Sep 23, 2020 at 06:17:33PM +0200, Borislav Petkov wrote: > > > > > Add 'access'

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver'

2020-09-24 Thread Jarkko Sakkinen
On Thu, Sep 24, 2020 at 05:57:51PM +0200, Borislav Petkov wrote: > On Thu, Sep 24, 2020 at 02:51:28PM +0300, Jarkko Sakkinen wrote: > > On Wed, Sep 23, 2020 at 06:17:33PM +0200, Borislav Petkov wrote: > > > > Add 'access' implementation to vm_ops with the help of these functions. > > > > > > "Add

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver

2020-09-24 Thread Borislav Petkov
On Thu, Sep 24, 2020 at 02:51:28PM +0300, Jarkko Sakkinen wrote: > On Wed, Sep 23, 2020 at 06:17:33PM +0200, Borislav Petkov wrote: > > > Add 'access' implementation to vm_ops with the help of these functions. > > > > "Add an ->access virtual MM function for accessing the enclave's memory... " >

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver

2020-09-24 Thread Jarkko Sakkinen
On Wed, Sep 23, 2020 at 06:17:33PM +0200, Borislav Petkov wrote: > > Add 'access' implementation to vm_ops with the help of these functions. > > "Add an ->access virtual MM function for accessing the enclave's memory... " Thank you. I wrote the last paragraph like this: "Add an '->access'

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver

2020-09-23 Thread Borislav Petkov
On Wed, Sep 23, 2020 at 04:20:49PM +0300, Jarkko Sakkinen wrote: > Intel Sofware Guard eXtensions (SGX) allows creation of executable blobs > called enclaves, which cannot be accessed by default when not executing > inside the enclave. Enclaves can be entered by only using predefined memory >

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver

2020-09-23 Thread Jarkko Sakkinen
On Tue, Sep 22, 2020 at 05:44:24PM +0200, Borislav Petkov wrote: > > > Subject: Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver >... x86/sgx: Add ptrace() support... > > subject needs a verb. > > On Tue, Sep 15, 2020 at

Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver

2020-09-22 Thread Borislav Petkov
> Subject: Re: [PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver ... x86/sgx: Add ptrace() support... subject needs a verb. On Tue, Sep 15, 2020 at 02:28:35PM +0300, Jarkko Sakkinen wrote: > Add VMA callbacks for ptrace() that can be used with

[PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver

2020-09-15 Thread Jarkko Sakkinen
Add VMA callbacks for ptrace() that can be used with debug enclaves. With debug enclaves data can be read and write the memory word at a time by using ENCLS(EDBGRD) and ENCLS(EDBGWR) leaf instructions. Acked-by: Jethro Beekman Signed-off-by: Jarkko Sakkinen --- arch/x86/kernel/cpu/sgx/encl.c |

[PATCH v38 17/24] x86/sgx: ptrace() support for the SGX driver

2020-09-15 Thread Jarkko Sakkinen
Add VMA callbacks for ptrace() that can be used with debug enclaves. With debug enclaves data can be read and write the memory word at a time by using ENCLS(EDBGRD) and ENCLS(EDBGWR) leaf instructions. Acked-by: Jethro Beekman Signed-off-by: Jarkko Sakkinen --- arch/x86/kernel/cpu/sgx/encl.c |