diff options
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/kernel/randstruct-provide-seed-5.19.patch')
-rw-r--r-- | nixpkgs/pkgs/os-specific/linux/kernel/randstruct-provide-seed-5.19.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/randstruct-provide-seed-5.19.patch b/nixpkgs/pkgs/os-specific/linux/kernel/randstruct-provide-seed-5.19.patch new file mode 100644 index 000000000000..5ca897a76bf6 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/kernel/randstruct-provide-seed-5.19.patch @@ -0,0 +1,13 @@ +diff --git a/scripts/gen-randstruct-seed.sh b/scripts/gen-randstruct-seed.sh +index 61017b36c464..7bb494dd2e18 100755 +--- a/scripts/gen-randstruct-seed.sh ++++ b/scripts/gen-randstruct-seed.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + # SPDX-License-Identifier: GPL-2.0 + +-SEED=$(od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n') ++SEED="NIXOS_RANDSTRUCT_SEED" + echo "$SEED" > "$1" + HASH=$(echo -n "$SEED" | sha256sum | cut -d" " -f1) + echo "#define RANDSTRUCT_HASHED_SEED \"$HASH\"" > "$2" |