From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x226Y6wpTeUOlWwD1KJaQt7emPV4Yo64y0CeL0+RPL6NERC9JwO48qXx6b2JXQ3q8HlyLNbtb ARC-Seal: i=1; a=rsa-sha256; t=1517007356; cv=none; d=google.com; s=arc-20160816; b=TVts232/pA+YZ3sLVWQ9xWvEVJT7CXTRaNJfpVMh0nP9hgqybodEiGIbN3oGLmW6Ab SqCZm7NKy88mZMjv6BrxjbrdyERVY3AaLsFFMfbx+Uh+VmdWn5lK7n0esDKj/yN/L8Gx kl2KqOERqScD5hsgc+l/ZlyoBs/XsSq9usJjXdlapCdtbf8pPQ9a8TofRpJ2yjFkCD1y EIH3KZYCR15v/YQ60MeK4N6YkcNvhwXuFXh5neWA1TXKv/z55CUPwKTeP6XDSOWR4vrj 7O0w9WrRPJS5T6gmCno8TsRLxUXQKmfU84qSH0QV1mmPnIzqiU8+We0ECpCtjUKgEGhB HbYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=SK14fXB71UcmOBhG/BxE0JoiQd+El2N+t3xL5wtiVaE=; b=KVe5u9RQ6JhpCJzhvdiS8kGCmPhYog87Kt+69V+1U2IyMtRnJN4Ce9Gp29fHxPXkcc jt86mtuEwk3ixWGHpQX9Eolu8bWsW8oTL0H7K8PYRnC3+W85UmiGETuQdCw12HSd4Zdk TNt1+JDTJZ7pbEsa7Yp1rDmX3JV05rUVrIzTdzvsDHfm0Df1ktqEqdltvuUdpzB8ztxp yElGujtPcmQ64O5GknuHsN8pWi7M7clZQ34Cza9xpzU+sPv5fxUfodUYRAZY04nR9DbJ 79mrEEBJiSlRdGaJiNr9uT1DTTPe2hTfliR65lJlZY+1BnJxqt9r4ZWwQiX9PsVRgyTw XKBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kselftest-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kselftest-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751863AbeAZWz4 (ORCPT ); Fri, 26 Jan 2018 17:55:56 -0500 Received: from terminus.zytor.com ([65.50.211.136]:42321 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751409AbeAZWzz (ORCPT ); Fri, 26 Jan 2018 17:55:55 -0500 Subject: Re: selftests/x86/fsgsbase_64 test problem To: Andy Lutomirski Cc: Dan Rue , Shuah Khan , Ingo Molnar , Dmitry Safonov , Borislav Petkov , "open list:KERNEL SELFTEST FRAMEWORK" , LKML References: <20180126153631.ha7yc33fj5uhitjo@xps> From: "H. Peter Anvin" Message-ID: <9630de94-83ba-85ad-c5f3-a515f7aa7243@zytor.com> Date: Fri, 26 Jan 2018 14:51:19 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kselftest-owner@vger.kernel.org X-Mailing-List: linux-kselftest@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590669876861238825?= X-GMAIL-MSGID: =?utf-8?q?1590697505993099089?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On 01/26/18 11:46, Andy Lutomirski wrote: > > Under QEMU TCG, gs stays equal to 1. On native or KVM, on Skylake, it > changes to 0. > > On KVM or native, I do not observe do_debug getting called with %gs == > 1. On TCG, I do. I don't think that's precisely the problem that's > causing the test to fail, since the test doesn't use TF or ptrace, but > I wouldn't be shocked if it's related. > > hpa, any insight? > > (NB: if you want to play with this as I've described it, you may need > to make invalid_selector() in ptrace.c always return false. The > current implementation is too strict and causes problems.) > Looking at it. I want to grok this in the general context of fsgsbase as well, of course. -hpa