Return-path: Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1fAivm-0000Kl-GB for speck@linutronix.de; Mon, 23 Apr 2018 23:23:27 +0200 Received: by mail-pf0-x22a.google.com with SMTP id l27so10353674pfk.12 for ; Mon, 23 Apr 2018 14:23:26 -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 d8sm24906873pfh.177.2018.04.23.14.23.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 14:23:18 -0700 (PDT) Sender: Linus Torvalds Date: Mon, 23 Apr 2018 14:23:17 -0700 (PDT) From: Linus Torvalds Subject: [MODERATED] Re: [patch 07/11] [PATCH v2 07/10] Linux Patch #7 In-Reply-To: <20180423211338.GA22504@dhcp-10-159-147-220.vpn.oracle.com> Message-ID: References: <0de04dd1-0f35-dc0e-d27a-dec03ed0f138@redhat.com> <20180422093545.GA32218@pd.tnic> <2c7fa188-cd84-1a10-56cb-358d3f859559@redhat.com> <20180422103456.GC32218@pd.tnic> <3d7880e7-6b67-b35a-a090-2854f7db54ff@redhat.com> <2184fc1b-dcbc-a40c-64da-4965c7c48faa@redhat.com> <20180423175151.GA21779@dhcp-10-159-147-220.vpn.oracle.com> <20180423211338.GA22504@dhcp-10-159-147-220.vpn.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Mon, 23 Apr 2018, speck for Konrad Rzeszutek Wilk wrote: > > > > Absolutely. That would be entirely crazy. Is there a known situation where > > that would actually make sense? > > For Skylake where they report via X86_FEATURE_ARCH_CAPABILITIES > RBSA Bit(2) (see 5.3 where they introduce it): > > https://software.intel.com/sites/default/files/managed/1d/46/Retpoline-A-Branch-Target-Injection-Mitigation.pdf > > Where they state that retpoline is not good enough for a list of "may" > conditions. Yeah, I'm not in the least interested in theory. Are there actual real attacks where it makes sense? In particular since we actually have the RSB stuffing workarounds too, not just bare retpoline. Which leaves the "call stacks deeper than 16" case as the only actual possible case even in theory, and then you have to be able to attack it too. Because we're not taking another 30% performance hit on kernel entry on theory. You may not care, and there are a lot of crazy security people who may not care, but real people do. Performance matters. We're not doing insane things in kernel entry for insane reasons. So let insane people take the insane patches. That is *NOT* a valid reason for them going upstream. Anyway, I was wondering if there was any reason why we'd care for the store buffer bypass problem? The whole "run with store buffers in user space, disable them in kernel space" model seems insane. Linus