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.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 1B2C0C54E4A for ; Tue, 12 May 2020 11:42:52 +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 C1EF320674 for ; Tue, 12 May 2020 11:42:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cpX9I8ew"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="jK/mSF2g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1EF320674 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-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VJ18L6cBcnvZboQccONg/0jfbioTnZrobuUPCszOm2s=; b=cpX9I8ewiXyqDh U2+H9mNuaHztO7i87iGCYt0IAu0K/V8TrhYsDn760i4+YdcFupKEGQVvZniTZq3gLe2t1FyWB+SMF abW7DDLj97blvBaBZJGKkoG/+J5lHLKY3axqJ2ybfC2w77aZ2Fk7CeE08HlXVZZyYqqmLa2oFEuat p6apfbpGsx1QPmzY3gSA0sbxypojVA9jKO0erbhNLzksQw+kfjA3Kp35NKL1JG6jpAuWg8SAPe2Y2 /LKWQzfW7GLg0y7GKvBD/RLRWUxAusBndPteaPLanb1ncHAafxnYIZr8XL+D0yXm1/hGQeT3B/xxg PXm7kN93veKl6nyk+lbA==; 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 1jYTJD-0003ST-7p; Tue, 12 May 2020 11:42:51 +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 1jYTJA-0003S6-Uo for linux-arm-kernel@lists.infradead.org; Tue, 12 May 2020 11:42:50 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 E265220674; Tue, 12 May 2020 11:42:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589283768; bh=+9R9sgZfh2fvfKd9M6UBXaeYwcsbhjlX1p9x7dsPUTA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jK/mSF2gVJW2+UnH077SgLQYBkQKqU2SdybYB+n1MZyXuvYHyVoIr2XxY2cCCsKDb dbpoV6Zy2acMo9+k9x5nvP7vAKho0Ekc3IxUp6c3ZRoMMiVt8OuOrUWzdrEUnj4VgN sLSmvZu4yhl1HLLcAyFi5EFzQOZ2LHh0dgfjfnwQ= Date: Tue, 12 May 2020 12:42:44 +0100 From: Will Deacon To: Mark Brown Subject: Re: [PATCH] arm64: bti: Fix support for userspace only BTI Message-ID: <20200512114243.GC3021@willie-the-truck> References: <20200512092155.56931-1-broonie@kernel.org> <20200512103908.GB3021@willie-the-truck> <20200512110502.GC5110@sirena.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200512110502.GC5110@sirena.org.uk> 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_044249_010448_E5D4B79C X-CRM114-Status: GOOD ( 14.17 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 12, 2020 at 12:05:02PM +0100, Mark Brown wrote: > 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. I was thinking of using CC_HAS_BRANCH_PROT_PAC_RET_BTI instead, but I'd forgotten about that GCC bug. Oh well. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel