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=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 E1701C2D0E4 for ; Tue, 24 Nov 2020 18:49:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 3F695206D8 for ; Tue, 24 Nov 2020 18:49:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DTs3SLA6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F695206D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.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=EJmdAfuPH3blSpqnKviMKpLh20qHbNJAFd+N7Wazt9w=; b=DTs3SLA6rD+LncBwJxZ+jnkoF 1xhQOHvMiUNKJSSmJX3roBGgMJDpzSHkDARWyFTyeb+SHj/d9Y6kYwtE3eO2a8VrFeDNzNlPFbJT6 y0Z7r23wfeGnLReHnn5mXw1cypksM9fk9tzdFHwzJ0aj8V+fz/AFU1t19lR5h7vajFuyIsNl9JHew e8NaDd62ndTHTdlXSPrl4OrsFNJWW/K1OLIwx1yqbKUWz8gplPjPGyMRCU3GQcqtQodbt/V6aJGTw JM/NWttxjbK8HUD0EO29tRBRA4uzrS5vQ2s4KuYRjobrIlzGugPYpJoVWUGvCTcRCenLTP8HGN3EV aUYJWokIQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khdM2-000349-GR; Tue, 24 Nov 2020 18:47:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khdLz-00033h-J1 for linux-arm-kernel@lists.infradead.org; Tue, 24 Nov 2020 18:47:52 +0000 Received: from C02TF0J2HF1T.local (unknown [95.146.230.165]) (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 78D05206E5; Tue, 24 Nov 2020 18:47:46 +0000 (UTC) Date: Tue, 24 Nov 2020 18:47:42 +0000 From: Catalin Marinas To: Peter Collingbourne Subject: Re: [PATCH 2/2] arm64: allow TCR_EL1.TBID0 to be configured Message-ID: <20201124184742.GC42276@C02TF0J2HF1T.local> References: <20f64e26fc8a1309caa446fffcb1b4e2fe9e229f.1605952129.git.pcc@google.com> <64c0fa360333fd5275582d25019614156a8302bc.1605952129.git.pcc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <64c0fa360333fd5275582d25019614156a8302bc.1605952129.git.pcc@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201124_134751_716347_5331A0D6 X-CRM114-Status: GOOD ( 21.56 ) 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: Szabolcs Nagy , Andrey Konovalov , Kostya Serebryany , Evgenii Stepanov , linux-api@vger.kernel.org, Vincenzo Frascino , Will Deacon , Dave Martin , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Nov 21, 2020 at 01:59:03AM -0800, Peter Collingbourne wrote: > Introduce a Kconfig option that controls whether TCR_EL1.TBID0 is > set at boot time. > > Setting TCR_EL1.TBID0 increases the number of signature bits used by > the pointer authentication instructions for instruction addresses by 8, > which improves the security of pointer authentication, but it also has > the consequence of changing the operation of the branch instructions > so that they no longer ignore the top byte of the target address but > instead fault if they are non-zero. Since this is a change to the > userspace ABI the option defaults to off. > > Signed-off-by: Peter Collingbourne > Link: https://linux-review.googlesource.com/id/Ife724ad708142bc475f42e8c1d9609124994bbbd > --- > This is more of an RFC. An open question is how to expose this. > Having it be a build-time flag is probably the simplest option > but I guess it could also be a boot flag. Since it involves an > ABI change we may also want a prctl() so that userspace can > figure out which mode it is in. > > I think we should try to avoid it being a per-task property > so that we don't need to swap yet another system register on > task switch. Having it changed per task at run-time is problematic as this bit may be cached in the TLB, so it would require a synchronisation across all CPUs followed by TLBI. It's not even clear to me from the ARM ARM whether this bit is tagged by ASID, which, if not, would make a per-process setting impossible. So this leaves us with a cmdline option. If we are confident that no software makes use of tagged instruction pointers, we could have it default on. Adding Szabolcs on the gcc/glibc side. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel