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

2022-06-23 Thread Anshuman Khandual
On 6/24/22 10:52, Christophe Leroy wrote: > > > Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : >> protection_map[] has already been moved inside those platforms which enable > > Usually "already" means before your series. > > Your series is the one that moves protection_map[] so I would

Re: [PATCH V4 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-06-23 Thread Christophe Leroy
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

Re: [PATCH V4 02/26] mm/mmap: Define DECLARE_VM_GET_PAGE_PROT

2022-06-23 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > 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 >

Re: [PATCH V4 08/26] microblaze/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-23 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > 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

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

2022-06-23 Thread Anshuman Khandual
On 6/24/22 10:48, Christophe Leroy wrote: > > > Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : >> 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. > > Not only 32 bit platforms, also

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

2022-06-23 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > protection_map[] has already been moved inside those platforms which enable Usually "already" means before your series. Your series is the one that moves protection_map[] so I would have just said "Now that protection_map[] has been moved

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

2022-06-23 Thread Christoph Hellwig
On Fri, Jun 24, 2022 at 10:50:33AM +0530, Anshuman Khandual wrote: > > On most architectures this should be const now, only very few ever > > modify it. > > Will make it a 'static const pgprot_t protection_map[16] __ro_after_init' > on platforms that do not change the protection_map[] even during

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

2022-06-23 Thread Anshuman Khandual
On 6/24/22 10:42, Christoph Hellwig wrote: > On Fri, Jun 24, 2022 at 10:13:13AM +0530, Anshuman Khandual wrote: >> vm_get_page_prot(), in order for it to be reused on platforms that do not >> require custom implementation. Finally, ARCH_HAS_VM_GET_PAGE_PROT can just >> be dropped, as all

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

2022-06-23 Thread Christophe Leroy
Le 24/06/2022 à 06:43, Anshuman Khandual a écrit : > 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. Not only 32 bit platforms, also nohash 64 (aka book3e/64) > > Cc: Michael Ellerman >

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

2022-06-23 Thread Christoph Hellwig
On Fri, Jun 24, 2022 at 10:13:13AM +0530, Anshuman Khandual wrote: > vm_get_page_prot(), in order for it to be reused on platforms that do not > require custom implementation. Finally, ARCH_HAS_VM_GET_PAGE_PROT can just > be dropped, as all platforms now define and export vm_get_page_prot(), via >

Re: [PATCH V4 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-06-23 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH V4 16/26] riscv/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-23 Thread Christoph Hellwig
On Fri, Jun 24, 2022 at 10:13:29AM +0530, Anshuman Khandual wrote: index d466ec670e1f..f976580500b1 100644 > --- a/arch/riscv/mm/init.c > +++ b/arch/riscv/mm/init.c > @@ -288,6 +288,26 @@ static pmd_t __maybe_unused early_dtb_pmd[PTRS_PER_PMD] > __initdata __aligned(PAG > #define early_pg_dir

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

2022-06-23 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH V4 02/26] mm/mmap: Define DECLARE_VM_GET_PAGE_PROT

2022-06-23 Thread Christoph Hellwig
On Fri, Jun 24, 2022 at 10:13:15AM +0530, Anshuman Khandual wrote: > 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

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

2022-06-23 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

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

2022-06-23 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.

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

2022-06-23 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:

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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:

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

[PATCH V4 11/26] extensa/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 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

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

2022-06-23 Thread Anshuman Khandual
protection_map[] has already been moved inside those platforms which 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

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

2022-06-23 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

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

2022-06-23 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 Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/pgtable-prot.h | 18 --

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

2022-06-23 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 Signed-off-by: Anshuman Khandual --- arch/sparc/Kconfig

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

2022-06-23 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: Michael Ellerman Cc: Paul Mackerras Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-ker...@vger.kernel.org Signed-off-by:

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

2022-06-23 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:

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

2022-06-23 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

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

2022-06-23 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

Re: [PATCH v3 0/5] of: add of_property_alloc/free() and of_node_alloc()

2022-06-23 Thread Frank Rowand
Sorry for the lack of response, it's been a busy week. I will get to this soon. -Frank On 6/20/22 06:41, Clément Léger wrote: > In order to be able to create new nodes and properties dynamically from > drivers, add of_property_alloc/free() and of_node_alloc(). These > functions can be used to

Re: [PATCH RFC] drivers/usb/ehci-fsl: Fix interrupt setup in host mode.

2022-06-23 Thread Michael Ellerman
Darren Stevens writes: > In patch a1a2b7125e1079 (Drop static setup of IRQ resource from DT > core) we stopped platform_get_resource() from returning the IRQ, as all > drivers were supposed to have switched to platform_get_irq() > Unfortunately the Freescale EHCI driver in host mode got missed.

Re: [PATCH] powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers

2022-06-23 Thread Michael Ellerman
Pali Rohár writes: > CZ.NIC Turris 1.0 and 1.1 are open source routers, they have dual-core > PowerPC Freescale P2020 CPU and are based on Freescale P2020RDB-PC-A board. > Hardware design is fully open source, all firmware and hardware design > files are available at Turris project website: > >

Re: [PATCH 3/3] powerpc/mm: Use VMALLOC_START to validate addr

2022-06-23 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > Instead of high_memory use VMALLOC_START to validate that the address is > not in the vmalloc range. > > Cc: Kefeng Wang > Cc: Christophe Leroy > Signed-off-by: Aneesh Kumar K.V Isn't this really the fix for ffa0b64e3be5 ("powerpc: Fix virt_addr_valid() for 64-bit

Re: [PATCH] kexec: replace crash_mem_range with range

2022-06-23 Thread Baoquan He
Hi, On 06/15/22 at 07:37pm, Li Chen wrote: > Hi Baoquan, > > On Wed, 15 Jun 2022 19:03:53 -0700 Baoquan He wrote > > > On 06/14/22 at 10:04pm, Li Chen wrote: > > > From: Li Chen > > > > > > We already have struct range, so just use it. > > > > Looks good, have you tested

[PATCH] powerpc/prom_init: Fix kernel config grep

2022-06-23 Thread Liam Howlett
When searching for config options, use the KCONFIG shell variable so that builds using non-standard config locations work. Signed-off-by: Liam R. Howlett --- arch/powerpc/kernel/prom_init_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] crypto: vmx - drop unexpected word 'for' in comments

2022-06-23 Thread Jiang Jian
there is an unexpected word 'for' in the comments that need to be dropped file - drivers/crypto/vmx/ghashp8-ppc.pl line - 19 "# GHASH for for PowerISA v2.07." changed to: "# GHASH for PowerISA v2.07." Signed-off-by: Jiang Jian --- drivers/crypto/vmx/ghashp8-ppc.pl | 2 +- 1 file changed, 1

[PATCH] KVM: Fix spelling mistake

2022-06-23 Thread Zhang Jiaming
Change 'subsquent' to 'subsequent'. Change 'accross' to 'across'. Signed-off-by: Zhang Jiaming --- arch/powerpc/kvm/book3s_xive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c index

[PATCH] powerpc/eeh: drop unexpected word 'for' in comments

2022-06-23 Thread Jiang Jian
there is an unexpected word 'for' in the comments that need to be dropped file - arch/powerpc/kernel/eeh_driver.c line - 753 * presence state. This might happen for for PCIe slots if the PE containing changed to: * presence state. This might happen for PCIe slots if the PE containing

[PATCH] powerpc/64s: drop unexpected word 'and' in the comments

2022-06-23 Thread Jiang Jian
there is an unexpected word 'and' in the comments that need to be dropped file: arch/powerpc/kernel/exceptions-64s.S line: 2782 * - If it was a decrementer interrupt, we bump the dec to max and and return. changed to: * - If it was a decrementer interrupt, we bump the dec to max and return.

[PATCH] powerpc/ptrace: drop unexpected word 'and' in the comments

2022-06-23 Thread Jiang Jian
there is an unexpected word 'and' in the comments that need to be dropped file & line: arch/powerpc/kernel/ptrace/ptrace-vsx.c:74: * Currently to set and and get all the vsx state, you need to call changed to: * Currently to set and get all the vsx state, you need to call Signed-off-by: Jiang

[PATCH] cxl: drop unexpected word "the" in the comments

2022-06-23 Thread Jiang Jian
there is an unexpected word "the" in the comments that need to be dropped file: drivers/misc/cxl/cxl.h line: 1107 +/* check if the given pci_dev is on the the cxl vphb bus */ changed to +/* check if the given pci_dev is on the cxl vphb bus */ Signed-off-by: Jiang Jian ---

[PATCH] crypto: nx - drop unexpected word "the"

2022-06-23 Thread Jiang Jian
there is an unexpected word "the" in the comments that need to be dropped >- * The DDE is setup with the the DDE count, byte count, and address of >+ * The DDE is setup with the DDE count, byte count, and address of Signed-off-by: Jiang Jian --- drivers/crypto/nx/nx-common-powernv.c | 2 +- 1

[linux-next:master] BUILD REGRESSION 08897940f458ee55416cf80ab13d2d8b9f20038e

2022-06-23 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 08897940f458ee55416cf80ab13d2d8b9f20038e Add linux-next specific files for 20220623 Error/Warning reports: https://lore.kernel.org/linux-mm/202206212029.yr5m7cd3-...@intel.com https

Re: [PATCH] powerpc/xive/spapr: correct bitmap allocation size

2022-06-23 Thread Cédric Le Goater
On 6/23/22 20:25, Nathan Lynch wrote: kasan detects access beyond the end of the xibm->bitmap allocation: BUG: KASAN: slab-out-of-bounds in _find_first_zero_bit+0x40/0x140 Read of size 8 at addr c0001d1d0118 by task swapper/0/1 CPU: 0 PID: 1 Comm: swapper/0 Not tainted

[PATCH] powerpc/xive/spapr: correct bitmap allocation size

2022-06-23 Thread Nathan Lynch
kasan detects access beyond the end of the xibm->bitmap allocation: BUG: KASAN: slab-out-of-bounds in _find_first_zero_bit+0x40/0x140 Read of size 8 at addr c0001d1d0118 by task swapper/0/1 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.19.0-rc2-1-g90df023b36dd #28 Call Trace:

Re: [PATCH v2 4/4] pseries/mobility: Set NMI watchdog factor during LPM

2022-06-23 Thread Nathan Lynch
Laurent Dufour writes: > diff --git a/arch/powerpc/platforms/pseries/mobility.c > b/arch/powerpc/platforms/pseries/mobility.c > index 179bbd4ae881..4284ceaf9060 100644 > --- a/arch/powerpc/platforms/pseries/mobility.c > +++ b/arch/powerpc/platforms/pseries/mobility.c > @@ -48,6 +48,39 @@ struct

Re: [PATCH v4 2/2] PCI/DPC: Disable DPC service when link is in L2/L3 ready, L2 and L3 state

2022-06-23 Thread Bjorn Helgaas
On Tue, Jun 21, 2022 at 10:27:31AM +0800, Kai-Heng Feng wrote: > On Mon, Apr 18, 2022 at 10:41 AM Sathyanarayanan Kuppuswamy > wrote: > > On 4/8/22 8:31 AM, Kai-Heng Feng wrote: > > > On Intel Alder Lake platforms, Thunderbolt entering D3cold can cause > > > some errors reported by AER: > > > [

Re: [PATCH] powerpc/64e: Rewrite p4d_populate() as a static inline function

2022-06-23 Thread Mike Rapoport
On Thu, Jun 23, 2022 at 10:56:57AM +0200, Christophe Leroy wrote: > Rewrite p4d_populate() as a static inline function instead of > a macro. > > This change allows typechecking and would have helped detecting > a recently found bug in map_kernel_page(). > > Cc: Mike Rapoport > Signed-off-by:

Re: [PATCH] powerpc/book3e: Fix PUD allocation size in map_kernel_page()

2022-06-23 Thread Mike Rapoport
On Thu, Jun 23, 2022 at 10:56:17AM +0200, Christophe Leroy wrote: > Commit 2fb4706057bc ("powerpc: add support for folded p4d page tables") > erroneously changed PUD setup to a mix of PMD and PUD. Fix it. > > While at it, use PTE_TABLE_SIZE instead of PAGE_SIZE for PTE tables > in order to avoid

Re: [PATCH v2 2/3] scsi: BusLogic remove bus_to_virt

2022-06-23 Thread Arnd Bergmann
On Tue, Jun 21, 2022 at 11:56 PM Khalid Aziz wrote: > > while ((comp_code = next_inbox->comp_code) != BLOGIC_INBOX_FREE) { > > - /* > > -We are only allowed to do this because we limit our > > -architectures we run on to machines where

Re: [RFC PATCH v2 2/3] fs: define a firmware security filesystem named fwsecurityfs

2022-06-23 Thread James Bottomley
On Thu, 2022-06-23 at 10:54 +0200, Greg Kroah-Hartman wrote: [...] > > diff --git a/fs/fwsecurityfs/inode.c b/fs/fwsecurityfs/inode.c > > new file mode 100644 > > index ..5d06dc0de059 > > --- /dev/null > > +++ b/fs/fwsecurityfs/inode.c > > @@ -0,0 +1,159 @@ > > +//

[PATCH 2/2] powerpc/numa: Return the first online node if device tree mapping returns a not online node

2022-06-23 Thread Aneesh Kumar K.V
While building the cpu_to_node map make sure we always use the online node to build the mapping table. In general this should not be an issue because the kernel use similar lookup mechanism (vphn_get_nid()) to mark nodes online (setup_node_data()). Hence NUMA nodes we find during lookup in

[PATCH 1/2] powerpc/numa: Return the first online node instead of 0

2022-06-23 Thread Aneesh Kumar K.V
If early cpu to node mapping finds an invalid node id, return the first online node instead of node 0. With commit e75130f20b1f ("powerpc/numa: Offline memoryless cpuless node 0") the kernel marks node 0 offline in certain scenarios. Signed-off-by: Aneesh Kumar K.V ---

[PATCH 3/3] powerpc/mm: Use VMALLOC_START to validate addr

2022-06-23 Thread Aneesh Kumar K.V
Instead of high_memory use VMALLOC_START to validate that the address is not in the vmalloc range. Cc: Kefeng Wang Cc: Christophe Leroy Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/3] powerpc/memhotplug: Add add_pages override for PPC

2022-06-23 Thread Aneesh Kumar K.V
With commit ffa0b64e3be5 ("powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit") the kernel now validate the addr against high_memory value. This results in the below BUG_ON with dax pfns. [ 635.798741][T26531] kernel BUG at mm/page_alloc.c:5521! 1:mon> e cpu 0x1: Vector: 700 (Program

[PATCH 2/3] powerpc/mm: Update max/min_low_pfn in the same function

2022-06-23 Thread Aneesh Kumar K.V
For both CONFIG_NUMA enabled/disabled use mem_topology_setup to update max/min_low_pfn. This also add min_low_pfn update to CONFIG_NUMA which was initialized to zero before. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH] powerpc/powermac: Remove empty function note_scsi_host()

2022-06-23 Thread Christophe Leroy
note_scsi_host() has been an empty function since commit 6ee0d9f744d4 ("[POWERPC] Remove unused old code from powermac setup code"). Remove it. Reported-by: kernel test robot Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/setup.h| 1 -

[PATCH] powerpc/64e: Rewrite p4d_populate() as a static inline function

2022-06-23 Thread Christophe Leroy
Rewrite p4d_populate() as a static inline function instead of a macro. This change allows typechecking and would have helped detecting a recently found bug in map_kernel_page(). Cc: Mike Rapoport Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/64/pgalloc.h | 5 - 1

[PATCH] powerpc/book3e: Fix PUD allocation size in map_kernel_page()

2022-06-23 Thread Christophe Leroy
Commit 2fb4706057bc ("powerpc: add support for folded p4d page tables") erroneously changed PUD setup to a mix of PMD and PUD. Fix it. While at it, use PTE_TABLE_SIZE instead of PAGE_SIZE for PTE tables in order to avoid any confusion. Fixes: 2fb4706057bc ("powerpc: add support for folded p4d

Re: [RFC PATCH v2 2/3] fs: define a firmware security filesystem named fwsecurityfs

2022-06-23 Thread Greg Kroah-Hartman
On Wed, Jun 22, 2022 at 05:56:47PM -0400, Nayna Jain wrote: > securityfs is meant for linux security subsystems to expose policies/logs > or any other information. However, there are various firmware security > features which expose their variables for user management via kernel. > There is

Re: [PATCH v6 32/33] arm64: irq-gic: Replace unreachable() with -EINVAL

2022-06-23 Thread Marc Zyngier
On 2022-06-23 02:49, Chen Zhongjin wrote: Using unreachable() at default of switch generates an extra branch at end of the function, and compiler won't generate a ret to close this branch because it knows it's unreachable. If there's no instruction in this branch, compiler will generate a NOP,