Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1734ybz; Tue, 21 Apr 2020 13:54:56 -0700 (PDT) X-Google-Smtp-Source: APiQypIWheCMKG+KA0FIS7uAnWzbycMUEr57NaQbMVSOAAbTQxQ7AmRYViRomdYHaEjC0bKBZbKW X-Received: by 2002:a17:907:2645:: with SMTP id ar5mr23446160ejc.75.1587502495881; Tue, 21 Apr 2020 13:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587502495; cv=none; d=google.com; s=arc-20160816; b=tRg6NK2JQl5WHWu8oxjY4DVRTaDfgLOtYkyGNIBUMvkEdalZ40z6LaL0P1Vdzle+Z9 GdML6XgTXm2juvDT6BdOigo6PVbYmMg08D0Qa1R9p1C6I048cMc2SsaseW7FQK1n61po KcdYK5rXpJ9OMkcQm19BZ8OQUXBvRdXdPlhHZ9E5ijkne3G5czOyOKnfshdibMi9b8y2 rSSr6OEYOb0QgDfOy+R62l4n9POqMng5qUh7N1C9LSi7NFX+iGKqhxfvz3ar2gXcW4Ev kOgzi2pg5dCKSBYxWzimXyMpsQBNeKgwCf1AEqWkWicekmkAkvcOlZk9CHxwL7aJngmu ACQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hYx0Ka24f4tMkDlpyaCktuoc34ladqhOzosOUrswhA8=; b=FeF6t7ZIxMGEDWEQcmbAnY+AZhrx8eK35HjCc/9iCbrQMyfAeRStMmogg2zisCW7Li W58cNSG/iV9c+2+vmB53FFYVNmVBVllO7DgnBOYddAAarft3KSKVF/9N4tE/28OPJBEM hFWqrReJqlsFH3sL6OuVL8h5ohwSmgAq0FLc9PNQcdihJjcI1Ydu+9GlgZ1cDekFWWWb 6nNrky48Rq4HKIYd3FlDBH9jl60z49Iw4gozHpVBLqwCpGHVlSrquDOlhS+vitBKteRW 6b1QkWa9XPgZ75747Y4ULTa7dr71A4jF2lJwpYsDrb+lyzeWklbfAIavOblauSH0fGS9 QJtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0huLLdlR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si2434476eju.349.2020.04.21.13.54.32; Tue, 21 Apr 2020 13:54:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0huLLdlR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726214AbgDUUvW (ORCPT + 99 others); Tue, 21 Apr 2020 16:51:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:48668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbgDUUvV (ORCPT ); Tue, 21 Apr 2020 16:51:21 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED2A42072D; Tue, 21 Apr 2020 20:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587502281; bh=B4msNDL1Yzxcz33wA2byIcA6OcufrnzZGryN6Kl9U8k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0huLLdlRbIWhWLzyIWrsZE6+txoBZQ6CCp4MOLqLNYzr+R+S836HoShcZHKqkf4z/ x11+q9O++eRw18+TgEPGuH+2dUPbpn7FjIVddDwTbbHC1kmKkmdpmA/q99cNf9yFhR rwF7dFbQ/5OKxIu5OjjOcMhyByoCXribAbGyXA18= Date: Tue, 21 Apr 2020 16:51:19 -0400 From: Sasha Levin To: Andy Lutomirski Cc: Andi Kleen , Thomas Gleixner , Andy Lutomirski , "Bae, Chang Seok" , "Metzger, Markus T" , "hpa@zytor.com" , "bp@alien8.de" , "Hansen, Dave" , "Luck, Tony" , Pedro Alves , Simon Marchi , "Shankar, Ravi V" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v9 00/17] Enable FSGSBASE instructions Message-ID: <20200421205119.GK1809@sasha-vm> References: <20200421195629.GE608746@tassilo.jf.intel.com> <5957D3CC-B54B-4A1A-998A-0E6F58589CF4@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5957D3CC-B54B-4A1A-998A-0E6F58589CF4@amacapital.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 21, 2020 at 01:21:39PM -0700, Andy Lutomirski wrote: > > >> On Apr 21, 2020, at 12:56 PM, Andi Kleen wrote: >> >>  >>> >>> Andi's point is that there is no known user it breaks, and the Intel >>> folks did some digging into potential users who might be affected by >>> this, including 'rr' brought up by Andy, and concluded that there won't >>> be breakage as a result of this patchset: >>> >>> https://mail.mozilla.org/pipermail/rr-dev/2018-March/000616.html >>> >>> Sure, if you poke at it you could see a behavior change, but is there >>> an actual user that will be affected by it? I suspect not. >> >> Actually we don't know of any behavior changes caused by the kernel >> with selectors. >> >> The application can change itself of course, but only if it uses the >> new instructions, which no current application does. > >If you use ptrace to change the gs selector, the behavior is different on a patched kernel. > >Again, I’m not saying that the change is problematic. But I will say that the fact that anyone involved in this series keeps ignoring this fact makes me quite uncomfortable with the patch set. That's what I referred to with "poke at it". While the behavior may be different, I fail to find anyone who cares. >> >> [This was different in the original patch kit long ago which could >> change behavior on context switch for programs with out of sync selectors, >> but this has been long fixed] > >That’s the issue I was referring to. > >> >> A debugger can also change behavior, but we're not aware of any case >> that it would break. > >How hard did you look? Come on, how does one respond to this? Is there a real use case affected by this? If so, point it out and I'll be happy to go test it. This was already done (per your previous request) for gdb and rr. -- Thanks, Sasha