Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 64ffde6

Browse files
tjuhaszrhtargos
authored andcommitted
src: add Intel CET properties to large_pages.S
Add note indicating support of Intel CET for large_pages.S file based on annocheck guide: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html PR-URL: #59363 Refs: #59084 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 823dce3 commit 64ffde6

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/large_pages/node_text_start.S

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
#if defined(__ELF__)
22
.section .note.GNU-stack,"",%progbits
33
#endif
4+
// Add .note.gnu.property note for x86_64 to enable Intel CET
5+
// Based on: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html
6+
// Refs: https://github.com/nodejs/node/issues/59084
7+
#if defined(__x86_64__) || defined(_M_X64)
8+
.section .note.gnu.property,"a"
9+
.align 8
10+
.long 1f - 0f
11+
.long 4f - 1f
12+
.long 5
13+
0:
14+
.string "GNU"
15+
1:
16+
.align 8
17+
.long 0xc0000002
18+
.long 3f - 2f
19+
2:
20+
.long 0x3
21+
3:
22+
.align 8
23+
4:
24+
#endif
425
.text
526
.align 0x2000
627
.global __node_text_start

0 commit comments

Comments
 (0)