Skip to content

Commit 90ba19e

Browse files
authored
Do no use .cfi_negate_ra_state within the assembly on Arm64
Compiling openzfs on aarch64 with gcc-8 and gcc-9 is failing currently. See issue #14965 for deeper context. On platforms without pointer authentication, .cfi_negate_ra_state can be defined to a no-op: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/aarch64-tdep.c#l1413 I have tested this on Arm64 FreeBSD 13.2 and AlmaLinux-8. Reviewed-by: Andrew Turner <andrew.turner4@arm.com> Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de> Closes #14965 Closes #15784
1 parent c6da985 commit 90ba19e

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S

+11-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@
3232
*/
3333

3434
#if defined(__aarch64__)
35+
36+
/* make gcc <= 9 happy */
37+
#if LD_VERSION >= 233010000
38+
#define CFI_NEGATE_RA_STATE .cfi_negate_ra_state
39+
#else
40+
#define CFI_NEGATE_RA_STATE
41+
#endif
42+
3543
.text
3644
.section .note.gnu.property,"a",@note
3745
.p2align 3
@@ -51,7 +59,7 @@
5159
zfs_blake3_compress_in_place_sse2:
5260
.cfi_startproc
5361
hint #25
54-
.cfi_negate_ra_state
62+
CFI_NEGATE_RA_STATE
5563
sub sp, sp, #96
5664
stp x29, x30, [sp, #64]
5765
add x29, sp, #64
@@ -555,7 +563,7 @@ compress_pre:
555563
zfs_blake3_compress_xof_sse2:
556564
.cfi_startproc
557565
hint #25
558-
.cfi_negate_ra_state
566+
CFI_NEGATE_RA_STATE
559567
sub sp, sp, #96
560568
stp x29, x30, [sp, #64]
561569
add x29, sp, #64
@@ -608,7 +616,7 @@ zfs_blake3_compress_xof_sse2:
608616
zfs_blake3_hash_many_sse2:
609617
.cfi_startproc
610618
hint #25
611-
.cfi_negate_ra_state
619+
CFI_NEGATE_RA_STATE
612620
stp d15, d14, [sp, #-160]!
613621
stp d13, d12, [sp, #16]
614622
stp d11, d10, [sp, #32]

module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S

+10-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@
3232
*/
3333

3434
#if defined(__aarch64__)
35+
36+
/* make gcc <= 9 happy */
37+
#if LD_VERSION >= 233010000
38+
#define CFI_NEGATE_RA_STATE .cfi_negate_ra_state
39+
#else
40+
#define CFI_NEGATE_RA_STATE
41+
#endif
42+
3543
.text
3644
.section .note.gnu.property,"a",@note
3745
.p2align 3
@@ -51,7 +59,7 @@
5159
zfs_blake3_compress_in_place_sse41:
5260
.cfi_startproc
5361
hint #25
54-
.cfi_negate_ra_state
62+
CFI_NEGATE_RA_STATE
5563
sub sp, sp, #96
5664
stp x29, x30, [sp, #64]
5765
add x29, sp, #64
@@ -565,7 +573,7 @@ compress_pre:
565573
zfs_blake3_compress_xof_sse41:
566574
.cfi_startproc
567575
hint #25
568-
.cfi_negate_ra_state
576+
CFI_NEGATE_RA_STATE
569577
sub sp, sp, #96
570578
stp x29, x30, [sp, #64]
571579
add x29, sp, #64

0 commit comments

Comments
 (0)