From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753282AbeADOqg (ORCPT + 1 other); Thu, 4 Jan 2018 09:46:36 -0500 Received: from mga02.intel.com ([134.134.136.20]:41987 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753119AbeADOqf (ORCPT ); Thu, 4 Jan 2018 09:46:35 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,507,1508828400"; d="scan'208";a="8031635" Subject: Re: [PATCH v3 03/13] x86/retpoline/entry: Convert entry assembler indirect jumps To: David Woodhouse , ak@linux.intel.com References: <1515058213.12987.89.camel@amazon.co.uk> <20180104143710.8961-3-dwmw@amazon.co.uk> Cc: Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , tglx@linutronix.de, Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk From: Dave Hansen Message-ID: <4151b1a1-b93e-0329-4000-b6b00e78e9e9@intel.com> Date: Thu, 4 Jan 2018 06:46:33 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180104143710.8961-3-dwmw@amazon.co.uk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/04/2018 06:37 AM, David Woodhouse wrote: > KPTI complicates this a little; the one in entry_SYSCALL_64_trampoline > can't just jump to the thunk because the thunk isn't mapped. So it gets > its own copy of the thunk, inline. This one call site isn't too painful, of course. But, is there anything keeping us from just sticking the thunk in the entry text section where it would be available while still in the trampoline?