linux/arch/mips/boot
Paul Cercueil f5c2f79706 MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB
commit 4d4f9c1a17a3480f8fe523673f7232b254d724b7 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
..
compressed MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB 2021-01-19 18:26:12 +01:00
dts MIPS: qi_lb60: Fix routing to audio amplifier 2020-08-21 13:05:26 +02:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore 2017-11-08 11:20:24 -06:00
Makefile MIPS: boot: fix typo in 'vmlinux.lzma.its' target 2020-02-11 04:35:17 -08:00
ecoff.h MIPS: Make elf2ecoff work on 64bit host machines 2018-06-24 09:25:24 -07:00
elf2ecoff.c MIPS: Make elf2ecoff work on 64bit host machines 2018-06-24 09:25:24 -07:00