ARM: dont specify STACKPROTECTOR in defconfigs
Subsystems (4)
PATCH 1/1 ARM: dont specify STACKPROTECTOR in defconfigs
Note the output from the following:
$ git grep STACKPROTECTOR arch/arm/configs/ arch/arm/configs/aspeed_g4_defconfig:CONFIG_CC_STACKPROTECTOR_STRONG=y arch/arm/configs/aspeed_g5_defconfig:CONFIG_CC_STACKPROTECTOR_STRONG=y arch/arm/configs/bcm2835_defconfig:CONFIG_CC_STACKPROTECTOR_REGULAR=y $
Only three defconfigs specify a value. And two of the three ask for the strong variant, which isn't supported by older toolchains.
Due to the nature of ARM having more platform specific code than say x86, the allyesconfig and allmodconfig aren't as effective for build coverage. So, in addition, I like to use a trivial script to walk all the defconfigs and build each one.
However I will get false positives on unsupported stackprotector values with an older toolchain like gcc-4.6.3. As in this instance I am just using the compiler as a glorified syntax checker on a machine where I build a bunch of other arch for the same reason, there is no real motivation to get a newer toolchain for improved optimization etc.
Since there are only three of them, and there is nothing about these settings that are board/platform specific, I propose we just eliminate the three existing instances and take the default.
--- arch/arm/configs/aspeed_g4_defconfig | 1 - arch/arm/configs/aspeed_g5_defconfig | 1 - arch/arm/configs/bcm2835_defconfig | 1 - 3 files changed, 3 deletions(-)
arch/arm/configs/aspeed_g4_defconfig +0 -1
@@ -18,7 +18,6 @@ CONFIG_BPF_SYSCALL=y CONFIG_EMBEDDED=y # CONFIG_COMPAT_BRK is not set CONFIG_SLAB=y -CONFIG_CC_STACKPROTECTOR_STRONG=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLOCK is not set
arch/arm/configs/aspeed_g5_defconfig +0 -1
@@ -18,7 +18,6 @@ CONFIG_BPF_SYSCALL=y CONFIG_EMBEDDED=y # CONFIG_COMPAT_BRK is not set CONFIG_SLAB=y -CONFIG_CC_STACKPROTECTOR_STRONG=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLOCK is not set
arch/arm/configs/bcm2835_defconfig +0 -1
@@ -24,7 +24,6 @@ CONFIG_EMBEDDED=y CONFIG_PROFILING=y CONFIG_OPROFILE=y CONFIG_JUMP_LABEL=y -CONFIG_CC_STACKPROTECTOR_REGULAR=y CONFIG_ARCH_MULTI_V6=y CONFIG_ARCH_BCM=y CONFIG_ARCH_BCM2835=y
Signature · 1 line
2.8.4
Quoted 7 lines · Paul Gortmaker
Note the output from the following:
$ git grep STACKPROTECTOR arch/arm/configs/ arch/arm/configs/aspeed_g4_defconfig:CONFIG_CC_STACKPROTECTOR_STRONG=y arch/arm/configs/aspeed_g5_defconfig:CONFIG_CC_STACKPROTECTOR_STRONG=y arch/arm/configs/bcm2835_defconfig:CONFIG_CC_STACKPROTECTOR_REGULAR=y $
I don't see why rpi1 shoud be special, so for bcm2835:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160721/5c207bcf/attachment.sig>
Hi Paul,
Quoted 16 lines · Paul Gortmaker
Note the output from the following:
$ git grep STACKPROTECTOR arch/arm/configs/ arch/arm/configs/aspeed_g4_defconfig:CONFIG_CC_STACKPROTECTOR_STRONG=y arch/arm/configs/aspeed_g5_defconfig:CONFIG_CC_STACKPROTECTOR_STRONG=y arch/arm/configs/bcm2835_defconfig:CONFIG_CC_STACKPROTECTOR_REGULAR=y $Only three defconfigs specify a value. And two of the three ask for the strong variant, which isn't supported by older toolchains.
Due to the nature of ARM having more platform specific code than say x86, the allyesconfig and allmodconfig aren't as effective for build coverage. So, in addition, I like to use a trivial script to walk all the defconfigs and build each one.
Quoted 5 lines
However I will get false positives on unsupported stackprotector values with an older toolchain like gcc-4.6.3. As in this instance I am just using the compiler as a glorified syntax checker on a machine where I build a bunch of other arch for the same reason, there is no real motivation to get a newer toolchain for improved optimization etc.
I'm happy to remove it from the Aspeed configurations as I'm not sure why it was enabled in the first place.
However, I do not agree with the reasoning here. If you're building to check syntax a modern GCC will certainly pick up on more than one from four years ago.
Quoted 3 lines
Since there are only three of them, and there is nothing about these settings that are board/platform specific, I propose we just eliminate the three existing instances and take the default.
This makes sense to me.
Quoted 26 lines · [Re: [PATCH] ARM: dont specify STACKPROTECTOR in defconfigs] On 22/07/2016…
Hi Paul,
Quoted 16 lines · Paul Gortmaker
Note the output from the following:
$ git grep STACKPROTECTOR arch/arm/configs/ arch/arm/configs/aspeed_g4_defconfig:CONFIG_CC_STACKPROTECTOR_STRONG=y arch/arm/configs/aspeed_g5_defconfig:CONFIG_CC_STACKPROTECTOR_STRONG=y arch/arm/configs/bcm2835_defconfig:CONFIG_CC_STACKPROTECTOR_REGULAR=y $Only three defconfigs specify a value. And two of the three ask for the strong variant, which isn't supported by older toolchains.
Due to the nature of ARM having more platform specific code than say x86, the allyesconfig and allmodconfig aren't as effective for build coverage. So, in addition, I like to use a trivial script to walk all the defconfigs and build each one.
Quoted 5 lines
However I will get false positives on unsupported stackprotector values with an older toolchain like gcc-4.6.3. As in this instance I am just using the compiler as a glorified syntax checker on a machine where I build a bunch of other arch for the same reason, there is no real motivation to get a newer toolchain for improved optimization etc.
Quoted 6 lines
I'm happy to remove it from the Aspeed configurations as I'm not sure why it was enabled in the first place.
However, I do not agree with the reasoning here. If you're building to check syntax a modern GCC will certainly pick up on more than one from four years ago.
Just to clarify, syntax in this case is just for fat fingered typos and ensuring functions resolve with the appropriate header includes. If I was coding new stuff specifically for ARM, then that would be different.
Quoted 8 lines
Quoted 4 lines
Since there are only three of them, and there is nothing about these settings that are board/platform specific, I propose we just eliminate the three existing instances and take the default.
This makes sense to me.
Acked-by Joel Stanley <[email protected]>
Thanks,
Paul.
--