# git rev-parse -q --verify 2d83b0f30c1483a556c8aa1f7d891006fffcd5e0^{commit} 2d83b0f30c1483a556c8aa1f7d891006fffcd5e0 already have revision, skipping fetch # git checkout -q -f -B kisskb 2d83b0f30c1483a556c8aa1f7d891006fffcd5e0 # git clean -qxdf # < git log -1 # commit 2d83b0f30c1483a556c8aa1f7d891006fffcd5e0 # Author: Ard Biesheuvel # Date: Wed Oct 28 09:04:33 2020 +0100 # # powerpc: Avoid broken GCC __attribute__((optimize)) # # Commit 7053f80d9696 ("powerpc/64: Prevent stack protection in early # boot") introduced a couple of uses of __attribute__((optimize)) with # function scope, to disable the stack protector in some early boot # code. # # Unfortunately, and this is documented in the GCC man pages [0], # overriding function attributes for optimization is broken, and is only # supported for debug scenarios, not for production: the problem appears # to be that setting GCC -f flags using this method will cause it to # forget about some or all other optimization settings that have been # applied. # # So the only safe way to disable the stack protector is to disable it # for the entire source file. # # [0] https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html # # Fixes: 7053f80d9696 ("powerpc/64: Prevent stack protection in early boot") # Signed-off-by: Ard Biesheuvel # [mpe: Drop one remaining use of __nostackprotector, reported by snowpatch] # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20201028080433.26799-1-ardb@kernel.org # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 2d83b0f30c1483a556c8aa1f7d891006fffcd5e0 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc5200_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc5200_defconfig # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc5200_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc5200_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc5200_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/arch/powerpc/platforms/52xx/lite5200_sleep.S: Assembler messages: /kisskb/src/arch/powerpc/platforms/52xx/lite5200_sleep.S:184: Warning: invalid register expression /kisskb/src/block/genhd.c: In function 'diskstats_show': /kisskb/src/block/genhd.c:1659:1: warning: the frame size of 1160 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ /kisskb/src/lib/zstd/compress.c: In function 'ZSTD_compressBlock_doubleFast': /kisskb/src/lib/zstd/compress.c:1393:1: warning: the frame size of 1584 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ INFO: Uncompressed kernel (size 0x825954) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x900000) INFO: Uncompressed kernel (size 0x825954) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x900000) INFO: Uncompressed kernel (size 0x825954) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x900000) INFO: Uncompressed kernel (size 0x81529c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x900000) Image Name: Linux-5.10.0-rc2-g2d83b0f30c14 Created: Tue Nov 3 04:20:30 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3812406 Bytes = 3723.05 KiB = 3.64 MiB Load Address: 00900000 Entry Point: 00900274 Image Name: Linux-5.10.0-rc2-g2d83b0f30c14 Created: Tue Nov 3 04:20:30 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3782286 Bytes = 3693.64 KiB = 3.61 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.10.0-rc2-g2d83b0f30c14 Created: Tue Nov 3 04:20:30 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3812816 Bytes = 3723.45 KiB = 3.64 MiB Load Address: 00900000 Entry Point: 00900274 Image Name: Linux-5.10.0-rc2-g2d83b0f30c14 Created: Tue Nov 3 04:20:30 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 3812665 Bytes = 3723.31 KiB = 3.64 MiB Load Address: 00900000 Entry Point: 00900274 Completed OK # rm -rf /kisskb/build/powerpc-next_mpc5200_defconfig_powerpc-gcc4.9 # Build took: 0:01:09.678223