3715b23
From 1999108aeb1f6f93a19ea7bb64c6ae8b87d1b264 Mon Sep 17 00:00:00 2001
3715b23
From: "H.J. Lu" <hjl.tools@gmail.com>
3715b23
Date: Thu, 20 Jan 2022 05:33:13 -0800
3715b23
Subject: [PATCH] CET: Add CET marker to crc32c_intel_fast_zero_asm.s
3715b23
3715b23
Add .note.gnu.property section to crc32c_intel_fast_zero_asm.s to mark
3715b23
for IBT and SHSTK compatibility.
3715b23
---
3715b23
 src/common/crc32c_intel_fast_zero_asm.s | 4 ++++
3715b23
 1 file changed, 4 insertions(+)
3715b23
3715b23
diff --git a/src/common/crc32c_intel_fast_zero_asm.s b/src/common/crc32c_intel_fast_zero_asm.s
3715b23
index 216ecf639f3..2e291d858f3 100644
3715b23
--- a/src/common/crc32c_intel_fast_zero_asm.s
3715b23
+++ b/src/common/crc32c_intel_fast_zero_asm.s
3715b23
@@ -654,4 +654,8 @@ slversion crc32_iscsi_zero_00, 00,   02,  0014
3715b23
 %ifidn __OUTPUT_FORMAT__, elf64
3715b23
 ; inform linker that this doesn't require executable stack
3715b23
 section .note.GNU-stack noalloc noexec nowrite progbits
3715b23
+; inform linker that this is compatible with IBT and SHSTK
3715b23
+section .note.gnu.property  note  alloc noexec align=8
3715b23
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
3715b23
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
3715b23
 %endif
3715b23
-- 
3715b23
2.34.1
3715b23