MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB
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: b8f54f2c ("MIPS: ZBOOT: copy appended dtb to the end of the kernel") Cc: <stable@vger.kernel.org> # v4.7 Signed-off-by: NPaul Cercueil <paul@crapouillou.net> Reviewed-by: NNick Desaulniers <ndesaulniers@google.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
Showing
想要评论请 注册 或 登录