diff mbox series

AArch64: Use bitfield in cpu_features struct (BZ #32279)

Message ID PAWPR08MB8982C83A163970393E530A2683472@PAWPR08MB8982.eurprd08.prod.outlook.com
State New
Headers show
Series AArch64: Use bitfield in cpu_features struct (BZ #32279) | expand

Commit Message

Wilco Dijkstra Oct. 17, 2024, 11:59 a.m. UTC
To avoid increasing the size of the cpu_features struct, use bitfields for "sve" and 
"prefer_sve_ifuncs" fields.  Backporting this to 2.39 and older (but not 2.40) then
restores the original layout which is compatible with older dynamic linkers.
This avoids the issue reported in BZ 32279.

Passes regress, OK for backport?

---
diff mbox series

Patch

diff --git a/sysdeps/aarch64/cpu-features.h b/sysdeps/aarch64/cpu-features.h
index bc8d8422388f9cf0a06673af58b39c50dcaa3ee1..0a7a03c1c51e165384eb43d2085fc5c46e0aae21 100644
--- a/sysdeps/aarch64/cpu-features.h
+++ b/sysdeps/aarch64/cpu-features.h
@@ -69,8 +69,8 @@  struct cpu_features
   bool bti;
   /* Currently, the GLIBC memory tagging tunable only defines 8 bits.  */
   uint8_t mte_state;
-  bool sve;
-  bool prefer_sve_ifuncs;
+  bool sve : 1;			/* Bitfield to avoid changing size of struct.  */
+  bool prefer_sve_ifuncs : 1;	/* Bitfield to avoid changing size of struct.  */
   bool mops;
 };