Hey Mark, does the order of .cfi_startproc and endbranch matter at all, I noticed a difference between your openssl/3.1 and 3.2 patches and was just wondering, it's reversed in gcm_init_avx.
-Bryan. diff -u -p -r1.1.1.1 patch-crypto_modes_asm_ghash-x86_64_pl --- security/openssl/3.1/patches/patch-crypto_modes_asm_ghash-x86_64_pl 14 Mar 2023 18:54:42 -0000 1.1.1.1 +++ security/openssl/3.1/patches/patch-crypto_modes_asm_ghash-x86_64_pl 18 Feb 2024 22:25:50 -0000 @@ -1,7 +1,23 @@ Index: crypto/modes/asm/ghash-x86_64.pl --- crypto/modes/asm/ghash-x86_64.pl.orig +++ crypto/modes/asm/ghash-x86_64.pl -@@ -1609,6 +1609,7 @@ ___ +@@ -534,6 +534,7 @@ $code.=<<___; + .align 16 + gcm_init_clmul: + .cfi_startproc ++ endbranch + .L_init_clmul: + ___ + $code.=<<___ if ($win64); +@@ -1026,6 +1027,7 @@ $code.=<<___; + .type gcm_init_avx,\@abi-omnipotent + .align 32 + gcm_init_avx: ++ endbranch + .cfi_startproc + ___ + if ($avx) { +@@ -1609,6 +1611,7 @@ ___ } $code.=<<___; @@ -9,7 +25,7 @@ Index: crypto/modes/asm/ghash-x86_64.pl .align 64 .Lbswap_mask: .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -@@ -1662,6 +1663,7 @@ $code.=<<___; +@@ -1662,6 +1665,7 @@ $code.=<<___; .asciz "GHASH for x86_64, CRYPTOGAMS by <appro\@openssl.org>" .align 64