[v4,01/22] aarch64: Add HWCAP_GCS

Message ID 20241129163721.2385847-2-yury.khrustalev@arm.com
State Superseded
Delegated to: Carlos O'Donell
Headers
Series aarch64: Add support for Guarded Control Stack extension |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Build passed

Commit Message

Yury Khrustalev Nov. 29, 2024, 4:37 p.m. UTC
  From: Szabolcs Nagy <szabolcs.nagy@arm.com>

Use upper 32 bits of HWCAP.
---
 sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Carlos O'Donell Dec. 2, 2024, 9:21 p.m. UTC | #1
On 11/29/24 11:37 AM, Yury Khrustalev wrote:
> From: Szabolcs Nagy <szabolcs.nagy@arm.com>
> 
> Use upper 32 bits of HWCAP.

This can't go in until a Linux kernel is released with this constant
since this is bits/hwcap.h and is included in sys/auxv.h and would
make the constant visible to the users.

You use HWCAP_GCS internally in a couple of places, so you could
put this into another header temporarily to support building
glibc without exposing the constant in the release.

> ---
>  sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h b/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
> index 2fa158fcc0..47836eb414 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
> +++ b/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
> @@ -54,6 +54,7 @@
>  #define HWCAP_SB		(1 << 29)
>  #define HWCAP_PACA		(1 << 30)
>  #define HWCAP_PACG		(1UL << 31)
> +#define HWCAP_GCS		(1UL << 32)
>  
>  #define HWCAP2_DCPODP		(1 << 0)
>  #define HWCAP2_SVE2		(1 << 1)

Cheers,
Carlos.
  

Patch

diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h b/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
index 2fa158fcc0..47836eb414 100644
--- a/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
+++ b/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
@@ -54,6 +54,7 @@ 
 #define HWCAP_SB		(1 << 29)
 #define HWCAP_PACA		(1 << 30)
 #define HWCAP_PACG		(1UL << 31)
+#define HWCAP_GCS		(1UL << 32)
 
 #define HWCAP2_DCPODP		(1 << 0)
 #define HWCAP2_SVE2		(1 << 1)