Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752627AbeAJBQI (ORCPT + 1 other); Tue, 9 Jan 2018 20:16:08 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:38659 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091AbeAJBQG (ORCPT ); Tue, 9 Jan 2018 20:16:06 -0500 X-Google-Smtp-Source: ACJfBosZa4FrjHR67tsWpwZKgVcA9qG5iZnRqHzVM6Vqq0FQN6JCI0irbcjXRxPXjR8swCVgR6ajnw== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: x86/clearregs: Register sanitizing at kernel entry for speculation hygiene From: Andy Lutomirski X-Mailer: iPhone Mail (15C153) In-Reply-To: <20180110010328.22163-1-andi@firstfloor.org> Date: Tue, 9 Jan 2018 17:16:04 -0800 Cc: tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, dwmw@amazon.co.uk, pjt@google.com, luto@kernel.org, peterz@infradead.org, thomas.lendacky@amd.com, tim.c.chen@linux.intel.com, gregkh@linux-foundation.org, dave.hansen@intel.com, jikos@kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <50B38CB9-546E-4419-9162-D6A2AC2D80C3@amacapital.net> References: <20180110010328.22163-1-andi@firstfloor.org> To: Andi Kleen Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > On Jan 9, 2018, at 5:03 PM, Andi Kleen wrote: > > This patch kit implements clearing of all unused registers on kernel entries, > including system calls and all exceptions and interrupt. > > This doesn't fix any known issue, but will make it harder in general > to exploit the kernel with speculation because it will be harder > to get user controlled values into kernel code. I don't like this at all. Once upon a time, Linux syscalls were supposed to be fast. Then we learned about the Meltdown screwup, so we mostly fixed it for real upstream and the distroa seriously half-arsed their own fixes [1]. This came with a big performance cost, but it can be turned off on non-busted hardware. So be it. But now we're proposing to throw out the whole fast path because it might make it a bit harder to do the most obvious attack. Not very hard, mind you, but a little bit harder. And there's no off switch for less-leaky hardware. No thanks. Meanwhile we're doing nothing whatsoever to mitigate cross-process attacks because we can't do anything about it short of turning IBRS on systemwide.