Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / arch / x86 / Kconfig
index 607382b953728927679ae7f68f08e847d3234293..5977fea2c8b1d8cd542ddf831fb405b4de9ea517 100644 (file)
@@ -293,11 +293,6 @@ config X86_32_LAZY_GS
        def_bool y
        depends on X86_32 && !CC_STACKPROTECTOR
 
-config ARCH_HWEIGHT_CFLAGS
-       string
-       default "-fcall-saved-ecx -fcall-saved-edx" if X86_32
-       default "-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" if X86_64
-
 config ARCH_SUPPORTS_UPROBES
        def_bool y
 
@@ -1933,21 +1928,26 @@ config RANDOMIZE_BASE
          attempts relying on knowledge of the location of kernel
          code internals.
 
-         The kernel physical and virtual address can be randomized
-         from 16MB up to 1GB on 64-bit and 512MB on 32-bit. (Note that
-         using RANDOMIZE_BASE reduces the memory space available to
-         kernel modules from 1.5GB to 1GB.)
+         On 64-bit, the kernel physical and virtual addresses are
+         randomized separately. The physical address will be anywhere
+         between 16MB and the top of physical memory (up to 64TB). The
+         virtual address will be randomized from 16MB up to 1GB (9 bits
+         of entropy). Note that this also reduces the memory space
+         available to kernel modules from 1.5GB to 1GB.
+
+         On 32-bit, the kernel physical and virtual addresses are
+         randomized together. They will be randomized from 16MB up to
+         512MB (8 bits of entropy).
 
          Entropy is generated using the RDRAND instruction if it is
          supported. If RDTSC is supported, its value is mixed into
          the entropy pool as well. If neither RDRAND nor RDTSC are
-         supported, then entropy is read from the i8254 timer.
-
-         Since the kernel is built using 2GB addressing, and
-         PHYSICAL_ALIGN must be at a minimum of 2MB, only 10 bits of
-         entropy is theoretically possible. Currently, with the
-         default value for PHYSICAL_ALIGN and due to page table
-         layouts, 64-bit uses 9 bits of entropy and 32-bit uses 8 bits.
+         supported, then entropy is read from the i8254 timer. The
+         usable entropy is limited by the kernel being built using
+         2GB addressing, and that PHYSICAL_ALIGN must be at a
+         minimum of 2MB. As a result, only 10 bits of entropy are
+         theoretically possible, but the implementations are further
+         limited due to memory layouts.
 
          If CONFIG_HIBERNATE is also enabled, KASLR is disabled at boot
          time. To enable it, boot with "kaslr" on the kernel command
@@ -1987,6 +1987,38 @@ config PHYSICAL_ALIGN
 
          Don't change this unless you know what you are doing.
 
+config RANDOMIZE_MEMORY
+       bool "Randomize the kernel memory sections"
+       depends on X86_64
+       depends on RANDOMIZE_BASE
+       default RANDOMIZE_BASE
+       ---help---
+          Randomizes the base virtual address of kernel memory sections
+          (physical memory mapping, vmalloc & vmemmap). This security feature
+          makes exploits relying on predictable memory locations less reliable.
+
+          The order of allocations remains unchanged. Entropy is generated in
+          the same way as RANDOMIZE_BASE. Current implementation in the optimal
+          configuration have in average 30,000 different possible virtual
+          addresses for each memory section.
+
+          If unsure, say N.
+
+config RANDOMIZE_MEMORY_PHYSICAL_PADDING
+       hex "Physical memory mapping padding" if EXPERT
+       depends on RANDOMIZE_MEMORY
+       default "0xa" if MEMORY_HOTPLUG
+       default "0x0"
+       range 0x1 0x40 if MEMORY_HOTPLUG
+       range 0x0 0x40
+       ---help---
+          Define the padding in terabytes added to the existing physical
+          memory size during kernel memory randomization. It is useful
+          for memory hotplug support but reduces the entropy available for
+          address randomization.
+
+          If unsure, leave at the default value.
+
 config HOTPLUG_CPU
        bool "Support for hot-pluggable CPUs"
        depends on SMP
@@ -2438,6 +2470,15 @@ config PCI_CNB20LE_QUIRK
 
 source "drivers/pci/Kconfig"
 
+config ISA_BUS
+       bool "ISA-style bus support on modern systems" if EXPERT
+       select ISA_BUS_API
+       help
+         Enables ISA-style drivers on modern systems. This is necessary to
+         support PC/104 devices on X86_64 platforms.
+
+         If unsure, say N.
+
 # x86_64 have no ISA slots, but can have ISA-style DMA.
 config ISA_DMA_API
        bool "ISA-style DMA support" if (X86_64 && EXPERT)