Skip to content

Commit 272a41d

Browse files
authored
Avoid executable stack by marking that it's not required. (#4418)
Also refer to: fluent/fluent-bit#10513 Signed-off-by: Jaco Kroon <[email protected]>
1 parent 378320b commit 272a41d

14 files changed

+40
-1
lines changed

core/iwasm/common/arch/fneh.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#if defined(__linux__) && defined(__ELF__)
2+
.section .note.GNU-stack,"",%progbits
3+
#endif

core/iwasm/common/arch/invokeNative_aarch64.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,6 @@ return:
7979
add sp, sp, #0x30 /* restore sp */
8080
ret
8181

82+
#if defined(__linux__) && defined(__ELF__)
83+
.section .note.GNU-stack,"",%progbits
84+
#endif

core/iwasm/common/arch/invokeNative_aarch64_simd.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ return:
7777
add sp, sp, #0x30 /* restore sp */
7878
ret
7979

80+
#if defined(__linux__) && defined(__ELF__)
81+
.section .note.GNU-stack,"",%progbits
82+
#endif

core/iwasm/common/arch/invokeNative_arc.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,6 @@ call_func:
6767
j_s [blink] /* ret */
6868
nop_s
6969

70+
#if defined(__linux__) && defined(__ELF__)
71+
.section .note.GNU-stack,"",%progbits
72+
#endif

core/iwasm/common/arch/invokeNative_arm.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,6 @@ return:
7373
add sp, sp, #4
7474
ldmfd sp!, {r4, r5, r6, r7, lr}
7575
bx lr
76+
#if defined(__linux__) && defined(__ELF__)
77+
.section .note.GNU-stack,"",%progbits
78+
#endif

core/iwasm/common/arch/invokeNative_arm_vfp.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,6 @@ return:
8484
ldmfd sp!, {r4, r5, r6, r7, lr}
8585
bx lr
8686

87+
#if defined(__linux__) && defined(__ELF__)
88+
.section .note.GNU-stack,"",%progbits
89+
#endif

core/iwasm/common/arch/invokeNative_em64.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ push_args_end:
6262
leave
6363
ret
6464

65+
#if defined(__linux__) && defined(__ELF__)
66+
.section .note.GNU-stack,"",%progbits
67+
#endif

core/iwasm/common/arch/invokeNative_em64_simd.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ push_args_end:
6262
leave
6363
ret
6464

65+
#if defined(__linux__) && defined(__ELF__)
66+
.section .note.GNU-stack,"",%progbits
67+
#endif

core/iwasm/common/arch/invokeNative_ia32.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ skip_push_args:
3535
leave
3636
ret
3737

38+
#if defined(__linux__) && defined(__ELF__)
39+
.section .note.GNU-stack,"",%progbits
40+
#endif

core/iwasm/common/arch/invokeNative_mips.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,6 @@ done:
7272

7373
j $31
7474
.end invokeNative
75+
#if defined(__linux__) && defined(__ELF__)
76+
.section .note.GNU-stack,"",%progbits
77+
#endif

0 commit comments

Comments
 (0)