Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3836688ybb; Mon, 23 Mar 2020 08:34:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vswwVbGvwqBaZWd28wx8lbUaprzl7CAtSu2KjIpHKlM+oofPAFq/KC4ElTpL/HfhgFeDc/i X-Received: by 2002:a9d:6945:: with SMTP id p5mr5807077oto.268.1584977664432; Mon, 23 Mar 2020 08:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584977664; cv=none; d=google.com; s=arc-20160816; b=n6JS8SjYISKASJMy9jjFDPW2HQ4NMAM/rnHpTOtfJ85OVt6WoCWTO5SKXnALvoC15R iZunoQzyMNEDJb/qXjDLv49CcIMbotT6v0X26jZqdpH0P6WiUgjfBsPomK/5NCik+EjY lq4BrYi4I0Q+a0q/HCT/eW3tMrpSuAS7WFb+LDt/BqedGbaWMfSSd7LMlVUXaBZUfTsQ OBbnAxmRcKvtn2hEgLJXvqu5KEsi8jXcNggIvkcKYUIueQNDDiFE+QCrhT/Ml8UIT/XH 0TtiYR+KmgUO9ng0VYaBtzAn7ErGKDEDxV2+FqBbsird4n2rctMVL3r6OM7sSaJpxYTQ bcbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=sy7CHZNunhZTcc9rQX8ICVd4IzZMVIJHxJurfU08Dlk=; b=NJYDwdqjLJ5s8p/+q65CyhC7E/8zMtk2IASBW8j3qw+V01WMjrAsJlqayY7rAPXZBw +2tiQGZCsMfI26dcb1WqnV1VEDQkd1+8lcWm3SzCWl/nRTytLlkC8zNFGol3N1O/7mXZ 9UurDkqRLtGEzaHMbO5mFTWfz7mJedpP72WXawYcn5+JADg67BHlnimcAtiejTL341zk 1/aZbrSmmN1EsrmKCcVPg3TTqA2RMLvnhdKfOhtnM9iBHik3BTAUxW6oZ8bDL3pQJ2u6 YfypDl0HbeCVCCvTeD6ScD/H4J+Zvw4F3A+HkmOT8kfco0z3F+Z0Q0fF/3l5fMiloHE3 1tOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si6996560oij.237.2020.03.23.08.34.10; Mon, 23 Mar 2020 08:34:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727230AbgCWPcb (ORCPT + 99 others); Mon, 23 Mar 2020 11:32:31 -0400 Received: from foss.arm.com ([217.140.110.172]:51124 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727137AbgCWPcb (ORCPT ); Mon, 23 Mar 2020 11:32:31 -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 640121FB; Mon, 23 Mar 2020 08:32:30 -0700 (PDT) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B83F23F7C3; Mon, 23 Mar 2020 08:32:29 -0700 (PDT) Date: Mon, 23 Mar 2020 15:32:28 +0000 From: Mark Brown To: Mark Rutland Cc: Catalin Marinas , Szabolcs Nagy , Will Deacon , Alexander Viro , Paul Elliott , Peter Zijlstra , Yu-cheng Yu , Amit Kachhap , Vincenzo Frascino , Marc Zyngier , Eugene Syromiatnikov , "H . J . Lu " , Andrew Jones , Kees Cook , Arnd Bergmann , Jann Horn , Richard Henderson , Kristina =?utf-8?Q?Mart=C5=A1enko?= , Thomas Gleixner , Florian Weimer , Sudakshina Das , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, nd@arm.com Subject: Re: [PATCH v10 00/13] arm64: Branch Target Identification support Message-ID: <20200323153228.GE4948@sirena.org.uk> References: <20200316165055.31179-1-broonie@kernel.org> <20200320173945.GC27072@arm.com> <20200323122143.GB4892@mbp> <20200323132412.GD4948@sirena.org.uk> <20200323135722.GA3959@C02TD0UTHF1T.local> <20200323143954.GC4892@mbp> <20200323145546.GB3959@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2hMgfIw2X+zgXrFs" Content-Disposition: inline In-Reply-To: <20200323145546.GB3959@C02TD0UTHF1T.local> X-Cookie: Stay on the trail. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2hMgfIw2X+zgXrFs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 23, 2020 at 02:55:46PM +0000, Mark Rutland wrote: > On Mon, Mar 23, 2020 at 02:39:55PM +0000, Catalin Marinas wrote: > > So this means that the interpreter will have to mprotect(PROT_BTI) the > > text section of the primary executable. > Yes, but after fixing up any relocations in that section it's going to > have to call mprotect() on it anyhow (e.g. in order to make it > read-only), and in doing so would throw away BTI unless it was BTI > aware. Ah, of course - I forgot that's not a read/modify/write cycle. I'll send the comment version. > > That's a valid point. If we have an old dynamic linker and the kernel > > enabled BTI automatically for the main executable, could things go wrong > > (e.g. does the PLT need to be BTI-aware)? > I believe that a PLT in an unguarded page needs no special treatment. A > PLT within a guarded page needs to be built specially for BTI. Unguarded stuff is unaffected. --2hMgfIw2X+zgXrFs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl541osACgkQJNaLcl1U h9A4pAf+IvJV9iWwP6vJKgT868+5ZjhSjiVsOKwt0PqgVzwOcV5HIX7k7mlf91GM k1Fn/ZsPWecmng93bj0iUlMtnBCoxTyE4F20odXx1vgUhscr6RjCvtPkGlLEgYEz 0Cs6mB6NDjJxcTJDxB54HIXhlP4lL3Jo++u+yRS2/0lLHba08FUu7/gJYjh7TTCV n9kw50W8boGR1DgRe51u0Yn08RqNt2Boe/tauY2huT9H5zgbM2d40jv7qVcdTffJ PWeuF23KN9w9E/burfR4MrA8JtLgZHrnjt5cuSXuogtP28D1UcfgaKfr8JSDPT6P VjN8hBGRZhte6hqR58+ZsNUrKDDLIw== =1CsH -----END PGP SIGNATURE----- --2hMgfIw2X+zgXrFs--