Skip to content

Commit d58740d

Browse files
committed
Linux build: silence objtool warnings
After openzfs#17401 the Linux build produces some stack related warnings. Silence them with the `STACK_FRAME_NON_STANDARD` macro. Signed-off-by: Attila Fülöp <[email protected]>
1 parent e8e602d commit d58740d

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

include/sys/frame.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ extern "C" {
3333
#endif
3434
#else
3535
#define STACK_FRAME_NON_STANDARD(func)
36+
#if defined(_ASM)
37+
.macro STACK_FRAME_NON_STANDARD func:req
38+
.endm
39+
#endif
3640
#endif
3741

3842
#ifdef __cplusplus

module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050

5151
#define _ASM
5252
#include <sys/asm_linkage.h>
53+
#include <sys/frame.h>
5354

5455
/* Windows userland links with OpenSSL */
5556
#if !defined (_WIN32) || defined (_KERNEL)
@@ -378,6 +379,7 @@ FUNCTION(_aesni_ctr32_ghash_6x)
378379
RET
379380
.cfi_endproc
380381
SET_SIZE(_aesni_ctr32_ghash_6x)
382+
STACK_FRAME_NON_STANDARD _aesni_ctr32_ghash_6x
381383
#endif /* ifdef HAVE_MOVBE */
382384

383385
.balign 32
@@ -706,6 +708,7 @@ FUNCTION(_aesni_ctr32_ghash_no_movbe_6x)
706708
RET
707709
.cfi_endproc
708710
SET_SIZE(_aesni_ctr32_ghash_no_movbe_6x)
711+
STACK_FRAME_NON_STANDARD _aesni_ctr32_ghash_no_movbe_6x
709712

710713
ENTRY_ALIGN(aesni_gcm_decrypt, 32)
711714
.cfi_startproc
@@ -823,6 +826,7 @@ ENTRY_ALIGN(aesni_gcm_decrypt, 32)
823826
RET
824827
.cfi_endproc
825828
SET_SIZE(aesni_gcm_decrypt)
829+
STACK_FRAME_NON_STANDARD aesni_gcm_decrypt
826830

827831
.balign 32
828832
FUNCTION(_aesni_ctr32_6x)
@@ -1198,6 +1202,7 @@ ENTRY_ALIGN(aesni_gcm_encrypt, 32)
11981202
RET
11991203
.cfi_endproc
12001204
SET_SIZE(aesni_gcm_encrypt)
1205+
STACK_FRAME_NON_STANDARD aesni_gcm_encrypt
12011206

12021207
#endif /* !_WIN32 || _KERNEL */
12031208

module/icp/asm-x86_64/sha2/sha256-x86_64.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#define _ASM
2626
#include <sys/asm_linkage.h>
27+
#include <sys/frame.h>
2728

2829
SECTION_STATIC
2930

@@ -1420,6 +1421,7 @@ ENTRY_ALIGN(zfs_sha256_transform_x64, 16)
14201421
RET
14211422
.cfi_endproc
14221423
SET_SIZE(zfs_sha256_transform_x64)
1424+
STACK_FRAME_NON_STANDARD zfs_sha256_transform_x64
14231425

14241426
ENTRY_ALIGN(zfs_sha256_transform_shani, 64)
14251427
.cfi_startproc
@@ -1628,6 +1630,7 @@ ENTRY_ALIGN(zfs_sha256_transform_shani, 64)
16281630
RET
16291631
.cfi_endproc
16301632
SET_SIZE(zfs_sha256_transform_shani)
1633+
STACK_FRAME_NON_STANDARD zfs_sha256_transform_shani
16311634

16321635
ENTRY_ALIGN(zfs_sha256_transform_ssse3, 64)
16331636
.cfi_startproc
@@ -2739,6 +2742,7 @@ ENTRY_ALIGN(zfs_sha256_transform_ssse3, 64)
27392742
RET
27402743
.cfi_endproc
27412744
SET_SIZE(zfs_sha256_transform_ssse3)
2745+
STACK_FRAME_NON_STANDARD zfs_sha256_transform_ssse3
27422746

27432747
ENTRY_ALIGN(zfs_sha256_transform_avx, 64)
27442748
.cfi_startproc
@@ -3813,6 +3817,7 @@ ENTRY_ALIGN(zfs_sha256_transform_avx, 64)
38133817
RET
38143818
.cfi_endproc
38153819
SET_SIZE(zfs_sha256_transform_avx)
3820+
STACK_FRAME_NON_STANDARD zfs_sha256_transform_avx
38163821

38173822
ENTRY_ALIGN(zfs_sha256_transform_avx2, 64)
38183823
.cfi_startproc
@@ -5098,6 +5103,7 @@ ENTRY_ALIGN(zfs_sha256_transform_avx2, 64)
50985103
RET
50995104
.cfi_endproc
51005105
SET_SIZE(zfs_sha256_transform_avx2)
5106+
STACK_FRAME_NON_STANDARD zfs_sha256_transform_avx2
51015107

51025108
#if defined(__ELF__)
51035109
.section .note.GNU-stack,"",%progbits

module/icp/asm-x86_64/sha2/sha512-x86_64.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#define _ASM
2626
#include <sys/asm_linkage.h>
27+
#include <sys/frame.h>
2728

2829
SECTION_STATIC
2930

@@ -1463,6 +1464,7 @@ ENTRY_ALIGN(zfs_sha512_transform_x64, 16)
14631464
RET
14641465
.cfi_endproc
14651466
SET_SIZE(zfs_sha512_transform_x64)
1467+
STACK_FRAME_NON_STANDARD zfs_sha512_transform_x64
14661468

14671469
ENTRY_ALIGN(zfs_sha512_transform_avx, 64)
14681470
.cfi_startproc
@@ -2627,6 +2629,7 @@ ENTRY_ALIGN(zfs_sha512_transform_avx, 64)
26272629
RET
26282630
.cfi_endproc
26292631
SET_SIZE(zfs_sha512_transform_avx)
2632+
STACK_FRAME_NON_STANDARD zfs_sha512_transform_avx
26302633

26312634
ENTRY_ALIGN(zfs_sha512_transform_avx2, 64)
26322635
.cfi_startproc
@@ -4005,6 +4008,7 @@ ENTRY_ALIGN(zfs_sha512_transform_avx2, 64)
40054008
RET
40064009
.cfi_endproc
40074010
SET_SIZE(zfs_sha512_transform_avx2)
4011+
STACK_FRAME_NON_STANDARD zfs_sha512_transform_avx2
40084012

40094013
#if defined(__ELF__)
40104014
.section .note.GNU-stack,"",%progbits

0 commit comments

Comments
 (0)