All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/uaccess: Check CONFIG_PPC_E500
@ 2026-06-24  8:15 Pengpeng Hou
  2026-06-24  8:41 ` Christophe Leroy (CS GROUP)
  0 siblings, 1 reply; 2+ messages in thread
From: Pengpeng Hou @ 2026-06-24  8:15 UTC (permalink / raw)
  To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy
  Cc: Pengpeng Hou, linuxppc-dev, linux-kernel

The powerpc CPU Kconfig defines `PPC_E500`.  There is no generated
`CONFIG_E500` symbol for `IS_ENABLED()` to test here.

`mask_user_address()` therefore checks an impossible symbol before
choosing the E500-specific masking helper.  Use `CONFIG_PPC_E500`, which
matches the actual Kconfig provider for this CPU family.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
 arch/powerpc/include/asm/uaccess.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
--- a/arch/powerpc/include/asm/uaccess.h
+++ b/arch/powerpc/include/asm/uaccess.h
@@ -537,7 +537,7 @@ static __always_inline unsigned long mask_user_address(const void __user *ptr)
 
 	if (IS_ENABLED(CONFIG_PPC64))
 		return mask_user_address_simple(ptr);
-	if (IS_ENABLED(CONFIG_E500))
+	if (IS_ENABLED(CONFIG_PPC_E500))
 		return mask_user_address_isel(ptr);
 	if (TASK_SIZE <= UL(SZ_2G) && border >= UL(SZ_2G))
 		return mask_user_address_simple(ptr);


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc/uaccess: Check CONFIG_PPC_E500
  2026-06-24  8:15 [PATCH] powerpc/uaccess: Check CONFIG_PPC_E500 Pengpeng Hou
@ 2026-06-24  8:41 ` Christophe Leroy (CS GROUP)
  0 siblings, 0 replies; 2+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-06-24  8:41 UTC (permalink / raw)
  To: Pengpeng Hou, Madhavan Srinivasan, Michael Ellerman,
	Nicholas Piggin
  Cc: linuxppc-dev, linux-kernel

Hi,

Le 24/06/2026 à 10:15, Pengpeng Hou a écrit :
> The powerpc CPU Kconfig defines `PPC_E500`.  There is no generated
> `CONFIG_E500` symbol for `IS_ENABLED()` to test here.
> 
> `mask_user_address()` therefore checks an impossible symbol before
> choosing the E500-specific masking helper.  Use `CONFIG_PPC_E500`, which
> matches the actual Kconfig provider for this CPU family.

There is already a fix in the queue waiting to be applied:

https://lore.kernel.org/all/20260615233729.29386-1-enelsonmoore@gmail.com/


> 
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
>   arch/powerpc/include/asm/uaccess.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
> --- a/arch/powerpc/include/asm/uaccess.h
> +++ b/arch/powerpc/include/asm/uaccess.h
> @@ -537,7 +537,7 @@ static __always_inline unsigned long mask_user_address(const void __user *ptr)
>   
>   	if (IS_ENABLED(CONFIG_PPC64))
>   		return mask_user_address_simple(ptr);
> -	if (IS_ENABLED(CONFIG_E500))
> +	if (IS_ENABLED(CONFIG_PPC_E500))
>   		return mask_user_address_isel(ptr);
>   	if (TASK_SIZE <= UL(SZ_2G) && border >= UL(SZ_2G))
>   		return mask_user_address_simple(ptr);
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-24  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-24  8:15 [PATCH] powerpc/uaccess: Check CONFIG_PPC_E500 Pengpeng Hou
2026-06-24  8:41 ` Christophe Leroy (CS GROUP)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.