-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
cannot boot linux_latest_hardened on lvm-on-luks anymore #87260
Comments
What filesystem are you using? If it's a mainlined filesystem, I don't believe hardened should've broken that. But it's probably depending on |
Thanks so much for the reponse :) It's |
Sorry, this is my fault! Yeah, my guess is that we need to re-enable AIO. I did notice some additional harmless-seeming warnings at boot that seemed AIO-related when writing #84522 (which switched to a patchset that disables AIO by default), but I guess it didn't affect any of my systems because they use ZFS. I was hoping AIO was only required by marginal things (like Oracle...), but LVM is pretty important. Given that nginx also uses AIO per #84522 (comment), it might be worth explicitly turning it on in the default shared Kconfig (as I did for System V IPC in the original PR). I'm not sure if the AIO code is known to be particularly crufty by Linux standards or if it's just a general attack surface reduction thing; a few of the linux-hardened defaults are a bit better-suited to the Android environment than a desktop Linux distro. kconfig-hardened-check credits @cyplo Here's a nixpkgs diff to re-enable AIO: diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index 0a58ed87e6c..06fd21bb87b 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -615,6 +615,8 @@ let
SYSVIPC = yes; # System-V IPC
+ AIO = yes; # POSIX asynchronous I/O
+
UNIX = yes; # Unix domain sockets.
MD = yes; # Device mapper (RAID, LVM, etc.) It'd definitely be good to know if this fixes things for you. |
Also, this would be pretty easy to test for, so if this change fixes it then we should also update the hardened test to use LVM. |
Heya, good news ! One kernel compilation later - I'm back to running For the test - I think that would be awesome, to catch things like this in the future :) |
This is disabled by default in the linux-hardened patchset, but is required by e.g. LVM. Fixes NixOS#87260.
Describe the bug
Since switching from
19.09
to20.03
I needed to switch frompkgs.linuxPackages_latest_hardened
topkgs.linuxPackages_latest
, otherwise the system does not boot anymore.To Reproduce
Steps to reproduce the behavior:
20.03
orunstable
channelpkgs.linuxPackages_latest_hardened
sudo nixos-rebuild switch --upgrade
reboot
Expected behavior
Would boot :)
Screenshots
latest_hardened
:latest
:Additional context
All my config for this machine starts from here - I link this file in place of
/etc/nixos/configuration.nix
Notify maintainers
@thoughtpolice maybe ?
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.^ using
unstable
channel withlatest
kernel right nowHappy to help debug this if needed :)
The text was updated successfully, but these errors were encountered: