x86: Remove CONFIG_DEBUG_NX_TEST
PATCH 1/1 x86: Remove CONFIG_DEBUG_NX_TEST
CONFIG_DEBUG_NX_TEST has been broken since CONFIG_DEBUG_SET_MODULE_RONX was added in v2.6.37 via commit 84e1c6bb38eb ("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 commit 706276543b69 ("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.
--- arch/x86/Kconfig.debug | 8 --- arch/x86/kernel/Makefile | 1 - arch/x86/kernel/test_nx.c | 173 ---------------------------------------------- 3 files changed, 182 deletions(-) delete mode 100644 arch/x86/kernel/test_nx.c
arch/x86/Kconfig.debug +0 -8
@@ -120,14 +120,6 @@ config DEBUG_SET_MODULE_RONX against certain classes of kernel exploits. If in doubt, say "N". -config DEBUG_NX_TEST - tristate "Testcase for the NX non-executable stack feature" - depends on DEBUG_KERNEL && m - ---help--- - This option enables a testcase for the CPU NX capability - and the software setup of this feature. - If in doubt, say "N" - config DOUBLEFAULT default y bool "Enable doublefault exception handler" if EXPERT
arch/x86/kernel/Makefile +0 -1
@@ -101,7 +101,6 @@ obj-$(CONFIG_APB_TIMER) += apb_timer.o obj-$(CONFIG_AMD_NB) += amd_nb.o obj-$(CONFIG_DEBUG_RODATA_TEST) += test_rodata.o -obj-$(CONFIG_DEBUG_NX_TEST) += test_nx.o obj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o obj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o
arch/x86/kernel/test_nx.c deleted +0 -173
173 lines not on this page · raw message
Signature · 6 lines
2.7.4 -- Kees Cook Pixel Security