1
0
Fork 0
alistair23-linux/arch/mips/boot/compressed
Paul Cercueil f5c2f79706 MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB
commit 4d4f9c1a17 upstream.

The compressed payload is not necesarily 4-byte aligned, at least when
compiling with Clang. In that case, the 4-byte value appended to the
compressed payload that corresponds to the uncompressed kernel image
size must be read using get_unaligned_le32().

This fixes Clang-built kernels not booting on MIPS (tested on a Ingenic
JZ4770 board).

Fixes: b8f54f2cde ("MIPS: ZBOOT: copy appended dtb to the end of the kernel")
Cc: <stable@vger.kernel.org> # v4.7
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-19 18:26:12 +01:00
..
.gitignore MIPS: gitignore: ignore generated .c files 2017-08-07 11:57:30 +02:00
Makefile MIPS: Truncate link address into 32bit for 32bit kernel 2020-06-22 09:31:03 +02:00
calc_vmlinuz_load_addr.c MIPS: fix build on non-linux hosts 2019-06-19 15:55:53 -07:00
dbg.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
decompress.c MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB 2021-01-19 18:26:12 +01:00
dummy.c MIPS: Add support for GZIP / BZIP2 / LZMA compressed kernel images 2009-12-17 01:56:56 +00:00
head.S MIPS: ZBOOT: copy appended dtb to the end of the kernel 2016-08-02 14:00:16 +02:00
ld.script MIPS: Add support for vmlinuz.bin appended dtb 2015-06-21 21:54:15 +02:00
string.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uart-16550.c MIPS: Fix build with DEBUG_ZBOOT and MACH_JZ4770 2018-05-14 23:54:25 +01:00
uart-alchemy.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uart-prom.c mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00