linux/arch/arm
Linus Torvalds 050e9baa9d Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables
The changes to automatically test for working stack protector compiler
support in the Kconfig files removed the special STACKPROTECTOR_AUTO
option that picked the strongest stack protector that the compiler
supported.

That was all a nice cleanup - it makes no sense to have the AUTO case
now that the Kconfig phase can just determine the compiler support
directly.

HOWEVER.

It also meant that doing "make oldconfig" would now _disable_ the strong
stackprotector if you had AUTO enabled, because in a legacy config file,
the sane stack protector configuration would look like

  CONFIG_HAVE_CC_STACKPROTECTOR=y
  # CONFIG_CC_STACKPROTECTOR_NONE is not set
  # CONFIG_CC_STACKPROTECTOR_REGULAR is not set
  # CONFIG_CC_STACKPROTECTOR_STRONG is not set
  CONFIG_CC_STACKPROTECTOR_AUTO=y

and when you ran this through "make oldconfig" with the Kbuild changes,
it would ask you about the regular CONFIG_CC_STACKPROTECTOR (that had
been renamed from CONFIG_CC_STACKPROTECTOR_REGULAR to just
CONFIG_CC_STACKPROTECTOR), but it would think that the STRONG version
used to be disabled (because it was really enabled by AUTO), and would
disable it in the new config, resulting in:

  CONFIG_HAVE_CC_STACKPROTECTOR=y
  CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
  CONFIG_CC_STACKPROTECTOR=y
  # CONFIG_CC_STACKPROTECTOR_STRONG is not set
  CONFIG_CC_HAS_SANE_STACKPROTECTOR=y

That's dangerously subtle - people could suddenly find themselves with
the weaker stack protector setup without even realizing.

The solution here is to just rename not just the old RECULAR stack
protector option, but also the strong one.  This does that by just
removing the CC_ prefix entirely for the user choices, because it really
is not about the compiler support (the compiler support now instead
automatially impacts _visibility_ of the options to users).

This results in "make oldconfig" actually asking the user for their
choice, so that we don't have any silent subtle security model changes.
The end result would generally look like this:

  CONFIG_HAVE_CC_STACKPROTECTOR=y
  CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
  CONFIG_STACKPROTECTOR=y
  CONFIG_STACKPROTECTOR_STRONG=y
  CONFIG_CC_HAS_SANE_STACKPROTECTOR=y

where the "CC_" versions really are about internal compiler
infrastructure, not the user selections.

Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-14 12:21:18 +09:00
..
boot ARM: SoC: late updates 2018-06-11 18:19:45 -07:00
common ARM: SoC platform updates 2018-06-11 17:49:09 -07:00
configs Renesas ARM Based SoC Defconfig Updates for v4.18 2018-05-26 12:37:07 -07:00
crypto crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
firmware
include Small update for KVM. 2018-06-12 11:34:04 -07:00
kernel Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables 2018-06-14 12:21:18 +09:00
kvm Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2018-06-06 13:49:25 -07:00
lib ARM: 8772/1: kprobes: Prohibit kprobes on get_user functions 2018-05-19 11:35:56 +01:00
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91
mach-axxia arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig 2018-05-09 06:57:04 +02:00
mach-bcm arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig 2018-05-09 06:57:04 +02:00
mach-berlin ARM: berlin: switch to SPDX license identifier 2018-05-24 14:49:09 +08:00
mach-clps711x
mach-cns3xxx
mach-davinci ARM: SoC platform updates 2018-06-11 17:49:09 -07:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx sound updates for 4.18 2018-06-06 09:08:38 -07:00
mach-exynos ARM: exynos: Remove unused soc_is_exynos{4,5} 2018-05-13 14:07:03 +02:00
mach-footbridge treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
mach-gemini
mach-highbank arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig 2018-05-09 06:57:04 +02:00
mach-hisi
mach-imx regulator: gpio: Revert 2018-06-07 14:23:08 +01:00
mach-integrator
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
mach-keystone ARM: keystone: fix platform_domain_notifier array overrun 2018-05-14 09:24:29 -07:00
mach-ks8695
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson ARM: meson: merge Kconfig symbol MACH_MESON8B into MACH_MESON8 2018-05-23 10:08:13 -07:00
mach-mmp regulator: gpio: Revert 2018-06-07 14:23:08 +01:00
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-netx
mach-nomadik
mach-npcm arm: npcm: enable L2 cache in NPCM7xx architecture 2018-04-10 16:40:03 +02:00
mach-nspire
mach-omap1 - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
mach-omap2 - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
mach-orion5x
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa ARM: SoC platform updates 2018-06-11 17:49:09 -07:00
mach-qcom
mach-realview
mach-rockchip arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig 2018-05-09 06:57:04 +02:00
mach-rpc proc: introduce proc_create_single{,_data} 2018-05-16 07:23:35 +02:00
mach-s3c24xx Samsung mach/soc changes for v4.18 2018-05-14 13:52:23 -07:00
mach-s3c64xx regulator: gpio: Revert 2018-06-07 14:23:08 +01:00
mach-s5pv210
mach-sa1100 regulator: gpio: Revert 2018-06-07 14:23:08 +01:00
mach-shmobile ARM: SoC platform updates 2018-06-11 17:49:09 -07:00
mach-socfpga
mach-spear
mach-sti
mach-stm32 ARM: stm32: Don't select DMA unconditionally on STM32MP157C 2018-05-25 15:26:38 -07:00
mach-sunxi ARM: sun8i: smp: Add support for A83T 2018-05-08 15:00:20 +02:00
mach-tango
mach-tegra ARM: SoC platform updates 2018-06-11 17:49:09 -07:00
mach-u300
mach-uniphier
mach-ux500 ARM: ux500: Cut down Kconfig options 2018-05-04 11:02:52 +02:00
mach-versatile
mach-vexpress treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
mach-vt8500
mach-w90x900
mach-zx
mach-zynq
mm - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
net bpf, arm32: fix inconsistent naming about emit_a32_lsr_{r64,i64} 2018-06-05 10:54:53 +02:00
nwfpe
oprofile
plat-iop
plat-omap ARM: OMAP2+: Drop unused pm-noop 2018-04-16 10:22:40 -07:00
plat-orion
plat-pxa
plat-samsung ARM: exynos: Remove static mapping of SCU SFR 2018-05-13 14:06:55 +02:00
plat-versatile
probes treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
tools arm: Wire up restartable sequences system call 2018-06-06 11:58:31 +02:00
vdso
vfp Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2018-06-04 15:23:48 -07:00
xen xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE 2018-05-14 15:25:37 +02:00
Kconfig ARM: SoC platform updates 2018-06-11 17:49:09 -07:00
Kconfig-nommu
Kconfig.debug ARM: debug-ll: Add support for r8a77470 2018-04-16 16:01:25 +02:00
Makefile ARM: SoC platform updates 2018-06-11 17:49:09 -07:00