From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752283AbdLAF5E (ORCPT ); Fri, 1 Dec 2017 00:57:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:40728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750988AbdLAF5D (ORCPT ); Fri, 1 Dec 2017 00:57:03 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8748E2199C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org X-Google-Smtp-Source: AGs4zMaNDTMTDy9eT0Zplg6rDc/sqQuGaCINC9ahoSfOb0h9zt3y6JuG2Q3O3/9WC5W7ePL7DBf8wMQK/8bG/sO7s5k= MIME-Version: 1.0 In-Reply-To: <60410e99331c454caeaa787e372c8f37@AcuMS.aculab.com> References: <60410e99331c454caeaa787e372c8f37@AcuMS.aculab.com> From: Andy Lutomirski Date: Thu, 30 Nov 2017 21:56:41 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 14/19] x86/entry/64: Create a percpu SYSCALL entry trampoline To: David Laight Cc: Andy Lutomirski , X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Dave Hansen , Linus Torvalds , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 24, 2017 at 3:39 AM, David Laight wrote: > 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). Indeed, and it makes a *huge* difference. > > Is there a scratch register that can be used for an indirect jump? No, but I can fudge it. > > David >