Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp8199042ybc; Fri, 29 Nov 2019 06:57:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzXUU8yyVUDZshRInnMjrtNYcd7bG7hVsC+jrWmJrQaQ/0YquuMg+0XIixD0ijAM5nBhZ29 X-Received: by 2002:a1c:4e03:: with SMTP id g3mr1651915wmh.22.1575039463477; Fri, 29 Nov 2019 06:57:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575039463; cv=none; d=google.com; s=arc-20160816; b=udx7b3MUaQVJmKbN0/UC2Qm4ca43wyU9WBVvFEllwy3P5Ls2p5dk2mSNM9/CFxJ+bF 9eQ8STZy+dDeJtbpbN0JQxqy3fAvokxbb99HuTFnJOc6Gx19a5wv5UfJUkNTYGb8cTYI s3qd4v5KMjUCqvCNXnmnRqWUpkxXRe8vCBM1VEUfa7YhtWb634Gm000J3y/KBQTRDuYG E58Sg4T1+7ubywLFJ4ZGk3b7zZo0Y/5FuEd2243JT7NB/pfb3/0gPIj8RoCIhAI8pz58 Z9L3UyU6zMGWT2P+idcA9AFl/7naC56m3icsAfoLVhzlYZTFOCYSco5RuhE45/gEsbpA Zl9w== 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:mime-version :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=53AKjcslVwTRzS2yPmsj+bW1c+ZFF9ihEZ3CZiHIkGY=; b=Q5Qe6/pthGOpwSGqKonCjdiwewlznT9/mNu8PcNeR5wFzV6UUmrWZVW6Hs8VLAZ65q R6ojKavTU/IwM6PUn4iDrKrRbNn57s5L0ek4HAADA/1zRLI0MfMTX5Us7gMXyFD2w+RX zNi51iHSFh9U9cKEsd1t6UidQPeVLKyXgdacy1OlodeJBOjl58lZRyYFnl3572x4HnX9 9VdRUQ3MeOiPTYvzvseZbqadc0oMOE5VaT+r4jECmhCRsaC23aV9d8xU1oEsQpu53UJK DwnD3xiEuSA6MJVMbCdomqgAJM1JBSOJu64zvN3ZqSBefsySiUTtaqQBmrIk4YRj5UA4 SIcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dh3si978586edb.426.2019.11.29.06.57.19; Fri, 29 Nov 2019 06:57:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbfK2O4H convert rfc822-to-8bit (ORCPT + 99 others); Fri, 29 Nov 2019 09:56:07 -0500 Received: from mga17.intel.com ([192.55.52.151]:32456 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbfK2O4H (ORCPT ); Fri, 29 Nov 2019 09:56:07 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2019 06:56:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,257,1571727600"; d="scan'208";a="212303680" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga003.jf.intel.com with ESMTP; 29 Nov 2019 06:56:04 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.252]) by IRSMSX152.ger.corp.intel.com ([169.254.6.76]) with mapi id 14.03.0439.000; Fri, 29 Nov 2019 14:56:03 +0000 From: "Metzger, Markus T" To: Thomas Gleixner CC: "Bae, Chang Seok" , "linux-kernel@vger.kernel.org" , "bp@alien8.de" , "luto@kernel.org" , "hpa@zytor.com" , "Hansen, Dave" , "Luck, Tony" , "Shankar, Ravi V" , "Pedro Alves" , Simon Marchi , Andi Kleen Subject: RE: [PATCH v9 00/17] Enable FSGSBASE instructions Thread-Topic: [PATCH v9 00/17] Enable FSGSBASE instructions Thread-Index: AQHVm+iTbaIQs/3oqE+UcwYHBKDTgKeiRc1Q Date: Fri, 29 Nov 2019 14:56:03 +0000 Message-ID: References: <1570212969-21888-1-git-send-email-chang.seok.bae@intel.com> <20191115191200.GD22747@tassilo.jf.intel.com> In-Reply-To: <20191115191200.GD22747@tassilo.jf.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Fri, Nov 15, 2019 at 07:29:17PM +0100, Thomas Gleixner wrote: > > On Fri, 4 Oct 2019, Chang S. Bae wrote: > > > > > > Updates from v8 [10]: > > > * Internalized the interrupt check in the helper functions (Andy L.) > > > * Simplified GS base helper functions (Tony L.) > > > * Changed the patch order to put the paranoid path changes before the > > > context switch changes (Tony L.) > > > * Fixed typos (Randy D.) and massaged a few sentences in the documentation > > > * Massaged the FSGSBASE enablement message > > > > That still lacks what Andy requested quite some time ago in the V8 thread: > > > > https://lore.kernel.org/lkml/034aaf3a-a93d-ec03-0bbd- > 068e1905b774@kernel.org/ > > > > "I also think that, before this series can have my ack, it needs an > > actual gdb maintainer to chime in, publicly, and state that they have > > thought about and tested the ABI changes and that gdb still works on > > patched kernels with and without FSGSBASE enabled. I realize that there > > were all kinds of discussions, but they were all quite theoretical, and > > I think that the actual patches need to be considered by people who > > understand the concerns. Specific test cases would be nice, too." > > > > What's the state of this? On branch users/mmetzger/fsgs in sourceware.org/git/binutils-gdb.git, there's a GDB test covering the behavior discussed theoretically back then. It covers modifying the selector as well as the base from GDB and using the modified values for inferior calls as well as for resuming the inferior. Current kernels allow changing the selector and provide the resulting base back to the ptracer. They also allow changing the base as long as the selector is zero. That's the behavior we wanted to preserve IIRC. The patch series on branch fsgs_tip_5.4-rc1_100319 at github.com/changbae/Linux-kernel.git breaks tests that modify the selector and expect that to change the base. That kernel allows changing the base via ptrace but ignores changes to the selector. Regards, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Gary Kershaw Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928