Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1336414pxb; Tue, 26 Oct 2021 07:14:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykn2lV0QUKvMWvbmVCZdilNylteZW6VmyDRduASOQyYhSfy039gv6hWENk1AaHT4uy8BJZ X-Received: by 2002:a62:1949:0:b0:47b:e527:cba2 with SMTP id 70-20020a621949000000b0047be527cba2mr17044789pfz.44.1635257692141; Tue, 26 Oct 2021 07:14:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635257692; cv=none; d=google.com; s=arc-20160816; b=kCR3UgYLfBv6Wn2/ntFyGCEOt3863dyucoTiojQa6TO2eCTzC2rmQ0VWnt00HoY9Zq UfTSFFQG99NbfisySvHrlKHB9fsnCP8qvNRm+rKuTSESwwD3uKUzpZPWgRqCDvwiitax UJkQg5qWgymyqFfCwi7PUpc+wpS2oCjaT8kWmb3Va1g2g9j7sUG/pfno+g1XBhNopMwz uKE+s0bkMQQ5tPaBB4cjxRd9Bxlejzd3zD+SicWNiWgciE31RS1y4ZppWLStBOzpX6BN aDDXbJHDFxcQaQVdc8UTc6S+2xTmOyV1jZ8iJKUS5kA8gcf73HXOQ+FUyhaynMj4Lwg8 wkOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=TzY5ed1BYowQNr0TPjrpfdrSAjLf3oogL9uBTW2J8Jg=; b=HRT6unZSEsNZnguei5OSbXLSpRwrS/pQSZaOKG2jsmhUCoa/XYSSLoyFGd9Vexo0lc geOxt9zcwGij8kRZwhvreuC5pPtSBV5bre/FF4wEqw95pnx7XMz/0osTboZXHldJ0UmN OiYHJjKaxhvyED2vyudEHYetEVAbZvSjWLKLVVlGBl/ZEa3NZEVP/Zfm6rYE2OciiEck BOrIHC3htGDb78NTlDV+25unkKLrRJhQUG4aWnk3KHPGH2ILjyrUumJJiicTm48tnqRo AY+bub9hov7IYnogAl+Brhs4bnD2sR2wDCMiuhKOjDWA5+EnOKW+4sO8TvpzCKglGWxd kQWA== 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=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si25998496plq.104.2021.10.26.07.14.36; Tue, 26 Oct 2021 07:14:52 -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=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234189AbhJZLIq convert rfc822-to-8bit (ORCPT + 99 others); Tue, 26 Oct 2021 07:08:46 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:32028 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235408AbhJZLIi (ORCPT ); Tue, 26 Oct 2021 07:08:38 -0400 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-235-Oxs7BlRtPqSKlsdjAPt0vw-1; Tue, 26 Oct 2021 12:06:12 +0100 X-MC-Unique: Oxs7BlRtPqSKlsdjAPt0vw-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.24; Tue, 26 Oct 2021 12:06:11 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.024; Tue, 26 Oct 2021 12:06:11 +0100 From: David Laight To: 'Mark Rutland' , Ard Biesheuvel CC: 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 Thread-Topic: [PATCH 2/4] arm64: implement support for static call trampolines Thread-Index: AQHXylVlgIVfu8vswkCI9TVLTUwuCavlHODQ Date: Tue, 26 Oct 2021 11:06:11 +0000 Message-ID: <7d807624275a4938871f8e433e510e3c@AcuMS.aculab.com> References: <20211025122102.46089-1-frederic@kernel.org> <20211025122102.46089-3-frederic@kernel.org> <20211026103655.GB30152@C02TD0UTHF1T.local> In-Reply-To: <20211026103655.GB30152@C02TD0UTHF1T.local> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)