Skip to content

Commit 3ad38ce

Browse files
keesIngo Molnar
authored andcommitted
x86/mm: Remove CONFIG_DEBUG_NX_TEST
CONFIG_DEBUG_NX_TEST has been broken since CONFIG_DEBUG_SET_MODULE_RONX=y was added in v2.6.37 via: 84e1c6b ("x86: Add RO/NX protection for loadable kernel modules") since the exception table was then made read-only. Additionally, the manually constructed extables were never fixed when relative extables were introduced in v3.5 via: 7062765 ("x86, extable: Switch to relative exception table entries") However, relative extables won't work for test_nx.c, since test instruction memory areas may be more than INT_MAX away from an executable fixup (e.g. stack and heap too far away from executable memory with the fixup). Since clearly no one has been using this code for a while now, and similar tests exist in LKDTM, this should just be removed entirely. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jinbum Park <jinb.park7@gmail.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20170131003711.GA74048@beast Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 459fbe0 commit 3ad38ce

File tree

3 files changed

+0
-182
lines changed

3 files changed

+0
-182
lines changed

arch/x86/Kconfig.debug

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,6 @@ config DEBUG_SET_MODULE_RONX
120120
against certain classes of kernel exploits.
121121
If in doubt, say "N".
122122

123-
config DEBUG_NX_TEST
124-
tristate "Testcase for the NX non-executable stack feature"
125-
depends on DEBUG_KERNEL && m
126-
---help---
127-
This option enables a testcase for the CPU NX capability
128-
and the software setup of this feature.
129-
If in doubt, say "N"
130-
131123
config DOUBLEFAULT
132124
default y
133125
bool "Enable doublefault exception handler" if EXPERT

arch/x86/kernel/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ obj-$(CONFIG_APB_TIMER) += apb_timer.o
101101

102102
obj-$(CONFIG_AMD_NB) += amd_nb.o
103103
obj-$(CONFIG_DEBUG_RODATA_TEST) += test_rodata.o
104-
obj-$(CONFIG_DEBUG_NX_TEST) += test_nx.o
105104
obj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o
106105

107106
obj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o

arch/x86/kernel/test_nx.c

Lines changed: 0 additions & 173 deletions
This file was deleted.

0 commit comments

Comments
 (0)