Canonical + SUSE Engineers Call For More Extensible Linux System Calls Moving Forward
Aleksa Sarai of SUSE and Christian Brauner of Canonical presented at last week's Linux Plumbers Conference with a call for more extensible system calls moving forward in aiming to enhance the Linux user-space API.
The talk was a collection of recommendations -- some of which are already common in the introduction of new system calls -- and new recommendations compared to the traditional "trial and error" approach the kernel has seen to some extent with system calls of the past.
The SUSE and Canonical kernel developers that presented ultimately hope the system call recommendations will be incorporated into the kernel documentation and encouraged by subsystem maintainers as new system calls are introduced moving forward in aiming to make it easier for user-space developers and avoiding pitfalls seen in the past by some poorly designed system calls.
One of the key topics of the LPC2020 presentation was on using an approach of structs in the syscall that are versioned by size. With the extensible structs approach, new fields are always appended to the end and makes it fairly straight forward in comparing the size of the struct and proper handling. This approach has seen success recently in some new interfaces while the talk also covered best practices for testing of syscall features and more.
There is some dissenting views on the extensible struct approach for new system calls in that it can be a "crap insertion vector" in theoretically making it easier to "sneak in" new features without proper design/review, but so far that hasn't proven to be a real problem.
Those interested in hearing the latest recommendations around designing extensible syscalls can see the presentation embedded above and the PDF slide deck.
The talk was a collection of recommendations -- some of which are already common in the introduction of new system calls -- and new recommendations compared to the traditional "trial and error" approach the kernel has seen to some extent with system calls of the past.
The SUSE and Canonical kernel developers that presented ultimately hope the system call recommendations will be incorporated into the kernel documentation and encouraged by subsystem maintainers as new system calls are introduced moving forward in aiming to make it easier for user-space developers and avoiding pitfalls seen in the past by some poorly designed system calls.
One of the key topics of the LPC2020 presentation was on using an approach of structs in the syscall that are versioned by size. With the extensible structs approach, new fields are always appended to the end and makes it fairly straight forward in comparing the size of the struct and proper handling. This approach has seen success recently in some new interfaces while the talk also covered best practices for testing of syscall features and more.
There is some dissenting views on the extensible struct approach for new system calls in that it can be a "crap insertion vector" in theoretically making it easier to "sneak in" new features without proper design/review, but so far that hasn't proven to be a real problem.
Those interested in hearing the latest recommendations around designing extensible syscalls can see the presentation embedded above and the PDF slide deck.
1 Comment