Show HN: I've updated my Linux System Call website and API
I first released those in back in 2020 and now I finally added more architectures, Kernel selector, syscall descriptions and a few other niceties. It should work a bit better on mobile devices too but I am no CSS expert. The API is at https://api.syscall.sh
Discussion Highlights (12 comments)
ReDress
If syscalls are so similar, for instance, like 'read' and 'readv' or 'pread', 'sendmsg' and 'sendmsgv' or 'fork' and 'vfork'. Does it still make sense to term or classify them as two distinct syscalls?
bkallus
On x86_64 and x32, the syscall number goes in eax, not rax. The upper 32 bits of rax are ignored and can be anything.
shoobiedoo
This is very handy, thank you. Currently learning aarch64 assembly
wg0
This is really great resource, didn't know about it. But one question not related to the website above - why the syscalls vary per architecture if the linux API is the same? Or is it I am confusing it with the C standard library/POSIX and assuming that it should be the same everywhere?
guitmz
I also made a CLI for consulting the syscall API when I originally released the website. I think I can tidy up the code and make it public too. It uses a embedded dataset so it does not have to query the API endpoint all the time
hmokiguess
I am not familiar with the internals, so excuse my question, but how does one builds this? Separately, how often can it get stale?
DustinBrett
That website messes with my graphics for some reason.
ozgrakkurt
Would also recommend using commands like: echo '#include <sys/syscall.h>' | gcc -E -dM -xc - | grep -i "read" To get the real values on your PC to make sure. I had LLMs give wrong numbers or constant definitions several times but getting it to generate a command like this and seeing it for myself works every time. Also chromium docs has a table: https://www.chromium.org/chromium-os/developer-library/refer... It would be very useful to just make this website directly link to the syscall number.
whalesalad
Somewhat related - I am working on a dual Pentium III retro build (first retro build) and completely forgot that this would be 32-bit and won't have niceties like SSE2. Having some fun going down the rabbit hole of IDE, SCSI interfaces and AGP graphics. Can anyone recommend some OS installations to play with? So far I am thinking Haiku, ReactOS, NetBSD and antiX or MX Linux. At some point I am also going to simulate a Novell Netware deployment.
w2seraph
hehehe can't wait to get syscallin'
db48x
It’s a side issue, but I’ve long thought that the kernel should duplicate every existing syscall that takes a null–terminated string by pointer with an otherwise identical syscall that takes the string by pointer, capacity, and length instead. It would be a huge boon to programs written in modern languages. I keep meaning to search the kernel mailing lists to see if the idea has been proposed before, but I never quite find the time.
celesian
Muito foda TMZ!