Merge tag 'nfsd-4.16' of git://linux-nfs.org/~bfields/linux
[sfrench/cifs-2.6.git] / arch / Kconfig
index d007b2a15b2221ac10c596f4b47da83eb285d036..76c0b54443b1fd7563414622988032d9f63fc11f 100644 (file)
@@ -245,6 +245,17 @@ config ARCH_TASK_STRUCT_ON_STACK
 config ARCH_TASK_STRUCT_ALLOCATOR
        bool
 
+config HAVE_ARCH_THREAD_STRUCT_WHITELIST
+       bool
+       depends on !ARCH_TASK_STRUCT_ALLOCATOR
+       help
+         An architecture should select this to provide hardened usercopy
+         knowledge about what region of the thread_struct should be
+         whitelisted for copying to userspace. Normally this is only the
+         FPU registers. Specifically, arch_thread_struct_whitelist()
+         should be implemented. Without this, the entire thread_struct
+         field in task_struct will be left whitelisted.
+
 # Select if arch has its private alloc_thread_stack() function
 config ARCH_THREAD_STACK_ALLOCATOR
        bool
@@ -527,16 +538,10 @@ config HAVE_CC_STACKPROTECTOR
          - its compiler supports the -fstack-protector option
          - it has implemented a stack canary (e.g. __stack_chk_guard)
 
-config CC_STACKPROTECTOR
-       def_bool n
-       help
-         Set when a stack-protector mode is enabled, so that the build
-         can enable kernel-side support for the GCC feature.
-
 choice
        prompt "Stack Protector buffer overflow detection"
        depends on HAVE_CC_STACKPROTECTOR
-       default CC_STACKPROTECTOR_NONE
+       default CC_STACKPROTECTOR_AUTO
        help
          This option turns on the "stack-protector" GCC feature. This
          feature puts, at the beginning of functions, a canary value on
@@ -553,7 +558,6 @@ config CC_STACKPROTECTOR_NONE
 
 config CC_STACKPROTECTOR_REGULAR
        bool "Regular"
-       select CC_STACKPROTECTOR
        help
          Functions will have the stack-protector canary logic added if they
          have an 8-byte or larger character array on the stack.
@@ -567,7 +571,6 @@ config CC_STACKPROTECTOR_REGULAR
 
 config CC_STACKPROTECTOR_STRONG
        bool "Strong"
-       select CC_STACKPROTECTOR
        help
          Functions will have the stack-protector canary logic added in any
          of the following conditions:
@@ -585,6 +588,12 @@ config CC_STACKPROTECTOR_STRONG
          about 20% of all kernel functions, which increases the kernel code
          size by about 2%.
 
+config CC_STACKPROTECTOR_AUTO
+       bool "Automatic"
+       help
+         If the compiler supports it, the best available stack-protector
+         option will be chosen.
+
 endchoice
 
 config THIN_ARCHIVES