-
-
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
stdenv/generic/make-derivation.nix: always set NIX_HARDENING_ENABLE #206490
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as duplicate.
This comment was marked as duplicate.
…no custom hardeningDisable/hardeningEnable attr
@ofborg build stdenv.cc |
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, I've successfully built
- firefox
- chromium
- openssh
- sway
- qemu
on an x86_64-linux and everything seems to work.
This almost certainly will cause problems with fortran, have addressed some of them in #259070 |
The security label is a "severity" label to mark vulnerabilities that need priority action, not as a general subject classifier. |
If I'm not mistaken, the original problem seems to be described here: #27218 Fortran complains if we attempt to use either "format" or "fortify" hardening. However, it seems to be taken care of, at least partially by 78028df So if the toolchain supports Fortran, add-hardening.sh will drop those flags. Thus, setting NIX_HARDENING_ENABLE shouldn't break anything (?). EDIT: Oh, it seems it is already handled in #259070 🙏 |
Marked as a draft again so it doesn't get merged until #259070 is merged, if we still think this change is good after that PR. |
FWIW I'm not pushing to get #259070 merged before 23.11 - too close to the release. |
@risicle still worth making a change here or should I close this? |
There's probably some value in this if only for uniformity. I'd love to know why the musl exception was needed in the first place. |
See #205031, #252310 (comment)
Without this change setting either of hardeningDisable or hardeningEnable is required to activate the default set of hardening flags, making logic elsewhere in nixpkgs (primarily in build-support scripts) more complicated as it has to have its own defaults if this variable is unset. Except on musl which sets it unconditionally.
With this change the default hardening flags are applied even if neither hardening option is set, and other scripts can be simplified.
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes