arm64: Use v8.5-RNG entropy for KASLR seed
authorMark Brown <broonie@kernel.org>
Tue, 21 Jan 2020 12:58:53 +0000 (12:58 +0000)
committerWill Deacon <will@kernel.org>
Wed, 22 Jan 2020 09:54:52 +0000 (09:54 +0000)
commit2e8e1ea88cbcb19a77b7acb67f6ffe39cc15740c
tree24b908d1f3608e4bebf845d9b3202d83e5881beb
parent1a50ec0b3b2e9a83f1b1245ea37a853aac2f741c
arm64: Use v8.5-RNG entropy for KASLR seed

When seeding KALSR on a system where we have architecture level random
number generation make use of that entropy, mixing it in with the seed
passed by the bootloader. Since this is run very early in init before
feature detection is complete we open code rather than use archrandom.h.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/archrandom.h
arch/arm64/kernel/kaslr.c