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]
Date:   Fri, 24 Jun 2022 05:29:38 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Anshuman Khandual <anshuman.khandual@....com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>
CC:     "hch@...radead.org" <hch@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "openrisc@...ts.librecores.org" <openrisc@...ts.librecores.org>,
        "linux-xtensa@...ux-xtensa.org" <linux-xtensa@...ux-xtensa.org>,
        "linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
        "linux-hexagon@...r.kernel.org" <linux-hexagon@...r.kernel.org>,
        "linux-parisc@...r.kernel.org" <linux-parisc@...r.kernel.org>,
        "linux-alpha@...r.kernel.org" <linux-alpha@...r.kernel.org>,
        "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
        "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
        "linux-m68k@...ts.linux-m68k.org" <linux-m68k@...ts.linux-m68k.org>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-um@...ts.infradead.org" <linux-um@...ts.infradead.org>,
        "linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V4 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT



Le 24/06/2022 à 06:43, Anshuman Khandual a écrit :
> Now all the platforms enable ARCH_HAS_GET_PAGE_PROT. They define and export
> own vm_get_page_prot() whether custom or standard DECLARE_VM_GET_PAGE_PROT.
> Hence there is no need for default generic fallback for vm_get_page_prot().
> Just drop this fallback and also ARCH_HAS_GET_PAGE_PROT mechanism.
> 
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: linux-mm@...ck.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> ---
>   arch/alpha/Kconfig      |  1 -
>   arch/arc/Kconfig        |  1 -
>   arch/arm/Kconfig        |  1 -
>   arch/arm64/Kconfig      |  1 -
>   arch/csky/Kconfig       |  1 -
>   arch/hexagon/Kconfig    |  1 -
>   arch/ia64/Kconfig       |  1 -
>   arch/loongarch/Kconfig  |  1 -
>   arch/m68k/Kconfig       |  1 -
>   arch/microblaze/Kconfig |  1 -
>   arch/mips/Kconfig       |  1 -
>   arch/nios2/Kconfig      |  1 -
>   arch/openrisc/Kconfig   |  1 -
>   arch/parisc/Kconfig     |  1 -
>   arch/powerpc/Kconfig    |  1 -
>   arch/riscv/Kconfig      |  1 -
>   arch/s390/Kconfig       |  1 -
>   arch/sh/Kconfig         |  1 -
>   arch/sparc/Kconfig      |  1 -
>   arch/um/Kconfig         |  1 -
>   arch/x86/Kconfig        |  1 -
>   arch/xtensa/Kconfig     |  1 -
>   include/linux/mm.h      |  3 ---
>   mm/Kconfig              |  3 ---
>   mm/mmap.c               | 22 ----------------------
>   25 files changed, 50 deletions(-)
> 
> diff --git a/mm/mmap.c b/mm/mmap.c
> index 43db3bd49071..3557fe83d124 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -101,28 +101,6 @@ static void unmap_region(struct mm_struct *mm,
>    *								w: (no) no
>    *								x: (yes) yes
>    */

The above comment is not orphaned. I think it should go in linux/mm.h

> -#ifndef CONFIG_ARCH_HAS_VM_GET_PAGE_PROT
> -pgprot_t protection_map[16] __ro_after_init = {
> -	[VM_NONE]					= __P000,
> -	[VM_READ]					= __P001,
> -	[VM_WRITE]					= __P010,
> -	[VM_WRITE | VM_READ]				= __P011,
> -	[VM_EXEC]					= __P100,
> -	[VM_EXEC | VM_READ]				= __P101,
> -	[VM_EXEC | VM_WRITE]				= __P110,
> -	[VM_EXEC | VM_WRITE | VM_READ]			= __P111,
> -	[VM_SHARED]					= __S000,
> -	[VM_SHARED | VM_READ]				= __S001,
> -	[VM_SHARED | VM_WRITE]				= __S010,
> -	[VM_SHARED | VM_WRITE | VM_READ]		= __S011,
> -	[VM_SHARED | VM_EXEC]				= __S100,
> -	[VM_SHARED | VM_EXEC | VM_READ]			= __S101,
> -	[VM_SHARED | VM_EXEC | VM_WRITE]		= __S110,
> -	[VM_SHARED | VM_EXEC | VM_WRITE | VM_READ]	= __S111
> -};
> -DECLARE_VM_GET_PAGE_PROT
> -#endif	/* CONFIG_ARCH_HAS_VM_GET_PAGE_PROT */
> -
>   static pgprot_t vm_pgprot_modify(pgprot_t oldprot, unsigned long vm_flags)
>   {
>   	return pgprot_modify(oldprot, vm_get_page_prot(vm_flags));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ