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.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 31D01C83000 for ; Tue, 28 Apr 2020 18:04:01 +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 04FA7206A1 for ; Tue, 28 Apr 2020 18:04:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ivyl/h0K"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mj4Kibe0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04FA7206A1 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=wrHCzHjE+2GCBOgviMMC+GJlg9+OzTVzfAwKCZq4Mck=; b=ivyl/h0KbP+Oc6amIB+dwJVwo DF8oRIJKOhTZSTVd32Rs/GTpAgSJ8KU+1BAmSDVzkrRa85++HwZsp8OhPe/y2XrngUhXrkizgUkox FIKpgtA0ISFSXejpYEkMyBFG3vSXd72EvwNsU1JXTMDRMGPwqs4RGDSQZ9NIRgIWH1eTzMztLhmTd j6iJUrkCTg52FDCd7uuSvZGPa/I/o6xdJlfJj9vg4a8fh7XkymHZZch4uk80C4gYDUygg4a4Ta5cs KbkAHCjVXsaosu/1cBXoWtZBtGPn21cpVZsVg05stHscoy/ob8hYQviVQZ/rO3DPKzzL4Oup2VHJV /Pij7tahQ==; 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 1jTUaN-0007Wl-Tw; Tue, 28 Apr 2020 18:03:59 +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 1jTUaK-0007WK-QD for linux-arm-kernel@lists.infradead.org; Tue, 28 Apr 2020 18:03:57 +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 67453206A1; Tue, 28 Apr 2020 18:03:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588097036; bh=Cs+kIiosUe791V7Z5t03iJ9kPgSd432o6JZePUdLsUk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mj4Kibe0SeTW+5PkgBRQxo2v5NNV/siY7n3m2TUmtZfkLvGF9xGxB91klXOWmXWHg 9ICOIR3igwxYZ1dhYTO/CWpXjOXCz3r69qyueK5YgF5xDrfEBqPmW3ZCI3G4dpDR4/ s8/TdlNHydSciWfIPyZT2Iphvn/pKaE0EgB//Mb4= Date: Tue, 28 Apr 2020 19:03:53 +0100 From: Mark Brown To: Catalin Marinas Subject: Re: [PATCH 04/10] arm64: Set GP bit in kernel page tables to enable BTI for the kernel Message-ID: <20200428180353.GN5677@sirena.org.uk> References: <20200415130750.18645-1-broonie@kernel.org> <20200415130750.18645-5-broonie@kernel.org> <20200428172432.GB18257@gaia> MIME-Version: 1.0 In-Reply-To: <20200428172432.GB18257@gaia> X-Cookie: Eschew obfuscation. 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-20200428_110356_871120_0C7C4838 X-CRM114-Status: GOOD ( 14.00 ) 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: Vincenzo Frascino , Will Deacon , Kees Cook , linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============5627030312383529008==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5627030312383529008== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="p1Od3smaOkJqivj4" Content-Disposition: inline --p1Od3smaOkJqivj4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 28, 2020 at 06:24:32PM +0100, Catalin Marinas wrote: > On Wed, Apr 15, 2020 at 02:07:43PM +0100, Mark Brown wrote: > > +#define PAGE_KERNEL_EXEC_GP __pgprot((PROT_NORMAL & ~PTE_PXN) | PTE_GP) > > #define PAGE_KERNEL_EXEC_CONT __pgprot((PROT_NORMAL & ~PTE_PXN) | PTE_CONT) > Are the PAGE_*_GP defines used anywhere in this series? Not any more, I'll drop them. > > +#ifdef CONFIG_ARM64_BTI_KERNEL > > + .type = ARM64_CPUCAP_STRICT_BOOT_CPU_FEATURE, > > +#else > > .type = ARM64_CPUCAP_SYSTEM_FEATURE, > > +#endif > As with PtrAuth, I'm tempted to have a single config for both user and > kernel. Not a strong opinion though, just looking for some consistency. Yeah, it's not ideal. My concern with this was that at the time I sent the patches out GCC had a sufficiently severe code generation issue that it was unsustainable to use for building the kernel. That seemed excessively restrictive so I made it a separate option. This will be fixed in GCC 10 all being well (one of the things I need to do before reposting this is to verify that the current fix addresses everything I was seeing and update the dependencies) so it's less of a concern although still a bit annoying. --p1Od3smaOkJqivj4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl6ocAgACgkQJNaLcl1U h9DEEwf/UaS8sYjOTv43fN70yoBROa93BBnVc3TG376JdSWHIa+2QJwsxwOHmwRa JTJoZGi1KI8fPAhWeK0aaMJ3wJ6or00EH4oYKgXzxizgIFMwJCKOWgNED8y6iScQ QdVkv7AkjECVyFE1CZjyY0w9U1aoZ0YIdcdqgp+uC5elOt8tw6DouDd1uJ9E6tER MAp6/npnACoPyJbt2OJBAgD61pfN9tbgIxd4J+JKhR3fPar/B1ZVkX9nGnkQMxou V/aU5O+fpEl3o2gdOAbuEIaZDdYv+Q8FBd+iuL9lyMcUBv7xV2I5I8pY7EM9kMfq Vaei/2vWQd5Uko6UTPrKcCh7ul85CQ== =SHOs -----END PGP SIGNATURE----- --p1Od3smaOkJqivj4-- --===============5627030312383529008== 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 --===============5627030312383529008==--