efi/cper: use stack buffer for error record decoding
authorArd Biesheuvel <ardb@kernel.org>
Wed, 1 Sep 2021 06:33:19 +0000 (08:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Oct 2021 07:33:57 +0000 (09:33 +0200)
commit508fe9a16f4fa52e42a541bfcf41a0af247ab67b
tree548574782d926fbb7a3e2264547ebeb2c48d8461
parentca3cf605901a17ad4cae5a4fd524d29849085c3c
efi/cper: use stack buffer for error record decoding

commit b3a72ca80351917cc23f9e24c35f3c3979d3c121 upstream.

Joe reports that using a statically allocated buffer for converting CPER
error records into human readable text is probably a bad idea. Even
though we are not aware of any actual issues, a stack buffer is clearly
a better choice here anyway, so let's move the buffer into the stack
frames of the two functions that refer to it.

Cc: <stable@vger.kernel.org>
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/efi/cper.c