-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Kernel updates 2024-05-27 (incl 6.10-rc1) #315121
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Rust patch seems already applied for /nix/store/z4sf9jia1rzqlkpgbx3985glaxk8hy9g-linux-6.10-rc1.drv
:
error log
last 25 log lines:
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |diff --git a/rust/alloc/vec/mod.rs b/rust/alloc/vec/mod.rs
> |index 220fb9d6f45b3f..0be27fff4554a1 100644
> |--- a/rust/alloc/vec/mod.rs
> |+++ b/rust/alloc/vec/mod.rs
> --------------------------
> File to patch:
> Skip this patch? [y]
> Skipping patch.
> 15 out of 15 hunks ignored
> patching file rust/kernel/lib.rs
> Reversed (or previously applied) patch detected! Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 2 out of 2 hunks ignored -- saving rejects to file rust/kernel/lib.rs.rej
> patching file scripts/Makefile.build
> Reversed (or previously applied) patch detected! Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file scripts/Makefile.build.rej
> patching file scripts/min-tool-version.sh
> Hunk #1 FAILED at 33.
> 1 out of 1 hunk FAILED -- saving rejects to file scripts/min-tool-version.sh.rej
For full logs, run 'nix log /nix/store/2rarf83b3j9202d533i8bdzdspk5hd1a-linux-config-6.10-rc1.drv'.
Ah right, of course. |
fwiw rest of the changed kernels seem good though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! The removal of the now-redundant Rust
patch and the renaming of the config options fixed my compilation of the kernel.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1689 |
linux_testing doesn't build for riscv64, I assume because of https://git.kernel.org/linus/e79dfcbfb902a99268cc8022031461da7a8e2bc8. It will now unconditionally try install Image.zst, which we haven't built because platforms.nix says we want Image on Linux, and that can't just be changed to Image.zst because that doesn't exist in older kernels. |
Ah, I guess we just need to unset all the kernel compression options for RISC-V, to preserve the old behaviour. |
Noticed while reviewing NixOS#315121.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask why we assume that Risc-V uses an uncompressed kernel? Not sure I understand that part.
Approving anyways, since this is not my area of expertise and I don't want to block an otherwise valid PR because I probably don't know enough about that.
From the commit message:
|
We assume RISC-V uses an uncompressed kernel in lib/systems/platforms.nix. Since this is the first Linux version to support either xz or zstd compressed kernels on RISC-V, we can't change platforms.nix to match the other platforms without breaking builds of older kernel versions, so let's just preserve the old behaviour. We could in future decide to use gzip-compressed kernels on RISC-V, which is supported going back further.
Sorry, understood. Thanks! |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-23.11
git worktree add -d .worktree/backport-315121-to-release-23.11 origin/release-23.11
cd .worktree/backport-315121-to-release-23.11
git switch --create backport-315121-to-release-23.11
git cherry-pick -x 9f18414c6b7daa5b83210984bfb124e4f7c3340e 3fb6880a9949dba1c40ef5811568e260bea1c1ba 979e6398aaa178d2542dbd856b2283bc38aad4f3 e192371fb05ff4f9ed9729610d1b01f581ef03f4 a21294b60b45847b27b227e5d5876e71e3a00d72 d1635db20cf65028ac48926281599a9b86e6513d 99017dc454f21e9343922d58d7fcb51816e57f42 d4d3f7bfb0c8db4addc4246ca47cb3b9a2a81e9a aa5556d0ae4b63e7035d1aed6b06e62202ae9b40 3b26c0fc145825df5da637380fd8ab5e22b840d7 90e6b1f3777c2d7b0fb8f6ca78f96b7c68ebf5d4 e756e6ab57a0a6423bfcdb356399c7720526c9d1 e2326d3d20cb5278c7355e477063f8d21d386c8b |
Successfully created backport PR for |
@blitz @Ma27 @yu-re-ka I've just noticed that this has sadly regressed Rust on aarch64. It now uses the aarch64-unknown-none target instead of the default one. We could just build support for that into our default rustc, except that the build fails because it can't generate documentation for std for that target (because there is no std). I think the only good way to resolve this is going to be for Rust's build system to be fixed to skip trying to generate std documentation only for no_std targets, or to at least provide that option. I don't think I'm going to be able to work on that for at least a while. |
Noticed while reviewing NixOS#315121.
Backport (the rest of) #315121 to release-23.11
The first assumption[1] we had was that the `aarch64-unknown-none` target was missing from rustc and that this was the cause for the regression. However, it turns out that the relevant code from `rustc` wasn't used anyways because the Makefile does `--sysroot /dev/null`[2] which prevents rustc from using its own libcore. So luckily we don't have to patch the Rust bootstrap to get aarch64-linux back working[3]. In fact, the Rust part seems broken for both 6.10 and 6.11[4], but I decided to not bother since none of those are longterm versions. So what's left here? * Enabling Rust for aarch64-linux because it clearly works[5]. * Turning off NFS_LOCALIO for aarch6y4-linux because breaks the build like this: /nix/store/f3k0rdhcd2cx57phx755c2xixgifw5m5-binutils-2.42/bin/ld: Unexpected GOT/PLT entries detected! /nix/store/f3k0rdhcd2cx57phx755c2xixgifw5m5-binutils-2.42/bin/ld: Unexpected run-time procedure linkages detected! /nix/store/f3k0rdhcd2cx57phx755c2xixgifw5m5-binutils-2.42/bin/ld: fs/nfs/localio.o: in function `nfs_local_iocb_alloc': /build/source/build/../fs/nfs/localio.c:290:(.text+0x324): undefined reference to `nfs_to' [...] [1] NixOS#315121 (comment) [2] https://lore.kernel.org/all/20231031201752.1189213-1-mmaurer@google.com/ [3] Of course I only realized this _after_ I spent some time hacking a rustc patch together 🙃 [4] This broke with error[E0463]: can't find crate for `core` | = note: the `aarch64-unknown-none` target may not be installed = help: consider downloading the target with `rustup target add aarch64-unknown-none` = help: consider building the standard library from source with `cargo build -Zbuild-std` [5] While the build is fine, the VM tests are still panicking, but that's also the case for `kernel-generic` because of a 9p regression: switch_root: can't execute '/nix/store/zv87gw0yxfsslq0mcc35a99k54da9a4z-nixos-system-machine-test/init': Exec format error [ 1.734997] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 [ 1.736002] CPU: 0 UID: 0 PID: 1 Comm: switch_root Not tainted 6.12.0-rc1 #1-NixOS [...] Reported as https://lore.kernel.org/all/D4LHHUNLG79Y.12PI0X6BEHRHW@mbosch.me/T/#u
The first assumption[1] we had was that the `aarch64-unknown-none` target was missing from rustc and that this was the cause for the regression. However, it turns out that the relevant code from `rustc` wasn't used anyways because the Makefile does `--sysroot /dev/null`[2] which prevents rustc from using its own libcore. So luckily we don't have to patch the Rust bootstrap to get aarch64-linux back working[3]. In fact, the Rust part seems broken for both 6.10 and 6.11[4], but I decided to not bother since none of those are longterm versions. So all that's left here is to enable Rust for aarch64-linux because it clearly works[5]. [1] NixOS#315121 (comment) [2] https://lore.kernel.org/all/20231031201752.1189213-1-mmaurer@google.com/ [3] Of course I only realized this _after_ I spent some time hacking a rustc patch together 🙃 [4] This broke with error[E0463]: can't find crate for `core` | = note: the `aarch64-unknown-none` target may not be installed = help: consider downloading the target with `rustup target add aarch64-unknown-none` = help: consider building the standard library from source with `cargo build -Zbuild-std` [5] While the build is fine, the VM tests are still panicking, but that's also the case for `kernel-generic` because of a 9p regression: switch_root: can't execute '/nix/store/zv87gw0yxfsslq0mcc35a99k54da9a4z-nixos-system-machine-test/init': Exec format error [ 1.734997] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 [ 1.736002] CPU: 0 UID: 0 PID: 1 Comm: switch_root Not tainted 6.12.0-rc1 #1-NixOS [...] Reported as https://lore.kernel.org/all/D4LHHUNLG79Y.12PI0X6BEHRHW@mbosch.me/T/#u
The first assumption[1] we had was that the `aarch64-unknown-none` target was missing from rustc and that this was the cause for the regression. However, it turns out that the relevant code from `rustc` wasn't used anyways because the Makefile does `--sysroot /dev/null`[2] which prevents rustc from using its own libcore. So luckily we don't have to patch the Rust bootstrap to get aarch64-linux back working[3]. In fact, the Rust part seems broken for both 6.10 and 6.11[4], but I decided to not bother since none of those are longterm versions. So all that's left here is to enable Rust for aarch64-linux because it clearly works[5]. [1] #315121 (comment) [2] https://lore.kernel.org/all/20231031201752.1189213-1-mmaurer@google.com/ [3] Of course I only realized this _after_ I spent some time hacking a rustc patch together 🙃 [4] This broke with error[E0463]: can't find crate for `core` | = note: the `aarch64-unknown-none` target may not be installed = help: consider downloading the target with `rustup target add aarch64-unknown-none` = help: consider building the standard library from source with `cargo build -Zbuild-std` [5] While the build is fine, the VM tests are still panicking, but that's also the case for `kernel-generic` because of a 9p regression: switch_root: can't execute '/nix/store/zv87gw0yxfsslq0mcc35a99k54da9a4z-nixos-system-machine-test/init': Exec format error [ 1.734997] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 [ 1.736002] CPU: 0 UID: 0 PID: 1 Comm: switch_root Not tainted 6.12.0-rc1 #1-NixOS [...] Reported as https://lore.kernel.org/all/D4LHHUNLG79Y.12PI0X6BEHRHW@mbosch.me/T/#u
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.