From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753338AbdKWTg2 (ORCPT ); Thu, 23 Nov 2017 14:36:28 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:44816 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753253AbdKWTg1 (ORCPT ); Thu, 23 Nov 2017 14:36:27 -0500 Date: Thu, 23 Nov 2017 20:36:22 +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 v2 12/18] x86/espfix/64: Stop assuming that pt_regs is on the entry stack In-Reply-To: Message-ID: References: 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 Tue, 21 Nov 2017, Andy Lutomirski wrote: > When we start using an entry trampoline, a #GP from userspace will > be delivered on the entry stack, not on the task stack. Fix the > espfix64 #DF fixup to set up #GP according to TSS.SP0, rather than > assuming that pt_regs + 1 == SP0. This won't change anything > without an entry stack, but it will make the code continue to work > when an entry stack is added. > > Signed-off-by: Andy Lutomirski Reviewed-by: Thomas Gleixner