arm64: kernel: Add support for Privileged Access Never
[cascardo/linux.git] / arch / arm64 / Kconfig
index 318175f..c2bd79a 100644 (file)
@@ -28,7 +28,7 @@ config ARM64
        select EDAC_SUPPORT
        select GENERIC_ALLOCATOR
        select GENERIC_CLOCKEVENTS
-       select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+       select GENERIC_CLOCKEVENTS_BROADCAST
        select GENERIC_CPU_AUTOPROBE
        select GENERIC_EARLY_IOREMAP
        select GENERIC_IRQ_PROBE
@@ -137,6 +137,9 @@ config NEED_DMA_MAP_STATE
 config NEED_SG_DMA_LENGTH
        def_bool y
 
+config SMP
+       def_bool y
+
 config SWIOTLB
        def_bool y
 
@@ -469,27 +472,30 @@ config ARM64_VA_BITS
        default 42 if ARM64_VA_BITS_42
        default 48 if ARM64_VA_BITS_48
 
+config ARM64_HW_AFDBM
+       bool "Support for hardware updates of the Access and Dirty page flags"
+       default y
+       help
+         The ARMv8.1 architecture extensions introduce support for
+         hardware updates of the access and dirty information in page
+         table entries. When enabled in TCR_EL1 (HA and HD bits) on
+         capable processors, accesses to pages with PTE_AF cleared will
+         set this bit instead of raising an access flag fault.
+         Similarly, writes to read-only pages with the DBM bit set will
+         clear the read-only bit (AP[2]) instead of raising a
+         permission fault.
+
+         Kernels built with this configuration option enabled continue
+         to work on pre-ARMv8.1 hardware and the performance impact is
+         minimal. If unsure, say Y.
+
 config CPU_BIG_ENDIAN
        bool "Build big-endian kernel"
        help
          Say Y if you plan on running a kernel in big-endian mode.
 
-config SMP
-       bool "Symmetric Multi-Processing"
-       help
-         This enables support for systems with more than one CPU.  If
-         you say N here, the kernel will run on single and
-         multiprocessor machines, but will use only one CPU of a
-         multiprocessor machine. If you say Y here, the kernel will run
-         on many, but not all, single processor machines. On a single
-         processor machine, the kernel will run faster if you say N
-         here.
-
-         If you don't know what to do here, say N.
-
 config SCHED_MC
        bool "Multi-core scheduler support"
-       depends on SMP
        help
          Multi-core scheduler support improves the CPU scheduler's decision
          making when dealing with multi-core CPU chips at a cost of slightly
@@ -497,7 +503,6 @@ config SCHED_MC
 
 config SCHED_SMT
        bool "SMT scheduler support"
-       depends on SMP
        help
          Improves the CPU scheduler's decision making when dealing with
          MultiThreading at a cost of slightly increased overhead in some
@@ -506,23 +511,17 @@ config SCHED_SMT
 config NR_CPUS
        int "Maximum number of CPUs (2-4096)"
        range 2 4096
-       depends on SMP
        # These have to remain sorted largest to smallest
        default "64"
 
 config HOTPLUG_CPU
        bool "Support for hot-pluggable CPUs"
-       depends on SMP
        help
          Say Y here to experiment with turning CPUs off and on.  CPUs
          can be controlled through /sys/devices/system/cpu.
 
 source kernel/Kconfig.preempt
 
-config UP_LATE_INIT
-       def_bool y
-       depends on !SMP
-
 config HZ
        int
        default 100
@@ -597,6 +596,20 @@ config FORCE_MAX_ZONEORDER
        default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
        default "11"
 
+config ARM64_PAN
+       bool "Enable support for Privileged Access Never (PAN)"
+       default y
+       help
+        Privileged Access Never (PAN; part of the ARMv8.1 Extensions)
+        prevents the kernel or hypervisor from accessing user-space (EL0)
+        memory directly.
+
+        Choosing this option will cause any unprotected (not using
+        copy_to_user et al) memory access to fail with a permission fault.
+
+        The feature is detected at runtime, and will remain as a 'nop'
+        instruction if the cpu does not implement the feature.
+
 menuconfig ARMV8_DEPRECATED
        bool "Emulate deprecated/obsolete ARMv8 instructions"
        depends on COMPAT