x86/boot: Allow a "silent" kaslr random byte fetch
authorKees Cook <keescook@chromium.org>
Wed, 13 Oct 2021 17:57:40 +0000 (10:57 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 27 Oct 2021 09:07:58 +0000 (11:07 +0200)
commit0d054d4e82072bcfd5eb961536b09a9b3f5613fb
tree020a40b38042c6ab1f58e47df57a432b1cf0f12c
parenta54c401ae66fc78f3f0002938b3465ebd6379009
x86/boot: Allow a "silent" kaslr random byte fetch

Under earlyprintk, each RNG call produces a debug report line. To support
the future FGKASLR feature, which will fetch random bytes during function
shuffling, this is not useful information (each line is identical and
tells us nothing new), needlessly spamming the console. Instead, allow
for a NULL "purpose" to suppress the debug reporting.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20211013175742.1197608-3-keescook@chromium.org
arch/x86/lib/kaslr.c