Re: [PATCH for_v22 v2 4/8] x86/sgx: Set SGX_ENCL_PAGE_TCS when allocating encl_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 12, 2019 at 06:12:48PM -0700, Sean Christopherson wrote:
> Set SGX_ENCL_PAGE_TCS when encl_page->desc is initialized in
> sgx_encl_page_alloc() to improve readability, and so that the code
> isn't affected when the bulk of __sgx_encl_add_page() is rewritten
> to remove the EADD worker in a future patch.
> 
> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>

I don't mean to be impolite but this change only decreases readability,
and in no possible way improves it. Clear semantics and such things
improve readability

The semantics are terrible if you have a parameter that can have
multiple values but only a single value would trigger something. We
don't want that kind of weirdness to the codebase. We want clean
up such glitches.

If you have a boolean behaviour, please use a boolean value then.

I changed it to always assign the page type and added spacing to make
the code more readable. SECINFO gets validated early in the ioctl so
there should not be problem.

/Jarkko



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux