Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21266be9 authored by Dan Williams's avatar Dan Williams
Browse files

arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug



Let all the archs that implement devmem_is_allowed() opt-in to a common
definition of CONFIG_STRICT_DEVM in lib/Kconfig.debug.

Cc: Kees Cook <keescook@chromium.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Acked-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
[heiko: drop 'default y' for s390]
Acked-by: default avatarIngo Molnar <mingo@redhat.com>
Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 9f9499ae
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ config ARM
	bool
	default y
	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
	select ARCH_HAVE_CUSTOM_GPIO_H
+0 −14
Original line number Diff line number Diff line
@@ -15,20 +15,6 @@ config ARM_PTDUMP
	  kernel.
	  If in doubt, say "N"

config STRICT_DEVMEM
	bool "Filter access to /dev/mem"
	depends on MMU
	---help---
	  If this option is disabled, you allow userspace (root) access to all
	  of memory, including kernel and userspace memory. Accidental
	  access to this is obviously disastrous, but specific access can
	  be used by people debugging the kernel.

	  If this option is switched on, the /dev/mem file only allows
	  userspace access to memory mapped peripherals.

          If in doubt, say Y.

# RMK wants arm kernels compiled with frame pointers or stack unwinding.
# If you know what you are doing and are willing to live without stack
# traces, you can get a slightly smaller kernel by setting this option to
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ config ARM64
	select ACPI_CCA_REQUIRED if ACPI
	select ACPI_GENERIC_GSI if ACPI
	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_GCOV_PROFILE_ALL
+0 −14
Original line number Diff line number Diff line
@@ -14,20 +14,6 @@ config ARM64_PTDUMP
	  kernel.
	  If in doubt, say "N"

config STRICT_DEVMEM
	bool "Filter access to /dev/mem"
	depends on MMU
	help
	  If this option is disabled, you allow userspace (root) access to all
	  of memory, including kernel and userspace memory. Accidental
	  access to this is obviously disastrous, but specific access can
	  be used by people debugging the kernel.

	  If this option is switched on, the /dev/mem file only allows
	  userspace access to memory mapped peripherals.

	  If in doubt, say Y.

config PID_IN_CONTEXTIDR
	bool "Write the current PID to the CONTEXTIDR register"
	help
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ config FRV
	select HAVE_DEBUG_BUGVERBOSE
	select ARCH_HAVE_NMI_SAFE_CMPXCHG
	select GENERIC_CPU_DEVICES
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_WANT_IPC_PARSE_VERSION
	select OLD_SIGSUSPEND3
	select OLD_SIGACTION
Loading