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
boot.kernel.features: add nixos option for setting kernel features #34791
Conversation
Success on aarch64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
nixos/modules/system/boot/kernel.nix
Outdated
default = {}; | ||
example = literalExample "{ debug = true; }"; | ||
description = '' | ||
This option allows to enable or certain kernel features. |
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.
seems like there is an disable
missing in the description
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.
Thanks!
I like the idea of exposing kernel features like that. We could eventually also use that for things like the spectre and meltdown mitigations. I know that @fpletz was thinking about such a way to configure this. I can not judge the configuration for CRIU or systemtap. |
fabf7d4
to
fe9b15b
Compare
Success on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
@GrahamcOfBorg test kernel-lts |
@GrahamcOfBorg test kernel-latest |
@GrahamcOfBorg test kernel-copperhead |
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
fe9b15b
to
92bb426
Compare
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.
features should be introduced to the kernel via the existing override in kernelPackages
nixos/modules/system/boot/kernel.nix
Outdated
inherit (config.boot.kernelPackages) kernel; | ||
kernel = config.boot.kernelPackages.kernel.override { | ||
inherit (config.boot.kernel) features; | ||
}; | ||
|
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.
this override doesn't work at all. besides, it's ugly.
it should be overridden in boot.kernelPackages
, a few lines down.
I'm currently running a build for that.
I redid the override, hopefully fixing it. |
Success on aarch64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
this allows setting the features attribute for pkgs/os-specific/linux/kernel/common-config.nix
also enables debug feature on kernel
This isn't useful as public API. It should be used by options to activate kernel features for use with specific programs.
92bb426
to
c1e7903
Compare
Success on aarch64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Motivation for this change
The motivation is submitted in the form of additional commits on this PR:
systemtap
andcriu
; both profit from / require custom kernel configCONFIG_DEBUG_INFO
, for use with systemtapCONFIG_CHECKPOINT_RESTORE
, which is required bycriu
Review requested
CONFIG_EXPERT
(EXPERT
is needed forCHECKPOINT_RESTORE
) d86f252#diff-ad3f665c58e343da48fc9981dde5afaeR690Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)