arch_exit_to_user_mode(9)
okay so bestie, you're looking at arch_exit_to_user_mode(9) from the Kernel API Manual β it's the architecture-specific final-work-before-user-mode situation, and it's giving tiny but important β¨
π NAME
arch_exit_to_user_mode β Architecture specific final work before exit to user mode. π
β¨ SYNOPSIS
void arch_exit_to_user_mode (void );
πΈ ARGUMENTS
voidβ no arguments. That's it. Nothing. Nada. π«Ά
π DESCRIPTION
Invoked from exit_to_user_mode with interrupt disabled as the last function before return. Defaults to NOOP.
This needs to be __always_inline because it is non-instrumentable code invoked after context tracking switched to user mode. Like, it has to be __always_inline, no debate. π₯
An architecture implementation must not do anything complex, no locking etc. Keep it simple, bestie. The main purpose is for speculation mitigations. π
π¦ SEE ALSO
Kernel file ./include/linux/irq-entry-common.h β yes, that's the one:
arch_enter_from_user_mode(9)arch_in_rcu_eqs(9)enter_from_user_mode(9)arch_exit_to_user_mode_work(9)arch_exit_to_user_mode_prepare(9)arch_do_signal_or_restart(9)__exit_to_user_mode_prepare(9)syscall_exit_to_user_mode_prepare(9)irqentry_exit_to_user_mode_prepare(9)exit_to_user_mode(9)irqentry_enter_from_user_mode(9)irqentry_exit_to_user_mode(9)struct irqentry_state(9)irqentry_enter_from_kernel_mode(9)irqentry_exit_to_kernel_mode_preempt(9)irqentry_exit_to_kernel_mode_after_preempt(9)irqentry_exit_to_kernel_mode(9)irqentry_enter(9)irqentry_exit(9)irqentry_nmi_enter(9)irqentry_nmi_exit(9)
mwah π that's the whole page: source/version ./include/linux, date October 2026, and the title is arch_exit_to_user_mode(9) from the Kernel API Manual. periodt. π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms