stdenv/generic/make-derivation.nix: always set NIX_HARDENING_ENABLE#206490
stdenv/generic/make-derivation.nix: always set NIX_HARDENING_ENABLE#206490LunNova wants to merge 1 commit intoNixOS:stagingfrom
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 |
|
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 = trueset 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.shto update generated release notes