4 ms·
Linux doesn't guarantee syscall stability either. Just make sure your wrappers can use a syscall table chosen at runtime, depending on which kernel you are runn
by zzzcpan 9y ago
Linux doesn't guarantee syscall stability either. Just make sure your wrappers can use a syscall table chosen at runtime, depending on which kernel you are running.
- smhenderson 9y agoif you're going to implement that kind of overhead why not just use libc?
- zzzcpan 9y agoI'm not sure what you mean by overhead. It's not that hard or expensive to choose a few function pointers on program start.
- wahern 9y agoYes it does, at least in the sense that syscalls which become officially public will never be removed from Linus' tree except in rare circumstances (i.e. proof that nobody is using it), nor will the arguments change. This is Linus' famous "never break user space" ABI mantra. While distributions may deprecate and remove them (e.g. sysctl(2)) they certainly won't be assigned new IDs. A table won't help in such cases.
- caf 9y agoExactly. This is why, for example, the original 'mmap' system call entry point on x86 still exists, even though it is overwhelmingly likely that every program on your machine is actually going to use the 'mmap2' entry point.
- RJIb8RBYxzAMX9u 9y agoI think you're confusing driver APIs and syscalls. Both are infamous for their respective lack of, or guarantee of stability.
- dungle6 9y agoYour first sentence is absolutely false. The syscall table is the stable API of the linux kernel.