Skip to contentSkip to conversation

powerpc/uaccess: correct check for CONFIG_PPC_E500 in mask_user_address()

PATCH Applied Ethan Nelson-Moore 3 participants 3 messages Jun 15 – Jul 21

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 powerpc/uaccess: correct check for CONFIG_PPC_E500 in mask_user_address()

mask_user_address() incorrectly checks for CONFIG_E500 instead of CONFIG_PPC_E500, causing mask_user_address_isel() to not be used on E500 hardware. Fix the check to use the correct name.

Fixes 861574d51bbd ("powerpc/uaccess: Implement masked user access")

---
Changes in v2: Correct explanation and Fixes tag (thanks Christophe)

 arch/powerpc/include/asm/uaccess.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/uaccess.h +1 -1
index e98c628e3899..619270bb7380 100644
@@ -511,7 +511,7 @@ static inline void __user *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);
Signature · 1 line
2.43.0
reviewer Reviewed-by on v2 1/1
#1 lore raw

Le 16/06/2026 à 01:37, Ethan Nelson-Moore a écrit :

Quoted 8 lines

mask_user_address() incorrectly checks for CONFIG_E500 instead of CONFIG_PPC_E500, causing mask_user_address_isel() to not be used on E500 hardware. Fix the check to use the correct name.

Fixes 861574d51bbd ("powerpc/uaccess: Implement masked user access")
Quoted 19 lines

---
Changes in v2: Correct explanation and Fixes tag (thanks Christophe)

  arch/powerpc/include/asm/uaccess.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/uaccess.h +1 -1
index e98c628e3899..619270bb7380 100644
@@ -511,7 +511,7 @@ static inline void __user *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);
maintainer Applied
#2 lore raw
In reply to Ethan Nelson-Moore
Quoted 8 lines · Ethan Nelson-Moore

mask_user_address() incorrectly checks for CONFIG_E500 instead of CONFIG_PPC_E500, causing mask_user_address_isel() to not be used on E500 hardware. Fix the check to use the correct name.

Fixes 861574d51bbd ("powerpc/uaccess: Implement masked user access")

[...]

Applied to powerpc/fixes.

[1/1] powerpc/uaccess: correct check for CONFIG_PPC_E500 in mask_user_address()

      https://git.kernel.org/powerpc/c/d610d3ab18197d87618da11ec5fe8b3cebf32208

cheers