Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp883730pxb; Wed, 27 Oct 2021 14:25:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1+nsf8wimVg1hhBnTulYBRyaXBz670+sKZCY/l4rvCrKD48Z7FHeCNwFJ2/D6ATHSlzjm X-Received: by 2002:a17:906:a1da:: with SMTP id bx26mr77536ejb.558.1635369953778; Wed, 27 Oct 2021 14:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635369953; cv=none; d=google.com; s=arc-20160816; b=Gs0P4iMedKXsJ6UNemm9JF4NWEsXc6ZUnNwi5bynfUHVhHtc5b0ImNaUot4fVxECwb a7AagYa4jlnuW3/whQLexSnyGAc/kbJTiDL8Be4sGiZJtt1QHU6qzK76h7CW1d0+Yq+p U9mTV0vgHGCAmn7QSkvBSDE+A7PtVxRk+jy9q9zZH5gKOcoZ997lwx+nebGZj2KgB3mG qkA72nvRBkdWZnETPQW+ptkwcavyyXvc6h3Yy68/MwNuuLACMHPHer6BE3QjLskdJSJx UKJzKdlUhyjCms4lfmRzG3zpUr71pKZ6WieR2S6oDpJkncLb5NYDqT7p3m7cKxHab+xZ Up4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:from:date; bh=AncJegvJ7kiv0cRG6HD7jBpYKb0sj/0eJxNwnmtboDI=; b=xY79R2DdIQgx2dZvYMdovhW5qPDI5wYrbkBWU/D5tswUSOYYT5EfQnBXDXnq4NzZkm h1S77tKvWF4rqsrjLBHlINIJXs3QGaaaulkQ17b5KYmjjYbFeugWGkD4QZlczGg/cOJl Q8eWX+cDFhRovsmcYkTA9SaBtgpu7yUUfZGaedsTNevpbl97KfixHA2WRvXqb3nmfTr4 vJUlhQYb5wbB6vBHrfv6VTV0kDBNlM1cf9ud0RCkeoA73hCas803R6dly8U4Q7hjWe29 rhz2arIDbJnmYhGh8WJNYAEK57FDhzCnOTSLgtytnWlf+iaGFDqxB/qkEqpVC+aKrRHq k3RA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 28si1209807ejb.46.2021.10.27.14.25.28; Wed, 27 Oct 2021 14:25:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236195AbhJ0MuQ (ORCPT + 97 others); Wed, 27 Oct 2021 08:50:16 -0400 Received: from foss.arm.com ([217.140.110.172]:42982 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231542AbhJ0MuP (ORCPT ); Wed, 27 Oct 2021 08:50:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 046931FB; Wed, 27 Oct 2021 05:47:50 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.72.240]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 08DC73F73D; Wed, 27 Oct 2021 05:47:46 -0700 (PDT) Date: Wed, 27 Oct 2021 13:47:44 +0100 From: Mark Rutland Cc: Ard Biesheuvel , Peter Zijlstra , Frederic Weisbecker , LKML , James Morse , Quentin Perret , Catalin Marinas , Will Deacon Subject: Re: [PATCH 2/4] arm64: implement support for static call trampolines Message-ID: <20211027124744.GE54628@C02TD0UTHF1T.local> References: <20211025122102.46089-3-frederic@kernel.org> <20211026103655.GB30152@C02TD0UTHF1T.local> <7d807624275a4938871f8e433e510e3c@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7d807624275a4938871f8e433e510e3c@AcuMS.aculab.com> To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 11:06:11AM +0000, David Laight wrote: > From: Mark Rutland > > Sent: 26 October 2021 11:37 > ... > > My preference overall is to keep the trampoline self-contained, and I'd > > prefer to keep the RET inline in the trampoline rather than trying to > > factor it out so that all the control-flow is clearly in one place. > > > > So I'd prefer that we have the sequence as-is: > > > > | 0: .quad 0x0 > > | bti c > > | < insn > > > | ldr x16, 0b > > | cbz x16, 1f > > | br x16 > > | 1: ret > > What is wrong with: > 0: .quad 1f > bti c > < insn > > ldr x16, 0b > br x16 > 1: bti c > ret > > Self-contained and reasonably easy to read. FWIW, that would work for me too. Thanks, Mark.