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] [day] [month] [year] [list]
Message-ID: <9051a597-0229-aaf2-9aad-42509b4f621d@arm.com>
Date:   Wed, 29 Sep 2021 08:27:46 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     linux-mm@...ck.org,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-mips@...r.kernel.org, sparclinux@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/mmap: Define index macros for protection_map[]



On 9/28/21 10:12 AM, Christoph Hellwig wrote:
> On Tue, Sep 28, 2021 at 08:24:43AM +0530, Anshuman Khandual wrote:
>>> simple switch statement provided by each architecture.  See the below
>>> WIP which just works for x86 and without pagetable debugging for where I
>>> think we should be going.
>>
>> Sure, this will work as well but all platforms need to be changed at once.
>> Is there any platform that would not subscribe ARCH_HAS_GET_PAGE_PROT and
>> export its own vm_get_page_prot() ? AFAICS all platforms are required to
>> export __PXXX and __SXXX elements currently.
>>
>> This seems to be a better idea than the current proposal. Probably all the
>> vm_flags combinations, which will be used in those switch statements can be
>> converted into macros just to improve readability. Are you planning to send
>> this as a proper patch soon ?
> 
> This was just a quŃ–ck WIP patch.  If you have some spare time to tackle
> it for real I'd sugget the following approach:

Sure, will try and get this working.

> 
>  1) Remove the direct references to protection_map in debug_vm_pgtable.c
>  2) add the ARCH_HAS_GET_PAGE_PROT symbol that lets architectures
>     provide vm_get_page_prot itself and not define protection_map at all
>     in this case
>  3) convert all architectures that touch protection_map to provide
>     vm_get_page_prot themselves
>  4) mark protection_map static
>  5) convert all architectures that provide arch_filter_pgprot and/or
>     arch_vm_get_page_prot to provide vm_get_page_prot directly and
>     remove those hooks
>  6) remove the __S???/__P??? macros and the generic vm_get_page_prot
>     after providing an arch implementation for every architecture.
>     This can maybe simplified with a new generic version that directly
>     looks at PAGE_* macros, but that will need further investigation
>     first.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ