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=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 790D9C4167B for ; Thu, 3 Dec 2020 14:53:07 +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 19750207A4 for ; Thu, 3 Dec 2020 14:53:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19750207A4 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=NYpVfW/4OIhu2gEYPNGV2SdcI0IK4fX74Cm+Hkr1u58=; b=1hO6s1Z1VBsHMce5ryMiTYfoq 7kIGUeg69kXFNEFivxOVjW2ltIx7OKu1tjl02eQQFM76rVFKW0DkOSiutuNgTl/I2ixfBvqERhT5w lgfkTVNs/xz0mwCaDvcOpkqssFOsxivXcXCBWKAhxBZSQRggsQW8MB2emLHfQ7wNANrIskTcJPuux 1Kkk9CcmHKelZQxCQFrM6WNH9zyrVxLzPvlmdjsid7KO/Du4i6A793AM4PndvvbGj1czOgCr3Ov4B GKdUEjhXHNSG7f4SnoSAyPlK1P2eqW6QVhfbGkpXUxBQeT/S5VdWLHJfKCv/1AsczoKr/+oANeKfU Ir4Gc8X4g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkpxL-00040e-GF; Thu, 03 Dec 2020 14:51:39 +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 1kkpxI-0003zV-Hz for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2020 14:51:37 +0000 Date: Thu, 3 Dec 2020 14:51:31 +0000 From: Catalin Marinas To: Peter Collingbourne Subject: Re: [PATCH] arm64: mte: fix prctl(PR_GET_TAGGED_ADDR_CTRL) if TCF0=NONE Message-ID: <20201203145131.GB2830@gaia> References: <20201203075110.2781021-1-pcc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201203075110.2781021-1-pcc@google.com> 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-20201203_095136_710871_D5158A92 X-CRM114-Status: GOOD ( 16.57 ) 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: Will Deacon , 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 Wed, Dec 02, 2020 at 11:51:10PM -0800, Peter Collingbourne wrote: > Previously we were always returning a tag inclusion mask of zero via > PR_GET_TAGGED_ADDR_CTRL if TCF0 was set to NONE. Fix it by making > the code for the NONE case match the others. > > Signed-off-by: Peter Collingbourne > Link: https://linux-review.googlesource.com/id/Iefbea66cf7d2b4c80b82f9639b9ea7f33f7fac53 > --- > arch/arm64/kernel/mte.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c > index 52a0638ed967..ef15c8a2a49d 100644 > --- a/arch/arm64/kernel/mte.c > +++ b/arch/arm64/kernel/mte.c > @@ -189,7 +189,8 @@ long get_mte_ctrl(struct task_struct *task) > > switch (task->thread.sctlr_tcf0) { > case SCTLR_EL1_TCF0_NONE: > - return PR_MTE_TCF_NONE; > + ret |= PR_MTE_TCF_NONE; > + break; > case SCTLR_EL1_TCF0_SYNC: > ret |= PR_MTE_TCF_SYNC; > break; With a fixes tag: Fixes: af5ce95282dc ("arm64: mte: Allow user control of the generated random tags via prctl()") Reviewed-by: Catalin Marinas Will, if you have another pull request for 5.10, please pick this up as well (it's an ABI fix so it would be nice to get it in the first release with MTE support). Otherwise I'll queue it at -rc1 and cc stable. Thanks. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel