From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277AbdKZOSx (ORCPT ); Sun, 26 Nov 2017 09:18:53 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:38001 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147AbdKZOSv (ORCPT ); Sun, 26 Nov 2017 09:18:51 -0500 X-Google-Smtp-Source: AGs4zMYLSmIJV82ndPZTEWuS89O7LN6czJxHC3db4v9SLKukc5mnwUMh90MbcAX/AiT7by572ombcg== Date: Sun, 26 Nov 2017 15:18:47 +0100 From: Ingo Molnar To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, Dave Hansen , Andy Lutomirski , Thomas Gleixner , "H . Peter Anvin" , Peter Zijlstra , Linus Torvalds Subject: Re: [PATCH 14/43] x86/asm/64: Return to userspace from the trampoline stack Message-ID: <20171126141847.mgn6lnsuafloasyc@gmail.com> References: <20171124172411.19476-1-mingo@kernel.org> <20171124172411.19476-15-mingo@kernel.org> <20171124191005.bn4zchmxlngdhvpv@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171124191005.bn4zchmxlngdhvpv@pd.tnic> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Borislav Petkov wrote: > On Fri, Nov 24, 2017 at 06:23:42PM +0100, Ingo Molnar wrote: > > From: Andy Lutomirski > > > > By itself, this is useless. It gives us the ability to run some final > > code before exit that cannnot run on the kernel stack. This could > > include a CR3 switch a la KAISER or some kernel stack erasing, for > > example. (Or even weird things like *changing* which kernel stack > > gets used as an ASLR-strengthening mechanism.) > > > > The SYSRET32 path is not covered yet. It could be in the future or > > we could just ignore it and force the slow path if needed. > > > > Signed-off-by: Andy Lutomirski > > Signed-off-by: Thomas Gleixner > > Cc: Borislav Petkov > > Cc: Brian Gerst > > Cc: Dave Hansen > > Cc: Josh Poimboeuf > > Cc: Linus Torvalds > > Cc: Peter Zijlstra > > Link: https://lkml.kernel.org/r/d350017000eed20922c3b2711a2d9229dc809256.1511497875.git.luto@kernel.org > > Signed-off-by: Ingo Molnar > > --- > > arch/x86/entry/entry_64.S | 55 +++++++++++++++++++++++++++++++++++++++++++---- > > 1 file changed, 51 insertions(+), 4 deletions(-) > > Nice commenting, future generations will appreciate it! > > :-) > > Reviewed-by: Borislav Petkov Heh, indeed - if by 'future generations' you mean 'the guys who merge it, a few months down the line'. ;-) Thanks, Ingo