Skip to content

Commit 734e659

Browse files
hanno-beckermkannwischer
authored andcommitted
ASM: Add marker for non-executable stack
This commit extends simpasm to automatically emit the marker `.section .note.GNU-stack,"",@progbits` marking the stack as non-executable. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent f504c9a commit 734e659

31 files changed

+93
-0
lines changed

mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_asm.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
* dev/fips202/aarch64/src/keccak_f1600_x1_scalar_asm.S using scripts/simpasm. Do not modify it directly.
1919
*/
2020

21+
#if defined(__ELF__)
22+
.section .note.GNU-stack,"",@progbits
23+
#endif
2124

2225
.text
2326
.balign 4

mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_asm.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
* dev/fips202/aarch64/src/keccak_f1600_x1_v84a_asm.S using scripts/simpasm. Do not modify it directly.
3636
*/
3737

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

3942
.text
4043
.balign 4

mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_asm.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
* dev/fips202/aarch64/src/keccak_f1600_x2_v84a_asm.S using scripts/simpasm. Do not modify it directly.
3636
*/
3737

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

3942
.text
4043
.balign 4

mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
* dev/fips202/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_asm.S using scripts/simpasm. Do not modify it directly.
1919
*/
2020

21+
#if defined(__ELF__)
22+
.section .note.GNU-stack,"",@progbits
23+
#endif
2124

2225
.text
2326
.balign 4

mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
* dev/fips202/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S using scripts/simpasm. Do not modify it directly.
2121
*/
2222

23+
#if defined(__ELF__)
24+
.section .note.GNU-stack,"",@progbits
25+
#endif
2326

2427
.text
2528
.balign 4

mldsa/src/native/aarch64/src/intt.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
* dev/aarch64_opt/src/intt.S using scripts/simpasm. Do not modify it directly.
3131
*/
3232

33+
#if defined(__ELF__)
34+
.section .note.GNU-stack,"",@progbits
35+
#endif
3336

3437
.text
3538
.balign 4

mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l4.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* dev/aarch64_opt/src/mld_polyvecl_pointwise_acc_montgomery_l4.S using scripts/simpasm. Do not modify it directly.
1111
*/
1212

13+
#if defined(__ELF__)
14+
.section .note.GNU-stack,"",@progbits
15+
#endif
1316

1417
.text
1518
.balign 4

mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l5.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* dev/aarch64_opt/src/mld_polyvecl_pointwise_acc_montgomery_l5.S using scripts/simpasm. Do not modify it directly.
1111
*/
1212

13+
#if defined(__ELF__)
14+
.section .note.GNU-stack,"",@progbits
15+
#endif
1316

1417
.text
1518
.balign 4

mldsa/src/native/aarch64/src/mld_polyvecl_pointwise_acc_montgomery_l7.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* dev/aarch64_opt/src/mld_polyvecl_pointwise_acc_montgomery_l7.S using scripts/simpasm. Do not modify it directly.
1111
*/
1212

13+
#if defined(__ELF__)
14+
.section .note.GNU-stack,"",@progbits
15+
#endif
1316

1417
.text
1518
.balign 4

mldsa/src/native/aarch64/src/ntt.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
* dev/aarch64_opt/src/ntt.S using scripts/simpasm. Do not modify it directly.
3131
*/
3232

33+
#if defined(__ELF__)
34+
.section .note.GNU-stack,"",@progbits
35+
#endif
3336

3437
.text
3538
.balign 4

0 commit comments

Comments
 (0)