public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Protect dl_powerpc_cpu_features on INIT_ARCH()
@ 2020-09-14 14:59 Raphael Moreira Zinsly
  2020-09-22 20:48 ` [PATCH] powerpc: Protect dl_powerpc_cpu_features on INIT_ARCH() [BZ #26615] Tulio Magno Quites Machado Filho
  0 siblings, 1 reply; 2+ messages in thread
From: Raphael Moreira Zinsly @ 2020-09-14 14:59 UTC (permalink / raw)
  To: libc-alpha; +Cc: tuliom, murphyp, Raphael Moreira Zinsly

dl_powerpc_cpu_features also needs to be protected by __GLRO to check
for the _rtld_global_ro realocation before accessing it.
---
 sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
index 17ddfcf528..c8fa07fadc 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
@@ -38,7 +38,7 @@
   unsigned long int hwcap = __GLRO(dl_hwcap); 			\
   unsigned long int __attribute__((unused)) hwcap2 = __GLRO(dl_hwcap2); \
   bool __attribute__((unused)) use_cached_memopt =		\
-    GLRO(dl_powerpc_cpu_features).use_cached_memopt;		\
+    __GLRO(dl_powerpc_cpu_features.use_cached_memopt);		\
   if (hwcap & PPC_FEATURE_ARCH_2_06)				\
     hwcap |= PPC_FEATURE_ARCH_2_05 |				\
 	     PPC_FEATURE_POWER5_PLUS |				\
-- 
2.26.2


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

* Re: [PATCH] powerpc: Protect dl_powerpc_cpu_features on INIT_ARCH() [BZ #26615]
  2020-09-14 14:59 [PATCH] powerpc: Protect dl_powerpc_cpu_features on INIT_ARCH() Raphael Moreira Zinsly
@ 2020-09-22 20:48 ` Tulio Magno Quites Machado Filho
  0 siblings, 0 replies; 2+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2020-09-22 20:48 UTC (permalink / raw)
  To: Raphael Moreira Zinsly, libc-alpha

Raphael Moreira Zinsly <rzinsly@linux.ibm.com> writes:

> diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
> index 17ddfcf528..c8fa07fadc 100644
> --- a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
> +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
> @@ -38,7 +38,7 @@
>    unsigned long int hwcap = __GLRO(dl_hwcap); 			\
>    unsigned long int __attribute__((unused)) hwcap2 = __GLRO(dl_hwcap2); \
>    bool __attribute__((unused)) use_cached_memopt =		\
> -    GLRO(dl_powerpc_cpu_features).use_cached_memopt;		\
> +    __GLRO(dl_powerpc_cpu_features.use_cached_memopt);		\

Agreed.  LGTM.

This is fixing BZ #26615, which was created after you submitted this patch.
I added this information to the patch and pushed as 3322ecbfe2.

Thanks!

-- 
Tulio Magno

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

end of thread, other threads:[~2020-09-22 20:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 14:59 [PATCH] powerpc: Protect dl_powerpc_cpu_features on INIT_ARCH() Raphael Moreira Zinsly
2020-09-22 20:48 ` [PATCH] powerpc: Protect dl_powerpc_cpu_features on INIT_ARCH() [BZ #26615] Tulio Magno Quites Machado Filho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).