diff options
author | Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> | 2018-07-04 19:57:02 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-08-07 13:49:28 +0200 |
commit | 74e96bf44f430cf7a01de19ba6cf49b361cdfd6e (patch) | |
tree | e487208fe0aaa68ae8b14df149ef5bb99eae6eb8 /arch/powerpc/include/asm/smu.h | |
parent | powerpc/xive: Remove xive_kexec_teardown_cpu() (diff) | |
download | linux-74e96bf44f430cf7a01de19ba6cf49b361cdfd6e.tar.xz linux-74e96bf44f430cf7a01de19ba6cf49b361cdfd6e.zip |
powerpc/pseries: Avoid using the size greater than RTAS_ERROR_LOG_MAX.
The global mce data buffer that used to copy rtas error log is of 2048
(RTAS_ERROR_LOG_MAX) bytes in size. Before the copy we read
extended_log_length from rtas error log header, then use max of
extended_log_length and RTAS_ERROR_LOG_MAX as a size of data to be copied.
Ideally the platform (phyp) will never send extended error log with
size > 2048. But if that happens, then we have a risk of buffer overrun
and corruption. Fix this by using min_t instead.
Fixes: d368514c3097 ("powerpc: Fix corruption when grabbing FWNMI data")
Reported-by: Michal Suchanek <msuchanek@suse.com>
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/smu.h')
0 files changed, 0 insertions, 0 deletions