On Mon, Mar 01, 2021 at 11:40:02PM +1300, Kai Huang wrote:
SGX2 means "Enclave Dynamic Memory Management", which supports dynamically
adding/removing EPC pages, plus changing page permission, after enclave is
initialized. So it allows enclave author to write enclave in more flexible way, and
also utilize EPC resource more efficiently.
So how is the enclave author going to use "sgx2" in /proc/cpuinfo? Query
it to know whether it can start adding/removing EPC pages or is this
going to be used by scripts?
Yes I can add "why" into commit message, but isn't the comment after X86_FEATURE_SGX2
enough? I think people who are interested in SGX will know what SGX2 is and why SGX2
is useful.
The point is, the commit message should say how this flag in
/proc/cpuinfo is going to be used - not what people interested in sgx
might and might not know.
/proc/cpuinfo is user-visible ABI - you can't add stuff to it just because.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette