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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Le 23/06/2022 à 14:29, Aneesh Kumar K.V a écrit :
> Instead of high_memory use VMALLOC_START to validate that the address is
> not in the vmalloc range.
> 
> Cc: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
> Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx>
> ---
>   arch/powerpc/include/asm/page.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
> index e5f75c70eda8..256cad69e42e 100644
> --- a/arch/powerpc/include/asm/page.h
> +++ b/arch/powerpc/include/asm/page.h
> @@ -134,7 +134,7 @@ static inline bool pfn_valid(unsigned long pfn)
>   
>   #define virt_addr_valid(vaddr)	({					\
>   	unsigned long _addr = (unsigned long)vaddr;			\
> -	_addr >= PAGE_OFFSET && _addr < (unsigned long)high_memory &&	\
> +	_addr >= PAGE_OFFSET && _addr < (unsigned long)VMALLOC_START &&	\
>   	pfn_valid(virt_to_pfn(_addr));					\
>   })
>   

What about booke/64 ?

The test will be _addr >= 0xc000000000000000 && _addr < 
0x8000000000000000 so the test will be always false.

Christophe




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux