Re: [PATCH V7 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-07-11 Thread Anshuman Khandual
On 7/12/22 01:44, Andrew Morton wrote: > On Mon, 11 Jul 2022 12:35:34 +0530 Anshuman Khandual > wrote: > >> This series drops __SXXX/__PXXX macros from across platforms in the tree. > > I've updated mm-unstable to this version, thanks. I skipped the added-to-mm > emails to avoid wearing out

Re: linux-next: Tree for Jul 11 (uml)

2022-07-11 Thread Randy Dunlap
On 7/11/22 04:12, Stephen Rothwell wrote: > Hi all, > > Changes since 20220708: > Since last week, building uml for i386 has had build warnings on allnoconfig, defconfig, and tinyconfig: In file included from ../arch/um/include/asm/processor-generic.h:13, from ../arch/x86/u

Re: [PATCH V7 15/26] nios2/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Dinh Nguyen
On 7/11/22 02:05, Anshuman Khandual wrote: This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dr

Re: [PATCH V7 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-07-11 Thread Andrew Morton
On Mon, 11 Jul 2022 12:35:34 +0530 Anshuman Khandual wrote: > This series drops __SXXX/__PXXX macros from across platforms in the tree. I've updated mm-unstable to this version, thanks. I skipped the added-to-mm emails to avoid wearing out people's inboxes. Reissuing a 26-patch series N times

[PATCH V7 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
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:

[PATCH V7 25/26] sh/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Yoshinori

[PATCH V7 24/26] um/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Jeff Dike

[PATCH V7 23/26] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Russell K

[PATCH V7 22/26] arc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Vineet Gu

[PATCH V7 21/26] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Thomas Bo

[PATCH V7 20/26] mips/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Thomas Bo

[PATCH V7 19/26] ia64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: linux-i..

[PATCH V7 18/26] s390/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Heiko Car

[PATCH V7 17/26] csky/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Geert Uyt

[PATCH V7 16/26] riscv/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Paul Walm

[PATCH V7 15/26] nios2/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Dinh Nguy

[PATCH V7 14/26] alpha/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Richard H

[PATCH V7 13/26] parisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: "James E.

[PATCH V7 12/26] hexagon/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Brian Cai

[PATCH V7 11/26] xtensa/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Chris Zan

[PATCH V7 10/26] openrisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Jonas Bon

[PATCH V7 09/26] loongarch/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Huacai Ch

[PATCH V7 08/26] microblaze/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Michal Si

[PATCH V7 07/26] mm/mmap: Build protect protection_map[] with ARCH_HAS_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
Now that protection_map[] has been moved inside those platforms that enable ARCH_HAS_VM_GET_PAGE_PROT. Hence generic protection_map[] array now can be protected with CONFIG_ARCH_HAS_VM_GET_PAGE_PROT intead of __P000. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Review

[PATCH V7 06/26] x86/mm: Move protection_map[] inside the platform

2022-07-11 Thread Anshuman Khandual
This moves protection_map[] inside the platform and makes it a static. This also defines a helper function add_encrypt_protection_map() that can update the protection_map[] array with pgprot_encrypted(). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: x...@kernel.org Cc: linux-ker...@vger.kernel.org Rev

[PATCH V7 05/26] arm64/mm: Move protection_map[] inside the platform

2022-07-11 Thread Anshuman Khandual
This moves protection_map[] inside the platform and makes it a static. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/pgtable-prot.h | 18 ---

[PATCH V7 04/26] sparc/mm: Move protection_map[] inside the platform

2022-07-11 Thread Anshuman Khandual
This moves protection_map[] inside the platform and while here, also enable ARCH_HAS_VM_GET_PAGE_PROT on 32 bit platforms via DECLARE_VM_GET_PAGE_PROT. Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Sam Ravnborg Signed-off-by: Anshuman Khandual

[PATCH V7 03/26] powerpc/mm: Move protection_map[] inside the platform

2022-07-11 Thread Anshuman Khandual
This moves protection_map[] inside the platform and while here, also enable ARCH_HAS_VM_GET_PAGE_PROT on 32 bit and nohash 64 (aka book3e/64) platforms via DECLARE_VM_GET_PAGE_PROT. Cc: Michael Ellerman Cc: Paul Mackerras Cc: Nicholas Piggin Cc: linuxppc-...@lists.ozlabs.org Cc: linux-ker...@vg

[PATCH V7 02/26] mm/mmap: Define DECLARE_VM_GET_PAGE_PROT

2022-07-11 Thread Anshuman Khandual
This just converts the generic vm_get_page_prot() implementation into a new macro i.e DECLARE_VM_GET_PAGE_PROT which later can be used across platforms when enabling them with ARCH_HAS_VM_GET_PAGE_PROT. This does not create any functional change. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux

[PATCH V7 01/26] mm/mmap: Build protect protection_map[] with __P000

2022-07-11 Thread Anshuman Khandual
Build protect generic protection_map[] array with __P000, so that it can be moved inside all the platforms one after the other. Otherwise there will be build failures during this process. CONFIG_ARCH_HAS_VM_GET_PAGE_PROT cannot be used for this purpose as only certain platforms enable this config n

[PATCH V7 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-07-11 Thread Anshuman Khandual
__SXXX/__PXXX macros is an unnecessary abstraction layer in creating the generic protection_map[] array which is used for vm_get_page_prot(). This abstraction layer can be avoided, if the platforms just define the array protection_map[] for all possible vm_flags access permission combinations and a