From patchwork Thu Aug 22 15:10:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13773845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B8913C52D7C for ; Thu, 22 Aug 2024 15:52:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ypJJJaKGYD4Ov7M2/l/WjUT/Qty4LPf9GxDEXpk7WH8=; b=1Zxaqnd5JcmZufLFGRQABIbbNP SdYKA+pClHn0L8Sfq78pK98RbXM2SUjzMY3QZ38aVfeyIc1ep3npmGKVpR0vrBY1jGwnh+MzFbTW2 QZdGtX0vtIQKZlFr8MPAYq50qK8h4Bs/RoyZ7Zgdo19YO76AwUjSIci0SqOUKq+dO+SZAFZH1A6S/ pnKc9bj1Jj9A/9P0GGqUR/VxJNvCYzr0CBhZQdX+461SjeN/9b7/FrkYT8Lz+Mo9nhDpL2BWcIAXb uPhBOUDARPsC6BEo8dyaTA9/65xZrEWuNRQWwyp6XoeblGC+7dsU3XYkZ2A5f9+L/cLqZVzuedqeO C1+Izn7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shA6b-0000000DPJ8-1hf2; Thu, 22 Aug 2024 15:52:09 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9U5-0000000DIKw-0xNQ for linux-arm-kernel@bombadil.infradead.org; Thu, 22 Aug 2024 15:12:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=ypJJJaKGYD4Ov7M2/l/WjUT/Qty4LPf9GxDEXpk7WH8=; b=FxScpTrK2hIYqPTkvEH3IwHS49 GunfYvlvCLsmRI3nl5MAXt9VmzuxhaDRFeJVYyoCWubSYpZa650FgA1B8jV6IVbRk9wZh6eEw2jde fyxr7IDPGkwjXR5pR7q2u3VCwaRrHV9YPs8qvF2tCLXsRBUTbRVST2b/KnutsQ7PkUvA6otXHiwsu KmIVFl9VLZys5r3DxitlOmgUjWqU+LJVjsVGnQ/JVjX4ycGdB1KW+7orYtSETx54vBkV8d5qO3eKX nbPVADFIkQIzZEkIcQ9iWOggbnUTkCrprlyNU/JjWBXjSvBX0dn15kijSi+7/2vAtFIIqy4j3uX5s daqSXRlg==; Received: from foss.arm.com ([217.140.110.172]) by desiato.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh9U0-00000009y2H-35xV for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 15:12:19 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4CCD31595; Thu, 22 Aug 2024 08:12:42 -0700 (PDT) Received: from e124191.cambridge.arm.com (e124191.cambridge.arm.com [10.1.197.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 167F53F58B; Thu, 22 Aug 2024 08:12:11 -0700 (PDT) From: Joey Gouly To: linux-arm-kernel@lists.infradead.org Cc: nd@arm.com, akpm@linux-foundation.org, aneesh.kumar@kernel.org, aneesh.kumar@linux.ibm.com, anshuman.khandual@arm.com, bp@alien8.de, broonie@kernel.org, catalin.marinas@arm.com, christophe.leroy@csgroup.eu, dave.hansen@linux.intel.com, hpa@zytor.com, joey.gouly@arm.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, maz@kernel.org, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.ibm.com, npiggin@gmail.com, oliver.upton@linux.dev, shuah@kernel.org, skhan@linuxfoundation.org, szabolcs.nagy@arm.com, tglx@linutronix.de, will@kernel.org, x86@kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org Subject: [PATCH v5 12/30] arm64: re-order MTE VM_ flags Date: Thu, 22 Aug 2024 16:10:55 +0100 Message-Id: <20240822151113.1479789-13-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240822151113.1479789-1-joey.gouly@arm.com> References: <20240822151113.1479789-1-joey.gouly@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_161217_044194_A6E7AAA6 X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org VM_PKEY_BIT[012] will use VM_HIGH_ARCH_[012], move the MTE VM flags to accommodate this. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Acked-by: Catalin Marinas --- include/linux/mm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git include/linux/mm.h include/linux/mm.h index 56dc2481cc0f..39e6234e2365 100644 --- include/linux/mm.h +++ include/linux/mm.h @@ -378,8 +378,8 @@ extern unsigned int kobjsize(const void *objp); #endif #if defined(CONFIG_ARM64_MTE) -# define VM_MTE VM_HIGH_ARCH_0 /* Use Tagged memory for access control */ -# define VM_MTE_ALLOWED VM_HIGH_ARCH_1 /* Tagged memory permitted */ +# define VM_MTE VM_HIGH_ARCH_4 /* Use Tagged memory for access control */ +# define VM_MTE_ALLOWED VM_HIGH_ARCH_5 /* Tagged memory permitted */ #else # define VM_MTE VM_NONE # define VM_MTE_ALLOWED VM_NONE