logoalt Hacker News

Show HN: I've updated my Linux System Call website and API

122 points • by guitmz • today at 9:29 AM • 40 comments • view on HN

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


Comments

ozgrakkurt • today at 2:43 PM

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.

w2seraph • today at 3:12 PM

hehehe can't wait to get syscallin'

bkallus • today at 11:49 AM

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.

➕ show 1 reply
DustinBrett • today at 2:31 PM

That website messes with my graphics for some reason.

guitmz • today at 12:49 PM

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 • today at 1:38 PM

I am not familiar with the internals, so excuse my question, but how does one builds this? Separately, how often can it get stale?

➕ show 1 reply
whalesalad • today at 2:59 PM

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.

➕ show 1 reply
wg0 • today at 12:24 PM

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?

➕ show 1 reply
shoobiedoo • today at 12:17 PM

This is very handy, thank you. Currently learning aarch64 assembly

ReDress • today at 10:41 AM

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?

➕ show 3 replies