x86/mm: Always enable CONFIG_DEBUG_RODATA and remove the Kconfig option
authorKees Cook <keescook@chromium.org>
Wed, 16 Mar 2016 23:10:24 +0000 (17:10 -0600)
committerMark Brown <broonie@kernel.org>
Thu, 17 Mar 2016 18:51:51 +0000 (18:51 +0000)
commitb8902f8e47805d591b57dc28c6e03903d57942cf
treeb59be7b1cc696ee34e91b45c983cbd74c195a5ac
parent97db5772c06cf9a0843767b91918d229d13d4ea8
x86/mm: Always enable CONFIG_DEBUG_RODATA and remove the Kconfig option

commit 9ccaf77cf05915f51231d158abfd5448aedde758 upstream.

This removes the CONFIG_DEBUG_RODATA option and makes it always enabled.

This simplifies the code and also makes it clearer that read-only mapped
memory is just as fundamental a security feature in kernel-space as it is
in user-space.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: David Brown <david.brown@linaro.org>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Emese Revfy <re.emese@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: PaX Team <pageexec@freemail.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel-hardening@lists.openwall.com
Cc: linux-arch <linux-arch@vger.kernel.org>
Link: http://lkml.kernel.org/r/1455748879-21872-4-git-send-email-keescook@chromium.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: David Brown <david.brown@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
13 files changed:
arch/x86/Kconfig
arch/x86/Kconfig.debug
arch/x86/include/asm/cacheflush.h
arch/x86/include/asm/kvm_para.h
arch/x86/include/asm/sections.h
arch/x86/kernel/ftrace.c
arch/x86/kernel/kgdb.c
arch/x86/kernel/test_nx.c
arch/x86/kernel/test_rodata.c
arch/x86/kernel/vmlinux.lds.S
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
arch/x86/mm/pageattr.c