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