Re: [PATCH v2] x86/sgx: Fix free_cnt counting logic in epc section

2021-01-20 Thread Jarkko Sakkinen
On Wed, Jan 20, 2021 at 11:53:20AM +0800, Tianjia Zhang wrote: > Increase `section->free_cnt` in sgx_sanitize_section() is more > reasonable, which is called in ksgxd kernel thread, instead of This is lacking reasoning of why. /Jarkko > assigning it to epc section pages number at initialization.

Re: [PATCH v2] x86/sgx: Fix free_cnt counting logic in epc section

2021-01-20 Thread Sean Christopherson
On Wed, Jan 20, 2021, Tianjia Zhang wrote: > Increase `section->free_cnt` in sgx_sanitize_section() is more > reasonable, which is called in ksgxd kernel thread, instead of > assigning it to epc section pages number at initialization. > Although this is unlikely to fail, these pages cannot be > all

[PATCH v2] x86/sgx: Fix free_cnt counting logic in epc section

2021-01-19 Thread Tianjia Zhang
Increase `section->free_cnt` in sgx_sanitize_section() is more reasonable, which is called in ksgxd kernel thread, instead of assigning it to epc section pages number at initialization. Although this is unlikely to fail, these pages cannot be allocated after initialization, and which need to be res