a35d80
From 3322ecbfe29a16e74c4f584d661b0b8018bb4031 Mon Sep 17 00:00:00 2001
a35d80
From: Raphael Moreira Zinsly <rzinsly@linux.ibm.com>
a35d80
Date: Mon, 14 Sep 2020 11:59:24 -0300
a35d80
Subject: [PATCH] powerpc: Protect dl_powerpc_cpu_features on INIT_ARCH() [BZ
a35d80
 #26615]
a35d80
a35d80
dl_powerpc_cpu_features also needs to be protected by __GLRO to check
a35d80
for the _rtld_global_ro realocation before accessing it.
a35d80
a35d80
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
a35d80
---
a35d80
 sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h | 2 +-
a35d80
 1 file changed, 1 insertion(+), 1 deletion(-)
a35d80
a35d80
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
a35d80
index 17ddfcf528..c8fa07fadc 100644
a35d80
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
a35d80
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
a35d80
@@ -38,7 +38,7 @@
a35d80
   unsigned long int hwcap = __GLRO(dl_hwcap); 			\
a35d80
   unsigned long int __attribute__((unused)) hwcap2 = __GLRO(dl_hwcap2); \
a35d80
   bool __attribute__((unused)) use_cached_memopt =		\
a35d80
-    GLRO(dl_powerpc_cpu_features).use_cached_memopt;		\
a35d80
+    __GLRO(dl_powerpc_cpu_features.use_cached_memopt);		\
a35d80
   if (hwcap & PPC_FEATURE_ARCH_2_06)				\
a35d80
     hwcap |= PPC_FEATURE_ARCH_2_05 |				\
a35d80
 	     PPC_FEATURE_POWER5_PLUS |				\
a35d80
-- 
a35d80
2.27.0
a35d80