From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759602AbcBYIOs (ORCPT ); Thu, 25 Feb 2016 03:14:48 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:32867 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758167AbcBYIOq (ORCPT ); Thu, 25 Feb 2016 03:14:46 -0500 Date: Thu, 25 Feb 2016 09:14:41 +0100 From: Ingo Molnar To: Andy Lutomirski Cc: "H. Peter Anvin" , Peter Zijlstra , Brian Gerst , Thomas Gleixner , Linus Torvalds , Andrew Lutomirski , "linux-kernel@vger.kernel.org" , Borislav Petkov , Denys Vlasenko , "linux-tip-commits@vger.kernel.org" Subject: Re: [tip:x86/urgent] x86/entry/32: Add an ASM_CLAC to entry_SYSENTER_32 Message-ID: <20160225081441.GA11615@gmail.com> References: <3e36be110724896e32a4a1fe73bacb349d3cba94.1456262295.git.luto@kernel.org> <56CE9897.6080702@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Lutomirski wrote: > >> Strengthen the SMAP protection by addding the missing ASM_CLAC right at the > >> beginning. > > > > Hmmm... this potentially adds a *lot* of unnecessary cycles to this path. > > Could we reinstate the early uaccess? > > I think that's more trouble than it's worth, and it'll undo a bunch of the > context tracking cleanups that deferring it made possible, especially since this > only matters in a configuration (32-bit SMAP) that no one uses. [1] But but ... 'context tracking' is not really something that a regular distro kernel cares about much - it's a nohz-full special AFAICS. So if the only reason to keep this overhead is to simplify context tracking then I'm pretty sure we want to burden context-tracking with that, not the common fast path. Anyway, maybe we are 'lucky': > *However*, I just realized that I have no idea why the 32-bit sysenter > path is safe against NT being set. I fixed it on compat, and now I'm > confused as to the status on 32-bit. If we need to fix up NT, I think > we can fold AC into that. > > Also, I'll try to benchmark this soon. Sounds good, thanks! Ingo