The mere fact that we are debating over the correctness of this table confirms the quality of the documentation of the OS we base our entire civilization upon is pretty poor.
Linux System Call Table
51–60 of 65 posts
Re: Linux System Call Table
#52This 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
Did they switch to libc since then?
If not, and given that Go apps are normally statically linked, does this mean that any precompiled Go app basically has a time bomb, in a sense that it'll break next time Apple changes some syscall?
Re: Linux System Call Table
#53Re: Linux System Call Table
#54What is the use case for this? Is it for someone trying to write their own syscall wrappers?
But yeah, it's for writing your own syscall wrappers. Something not exported by libc, or more likely if you're not using libc.
Re: Linux System Call Table
#55What is the use case for this? Is it for someone trying to write their own syscall wrappers?
Re: Linux System Call Table
#56Re: Linux System Call Table
#57Earlier quoted context omitted.
why bother with git grep vs. just vanilla grep. i could see the use if you're working with an older binary, but you didn't mention.
If you ran something like grep -r SYSCALL_DEFINE. read from the top level of the linux source it would search through not just your source code, but also all of the artifacts of building the kernel. Basically, git grep is faster in this case because it filters the searched files down to only ones that are checked in. You could achieve a similar effect with standard tools like this: find -type f -regex '. \.[hc]' | xa…
grep -r --include='*.[hc]' 'SYSCALL_DEFINE.*read'Re: Linux System Call Table
#58Earlier quoted context omitted.
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
Looking at this bug, it seems that Go has "fixed" it by fixing the syscall arguments, not by switching to libc. Did they switch to libc since then? If not, and given that Go apps are normally statically linked, does this mean that any precompiled Go app basically has a time bomb, in a sense that it'll break next time Apple changes some syscall?
[1]: https://groups.google.com/forum/m/#!topic/golang-nuts/RTtMsg...
Re: Linux System Call Table
#59Re: Linux System Call Table
#60Earlier quoted context omitted.
why bother with git grep vs. just vanilla grep. i could see the use if you're working with an older binary, but you didn't mention.
If you ran something like grep -r SYSCALL_DEFINE. read from the top level of the linux source it would search through not just your source code, but also all of the artifacts of building the kernel. Basically, git grep is faster in this case because it filters the searched files down to only ones that are checked in. You could achieve a similar effect with standard tools like this: find -type f -regex '. \.[hc]' | xa…
They work fine even where git-grep is not an option. Example:
ack 'SYSCALL_DEFINE.*read'