From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CC83C54EEB for ; Mon, 23 Mar 2020 15:32:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 53DE820753 for ; Mon, 23 Mar 2020 15:32:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584977554; bh=W+mvseXiKIXK+dS0UQFsPgiTwq9SRniuXlU+RpmLMpo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=ad6Zry/wVfJzdXUs5eNSHE7E/jZFOMd9PPRMel8k/BJ9R7rrRDZ0HCZc1YtLl8tOq WFVdvgqBE5iIn50CU9/Nb2V4FJS6U0ahOWEUZXuh9HOuIc/t5/28dqzGpufFsYjoBB zztaUAUKGGb96w4r0UEoUO+6VnxJJH/LHdMMa4+8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727179AbgCWPcb (ORCPT ); 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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--