Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3991787pxb; Tue, 25 Jan 2022 00:52:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2oCCFZg7l8VLRYHT5RQZcFYS98PtvQuQ2qjXUh8BVmAKj13Fag9/AJq6roVMaWql9xfGJ X-Received: by 2002:a17:902:c102:b0:14b:7fc:2660 with SMTP id 2-20020a170902c10200b0014b07fc2660mr17530864pli.92.1643100755326; Tue, 25 Jan 2022 00:52:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643100755; cv=none; d=google.com; s=arc-20160816; b=YmGbORxlU4Aw1/egbWgPV3hTRrKKe0gjw+NOWw9oVjnfg6F7Gs5aaF6EWUrUxiSePU HDGFpZCGZ789umQ5ucVF30dfib2H5PBtLn0cqXM0+2jXRM6+tBlfIC0dZYCXbxW1ZiDa iEY1t8puB3QZAu//Fjp7zl7LFMhpFzQAV0fXEirGpedBikahuk3F3QrFoTKxpDUjb/11 LoncbSRhNqd0DZPPpcfoVxzeOM4cots5ZoNvMH7Wk9WcTbI0DGtMdmRNidSP23ZmulwO K2Qzm6ikOmc9CuWK/kKgFe3g5Clyc8r+/xQ2ATBrgZUv/7xGkmlZ3O0I74dowdTsgIUg yv4w== 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=F4fF91LuTT5wq4wKG03AU3VS/nsn7scy3ZUF8NSOmYg=; b=a4++oU/C/szeHJcAoUAfXCoDSebB3z/1d0eYJ5i29mvN2IaYetakwePtcfESGOTNSD /rgf9/86p5TUYLpK6HFsdFgYzuewNGVHtKpJygxd23KkFJoNyCB/MZlcHRX9BeG8MUdl XXFCpa2gYQKvFCX8nZYsOliLqKJssdYOpV9JJe0tULzoe/M3dpjQR6ANf6V+Czeq/huP 5/mrAQ+Qns/GG5fNo82Cyo1NXG/9Ysn0MByoG2c25Eh/6jWc5XyqQ2UtFPAYgWBJNpbh RzPUH+xYIJYs0/sDqm7TXLB51VrBSD3uyvlLhfppZhNODdFGvylfX957nAFjaktE9N3O xtdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si14656863plr.271.2022.01.25.00.52.21; Tue, 25 Jan 2022 00:52:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S246050AbiAYEpH (ORCPT + 99 others); Mon, 24 Jan 2022 23:45:07 -0500 Received: from foss.arm.com ([217.140.110.172]:39414 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238766AbiAYDgp (ORCPT ); Mon, 24 Jan 2022 22:36:45 -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 18A0B6D; Mon, 24 Jan 2022 19:36:43 -0800 (PST) Received: from [10.163.42.113] (unknown [10.163.42.113]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6748F3F766; Mon, 24 Jan 2022 19:36:40 -0800 (PST) Subject: Re: [RFC V1 09/31] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT To: "Russell King (Oracle)" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, hch@infradead.org, akpm@linux-foundation.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org References: <1643029028-12710-1-git-send-email-anshuman.khandual@arm.com> <1643029028-12710-10-git-send-email-anshuman.khandual@arm.com> From: Anshuman Khandual Message-ID: <3bab7cde-f394-3e51-57a1-32be271762ae@arm.com> Date: Tue, 25 Jan 2022 09:06:46 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/24/22 10:36 PM, Russell King (Oracle) wrote: > On Mon, Jan 24, 2022 at 06:26:46PM +0530, Anshuman Khandual wrote: >> This defines and exports a platform specific custom vm_get_page_prot() via >> subscribing ARCH_HAS_VM_GET_PAGE_PROT. Subsequently all __SXXX and __PXXX >> macros can be dropped which are no longer needed. > > What is the fundamental advantage of this approach? > Remove multiple 'core MM <--> platform' abstraction layers to map vm_flags access permission combination into page protection. From the cover letter .. ---------- 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. ----------