Live data from Hacker News

Linux System Call Table

thevivekpandey.github.io

1–10 of 65 posts

Re: Linux System Call Table

#3
Nice, I'm curious how it maps the system call to the source code line number dynamically? (Edit: seems like ctags + http://elixir.free-electrons.com/linux/latest/source [1]) It supports every kernel version.

The linked source code browser seems like a useful way to check the history of system calls for research...

[1] https://github.com/thevivekpandey/syscalls-table-64bit/blob/...

Re: Linux System Call Table

#4
This is great! It would be even more useful to have this for Mac OSX too. A lot of the projects I do ends up being on both Mac and Linux. It's always a pain to find the corresponding number for the system call on Mac.

Re: Linux System Call Table

#5
I'm a bit puzzled. The code is at "syscalls-table-64bit", yet the regs are eax, etc. This makes very little sense.

In any event, I think the args should just be labeled arg0..arg5.

Re: Linux System Call Table

#6
If man pages were up to date, this should be the index of chapter 2. I have discover unix with sun in the 90s and I am very nostalgic of the quality of man pages. At that time, man pages were complete and up to date. My latest frustration was with the option -m of df command. Chapter 2 should be updated each time a new version of kernel is installed.

Re: Linux System Call Table

#8
post #5

I'm a bit puzzled. The code is at "syscalls-table-64bit", yet the regs are eax, etc. This makes very little sense. In any event, I think the args should just be labeled arg0..arg5.

In several cases, the order of the args for a syscall varies between architectures--writing a general "arg0" doesn't make a lot of sense.

That said, I don't know what's up with it using 32-bit register names.

Re: Linux System Call Table

#9
post #6

If man pages were up to date, this should be the index of chapter 2. I have discover unix with sun in the 90s and I am very nostalgic of the quality of man pages. At that time, man pages were complete and up to date. My latest frustration was with the option -m of df command. Chapter 2 should be updated each time a new version of kernel is installed.

It's very strange that adding/updating documentation isn't treated as a basic requirement for a patch that adds to or modifies Linux's public interfaces.

Re: Linux System Call Table

#10

This is great! It would be even more useful to have this for Mac OSX too. A lot of the projects I do ends up being on both Mac and Linux. It's always a pain to find the corresponding number for the system call on Mac.

System calls have not stability guarantee on macOS. You should use libc instead. In general the use of syscalls directly is fairly limited.

Edit: for instance go broke once for macOS Sierra, when Apple changed the gettimeofday system call: https://github.com/golang/go/issues/16570

Post reply on HN