linux/arch/powerpc
Mahesh Salgaonkar 74e96bf44f 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: d368514c30 ("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>
2018-08-07 21:49:28 +10:00
..
boot powerpc/dts: Use a correct at24 compatible fallback in ac14xx 2018-07-10 10:58:40 +10:00
configs powerpc: Add ppc32_allmodconfig defconfig target 2018-07-24 22:03:15 +10:00
crypto powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
include powerpc/xive: Remove xive_kexec_teardown_cpu() 2018-08-07 21:49:28 +10:00
kernel powerpc/64: Disable irq restore warning for now 2018-08-07 21:49:24 +10:00
kvm powerpc: remove unnecessary inclusion of asm/tlbflush.h 2018-07-30 22:48:20 +10:00
lib powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm powerpc/64s: free page table caches at exit_mmap time 2018-08-07 21:49:27 +10:00
net powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
oprofile treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
perf powerpc: clean the inclusion of stringify.h 2018-07-30 22:48:17 +10:00
platforms powerpc/pseries: Avoid using the size greater than RTAS_ERROR_LOG_MAX. 2018-08-07 21:49:28 +10:00
purgatory powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
sysdev powerpc/xive: Remove xive_kexec_teardown_cpu() 2018-08-07 21:49:28 +10:00
tools powerpc: Add a checkpatch wrapper with our preferred settings 2018-08-07 21:49:25 +10:00
xmon powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
Kconfig powerpc: Do not redefine NEED_DMA_MAP_STATE 2018-08-03 20:09:00 +10:00
Kconfig.debug powerpc: Add new kconfig CONFIG_PPC_IRQ_SOFT_MASK_DEBUG 2018-01-19 22:37:03 +11:00
Makefile powerpc: Add ppc64le and ppc64_book3e allmodconfig targets 2018-07-24 22:03:16 +10:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00