Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fC9Uz-0007w3-A0 for speck@linutronix.de; Fri, 27 Apr 2018 21:57:42 +0200 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0310587ABE for ; Fri, 27 Apr 2018 19:57:34 +0000 (UTC) Received: from washington.bos.jonmasters.org (ovpn-121-188.rdu2.redhat.com [10.10.121.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DCE85AB586 for ; Fri, 27 Apr 2018 19:57:33 +0000 (UTC) Subject: [MODERATED] Re: [PATCH v2] Linux Patch 1/1 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> <85e5e716-bd80-30f5-d4fe-a9bf0601e6d8@linux.intel.com> From: Jon Masters Message-ID: <07ad1696-ef36-27ba-67b9-150f1d33b5e5@redhat.com> Date: Fri, 27 Apr 2018 15:57:33 -0400 MIME-Version: 1.0 In-Reply-To: <85e5e716-bd80-30f5-d4fe-a9bf0601e6d8@linux.intel.com> Content-Type: multipart/mixed; boundary="JARJrExgdgrx1luPh0hTPzHnz3i6bmKLJ"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --JARJrExgdgrx1luPh0hTPzHnz3i6bmKLJ Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 04/27/2018 03:26 PM, speck for Tim Chen wrote: > On 04/27/2018 11:30 AM, speck for Linus Torvalds wrote: >> >> >> On Fri, 27 Apr 2018, speck for Thomas Gleixner wrote: >>> On Fri, 27 Apr 2018, speck for Thomas Gleixner wrote: >>>> >>>> Sure. You set it on that sandbox thing and then the thread which is = spawned >>>> of from there can disable it. Brilliant idea. >>> >>> And in fact you want it even inherit on exec because then you can sta= rt the >>> JVM or whatever you want to protect with it disabled and never have t= o >>> worry about it again. >> >> I don't think that's the attack people are worried about. >> >> Basically, for the store buffer bypass, the *only* worry is JIT'ed cod= e.=20 >> I don't think people expect it to leak from supervisor to user mode, f= or=20 >> example, so it's not primarily a protection domain issue. >> >> It's almost purely a "I generated code assuming the architecture would= =20 >> actualy execute the code I wrote" issue. >> >> That means that it's not like you're really executing "untrusted" code= in=20 >> general. Your jitted code isn't going to just run random sysctl's with= out=20 >> any checking or anything like that. You trust your JVM to take care of= =20 >> *those* kinds of security issues. >> >> So "user can turn it on and off as they please" is not really an issue= =2E In=20 >> fact, it could easily be seen as a feature. Making it expensive or har= d to=20 >> turn off the mitigation means that you can't necessarily just turn it = on=20 >> temporarily for the code you really care about. > I'll keep the option in prctl to turn the mitigation off then till we > find a strong reason to do otherwise. Konrad and I are sitting here chatting in my office. We debated the enumeration for this. Do we think simply calling and getting an EINVAL on older kernels is ok, or do we need a specific enumeration for the ability to control SSB from software? An enumeration would be nice. You might want to look to how the kernel handles MPX today to indicate whether the prctl implemented, and also whether runtime supported. (he's not got his encrypted email in front of him but he says he'll work in your update to his patch series if you send it out tonight) Jon. --=20 Computer Architect | Sent from my Fedora powered laptop --JARJrExgdgrx1luPh0hTPzHnz3i6bmKLJ--