Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-09-04 Thread Jarkko Sakkinen
On Wed Sep 4, 2024 at 4:39 AM EEST, Aaron Lu wrote: > On Tue, Sep 03, 2024 at 07:05:40PM +0300, Jarkko Sakkinen wrote: > > On Fri Aug 30, 2024 at 9:14 AM EEST, Aaron Lu wrote: > > > On Thu, Aug 29, 2024 at 07:44:13PM +0300, Jarkko Sakkinen wrote: > > > > On Thu Aug 29, 2024 at 5:38 AM EEST, Aaron L

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-09-03 Thread Aaron Lu
On Tue, Sep 03, 2024 at 07:05:40PM +0300, Jarkko Sakkinen wrote: > On Fri Aug 30, 2024 at 9:14 AM EEST, Aaron Lu wrote: > > On Thu, Aug 29, 2024 at 07:44:13PM +0300, Jarkko Sakkinen wrote: > > > On Thu Aug 29, 2024 at 5:38 AM EEST, Aaron Lu wrote: > > > > When current node doesn't have a EPC sectio

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-09-03 Thread Jarkko Sakkinen
On Fri Aug 30, 2024 at 9:14 AM EEST, Aaron Lu wrote: > On Thu, Aug 29, 2024 at 07:44:13PM +0300, Jarkko Sakkinen wrote: > > On Thu Aug 29, 2024 at 5:38 AM EEST, Aaron Lu wrote: > > > When current node doesn't have a EPC section configured by firmware and > > > all other EPC sections memory are used

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-09-02 Thread Aaron Lu
On Fri, Aug 30, 2024 at 07:03:33AM -0700, Dave Hansen wrote: > On 8/29/24 23:02, Aaron Lu wrote: > >> Also, I do think we should probably add some kind of sanity warning to > >> the SGX code in another patch. If a node on an SGX system has CPUs and > >> memory, it's very likely it will also have s

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-08-30 Thread Dave Hansen
On 8/29/24 23:02, Aaron Lu wrote: >> Also, I do think we should probably add some kind of sanity warning to >> the SGX code in another patch. If a node on an SGX system has CPUs and >> memory, it's very likely it will also have some EPC. It can be >> something soft like a pr_info(), but I think i

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-08-29 Thread Aaron Lu
On Thu, Aug 29, 2024 at 07:44:13PM +0300, Jarkko Sakkinen wrote: > On Thu Aug 29, 2024 at 5:38 AM EEST, Aaron Lu wrote: > > When current node doesn't have a EPC section configured by firmware and > > all other EPC sections memory are used up, CPU can stuck inside the > > while loop in __sgx_alloc_e

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-08-29 Thread Aaron Lu
On Thu, Aug 29, 2024 at 08:17:53AM -0700, Dave Hansen wrote: > Generally, I think it's a bad idea to refer to function names in > subjects. This, for instance would be much more informative: > > x86/sgx: Fix deadlock in SGX NUMA node search Indeed, will use this as subject, thanks. > On 8

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-08-29 Thread Jarkko Sakkinen
On Thu Aug 29, 2024 at 5:38 AM EEST, Aaron Lu wrote: > When current node doesn't have a EPC section configured by firmware and > all other EPC sections memory are used up, CPU can stuck inside the > while loop in __sgx_alloc_epc_page() forever and soft lockup will happen. > Note how nid_of_current

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-08-29 Thread Dave Hansen
Generally, I think it's a bad idea to refer to function names in subjects. This, for instance would be much more informative: x86/sgx: Fix deadlock in SGX NUMA node search On 8/28/24 19:38, Aaron Lu wrote: > When current node doesn't have a EPC section configured by firmware and > all ot

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-08-29 Thread Aaron Lu
On Thu, Aug 29, 2024 at 03:56:39PM +0800, Huang, Kai wrote: > Actually run spell check this time ... > > On Thu, 2024-08-29 at 10:38 +0800, Aaron Lu wrote: > > When current node doesn't have a EPC section configured by firmware and > > "current node" -> "the current node" > > "a EPC section" ->

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-08-29 Thread Huang, Kai
Actually run spell check this time ... On Thu, 2024-08-29 at 10:38 +0800, Aaron Lu wrote: > When current node doesn't have a EPC section configured by firmware and "current node" -> "the current node" "a EPC section" -> "an EPC section" > all other EPC sections memory are used up, CPU can stuck

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-08-29 Thread Huang, Kai
On Thu, 2024-08-29 at 10:38 +0800, Aaron Lu wrote: > When current node doesn't have a EPC section configured by firmware and > all other EPC sections memory are used up, CPU can stuck inside the > while loop in __sgx_alloc_epc_page() forever and soft lockup will happen. > Note how nid_of_current wi

[PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-08-28 Thread Aaron Lu
When current node doesn't have a EPC section configured by firmware and all other EPC sections memory are used up, CPU can stuck inside the while loop in __sgx_alloc_epc_page() forever and soft lockup will happen. Note how nid_of_current will never equal to nid in that while loop because nid_of_cur