[RFC 2/3] mm/vma: Introduce VM_ACCESS_FLAGS

Vlastimil Babka vbabka at suse.cz
Wed Mar 4 04:48:15 AEDT 2020


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 at armlinux.org.uk>
> CC: Catalin Marinas <catalin.marinas at arm.com>
> CC: Mark Salter <msalter at redhat.com>
> Cc: Nick Hu <nickhu at andestech.com>
> CC: Ley Foon Tan <ley.foon.tan at intel.com>
> Cc: Michael Ellerman <mpe at ellerman.id.au>
> Cc: Heiko Carstens <heiko.carstens at de.ibm.com>
> Cc: Yoshinori Sato <ysato at users.sourceforge.jp>
> Cc: Guan Xuetao <gxt at pku.edu.cn>
> Cc: Dave Hansen <dave.hansen at linux.intel.com>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Rob Springer <rspringer at google.com>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-c6x-dev at linux-c6x.org
> Cc: nios2-dev at lists.rocketboards.org
> Cc: linuxppc-dev at lists.ozlabs.org
> Cc: linux-s390 at vger.kernel.org
> Cc: linux-sh at vger.kernel.org
> Cc: devel at driverdev.osuosl.org
> Cc: linux-mm at kvack.org
> Cc: linux-kernel at vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual at arm.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.


More information about the Linuxppc-dev mailing list