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
nixos/malloc: apply allocator settings to systemd units #62238
Conversation
This uses systemd's system.conf/user.conf "DefaultEnvironment" feature to set the allocator's LD_PRELOAD near-globally.
@GrahamcOfBorg test hardened |
Thank you |
After this PR error worked authorization by openssh client. Used hardened profile.
Checked with this script:
|
This variant is no better?
Example. With ld-nix.so.preload:
With environment.variables.LD_PRELOAD and systemd.extraConfig library not loaded. |
That variant was mentioned in #59955 (comment) |
I used this method:
and
before this PR #60187 |
Motivation for this change
#62236
This PR uses systemd's system.conf/user.conf "DefaultEnvironment" feature to set the allocator's LD_PRELOAD near-globally.
I've only tested this with Scudo, not with Graphene, so no idea if it's going to break Graphene allocator systems further than they are already. With this PR, I see almost all processes on my system using the configured allocator. The only exceptions are:
@GrahamcOfBorg test hardened
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)