Loading the code workspace…
Implement a system call interface simulation in C.
Requirements:
Test:
The int 0x80 syscall table you're dispatching through here is the literal mechanism Linux used for two decades before sysenter and the AMD64 syscall/sysret instructions replaced it for speed, and the EAX-as-syscall-number convention is still how strace decodes every process's kernel requests. Returning a positive value for an error instead of a negative errno is a classic bug that makes user-space code think a failed syscall actually succeeded.