From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753450AbdKXLjS convert rfc822-to-8bit (ORCPT ); Fri, 24 Nov 2017 06:39:18 -0500 Received: from smtp-out6.electric.net ([192.162.217.181]:61098 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753402AbdKXLjR (ORCPT ); Fri, 24 Nov 2017 06:39:17 -0500 From: David Laight To: "'Andy Lutomirski'" , X86 ML CC: Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Dave Hansen , Linus Torvalds , "Josh Poimboeuf" Subject: RE: [PATCH v3 14/19] x86/entry/64: Create a percpu SYSCALL entry trampoline Thread-Topic: [PATCH v3 14/19] x86/entry/64: Create a percpu SYSCALL entry trampoline Thread-Index: AQHTZN2qVUDEL7cmA0GMx7mwy52CTKMjZwaA Date: Fri, 24 Nov 2017 11:39:29 +0000 Message-ID: <60410e99331c454caeaa787e372c8f37@AcuMS.aculab.com> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuMS.aculab.com X-TLS: TLSv1.2:ECDHE-RSA-AES256-SHA384:256 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Lutomirski > Sent: 24 November 2017 04:33 ... > + /* > + * x86 lacks a near absolute jump, and we can't jump to the real > + * entry text with a relative jump, so we fake it using retq. > + */ > + pushq $entry_SYSCALL_64_after_hwframe > + retq Don't some of the cpus have hardware logic that follows call and return? The above will break that logic and slow things down (unless it is an expected sequence). Is there a scratch register that can be used for an indirect jump? David