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: <d00c5b01-fb69-3a83-3eae-36231c5b08e9@arm.com>
Date:   Wed, 4 Mar 2020 11:22:46 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org
Cc:     Russell King <linux@...linux.org.uk>,
        Catalin Marinas <catalin.marinas@....com>,
        Mark Salter <msalter@...hat.com>,
        Nick Hu <nickhu@...estech.com>,
        Ley Foon Tan <ley.foon.tan@...el.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Guan Xuetao <gxt@....edu.cn>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Rob Springer <rspringer@...gle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-arm-kernel@...ts.infradead.org, linux-c6x-dev@...ux-c6x.org,
        nios2-dev@...ts.rocketboards.org, linuxppc-dev@...ts.ozlabs.org,
        linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC 2/3] mm/vma: Introduce VM_ACCESS_FLAGS



On 03/03/2020 11:18 PM, Vlastimil Babka wrote:
> On 3/2/20 7:47 AM, Anshuman Khandual wrote:
>> There are many places where all basic VMA access flags (read, write, exec)
>> are initialized or checked against as a group. One such example is during
>> page fault. Existing vma_is_accessible() wrapper already creates the notion
>> of VMA accessibility as a group access permissions. Hence lets just create
>> VM_ACCESS_FLAGS (VM_READ|VM_WRITE|VM_EXEC) which will not only reduce code
>> duplication but also extend the VMA accessibility concept in general.
>>
>> Cc: Russell King <linux@...linux.org.uk>
>> CC: Catalin Marinas <catalin.marinas@....com>
>> CC: Mark Salter <msalter@...hat.com>
>> Cc: Nick Hu <nickhu@...estech.com>
>> CC: Ley Foon Tan <ley.foon.tan@...el.com>
>> Cc: Michael Ellerman <mpe@...erman.id.au>
>> Cc: Heiko Carstens <heiko.carstens@...ibm.com>
>> Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
>> Cc: Guan Xuetao <gxt@....edu.cn>
>> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
>> Cc: Thomas Gleixner <tglx@...utronix.de>
>> Cc: Rob Springer <rspringer@...gle.com>
>> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: linux-arm-kernel@...ts.infradead.org
>> Cc: linux-c6x-dev@...ux-c6x.org
>> Cc: nios2-dev@...ts.rocketboards.org
>> Cc: linuxppc-dev@...ts.ozlabs.org
>> Cc: linux-s390@...r.kernel.org
>> Cc: linux-sh@...r.kernel.org
>> Cc: devel@...verdev.osuosl.org
>> Cc: linux-mm@...ck.org
>> Cc: linux-kernel@...r.kernel.org
>> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> 
> Dunno. Such mask seems ok for testing flags, but it's a bit awkward when
> initializing flags, where it covers just one of many combinations that seem
> used. But no strong opinions, patch looks correct.

Fair enough. The fact that it covers only one of the many init combinations
used at various places, is indeed a good point. The page fault handlers does
start with VMA flags mask as VM_ACCESS_FLAGS, hence will keep them and drop
other init cases here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ