WSL2-Linux-Kernel/arch/powerpc/mm
Christophe Leroy 541cebb51f powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000
In is_module_segment(), when VMALLOC_END is over 0xf0000000,
ALIGN(VMALLOC_END, SZ_256M) has value 0.

In that case, addr >= ALIGN(VMALLOC_END, SZ_256M) is always
true then is_module_segment() always returns false.

Use (ALIGN(VMALLOC_END, SZ_256M) - 1) which will have
value 0xffffffff and will be suitable for the comparison.

Fixes: c496433197 ("powerpc/32s: Only leave NX unset on segments used for modules")
Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Tested-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/09fc73fe9c7423c6b4cf93f93df9bb0ed8eefab5.1597994047.git.christophe.leroy@csgroup.eu
2020-08-21 23:30:25 +10:00
..
book3s32 powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000 2020-08-21 23:30:25 +10:00
book3s64 powerpc/pkeys: Fix build error with PPC_MEM_KEYS disabled 2020-08-17 23:33:00 +10:00
kasan Merge branch 'akpm' (patches from Andrew) 2020-08-07 11:39:33 -07:00
nohash Merge branch 'akpm' (patches from Andrew) 2020-08-07 11:39:33 -07:00
ptdump Merge branch 'akpm' (patches from Andrew) 2020-08-07 11:39:33 -07:00
Makefile
copro_fault.c mm: clean up the last pieces of page fault accountings 2020-08-12 10:58:04 -07:00
dma-noncoherent.c
drmem.c powerpc/drmem: Make LMB walk a bit more flexible 2020-07-29 23:47:54 +10:00
fault.c mm/powerpc: use general page fault accounting 2020-08-12 10:58:03 -07:00
highmem.c
hugetlbpage.c powerpc/hugetlb/cma: Allocate gigantic hugetlb pages using CMA 2020-07-29 21:09:37 +10:00
init-common.c
init_32.c Merge branch 'akpm' (patches from Andrew) 2020-08-07 11:39:33 -07:00
init_64.c Merge branch 'akpm' (patches from Andrew) 2020-08-07 11:39:33 -07:00
ioremap.c
ioremap_32.c
ioremap_64.c
mem.c Merge branch 'akpm' (patches from Andrew) 2020-08-07 11:39:33 -07:00
mmap.c
mmu_context.c
mmu_decl.h
numa.c Merge branch 'akpm' (patches from Andrew) 2020-08-07 11:39:33 -07:00
pgtable-frag.c powerpc/mm/radix: Fix PTE/PMD fragment count for early page table mappings 2020-07-20 22:57:56 +10:00
pgtable.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
pgtable_32.c
pgtable_64.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
slice.c