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