From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbdKTVzr (ORCPT ); Mon, 20 Nov 2017 16:55:47 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:60562 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753151AbdKTVzq (ORCPT ); Mon, 20 Nov 2017 16:55:46 -0500 Date: Mon, 20 Nov 2017 22:55:36 +0100 (CET) From: Thomas Gleixner To: Andy Lutomirski cc: X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Dave Hansen , Linus Torvalds , Josh Poimboeuf Subject: Re: [PATCH 01/16] x86/asm/64: Allocate and enable the SYSENTER stack In-Reply-To: <03b6d77bce2757a9d8b948dbe514aa13a34a3cc2.1511195781.git.luto@kernel.org> Message-ID: References: <03b6d77bce2757a9d8b948dbe514aa13a34a3cc2.1511195781.git.luto@kernel.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Nov 2017, Andy Lutomirski wrote: > This will simplify future changes that want scratch variables early in > the SYSENTER handler -- they'll be able to spill registers to the > stack. It also lets us get rid of a SWAPGS_UNSAFE_STACK user. > > This does not depend on CONFIG_IA32_EMULATION because we'll want the > stack space even without IA32 emulation. > > As far as I can tell, the reason that this wasn't done from day 1 is > that we use IST for #DB and #BP, which is IMO rather nasty and causes > a lot more problems than it solves. But, since #DB uses IST, we don't > actually need a real stack for SYSENTER (because SYSENTER with TF set > will invoke #DB on the IST stack rather than the SYSENTER stack). > I want to remove IST usage from these vectors some day, and this patch > is a prerequisite for that as well. > > Signed-off-by: Andy Lutomirski Reviewed-by: Thomas Gleixner