Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp355289pxb; Thu, 17 Feb 2022 05:44:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDFWplHN4xq2grD8dUFEjLcnabxYf8eYU9y2VmnwdDoTeNMFvtEnvExBycE9VnBy8aGhec X-Received: by 2002:a17:90a:7f03:b0:1b8:8d90:b194 with SMTP id k3-20020a17090a7f0300b001b88d90b194mr7407481pjl.2.1645105478268; Thu, 17 Feb 2022 05:44:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645105478; cv=none; d=google.com; s=arc-20160816; b=jOwJ/ApMOJMHVot/vL6ONPurpP93a/TJzMI3RHGSl/cO/IZncJL01NmssbokQOepmB rMDEymKdvlxlW0KGXdM8Zl2vjrFWO5LUcjGIv0uyuUV1R9UqGVLPukMEZnT7S94bhsm1 AN1Lsf+PgMGxmdSmE85MB1CC7lMe8qYdYa4qHhfIOTuQ6WeuShGCXar0lUYBbZoifAEq uL/x/0huNTkSwRb29oL0hUCFnegaDz/ue3Fr3vyqxIrZ4/SXS5nq30ky1z08KGBDuKSj Yr2MdjrZRBq9Uygv+qabhQ+u5Q+MBwCC6VDHmlv1FH9n1cql7lGYz+/FQXgHV4WJsY9N xF+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=bqDM/8aXZeDU9vt1c7XREtZ1rF/TlZlqR4acDudq6Ag=; b=NovW0b1uru/h6ZMLLdICDFmLp7roKw7ueXzh/eqJjKGvAbkFJ1nCVtTW0i7PIvFS8F R8wGcy01QIjTFoZjpIUC1D9PA/as7P+Tn1Itj062KMdDmRIh8KuXuZGNFQ1sKWsyycY9 dnjZzwa6gey+qDTpBX/1agD6+q1noGPSYpQwvAlk2NZKQdNGsiQONNFWE2V+p1leHrf8 QMmynOC2AIdmngH95znUZKNz8g2a+Vnv3MBbKsQ9ENe+r7DeUvUDxUtWZJCpjmf2or4Z aRyV4bb/JdhiX/YVhCU18S/1sydGqSMeYTsczWEN3LjJqqYPIRZslM9pkyLhS4GQo7VH Ny2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g191si8627209pgc.365.2022.02.17.05.44.23; Thu, 17 Feb 2022 05:44:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238792AbiBQJq1 (ORCPT + 99 others); Thu, 17 Feb 2022 04:46:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:56564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230072AbiBQJq0 (ORCPT ); Thu, 17 Feb 2022 04:46:26 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6234C1704F; Thu, 17 Feb 2022 01:46:12 -0800 (PST) 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 13C2912FC; Thu, 17 Feb 2022 01:46:12 -0800 (PST) Received: from [10.163.49.10] (unknown [10.163.49.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 568D63F718; Thu, 17 Feb 2022 01:46:10 -0800 (PST) Subject: Re: [PATCH 00/30] mm/mmap: Drop protection_map[] and platform's __SXXX/__PXXX requirements To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Andrew Morton , linux-arch@vger.kernel.org References: <1644805853-21338-1-git-send-email-anshuman.khandual@arm.com> From: Anshuman Khandual Message-ID: <5c809720-7b6e-4791-7eb3-0b4565789f3f@arm.com> Date: Thu, 17 Feb 2022 15:16:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1644805853-21338-1-git-send-email-anshuman.khandual@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/14/22 8:00 AM, 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 all these abstraction levels and instead > just move the responsibility of defining vm_get_page_prot() to the platform > 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 > either change protection_map[] or define the overrides arch_filter_pgprot() > or arch_vm_get_page_prot() which enables for those constructs to be dropped > off completely. This series then converts remaining platforms which enables > for __SXXX/__PXXX constructs to be dropped off completely. Finally it drops > the generic vm_get_page_prot() and then ARCH_HAS_VM_GET_PAGE_PROT as every > platform now defines their own vm_get_page_prot(). > > 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.17-rc3 after the following patch. > > https://lore.kernel.org/all/1643004823-16441-1-git-send-email-anshuman.khandual@arm.com/ > > This series has been cross built for multiple platforms. > > - Anshuman > > Cc: Christoph Hellwig > Cc: Andrew Morton > Cc: linux-mm@kvack.org > Cc: linux-arch@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > > Changes in V1: > > - Add white spaces around the | operators > - Moved powerpc_vm_get_page_prot() near vm_get_page_prot() on powerpc > - Moved arm64_vm_get_page_prot() near vm_get_page_prot() on arm64 > - Moved sparc_vm_get_page_prot() near vm_get_page_prot() on sparc > - Compacted vm_get_page_prot() switch cases on all platforms > - _PAGE_CACHE040 inclusion is dependent on CPU_IS_040_OR_060 > - VM_SHARED case should return PAGE_NONE (not PAGE_COPY) on SH platform > - Reorganized VM_SHARED, VM_EXEC, VM_WRITE, VM_READ > - Dropped the last patch [RFC V1 31/31] which added macros for vm_flags combinations > https://lore.kernel.org/all/1643029028-12710-32-git-send-email-anshuman.khandual@arm.com/ Hello, Just a gentle ping. I am planning to respin the series earlier next week on v5.17-rc5 with the build failure fixes and also accommodating a review comment from Geert. But will really appreciate some more reviews/comments/ suggestions as the series changes code in every platform. Although all individual patches copy required reviewers and mailing lists, I am wondering should they all be included in the cover letter and copied for individual patches as well via cc-cover. But previously, patches with many emails copied, faced problems while being delivered to mailing lists. - Anshuman