On 29/01/2026 14:11, Jinjie Ruan wrote: >>> diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h >>> index e4a8287af822..c4fea642d931 100644 >>> --- a/include/linux/entry-common.h >>> +++ b/include/linux/entry-common.h >>> @@ -125,14 +125,14 @@ void syscall_exit_work(struct pt_regs *regs, unsigned >>> long work); >>> * syscall_exit_to_user_mode_work - Handle work before returning to user >>> mode >>> * @regs: Pointer to currents pt_regs >>> * >>> - * Same as step 1 and 2 of syscall_exit_to_user_mode() but without calling >>> + * Same as step 1 of syscall_exit_to_user_mode() but without calling >>> + * local_irq_disable(), syscall_exit_to_user_mode_prepare() and >>> * exit_to_user_mode() to perform the final transition to user mode. >>> * >>> - * Calling convention is the same as for syscall_exit_to_user_mode() and it >>> - * returns with all work handled and interrupts disabled. The caller must >>> - * invoke exit_to_user_mode() before actually switching to user mode to >>> - * make the final state transitions. Interrupts must stay disabled between >>> - * return from this function and the invocation of exit_to_user_mode(). >>> + * Calling convention is the same as for syscall_exit_to_user_mode(). The >>> + * caller must invoke local_irq_disable(), __exit_to_user_mode_prepare() >>> and >> Shouldn't it be syscall_exit_to_user_mode_prepare() rather than >> __exit_to_user_mode_prepare()? The former has extra calls (e.g. rseq). > Perhaps we can just delete these comments — at present only generic > entry and arm64 use it, and nowhere else needs it; after the refactoring > the comments now seem rather unclear.
Agreed, the comments are essentially describing what each function calls; considering how short they are, directly reading the code is probably easier. - Kevin

