Re: [PATCH 02/25] x86/cpufeatures: Add SGX1 and SGX2 sub-features

From: Kai Huang
Date: Mon Mar 01 2021 - 05:42:26 EST


On Mon, 2021-03-01 at 11:30 +0100, Borislav Petkov wrote:
> On Mon, Mar 01, 2021 at 11:19:15PM +1300, Kai Huang wrote:
> > "sgx2" is useful because it adds additional functionality.
>
> Useful for what?

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.

>
> People have got to start explaining "why" something is useful and put
> that "why" in the commit message.
>

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.