Re: [PATCH v39 22/24] selftests/x86: Add a selftest for SGX

From: Jarkko Sakkinen
Date: Mon Oct 12 2020 - 12:51:13 EST


On Sat, Oct 03, 2020 at 07:50:57AM +0300, 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.
>
> Cc: Shuah Khan <shuah@xxxxxxxxxx>
> Cc: linux-kselftest@xxxxxxxxxxxxxxx
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>

Greg, speaking of dual licensing, I'd make an expection with this
selftest to what we agreed in the last week.

It's the only compact C-only example that I'm aware of that shows how to
put together the basics of an SGX user space. Here a more permissive
licensing would make sense in my opinion just to give a seed for
alternatives.

Right now the user space implementations are either in C++ and Rust, and
they work great for big things like containers etc. I could envision
someone to have something more minimalistic to do something simple for
lets say a system daemon.

I've done a similar decision with tools/testing/selftests/tpm2/tpm2.py
in the past.

What do you think?

/Jarkko