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, 20 Oct 2021 09:45:00 +0000 (11:45 +0200)
commit5100dc4489ab7497da9c062cb6a781a5ba04d51b
treeada511f2d300d32178169428407c9f7970576d56
parent2c5dd2a8af7704776376c8885d3b78d2442c32ed
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