OSDN Git Service

x86/cfi: Add boot time hash randomization
authorPeter Zijlstra <peterz@infradead.org>
Thu, 27 Oct 2022 09:28:16 +0000 (11:28 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 1 Nov 2022 12:44:11 +0000 (13:44 +0100)
commit0c3e806ec0f9771fa1f34c60499097d9260a8bb7
tree60850d57aa4d59cbc253f7939267af7ec426f057
parent082c4c815252ea333b0f3a51e336df60c2314fe2
x86/cfi: Add boot time hash randomization

In order to avoid known hashes (from knowing the boot image),
randomize the CFI hashes with a per-boot random seed.

Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20221027092842.765195516@infradead.org
arch/x86/kernel/alternative.c