Re: [PATCH] aarch64: Add memory clobber to pkey_write
Adhemerval Zanella Netto <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Organization | Linaro |
| Message-ID | <[email protected]> |
On 26/08/26 09:41, Yury Khrustalev wrote: > Add memory clobber for writing to the POR_EL0 register since a change > to this register affects subsequent memory accesses. > > --- > Passes regression on aarch64. OK for trunk? > OK to backport to 2.44, 2.43, 2.42, 2.41? > > Base commit: 9c86ea03aa Should we open a bug report for this (and does it change the code generation for current wrappers)? Reviewed-by: Adhemerval Zanella <[email protected]> > > --- > sysdeps/unix/sysv/linux/aarch64/arch-pkey.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sysdeps/unix/sysv/linux/aarch64/arch-pkey.h b/sysdeps/unix/sysv/linux/aarch64/arch-pkey.h > index 7276aa0b77..662ff73df3 100644 > --- a/sysdeps/unix/sysv/linux/aarch64/arch-pkey.h > +++ b/sysdeps/unix/sysv/linux/aarch64/arch-pkey.h > @@ -47,7 +47,7 @@ pkey_read (void) > static __always_inline void > pkey_write (unsigned long value) > { > - __asm__ volatile ("msr s3_3_c10_c2_4, %0; isb" : : "r" (value)); > + __asm__ volatile ("msr s3_3_c10_c2_4, %0; isb" : : "r" (value) : "memory"); > } > > #endif /* _ARCH_PKEY_H */