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 C22DDC433EF for ; Thu, 7 Apr 2022 23:20:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1555B6B0072; Thu, 7 Apr 2022 19:20:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 104A96B0073; Thu, 7 Apr 2022 19:20:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F0DD76B0074; Thu, 7 Apr 2022 19:20:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0074.hostedemail.com [216.40.44.74]) by kanga.kvack.org (Postfix) with ESMTP id E151C6B0072 for ; Thu, 7 Apr 2022 19:20:37 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9436DACF4C for ; Thu, 7 Apr 2022 23:20:27 +0000 (UTC) X-FDA: 79331654094.24.958E3FE Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id F348940003 for ; Thu, 7 Apr 2022 23:20:26 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4C086612FF; Thu, 7 Apr 2022 23:20:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64848C385A0; Thu, 7 Apr 2022 23:20:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1649373625; bh=3fTd4/oB9ZoXEdf+K+L8T8ud1sgeiHXYri5q9XU2dws=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZSvawR2SP4z25+5v05hEzD/SNY3BquUg00da51rb2XpIhfun/uRj9F50//O4lmLVK mMLQ0SBSzdnOSHOJqeZeyVk3ZlzylTqp4UUO/tQPLTSgSiMH0RDrND71V5dVeKi6ET qbMbsgu4SDWZr0njwS/0ZGtXu6KbiDlG0yFJTssU= Date: Thu, 7 Apr 2022 16:20:24 -0700 From: Andrew Morton To: Anshuman Khandual Cc: linux-mm@kvack.org, Christoph Hellwig , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V4 0/7] mm/mmap: Drop arch_vm_get_page_prot() and arch_filter_pgprot() Message-Id: <20220407162024.7747ee14092d04082f13aa9d@linux-foundation.org> In-Reply-To: <20220407103251.1209606-1-anshuman.khandual@arm.com> References: <20220407103251.1209606-1-anshuman.khandual@arm.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Stat-Signature: ionkmx5u9f84ak8uztde6fykdnkr8tf4 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=ZSvawR2S; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: F348940003 X-HE-Tag: 1649373626-503753 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 Thu, 7 Apr 2022 16:02:44 +0530 Anshuman Khandual wrote: > protection_map[] is an array based construct that translates given vm_flags > combination. This array contains page protection map, which is populated by > the platform via [__S000 .. __S111] and [__P000 .. __P111] exported macros. > Primary usage for protection_map[] is for vm_get_page_prot(), which is used > to determine page protection value for a given vm_flags. vm_get_page_prot() > implementation, could again call platform overrides arch_vm_get_page_prot() > and arch_filter_pgprot(). Some platforms override protection_map[] that was > originally built with __SXXX/__PXXX with different runtime values. > > Currently there are multiple layers of abstraction i.e __SXXX/__PXXX macros > , protection_map[], arch_vm_get_page_prot() and arch_filter_pgprot() built > between the platform and generic MM, finally defining vm_get_page_prot(). > > Hence this series proposes to drop later two abstraction levels and instead > just move the responsibility of defining vm_get_page_prot() to the platform > (still utilizing generic protection_map[] array) itself making it clean and > simple. > > This first introduces ARCH_HAS_VM_GET_PAGE_PROT which enables the platforms > to define custom vm_get_page_prot(). This starts converting platforms that > define the overrides arch_filter_pgprot() or arch_vm_get_page_prot() which > enables for those constructs to be dropped off completely. > > The series has been inspired from an earlier discuss with Christoph Hellwig > > https://lore.kernel.org/all/1632712920-8171-1-git-send-email-anshuman.khandual@arm.com/ > > This series applies on 5.18-rc1 after the following patch. > > https://lore.kernel.org/all/1643004823-16441-1-git-send-email-anshuman.khandual@arm.com/ Confusing. That patch is already in 5.18-rc1. But the version which was merged (24e988c7fd1ee701e) lacked the change to arch/arm64/Kconfig. I seem to recall that this patch went through a few issues and perhaps the arm64 change was dropped. Can you please check? (It would be easier for me to track all this down if the original patch had had cc:linux-mm. Please cc linux-mm!)