在 2018-03-16五的 15:55 +0800,Huacai Chen写道: > Call __stack_chk_guard_setup() in decompress_kernel() is too late > that > stack checking always fails for decompress_kernel() itself. So remove > __stack_chk_guard_setup() and initialize __stack_chk_guard before we > call decompress_kernel(). > > Original code comes from ARM but also used for MIPS and SH, so fix > them > together. If without this fix, compressed booting of these archs will > fail because stack checking is enabled by default (>=4.16). > > V2: Fix build on ARM. > V3: Fix build on SuperH. > > Cc: stable@xxxxxxxxxxxxxxx > Signed-off-by: Huacai Chen <chenhc@xxxxxxxxxx> Tested-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx> It works fine on MIPS(Loongson-3A3000) and arm (Allwinner H3) platforms. Thanks! > --- > arch/arm/boot/compressed/head.S | 4 ++++ > arch/arm/boot/compressed/misc.c | 7 ------- > arch/mips/boot/compressed/decompress.c | 7 ------- > arch/mips/boot/compressed/head.S | 4 ++++ > arch/sh/boot/compressed/head_32.S | 8 ++++++++ > arch/sh/boot/compressed/head_64.S | 4 ++++ > arch/sh/boot/compressed/misc.c | 7 ------- > 7 files changed, 20 insertions(+), 21 deletions(-) > -- Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>