Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303032

[PATCH] selftests/x86: Disable ldt_gdt_64 for now

Path csiph.com!2.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!news.albasani.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Andy Lutomirski <luto@kernel.org>
Newsgroups linux.kernel
Subject [PATCH] selftests/x86: Disable ldt_gdt_64 for now
Date Wed, 06 Jan 2016 21:00:03 +0100
Message-ID <qO2pt-5zb-19@gated-at.bofh.it> (permalink)
X-Original-To x86@kernel.org
X-Mailer git-send-email 2.5.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 46
Organization linux.* mail to news gateway
X-Original-Cc Borislav Petkov <bp@alien8.de>, Shuah Khan <shuahkh@osg.samsung.com>, linux-kernel@vger.kernel.org, Andy Lutomirski <luto@kernel.org>
X-Original-Date Wed, 6 Jan 2016 11:51:13 -0800
X-Original-Message-ID <8dd42ba6434d84eefe6d864fb453fbe34d43098c.1452109816.git.luto@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1303032

Show key headers only | View raw


ldt_gdt.c relies on cross-cpu invalidation of SS to do one of its
tests.  On 32-bit builds, this works fine, but on 64-bit builds, it
only works if the kernel has proper SS sigcontext handling for
64-bit user programs.

Since the SS fixes are currently reverted, restrict the test case to
32 bits for now.

In principle, I could change the test to use a different segment
register, but it would be messy: CS can't point to the LDT for
64-bit code, and the other registers don't result in immediate
faults because they aren't reloaded on kernel -> user transitions.

When we fix sigcontext (in 4.6?), we can revert this.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
 tools/testing/selftests/x86/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
index 3d1a8ef500a0..c0c15ff179b7 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -4,10 +4,11 @@ include ../lib.mk
 
 .PHONY: all all_32 all_64 warn_32bit_failure clean
 
-TARGETS_C_BOTHBITS := single_step_syscall sysret_ss_attrs ldt_gdt syscall_nt ptrace_syscall
+TARGETS_C_BOTHBITS := single_step_syscall sysret_ss_attrs syscall_nt ptrace_syscall
 TARGETS_C_32BIT_ONLY := entry_from_vm86 syscall_arg_fault sigreturn test_syscall_vdso unwind_vdso \
 			test_FCMOV test_FCOMI test_FISTTP \
-			vdso_restorer
+			vdso_restorer \
+			ldt_gdt
 
 TARGETS_C_32BIT_ALL := $(TARGETS_C_BOTHBITS) $(TARGETS_C_32BIT_ONLY)
 BINARIES_32 := $(TARGETS_C_32BIT_ALL:%=%_32)
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] selftests/x86: Disable ldt_gdt_64 for now Andy Lutomirski <luto@kernel.org> - 2016-01-06 21:00 +0100
  Re: [PATCH] selftests/x86: Disable ldt_gdt_64 for now Shuah Khan <shuahkh@osg.samsung.com> - 2016-01-07 21:50 +0100
    Re: [PATCH] selftests/x86: Disable ldt_gdt_64 for now Ingo Molnar <mingo@kernel.org> - 2016-01-11 12:00 +0100
      Re: [PATCH] selftests/x86: Disable ldt_gdt_64 for now Andy Lutomirski <luto@amacapital.net> - 2016-01-12 02:30 +0100
        Re: [PATCH] selftests/x86: Disable ldt_gdt_64 for now Ingo Molnar <mingo@kernel.org> - 2016-01-12 11:50 +0100

csiph-web