{{ message }}
Repository navigation
Handling out-of-date Linux headers #4486
Skyb0rg007
started this conversation in
General
Replies: 1 comment 2 replies
|
I personally prefer to define a fallback if something is too new for the installed kernel headers, when all we need is a simple macro (like the PR_SET_NO_NEW_PRIVS example). |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
I was looking at the setpriv code, and noticed two different kinds of “missing Linux header definition”:
PR_SET_NO_NEW_PRIVSis defined if the Linux header it’s compiled with doesn’t include the definition. The code will just produce an error if the kernel it runs on is too old.LANDLOCK_ACCESS_FS_REFERis not defined, setpriv does not know about it.I wanted to know which style is preferable. I was working on modernizing the setpriv landlock API and was thinking about switching to the “define what is missing” style, as it makes it easier for older build machines to compile all the features for newer kernels, and to allow users to use the features immediately upon updating their kernel.
All reactions