Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753406AbeAQOOi (ORCPT + 1 other); Wed, 17 Jan 2018 09:14:38 -0500 Received: from 8bytes.org ([81.169.241.247]:40504 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753208AbeAQOOU (ORCPT ); Wed, 17 Jan 2018 09:14:20 -0500 Date: Wed, 17 Jan 2018 15:14:18 +0100 From: Joerg Roedel To: Brian Gerst Cc: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , Linux-MM , Linus Torvalds , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Joerg Roedel Subject: Re: [PATCH 03/16] x86/entry/32: Leave the kernel via the trampoline stack Message-ID: <20180117141418.GS28161@8bytes.org> References: <1516120619-1159-1-git-send-email-joro@8bytes.org> <1516120619-1159-4-git-send-email-joro@8bytes.org> <20180117092442.GJ28161@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 17, 2018 at 06:00:07AM -0800, Brian Gerst wrote: > On Wed, Jan 17, 2018 at 5:57 AM, Brian Gerst wrote: > But then again, you could take a fault on the trampoline stack if you > get a bad segment. Perhaps just pushing the new stack pointer onto > the process stack before user segment loads will be the right move. User segment loads pop from the stack, so having anything on-top also doesn't work. Maybe I can leave some space at the bottom of the task-stack at entry time and store the pointer there on exit, if that doesn't confuse the stack unwinder too much. Joerg