From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753431AbdLHL2s (ORCPT ); Fri, 8 Dec 2017 06:28:48 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:38087 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753268AbdLHL2q (ORCPT ); Fri, 8 Dec 2017 06:28:46 -0500 X-Google-Smtp-Source: AGs4zMa3h4CPGz2nDUgm6SBnCMuepMXyzzs5/4ZvSE+XrUr2QBpEcdLgJF1nnAA3KyGavPESpMm2MQ== Date: Fri, 8 Dec 2017 12:28:42 +0100 From: Ingo Molnar To: "Kirill A. Shutemov" Cc: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Linus Torvalds , Andy Lutomirski , Cyrill Gorcunov , Borislav Petkov , Andi Kleen , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv4 3/4] x86/boot/compressed/64: Introduce place_trampoline() Message-ID: <20171208112842.jfh4rnu3nzdab4o6@gmail.com> References: <20171205135942.24634-1-kirill.shutemov@linux.intel.com> <20171205135942.24634-4-kirill.shutemov@linux.intel.com> <20171207063048.w46rrq2euzhtym3j@gmail.com> <20171208110722.gl2cxdq2vlg6olih@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171208110722.gl2cxdq2vlg6olih@node.shutemov.name> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Kirill A. Shutemov wrote: > On Thu, Dec 07, 2017 at 07:30:48AM +0100, Ingo Molnar wrote: > > > We also need a small stack in the trampoline to re-enable long mode via > > > long return. But stack and code can share the page just fine. > > > > BTW., I'm not sure this is necessarily a good idea: it means writable+executable > > memory, which we generally try to avoid. How complicated would it be to have them > > separate? > > It's trivial: you only need to bump TRAMPOLINE_32BIT_SIZE. > > But it doesn't make much sense. We're running from indentity mapping: all > memory is r/w without NX bit set (and IA32_EFER.NXE is 0). Ok, fair enough! Thanks, Ingo