Received: by 10.223.185.116 with SMTP id b49csp1054553wrg; Fri, 16 Feb 2018 11:34:42 -0800 (PST) X-Google-Smtp-Source: AH8x227CQL+WUsQqS/oDJMYOFjlmMVOHV3q2JGr9YLTxFct2MXo28F5Z8eywS0leGUFHUpWi3ETo X-Received: by 10.98.73.4 with SMTP id w4mr2317831pfa.227.1518809681896; Fri, 16 Feb 2018 11:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518809681; cv=none; d=google.com; s=arc-20160816; b=I7HRtzUo+SjGf5c6PbsvEVHtkq3tGwtHhSvCciiqna90aDL+JoEv4fEXuGQ32XUJWE Q5eGj7VqY1SgW7ReNvs1VmPmX+RvyhVXjVQ5CI219yjU3KgrcvGACY1c2K8DEKXNGA4b PXECxoZ2Sc1uAfnhpL2886qMVVxEX/KnuoB127QEiYJ6pviJvtaghxAWgaPdWy9GDibC COSQeKgnrwzH35DpXLmD0tqTXnrbYk+APDjoal3EW+9OhkbMblO5GEYtNnRBeEtNJafP Bk5FXmIuHaGFvmVWJsf/ZHO1zMYrRFAWPUapI5GZzpeUMMobU8si4MlkSYOJkAVooYh5 Um+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=y9iFXQIjGdbFewjUYUe5/XmUE10fqmcNismWnhSb+68=; b=fAiGDGrYzSbyUcOuHihQmu3yZQNFkF/dF+Y79bKFTPIbBGv+aGbSRpEYEGi4ujojQc pRWqzZ7/WwHWgh3WDk1jyvQFHW2wMnPBFX3iPUcSEZ9okGVEOMYmtvG7RbgqqXQCz2qI bSOOb7F89cNSL6ro17+RXzXEaQCNW1gd3H9DxFnDzfbWrsaP/TkOSGu2i0F2aioAfkPk yC6jUk/V7SIh3uiSkhvi8C5kXWmQeHQPPXhAvf2nSrv0JVTPCPzRJ1MlV6JRICnBWPu0 LtyPxRu4EkrFB3vMlPkq/UK/BBcG309ebAU93lV5oFoSnTOgUythwPCJsSDf7dAmV8O/ D/6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JT3BKm/7; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r13si1364795pgq.535.2018.02.16.11.34.27; Fri, 16 Feb 2018 11:34:41 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JT3BKm/7; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752618AbeBPEzd (ORCPT + 99 others); Thu, 15 Feb 2018 23:55:33 -0500 Received: from mail-pg0-f43.google.com ([74.125.83.43]:39376 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752450AbeBPEzb (ORCPT ); Thu, 15 Feb 2018 23:55:31 -0500 Received: by mail-pg0-f43.google.com with SMTP id w17so1566553pgv.6 for ; Thu, 15 Feb 2018 20:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=y9iFXQIjGdbFewjUYUe5/XmUE10fqmcNismWnhSb+68=; b=JT3BKm/7Yj8Xm+IPSSB0OoZ1NCyDG9hISvNC6Gm4vrXiZ9dgYNkMW4kpUfiZBR13yF N9tDhn42R29d1bWWiL5dkOFlyEl55bc27b0T/z57hydTb8lO/lmBItOo270/EKhbnQ3f Wr9D5v5Fixa7V3rBPYcaWrJiPe1WxStxYzGNdJ1i/hjhqHeOCUNpRuIbu+4dzv2xfyO7 u2F40LXG31vuY+/MaaiGsOPWcCAwS4Yd4p9B/PK2KmF/6E9hUz1TeH8+kGdhClKgf1GM hstC1tOWTYdTCt3AxNWBupokidEQZYfBUQnkAHU2gs2EyrTZqlVMaj0SJPYVHQ6HqKNi ykCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=y9iFXQIjGdbFewjUYUe5/XmUE10fqmcNismWnhSb+68=; b=UqYQ+NArKyFsZu2pm1vCTOB9M4sjNMnfSD86N9QepzkZYriSlz4kDnyxII5w54BgDZ D/Sda4eQOYNYkI8duQxr1uXLRTptBmFDs+qUsqicXvD9vZskaR7RNvqZOgyIq8FfBb0m TEvzJC4Se+n2eNraudCYf8AKlat+YBT3ccoUhAA3yEx0I2hoe2pDfyrb8hQ0Df63C+ES 3lN1DlAmBdzsvS4DhR1r5XQ8bu2JsrNxhUYh0bLYlNo5XaAh+ObzaHmRQo/gB8cE08R9 ORPl3myhjZrWsaomfyILsipfkY5sqaO24qioK11sqMu9ckabrJEVimjByEs3wU2L0b8z TDYA== X-Gm-Message-State: APf1xPCQaI6zhocCvW1Db74M5sBHtzDNtjKtOgrQgAg1Ux8URTk9LfMC rUaOIPDvPHpACb1qmtooo84= X-Received: by 10.99.172.66 with SMTP id z2mr4006457pgn.273.1518756929956; Thu, 15 Feb 2018 20:55:29 -0800 (PST) Received: from [10.0.1.10] (c-24-23-137-57.hsd1.ca.comcast.net. [24.23.137.57]) by smtp.gmail.com with ESMTPSA id j3sm42278152pfj.180.2018.02.15.20.55.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 20:55:29 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH RFC v2 4/6] x86: Disable PTI on compatibility mode From: Nadav Amit In-Reply-To: Date: Thu, 15 Feb 2018 20:55:16 -0800 Cc: Linus Torvalds , Pavel Emelyanov , Cyrill Gorcunov , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Dave Hansen , Willy Tarreau , X86 ML , LKML Content-Transfer-Encoding: quoted-printable Message-Id: References: <20180215163602.61162-1-namit@vmware.com> <20180215163602.61162-5-namit@vmware.com> <9EB804CA-0EC9-4CBB-965A-F3C8520201E7@gmail.com> To: Andy Lutomirski X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andy Lutomirski wrote: > On Fri, Feb 16, 2018 at 12:42 AM, Linus Torvalds > wrote: >> On Thu, Feb 15, 2018 at 4:22 PM, Nadav Amit = wrote: >>> It is not too pretty, I agree, but it should do the work. There is = only one >>> problematic descriptor that can be used to switch from = compatibility-mode to >>> long-mode in the GDT (LDT descriptors always have the L-bit = cleared). >>> Changing the descriptor's present bit on context switch when needed = can do >>> the work. >>=20 >> Sure, I can see it working, but it's some really shady stuff, and now >> the scheduler needs to save/restore/check one more subtle bit. >>=20 >> And if you get it wrong, things will happily work, except you've now >> defeated PTI. But you'll never notice, because you won't be testing >> for it, and the only people who will are the black hats. >>=20 >> This is exactly the "security depends on it being in sync" thing that >> makes me go "eww" about the whole model. Get one thing wrong, and >> you'll blow all the PTI code out of the water. >>=20 >> So now you tried to optimize one small case that most people won't >> use, but the downside is that you may make all our PTI work (and all >> the overhead for all the _normal_ cases) pointless. >=20 > There's also the fact that, if this stuff goes in, we'll be > encouraging people to deploy 32-bit binaries. Then they'll buy > Meltdown-fixed CPUs (or AMD CPUs!) and they may well continue running > 32-bit binaries. Sigh. I'm not totally a fan of this. Ok, ok. Stop kicking the dead body...=