various: fix Scudo allocator due to LLVM update (#444605)

Emily 597c7a90 855a52f0

Changed files
+3 -3
nixos
modules
config
profiles
pkgs
development
compilers
llvm
common
compiler-rt
+1 -1
nixos/modules/config/malloc.nix
···
or (throw "scudo not supported on ${pkgs.stdenv.hostPlatform.system}");
in
{
-
libPath = "${pkgs.llvmPackages.compiler-rt}/lib/linux/libclang_rt.scudo-${systemPlatform}.so";
+
libPath = "${pkgs.llvmPackages.compiler-rt}/lib/linux/libclang_rt.scudo_standalone-${systemPlatform}.so";
description = ''
A user-mode allocator based on LLVM Sanitizer’s CombinedAllocator,
which aims at providing additional mitigations against heap based
+1 -1
nixos/modules/profiles/hardened.nix
···
nix.settings.allowed-users = mkDefault [ "@users" ];
environment.memoryAllocator.provider = mkDefault "scudo";
-
environment.variables.SCUDO_OPTIONS = mkDefault "ZeroContents=1";
+
environment.variables.SCUDO_OPTIONS = mkDefault "zero_contents=true";
security.lockKernelModules = mkDefault true;
+1 -1
pkgs/development/compilers/llvm/common/compiler-rt/default.nix
···
env = {
NIX_CFLAGS_COMPILE = toString (
[
-
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+
"-DSCUDO_DEFAULT_OPTIONS=delete_size_mismatch=false:dealloc_type_mismatch=false"
]
++ lib.optionals (!haveLibc) [
# The compiler got stricter about this, and there is a usellvm patch below