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.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 C2A60C54E4A for ; Tue, 12 May 2020 11:05:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86B43206A3 for ; Tue, 12 May 2020 11:05:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i/VJ89X0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="nqhA5x5c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86B43206A3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/+M2cDTzwRmE7IHVIeHXkyximo898hkLabPNwcmamMc=; b=i/VJ89X0iS8hG1zTG8GBNo1QS 6kG65PhgGYl4VReckkrHVlKypDHGnoQOrbRFQRmdrgKQajpqAoiojpqNQHnZROpOVFvj2+vmwdo1S OUEnozCPJsPOCZp2pou5ofwv/gj5YGD3kd3/kYx9lWKY04DMITjbTEN2agFy4ugMmibqI+BY7CEsx F+3boMTNxXi2ugvT0LIr37Xx0Ezbp/hBUnf5MNTzHnFON/gz5h2Z1cS6DkthMlizuBWJosEHLn6X7 bRvX8A8ZwmDCneaUs9p9Yab0fR+SQOjk0VV3v06h889W8h4w+GJHsvBehxC+TSiIYhbqdo4avpUk8 48fPX6LHQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYSij-0002or-K3; Tue, 12 May 2020 11:05:09 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYSig-0001wB-HD for linux-arm-kernel@lists.infradead.org; Tue, 12 May 2020 11:05:07 +0000 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62D52206A3; Tue, 12 May 2020 11:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589281504; bh=FxQbeHzH87z7YqHq+pWRfh+Kr83b9qMjmrmptxIb/1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nqhA5x5cPAN+u/hfaCwJq6umWE9S2at4LRjSqAOzMEi2SU2my3u00mpGc9WzWqa1L Ivu1lIwoV7jmetNKkL41BY24YxO1KxW1rNZwwuJFNgWfA8zF4q44cELlJNiGdGal3g +jzErhr9ZFChQGlw9QVE/e6lcIwb99vROp+ddlJ4= Date: Tue, 12 May 2020 12:05:02 +0100 From: Mark Brown To: Will Deacon Subject: Re: [PATCH] arm64: bti: Fix support for userspace only BTI Message-ID: <20200512110502.GC5110@sirena.org.uk> References: <20200512092155.56931-1-broonie@kernel.org> <20200512103908.GB3021@willie-the-truck> MIME-Version: 1.0 In-Reply-To: <20200512103908.GB3021@willie-the-truck> X-Cookie: The only perfect science is hind-sight. User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200512_040506_601991_0FA196D4 X-CRM114-Status: GOOD ( 12.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============8801114428626413909==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8801114428626413909== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Y5rl02BVI9TCfPar" Content-Disposition: inline --Y5rl02BVI9TCfPar Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 12, 2020 at 11:39:09AM +0100, Will Deacon wrote: > Might be worth a comment here in case somebody tries to "clean this up" > later on! > > +#ifdef CONFIG_ARM64_BTI_KERNEL > > #define PTE_MAYBE_GP (system_supports_bti() ? PTE_GP : 0) > > +#else > > +#define PTE_MAYBE_GP 0 > > +#endif Sure. > I also notice we have a funny check in the vdso code: > if (IS_ENABLED(CONFIG_ARM64_BTI_KERNEL) && system_supports_bti()) > but why do we care about CONFIG_ARM64_BTI_KERNEL for the vdso pages? To enable BTI for the vDSO we need the vDSO to be built with BTI annotations. Currently the CFLAGS are the same for the vDSO and the kernel, we could arrange to allow them to differ but since the most likely reason why the user has userspace but not kernel BTI is that their compiler isn't suitable it seemed like disproportionate effort for a most likely small audience. --Y5rl02BVI9TCfPar Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl66gt0ACgkQJNaLcl1U h9DfRwf+LeNxyFEN4ORntAZEGtm6+2enfFtbsoklIv95dUOkvv6iuck/nJeowCtF O3L+7rN6VFR8zIQ03u1g0ddSWw8UEDb9PUa6wRHp0gHOPEDQUld104wwXgx86gNS 2sGSUlsa7pJ03L+VUWtn08y8fm1A8LEMqpj3NSFcpAol4D86Gbu2pCQO94pNfGAY k95pLMuR/DNTmv7QXDuOruJHyjJlCeV15dcIs39FyKJjRFLedr//thGGe5WmDLpC w2B04hHmQF6pQuM20tiJLc4yTPCRF2YcJ8+bjauhRFVsBzKb696Et02F2vT/zn4U dKDtPNnCMWvC2qC83CPqC5E/c7MN3Q== =6OIl -----END PGP SIGNATURE----- --Y5rl02BVI9TCfPar-- --===============8801114428626413909== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8801114428626413909==--