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

2021-01-20 Thread Jarkko Sakkinen
On Mon, Jan 18, 2021 at 09:33:47PM +0800, 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 >

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

2021-01-19 Thread Sean Christopherson
On Mon, Jan 18, 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] x86/sgx: Fix free_cnt counting logic in epc section

2021-01-18 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