New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Linux API headers to those of the default NixOS kernel #15449
Conversation
This updates the Linux API headers to those of the default NixOS kernel.
I wonder – could some packages have problems when running with a kernel older than |
For glibc in particular I know the minimal supported kernel is a configure option, so building against newer headers shouldn't move that bound. |
@vcunat my understanding is that what matters is whether the running kernel supports those APIs that the program actually uses. |
Yes, but my question was meant more like: if a program is compiled against some kernel header version, it might take those APIs for granted. We'll see, I suppose. Perhaps I'm too pessimistic. |
But I think a program has to use an API that doesn't exist on older kernels for it to crash; given that it's backwards compatible, I'd imagine that symbols available in both versions would have the same signature. |
Yes, kernel ABI is very stable (wrt. user space), that's for sure. |
Hm, are you thinking about a scenario where a program optionally uses a newer API if it detects that the headers have a certain version? Seems to me that if a program needs newer features, then running on older kernels is out of the question anyway. |
Anyway, this isn't important to me, I only thought it'd be a good opportunity to update the headers, so I'm fine with dropping this if it's seen as too risky. |
IMHO the risk is rather low, but I don't know much about these things. /cc @edolstra anyway. I presume that programs (e.g. glibc) had some older implementations against older kernels, but when new kernel features get in, they create better implementation of some parts utilizing the new ABI. Then they probably decide during runtime which to use, but they might purge some of the implementations during configure/build-time. |
https://sourceware.org/glibc/wiki/FAQ#What_version_of_the_Linux_kernel_headers_should_be_used.3F recommends using the latest version, but with the same caveat as the kernel docs. |
...to those of the default NixOS kernel
I don't know why it matters here; the error was: linux.c:25:24: fatal error: linux/nvme.h: No such file or directory
To answer the previous questions, yes programs will crash when using kernel On Mon, May 16, 2016, 1:16 AM Vladimír Čunát notifications@github.com
|
Hm, shouldn't this have gone into the staging branch? |
@edolstra it did |
Github only closed this after staging got merged to master. (Which is correct, as the PR was filed against master.) |
Given that we have to rebuild the world for #15447 could we take take that as an opportunity to update the API headers as well?