syscall_ent...er_mode_work(9)
π syscall_ent...er_mode_work(9) π
ok so this is a page from the Kernel API Manual (yes, the kernel has its own manual, we love that for it) and it's about syscall_enter_from_user_mode_work β the little pre-flight check that happens right before a syscall gets to actually do syscall things. buckle up bestie π
β¨ NAME β¨
syscall_enter_from_user_mode_work β check and handle work before invoking a syscall π¦
β¨ SYNOPSIS β¨
bool syscall_enter_from_user_mode_work (struct pt_regs *regs , long
*syscall );
β¨ ARGUMENTS β¨
regsβ pointer tocurrent'spt_regsπ (like, the register snapshot of whatever task is running right now)syscallβ the syscall number π
β¨ DESCRIPTION β¨
okay so picture this: you're in architecture specific syscall entry code, interrupts are enabled, and you've already invoked enter_from_user_mode, enabled interrupts, and done the extra architecture specific work β and the syscall return value is preset to -ENOSYS going in. that's the exact moment this function gets invoked. iconic timing honestly β
here's the part you cannot miss: if the return value is false, the caller must skip the syscall and leave the syscall return value unmodified β like, do NOT touch it, because one of the entry work functions might have already set it. hands off π
it handles these work items, in order:
syscall_workflag dependent invocations ofptrace_report_syscall_permit_entry,__seccomp_permit_syscall,trace_sys_enterπ₯- invocation of
audit_syscall_entryπ
β¨ RETURN β¨
True if the syscall should be invoked, False otherwise π (and remember, False means skip it and don't mess with the return value, k?)
β¨ SEE ALSO β¨
kernel file ./include/linux/entry-common.h πΈ
arch_ptrace_report_syscall_permit_entry(9)enter_from_user_mode_randomize_stack(9)syscall_enter_from_user_mode_randomize_stack(9)arch_ptrace_report_syscall_exit(9)syscall_exit_work(9)syscall_exit_to_user_mode_work(9)syscall_exit_to_user_mode(9)
lowkey the whole entry/exit family is a vibe, go read the exit ones next, bestie π«Ά
and that's the whole page!! source lives at ./include/linux and the version stamp says October 2026 β so yeah, print it, frame it, put it on your wall, 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