Re: [PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-15 Thread Jarkko Sakkinen
On Wed, Nov 14, 2018 at 08:09:42AM -0800, Sean Christopherson wrote: > On Tue, Nov 13, 2018 at 11:40:09PM +0200, Jarkko Sakkinen wrote: > > Add a selftest for SGX. It is a trivial test where a simple enclave > > copies one 64-bit word of memory between two memory locations given to > > the enclave

Re: [PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-15 Thread Jarkko Sakkinen
On Wed, Nov 14, 2018 at 08:09:42AM -0800, Sean Christopherson wrote: > On Tue, Nov 13, 2018 at 11:40:09PM +0200, Jarkko Sakkinen wrote: > > Add a selftest for SGX. It is a trivial test where a simple enclave > > copies one 64-bit word of memory between two memory locations given to > > the enclave

Re: [PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-15 Thread Jarkko Sakkinen
On Tue, Nov 13, 2018 at 01:51:06PM -0800, Dave Hansen wrote: > On 11/13/18 1:40 PM, Jarkko Sakkinen wrote: > > +int main(int argc, char **argv) > > +{ > > + unsigned long bin_size = (unsigned long)_bin_end - > > +(unsigned long)_bin; > > + struct sgx_secs secs; > >

Re: [PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-15 Thread Jarkko Sakkinen
On Tue, Nov 13, 2018 at 01:51:06PM -0800, Dave Hansen wrote: > On 11/13/18 1:40 PM, Jarkko Sakkinen wrote: > > +int main(int argc, char **argv) > > +{ > > + unsigned long bin_size = (unsigned long)_bin_end - > > +(unsigned long)_bin; > > + struct sgx_secs secs; > >

Re: [PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-14 Thread Sean Christopherson
On Tue, Nov 13, 2018 at 11:40:09PM +0200, Jarkko Sakkinen wrote: > Add a selftest for SGX. It is a trivial test where a simple enclave > copies one 64-bit word of memory between two memory locations given to > the enclave as arguments. > > Signed-off-by: Jarkko Sakkinen > --- > +SUBDIRS_64 :=

Re: [PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-14 Thread Sean Christopherson
On Tue, Nov 13, 2018 at 11:40:09PM +0200, Jarkko Sakkinen wrote: > Add a selftest for SGX. It is a trivial test where a simple enclave > copies one 64-bit word of memory between two memory locations given to > the enclave as arguments. > > Signed-off-by: Jarkko Sakkinen > --- > +SUBDIRS_64 :=

Re: [PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-13 Thread Dave Hansen
On 11/13/18 1:40 PM, Jarkko Sakkinen wrote: > +int main(int argc, char **argv) > +{ > + unsigned long bin_size = (unsigned long)_bin_end - > + (unsigned long)_bin; > + struct sgx_secs secs; > + uint64_t result = 0; > + > + if (!encl_load(, bin_size)) >

Re: [PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-13 Thread Dave Hansen
On 11/13/18 1:40 PM, Jarkko Sakkinen wrote: > +int main(int argc, char **argv) > +{ > + unsigned long bin_size = (unsigned long)_bin_end - > + (unsigned long)_bin; > + struct sgx_secs secs; > + uint64_t result = 0; > + > + if (!encl_load(, bin_size)) >

[PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-13 Thread Jarkko Sakkinen
Add a selftest for SGX. It is a trivial test where a simple enclave copies one 64-bit word of memory between two memory locations given to the enclave as arguments. Signed-off-by: Jarkko Sakkinen --- Since this is my very first addition to selftests, I decided to roll out an RFC patch before

[PATCH RFC] selftests/x86: Add a selftest for SGX

2018-11-13 Thread Jarkko Sakkinen
Add a selftest for SGX. It is a trivial test where a simple enclave copies one 64-bit word of memory between two memory locations given to the enclave as arguments. Signed-off-by: Jarkko Sakkinen --- Since this is my very first addition to selftests, I decided to roll out an RFC patch before