96 points · by soheilpro · 6y ago · 30 comments
Linux's syscall list is out of control. The many BSDs have managed to keep it more reasonable.
The last time I checked, FreeBSD's list of system calls was larger than Linux's. This is because Linux tends to expose more functionality through sysfs, procfs, ioctl, while FreeBSD uses dedicated system calls.
https://filippo.io/linux-syscall-table/ <- max = 313
https://github.com/freebsd/freebsd/blob/master/sys/kern/sysc... <- max = 576, 356 marked 'STD'
[1]: https://fedora.juszkiewicz.com.pl/syscalls.html [2]: https://elixir.bootlin.com/linux/latest/source/arch/x86/entr...
- macOS could once easily be panicked by calling something like fpathconf() on a message queue.
- If you want to have fun, try calling revoke(2) on character devices that are not TTYs. I remember fixing a bug in FreeBSD once, where you could make the system panic by calling that function on /dev/bpf.
Will finish and republish in a few days.