lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c809720-7b6e-4791-7eb3-0b4565789f3f@arm.com>
Date:   Thu, 17 Feb 2022 15:16:07 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     linux-mm@...ck.org
Cc:     linux-kernel@...r.kernel.org,
        Christoph Hellwig <hch@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-arch@...r.kernel.org
Subject: Re: [PATCH 00/30] mm/mmap: Drop protection_map[] and platform's
 __SXXX/__PXXX requirements



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 <hch@...radead.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: linux-mm@...ck.org
> Cc: linux-arch@...r.kernel.org
> Cc: linux-kernel@...r.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ