Re: [PATCH] powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000

2020-08-27 Thread Michael Ellerman
On Fri, 21 Aug 2020 07:15:25 + (UTC), Christophe Leroy wrote: > In is_module_segment(), when VMALLOC_END is over 0xf000, > 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

Re: [PATCH] powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000

2020-08-21 Thread Andreas Schwab
On Aug 21 2020, Christophe Leroy wrote: > In is_module_segment(), when VMALLOC_END is over 0xf000, > 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_256

[PATCH] powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000

2020-08-21 Thread Christophe Leroy
In is_module_segment(), when VMALLOC_END is over 0xf000, 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 0x and will be