I wholeheartedly agree with the desire to spin up enclaves without the
overhead or complexity of the SDK. I think I'm the one that asked for
this test enclave in the first place. There *IS* a gap here. Those who
care about SGX would be wise to close this gap in _some_ way.
But I don't think the kernel should be the place this is done. The
kernel should not be hosting a real-world (userspace) SGX reference
implementation.
I'd fully support if you'd like to take the selftest code, fork it, and
maintain it. The SGX ecosystem would be better off if such a project
existed. If I can help here in some way like (trying to) release the
SGX selftest under a different license, please let me know.
The only patches I want for the kernel are to make the test enclave more
*obviously* insecure.
So, it's a NAK from me for this series. I won't support merging this
into the kernel. But at the same time, I'm very sympathetic to your
cause, and I do appreciate your effort here.