do_int80_emulation(9)
π do_int80_emulation(9) β like, the manual page, bestie
okay so this is the Kernel API Manual page for do_int80_emulation, and honestly? it's a whole mood. it's the β¨ 32-bit legacy syscall C entry from asm β¨ and we're gonna go through it together, no skipped sections, no gatekeeping. π«Ά
πΈ NAME πΈ
do_int80_emulation β 32-bit legacy syscall C entry from asm
like, that's the whole vibe: it's the C function that catches the old-school 32-bit syscall entry coming in from assembly. iconic behavior. π
β¨ SYNOPSIS β¨
__visible noinstr void do_int80_emulation (struct pt_regs *regs );
that's it. that's the signature. __visible, noinstr, void, takes a struct pt_regs * called regs. copy it exactly, don't get creative with it π
π ARGUMENTS π
regsβ the syscall arguments live instruct pt_argson the stack. (and yes, bestie, the page literally saysstruct pt_argsβ that's what's written, i'm just the messenger π)
π¦ DESCRIPTION π¦
okay so here's the tea. β this entry point can be used by both 32-bit and 64-bit programs to perform 32-bit system calls. yes, both. that's not a typo, that's the whole point.
instances of INT $0x80 can be found inline in various programs and libraries β like, just vibing in the middle of your code, no cap.
it's also used by the vDSO's __kernel_vsyscall fallback, for hardware that doesn't support a faster entry method. so when the fast path isn't available, this is the safety net. π§
and β plot twist β restarted 32-bit system calls also fall back to INT $0x80 regardless of what instruction was originally used to do the system call. like, it doesn't matter what you came in with, you're going out through here. periodt.
this is considered a slow path. it is not used by most libc implementations on modern hardware β except during process startup. so like, it's giving "only shows up when things are just getting going." π
the arguments for the INT $0x80 based syscall are on the stack, in the pt_regs structure:
eax: system call number
ebx, ecx, edx, esi, edi, ebp: arg1 - arg 6
so eax holds the syscall number, and then ebx, ecx, edx, esi, edi, ebp are your arg1 through arg 6. six args, one number, all on the stack. slay. π₯
π SEE ALSO π
- Kernel file
./arch/x86/entry/syscall_32.cβ go read it, iykyk π
and that's the page!! π source/version situation: ./arch/x86/entry, dated October 2026 β so like, mark your calendar bestie, and take care of yourself out there in the slow path. πβ¨
π¦ 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