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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2CAAC43334 for ; Fri, 17 Jun 2022 03:29:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 148266B0071; Thu, 16 Jun 2022 23:29:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F7EE6B0073; Thu, 16 Jun 2022 23:29:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F02506B0074; Thu, 16 Jun 2022 23:29:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E1C2A6B0071 for ; Thu, 16 Jun 2022 23:29:36 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A71FE20309 for ; Fri, 17 Jun 2022 03:29:36 +0000 (UTC) X-FDA: 79586297952.01.ACE73AF Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf31.hostedemail.com (Postfix) with ESMTP id 25E1620042 for ; Fri, 17 Jun 2022 03:29:35 +0000 (UTC) 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 9897E12FC; Thu, 16 Jun 2022 20:29:35 -0700 (PDT) Received: from [192.168.0.146] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E26D33F73B; Thu, 16 Jun 2022 20:29:32 -0700 (PDT) Message-ID: <7c72a97f-d7d4-db27-faa5-fec01673cca7@arm.com> Date: Fri, 17 Jun 2022 08:59:12 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH V3 2/2] mm/mmap: Drop generic protection_map[] array Content-Language: en-US To: "hch@infradead.org" , Christophe Leroy Cc: "linux-mm@kvack.org" , Andrew Morton , "linux-kernel@vger.kernel.org" , kernel test robot , Christoph Hellwig References: <20220616040924.1022607-1-anshuman.khandual@arm.com> <20220616040924.1022607-3-anshuman.khandual@arm.com> <7cf922f4-2367-e173-0280-cb498391d9f7@csgroup.eu> From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf31.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655436576; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1tRGllVBjznun94oWw8+eORYear+M85EgTyCPAmpBGo=; b=7ZVbJjgYX41Qpde2B2dYrIK/s62WSX3ny7NfqVf8E33lsomYUHcp0q0WbUFHNI6jU0WCp3 pTtWhFcJU5AyuPr4HoGB2ZlrsvTtZiHp8sc8jMBMlNZzplWGC7uVMpRkUtphkU015i7V/3 uL2DjWjozInmmbYKljl5x4ifRjzyRBA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655436576; a=rsa-sha256; cv=none; b=FpmxJWwH6+7bFzS7YCGA5VM5RnWPxKbEZQTAoBJJlKc8J+H8lavyo+KmqWdHEIr4TbLfwI nv2H3qw7vofle1Q9dKQ0N/xxZPc61EeMuJ6o576v/g5M1uPtt5IkifaGuodYUIRTYnR7if sbUUMpNsBXEGZaprT647acpr0pt8w4Y= X-Rspam-User: X-Stat-Signature: te79s69w6e455xffddn5jxh1xkppwqkr X-Rspamd-Queue-Id: 25E1620042 Authentication-Results: imf31.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf31.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com X-Rspamd-Server: rspam05 X-HE-Tag: 1655436575-451122 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 6/16/22 11:42, hch@infradead.org wrote: > On Thu, Jun 16, 2022 at 05:45:39AM +0000, Christophe Leroy wrote: >>> +/* Note due to the way vm flags are laid out, the bits are XWR */ >>> +pgprot_t protection_map[16] = { >> >> Was const previously, now back to non const ? Maybe due to a conflict >> with linux/mm.h ? At least it should be __ro_after_init. > > Maybe we just need to duplicate vm_get_page_prot in all the > architectures and thus avoid making protection_map global in a > common header entirely. That certainly seems like the cleaner > interface. Agreed, also it does free up the platforms to provide any appropriate qualifiers for the protection_map[] array i.e __ro_after_init, const etc without impacting generic declaration used in a generic function.