Return-path: Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1fC8Uq-0006tZ-K8 for speck@linutronix.de; Fri, 27 Apr 2018 20:53:28 +0200 Received: by mail-pf0-x234.google.com with SMTP id j5so2110227pfh.2 for ; Fri, 27 Apr 2018 11:53:28 -0700 (PDT) Received: from i7.lan (c-73-11-52-149.hsd1.or.comcast.net. [73.11.52.149]) by smtp.gmail.com with ESMTPSA id x3sm5155819pff.87.2018.04.27.11.53.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Apr 2018 11:53:20 -0700 (PDT) Sender: Linus Torvalds Date: Fri, 27 Apr 2018 11:53:18 -0700 (PDT) From: Linus Torvalds Subject: [MODERATED] Re: [PATCH v2] Linux Patch 1/1 In-Reply-To: Message-ID: References: <92c45587-5eb3-2421-6fc1-42e74a715e30@linux.intel.com> <20180427164743.GA14180@pd.tnic> <6e2b14fc-3bf6-071d-6ce2-e518f2c4f069@redhat.com> <20180427173221.GB14180@pd.tnic> <20180427180944.GD75137@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Fri, 27 Apr 2018, speck for Thomas Gleixner wrote: > On Fri, 27 Apr 2018, speck for Linus Torvalds wrote: > > Basically, for the store buffer bypass, the *only* worry is JIT'ed code. > > I don't think people expect it to leak from supervisor to user mode, for > > example, so it's not primarily a protection domain issue. > > Fair enough. I didn't look at it that way. Thanks for the clarification. NOTE! My reading of the worry people have about the store buffer bypass attack may simply be wrong. So somebody should verify this part. Because if the store buffer bypass is actually seen as a security issue on its own, then your argument that people shouldn't be able to turn the mitigation off is obviously very valid. But I *think* that the store buffer bypass is a non-issue if you actually control the whole binary, because then you could just have written your code to not do the store that hid the old value in the first place. So I think this one is fundamentally different from say Spectre/Meltdown, that actually worked across security domains. That also argues that perhaps we could possible leave the store buffer bypass mitigation off by default, if we could just detect the "people are JIT'ing code" situation. Which we can't, afaik, but.. Anybody? Linus