System calls by kernel version

As you know I have a page with list of Linux system calls which I usually update every rc1 release.

Recently Pavel Šnajdr asked me on Twitter:

Could you also track the first kernel version supporting each syscall? That’d make the table a lot more useful for assembler/calling_it_raw junkies :)

I decided to give it a try.

Decided to check every -rc1 release as this is point in history when most of new code is already merged. First kernel version with rc1 tag was v3.0-rc1 one. Small shell script later I got tables for each rc1 release between 3.0-rc1 and 5.11-rc1 and started digging.

There were at least 80 system calls added in this time range (my method of checking was far from being perfect).

Most active kernel versions

Most active was 5.1 kernel with 24 new ones — mostly due to y2038 problem (21 time64 related calls added).

Then 5.2 kernel added 6 new ones in filesystem handling.

3.5 kernel had some Alpha related activity with 5 osf_* calls added of *stat* family. Also ‘kcmp’ appeared then.

There were few kernel releases with 3 new system calls:

Two new calls were present in:

kernel release system calls
3.2 process_vm_readv() and process_vm_writev()
3.3 cache_sync() and mq_getsetaddr()
3.8 finit_module() and kern_features()
3.9 arc_gettls() and arc_settls()
3.14 sched_getattr() and sched_setattr()
4.3 membarrier() and userfaultfd()
4.6 preadv2() and pwritev2()
4.18 io_pgetevents() and rseq()
5.6 openat2() and pidfd_getfd()

Sixteen kernel releases brought one system call each.

Architecture specific calls

Other arch specific entries:

architecture system calls
Alpha osf_*
ARC arc_gettls() and arc_settls()
Arm arm_fadvise64_64()
OpenRISC or1k_atomic()
S/390 s390_runtime_instr() and s390_sthyi()

Those are usually hardware specific. Some get their name changed — for example Arm had arm_sync_file_range() which was later renamed to sync_file_range2() and used on several of other architectures.

I do wonder why Alpha still has all those osf_* calls. Do people still use OSF/1 emulation there?

Summary

Most of kernel releases bring some new system call(s). Usually it takes 2-3 releases for most architectures to keep up. Looks like there are just 153 (of 595) calls supported on all archs (but this is affected by fact that I keep information also for architectures removed from Linux kernel).

Some system calls get dropped or renamed. I drop those from my table as well.

My work on this table will continue. It does not take much of my time and provides useful information to several FOSS projects.

kernel syscalls