Kbuild: rename HAVE_CC_STACKPROTECTOR config variable
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 14 Jun 2018 10:36:45 +0000 (19:36 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Jun 2018 22:15:28 +0000 (07:15 +0900)
HAVE_CC_STACKPROTECTOR should be selected by architectures with stack
canary implementation.  It is not about the compiler support.

For the consistency with commit 050e9baa9dc9 ("Kbuild: rename
CC_STACKPROTECTOR[_STRONG] config variables"), remove 'CC_' from the
config symbol.

I moved the 'select' lines to keep the alphabetical sorting.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/features/debug/stackprotector/arch-support.txt
arch/Kconfig
arch/arm/Kconfig
arch/arm64/Kconfig
arch/mips/Kconfig
arch/sh/Kconfig
arch/x86/Kconfig
arch/xtensa/Kconfig

index 74b89a9c8b3a312ba0fa110f646bcb9f6c03f0ce..954ac1c95553ef095040d3c862767aaf021cf7b5 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Feature name:          stackprotector
-#         Kconfig:       HAVE_CC_STACKPROTECTOR
+#         Kconfig:       HAVE_STACKPROTECTOR
 #         description:   arch supports compiler driven stack overflow protection
 #
     -----------------------
index c302b3dd0058524edf3681588fcb18197dc9d6d2..47b235d4390998a4797cdabd3e3bc64ea483a90c 100644 (file)
@@ -549,7 +549,7 @@ config GCC_PLUGIN_RANDSTRUCT_PERFORMANCE
          in structures.  This reduces the performance hit of RANDSTRUCT
          at the cost of weakened randomization.
 
-config HAVE_CC_STACKPROTECTOR
+config HAVE_STACKPROTECTOR
        bool
        help
          An arch should select this symbol if:
@@ -560,7 +560,7 @@ config CC_HAS_STACKPROTECTOR_NONE
 
 config STACKPROTECTOR
        bool "Stack Protector buffer overflow detection"
-       depends on HAVE_CC_STACKPROTECTOR
+       depends on HAVE_STACKPROTECTOR
        depends on $(cc-option,-fstack-protector)
        default y
        help
index 2a78bdef9a246a76716b07e3ac8527dab2a950f5..0be4397f3ccc17d1fd0298d051ce5e10d92eacb2 100644 (file)
@@ -57,7 +57,6 @@ config ARM
        select HAVE_ARCH_TRACEHOOK
        select HAVE_ARM_SMCCC if CPU_V7
        select HAVE_EBPF_JIT if !CPU_ENDIAN_BE32
-       select HAVE_CC_STACKPROTECTOR
        select HAVE_CONTEXT_TRACKING
        select HAVE_C_RECORDMCOUNT
        select HAVE_DEBUG_KMEMLEAK
@@ -92,6 +91,7 @@ config ARM
        select HAVE_RCU_TABLE_FREE if (SMP && ARM_LPAE)
        select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_RSEQ
+       select HAVE_STACKPROTECTOR
        select HAVE_SYSCALL_TRACEPOINTS
        select HAVE_UID16
        select HAVE_VIRT_CPU_ACCOUNTING_GEN
index 14f204c454505931da3f80affb97a059fa093499..42c090cf02927283ccb2dc597e30205a11050ecb 100644 (file)
@@ -103,7 +103,6 @@ config ARM64
        select HAVE_ARM_SMCCC
        select HAVE_EBPF_JIT
        select HAVE_C_RECORDMCOUNT
-       select HAVE_CC_STACKPROTECTOR
        select HAVE_CMPXCHG_DOUBLE
        select HAVE_CMPXCHG_LOCAL
        select HAVE_CONTEXT_TRACKING
@@ -128,6 +127,7 @@ config ARM64
        select HAVE_PERF_USER_STACK_DUMP
        select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_RCU_TABLE_FREE
+       select HAVE_STACKPROTECTOR
        select HAVE_SYSCALL_TRACEPOINTS
        select HAVE_KPROBES
        select HAVE_KRETPROBES
index fe98e459a416dfbf0eb22e4b72a583cbf9981250..3f9deec70b92383130b847ef3d9585db5134675e 100644 (file)
@@ -41,7 +41,6 @@ config MIPS
        select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES && 64BIT
        select HAVE_CBPF_JIT if (!64BIT && !CPU_MICROMIPS)
        select HAVE_EBPF_JIT if (64BIT && !CPU_MICROMIPS)
-       select HAVE_CC_STACKPROTECTOR
        select HAVE_CONTEXT_TRACKING
        select HAVE_COPY_THREAD_TLS
        select HAVE_C_RECORDMCOUNT
@@ -66,6 +65,7 @@ config MIPS
        select HAVE_OPROFILE
        select HAVE_PERF_EVENTS
        select HAVE_REGS_AND_STACK_ACCESS_API
+       select HAVE_STACKPROTECTOR
        select HAVE_SYSCALL_TRACEPOINTS
        select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP
        select IRQ_FORCED_THREADING
index 4d61a085982b3e2a669141372fd38c40c6ebb851..4bedd1c97f29a05e73285d539023e09e9ef577ad 100644 (file)
@@ -77,7 +77,7 @@ config SUPERH32
        select PERF_EVENTS
        select ARCH_HIBERNATION_POSSIBLE if MMU
        select SPARSE_IRQ
-       select HAVE_CC_STACKPROTECTOR
+       select HAVE_STACKPROTECTOR
 
 config SUPERH64
        def_bool "$(ARCH)" = "sh64"
index d6c6ee6af26b2afd9c42e38575fbbdfd750c1168..f1dbb4ee19d781751ac22f233ec7dea5f9a66ed3 100644 (file)
@@ -130,7 +130,6 @@ config X86
        select HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD if X86_64
        select HAVE_ARCH_VMAP_STACK             if X86_64
        select HAVE_ARCH_WITHIN_STACK_FRAMES
-       select HAVE_CC_STACKPROTECTOR           if CC_HAS_SANE_STACKPROTECTOR
        select HAVE_CMPXCHG_DOUBLE
        select HAVE_CMPXCHG_LOCAL
        select HAVE_CONTEXT_TRACKING            if X86_64
@@ -182,6 +181,7 @@ config X86
        select HAVE_RCU_TABLE_FREE
        select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_RELIABLE_STACKTRACE         if X86_64 && UNWINDER_FRAME_POINTER && STACK_VALIDATION
+       select HAVE_STACKPROTECTOR              if CC_HAS_SANE_STACKPROTECTOR
        select HAVE_STACK_VALIDATION            if X86_64
        select HAVE_RSEQ
        select HAVE_SYSCALL_TRACEPOINTS
index 17df332269b2b5a296ec4906dff660f023933c42..d575e8701955a3f46703162332a549946316f02d 100644 (file)
@@ -17,7 +17,6 @@ config XTENSA
        select GENERIC_SCHED_CLOCK
        select GENERIC_STRNCPY_FROM_USER if KASAN
        select HAVE_ARCH_KASAN if MMU
-       select HAVE_CC_STACKPROTECTOR
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DMA_CONTIGUOUS
        select HAVE_EXIT_THREAD
@@ -28,6 +27,7 @@ config XTENSA
        select HAVE_MEMBLOCK
        select HAVE_OPROFILE
        select HAVE_PERF_EVENTS
+       select HAVE_STACKPROTECTOR
        select IRQ_DOMAIN
        select MODULES_USE_ELF_RELA
        select NO_BOOTMEM