Re: [RFC PATCH 1/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-04-24 Thread Bojun Zhu
nning and end of the trace. Please refer to "Backtraces in commit messages" section in Documentation/process/submitting-patches.rst. Thanks for your advice! I will refine the trace log according to the suggestions in Documentation/process/submitting-patches.rst. and highlight the relate

Re: [RFC PATCH 1/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-04-24 Thread Bojun Zhu
Hi Jarkko, > On Apr 24, 2024, at 18:42, Jarkko Sakkinen wrote: > > On Wed Apr 24, 2024 at 10:02 AM EEST, Jarkko Sakkinen wrote: >> On Wed Apr 24, 2024 at 9:46 AM EEST, Bojun Zhu wrote: >>> Based on the the discussion among you, Jarkko and Reinette, >>> I will

[RFC PATCH v2 1/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-04-26 Thread Bojun Zhu
tl x64_sys_call do_syscall_64 entry_SYSCALL_64_after_hwframe [ end trace ]---- Signed-off-by: Bojun Zhu --- arch/x86/kernel/cpu/sgx/ioctl.c | 40 + 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/sg

[RFC PATCH v2 0/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-04-26 Thread Bojun Zhu
CPU in the ioctl() handler explicitly. I have attached a patch which can fix such issue. Appreciate for your review and thanks for your time! Regards, Bojun Zhu --- v1 -> v2: - Make the cond_resched() as a prefix op instead of a postfix op (Jarkko) - Additionly check the pending signal at the be

Re: [RFC PATCH v2 1/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-04-28 Thread Bojun Zhu
Hi Dave, Appreciate for your review! > On Apr 27, 2024, at 01:06, Dave Hansen wrote: > > On 4/26/24 07:18, Bojun Zhu wrote: >> for (c = 0 ; c < modp->length; c += PAGE_SIZE) { >> +if (sgx_check_signal_and_resched()) { >

[RFC PATCH v3 1/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-05-15 Thread Bojun Zhu
tl x64_sys_call do_syscall_64 entry_SYSCALL_64_after_hwframe [ end trace ]---- Signed-off-by: Bojun Zhu --- arch/x86/kernel/cpu/sgx/ioctl.c | 40 +++-- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/arch/x86/kernel/cpu/sg

[RFC PATCH v3 0/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-05-15 Thread Bojun Zhu
; to avoid redundantly check whether the current iteration is the first one (Dave) [1] v1: https://lore.kernel.org/linux-sgx/20240423092550.59297-1-zhubojun@antgroup.com/ [2] v2: https://lore.kernel.org/linux-sgx/20240426141823.112366-1-zhubojun@antgroup.com/ Bojun Zhu (1): x86/sgx: E