This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 846746be4b8edd66be8be2c123b0072de2636e9d
Author:     Martin Storsjö <[email protected]>
AuthorDate: Thu Mar 12 14:52:29 2026 +0200
Commit:     Martin Storsjö <[email protected]>
CommitDate: Tue Mar 17 20:37:53 2026 +0000

    aarch64: Add Armv9.3-A GCS (Guarded Control Stack) support
    
    Signal that our assembly is compliant with the GCS feature, if
    the GCS feature is enabled in the compiler (available since Clang
    18 and GCC 15) - this is enabled by -mbranch-protection=standard
    with a new enough compiler.
    
    GCS doesn't require any specific modifications to the assembly
    code, but requires that all functions return to the expected call
    address (checked through a shadow stack).
---
 libavutil/aarch64/asm.S | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/libavutil/aarch64/asm.S b/libavutil/aarch64/asm.S
index d9698a3203..33807c8caa 100644
--- a/libavutil/aarch64/asm.S
+++ b/libavutil/aarch64/asm.S
@@ -255,8 +255,14 @@ DISABLE_SME2
 #   define AARCH64_VALIDATE_LINK_REGISTER
 #endif
 
+#if defined(__ARM_FEATURE_GCS_DEFAULT) && __ARM_FEATURE_GCS_DEFAULT == 1
+#define GNU_PROPERTY_AARCH64_GCS (1 << 2)
+#else
+#define GNU_PROPERTY_AARCH64_GCS 0 /* No GCS */
+#endif
+
 
-#if (GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_PAC != 0) && 
defined(__ELF__)
+#if (GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_PAC != 0 || 
GNU_PROPERTY_AARCH64_GCS != 0) && defined(__ELF__)
         .pushsection .note.gnu.property, "a"
         .balign 8
         .long 4
@@ -265,7 +271,7 @@ DISABLE_SME2
         .asciz "GNU"
         .long 0xc0000000 /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */
         .long 4
-        .long (GNU_PROPERTY_AARCH64_BTI | GNU_PROPERTY_AARCH64_PAC)
+        .long (GNU_PROPERTY_AARCH64_BTI | GNU_PROPERTY_AARCH64_PAC | 
GNU_PROPERTY_AARCH64_GCS)
         .long 0
         .popsection
 #endif

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to