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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, 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 65C1EC43603 for ; Thu, 12 Dec 2019 10:48:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 43CA920663 for ; Thu, 12 Dec 2019 10:48:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728815AbfLLKsi (ORCPT ); Thu, 12 Dec 2019 05:48:38 -0500 Received: from foss.arm.com ([217.140.110.172]:42154 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728458AbfLLKsi (ORCPT ); Thu, 12 Dec 2019 05:48:38 -0500 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 E37C9328; Thu, 12 Dec 2019 02:48:36 -0800 (PST) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.197.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 117503F718; Thu, 12 Dec 2019 02:48:33 -0800 (PST) Date: Thu, 12 Dec 2019 10:48:32 +0000 From: Catalin Marinas To: Mark Brown Cc: Will Deacon , Paul Elliott , Peter Zijlstra , Yu-cheng Yu , Amit Kachhap , Vincenzo Frascino , Marc Zyngier , Eugene Syromiatnikov , Szabolcs Nagy , "H.J. Lu" , Andrew Jones , Kees Cook , Arnd Bergmann , Jann Horn , Richard Henderson , Kristina =?utf-8?Q?Mart=C5=A1enko?= , Thomas Gleixner , Florian Weimer , Sudakshina Das , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Dave Martin Subject: Re: [PATCH v4 03/12] mm: Reserve asm-generic prot flag 0x10 for arch use Message-ID: <20191212104831.GD18258@arrakis.emea.arm.com> References: <20191211154206.46260-1-broonie@kernel.org> <20191211154206.46260-4-broonie@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191211154206.46260-4-broonie@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 11, 2019 at 03:41:57PM +0000, Mark Brown wrote: > From: Dave Martin > > The asm-generic mman definitions are used by a few architectures > that also define an arch-specific PROT flag with value 0x10. This > currently applies to sparc and powerpc, and arm64 will soon join > in. > > To help future maintainers, document the use of this flag in the > asm-generic header too. > > Signed-off-by: Dave Martin > Signed-off-by: Mark Brown > --- > include/uapi/asm-generic/mman-common.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/uapi/asm-generic/mman-common.h b/include/uapi/asm-generic/mman-common.h > index c160a5354eb6..81442d2aaecb 100644 > --- a/include/uapi/asm-generic/mman-common.h > +++ b/include/uapi/asm-generic/mman-common.h > @@ -11,6 +11,7 @@ > #define PROT_WRITE 0x2 /* page can be written */ > #define PROT_EXEC 0x4 /* page can be executed */ > #define PROT_SEM 0x8 /* page may be used for atomic ops */ > + /* 0x10 reserved for arch-specific use */ > #define PROT_NONE 0x0 /* page can not be accessed */ > #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ > #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ Since the BTI will likely be merged before the MTE series, please consider reserving 0x20 as well. The updated patch, acked by Arnd: https://lore.kernel.org/linux-arm-kernel/20191211184027.20130-2-catalin.marinas@arm.com/ -- Catalin