Received: by 10.223.185.116 with SMTP id b49csp1016239wrg; Fri, 16 Feb 2018 10:52:26 -0800 (PST) X-Google-Smtp-Source: AH8x226pKFY+fmm6Clbpg85PIT/OpVrLTCZRT+CIgBuoQ+s0yMVBXi9jg4QNGhhEB5ggMTA96CLQ X-Received: by 10.99.0.139 with SMTP id 133mr5904467pga.267.1518807146845; Fri, 16 Feb 2018 10:52:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518807146; cv=none; d=google.com; s=arc-20160816; b=XVU4weyWazqVazOP1BYsWbeV7RbpZ8k7k0OSORHXmkATgDiXWdJFOnUSvtHOQ0tnPI MorpApE1ZyOrvvON+c2ht/5SHKrePwx5AlL1dJz2zWRlJWOvyZgQD3GCqYqvwnWdlrq3 brNCHClfUVg6BTZSOHd1zD0/Y9h+vpnI3M6uCSQNXZWsuzpmftFtdfUOLrBjIYurRQX+ LHfh1kUSPNdJwCr99THG5u9elSNj3DmDmY7E/idAnRPdnDLhsXmJfPD9mthrfclXMdHB xpJDGFpWnHU94IeIwFkpZmu3No1eq71+NBhLRyEA2ThgVppEzlaR/hnv5Bsx0IkKHwlh CsrQ== 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 :arc-authentication-results; bh=Q5LVtdY4y82x/VYKYZGdizsWaAXSplJRerx7YEUT6iE=; b=N7o3lBDLlz3MjS9Zaw/j18bc32ijMTLtetZXF5mP3sJbqHGtJWnBMVqvy6MU+wc2LK 6x92nMjoQ/lLqVp1lpx6t1Ik2FkwELLdoWDx2qXzc+JCUIdJwC9ga2qqGlDH199jCdJm HYU3/o2wXYbzud6Zvb1XLUZGRVuIK/6Zf8ZTMs5Kp6gVnFWEVLbmBp/ZMAw7ay9pF/ic GYbHZZCNADSOMy1TQeuuUKOeZuMXrYjAqF9znh5Cd5x8Gj+x03cBokKH8WR3DvPye540 sMOKJh6ZZHlDjn5mj2Qericmbr/lQh50UV0jei/tO7nnY3fQduCI4mscge6hOYOHCKca hrpg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si2564591pgd.694.2018.02.16.10.52.12; Fri, 16 Feb 2018 10:52:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755498AbeBPI6D (ORCPT + 99 others); Fri, 16 Feb 2018 03:58:03 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:53403 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755351AbeBPI6C (ORCPT ); Fri, 16 Feb 2018 03:58:02 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id CD6AE80182; Fri, 16 Feb 2018 09:58:00 +0100 (CET) Date: Fri, 16 Feb 2018 09:58:00 +0100 From: Pavel Machek To: David Woodhouse Cc: Andy Lutomirski , Andrew Cooper , Linus Torvalds , Andi Kleen , "linux-kernel@vger.kernel.org" , "tim.c.chen@linux.intel.com" , "peterz@infradead.org" , "tglx@linutronix.de" , "riel@redhat.com" , "keescook@google.com" , "gnomes@lxorguk.ukuu.org.uk" , "pjt@google.com" , "dave.hansen@intel.com" , "jikos@kernel.org" , "gregkh@linux-foundation.org" Subject: Re: [PATCH v6 11/10] x86/retpoline: Avoid return buffer underflows on context switch Message-ID: <20180216085800.GA7616@amd> References: <1515363085-4219-1-git-send-email-dwmw@amazon.co.uk> <1515455051.15588.7.camel@infradead.org> <1515455902.4423.59.camel@amazon.co.uk> <20180109004415.GG6718@tassilo.jf.intel.com> <3aadb8a0-08c8-bdf9-7b91-0fa774a9e1ab@citrix.com> <1515503060.22302.19.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1515503060.22302.19.camel@infradead.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2018-01-09 13:04:20, David Woodhouse wrote: > On Mon, 2018-01-08 at 19:27 -0800, Andy Lutomirski wrote: > > >? > > > If SMEP is not active, speculation can go anywhere, including to a user > > > controlled gadget which can reload any registers it needs, including > > > with immediate constants. > > > > I thought that, even on pre-SMEP hardware, the CPU wouldn't > > speculatively execute from NX pages.? And PTI marks user memory NX > > in kernel mode. > > Hm, now that could be useful.? > > Do *all* the KPTI backports (some of which are reimplementations rather > than strictly backports) mark user memory NX? Hmm. We'd still want to do something on 32-bit, and those might not even have NX support in hardware. Pentium 4 (and such) is probably advanced enough to be vulnerable to spectre, but not new enough to support NX... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html