File 2011-isa-l-CET-Add-CET-marker-to-x86-64-crc32-assembly-co.patch of Package ceph-ceph-18.2.7

diff --git a/src/isa-l/crc/crc32_gzip_refl_by16_10.asm b/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
index 15280b8..1812869 100644
--- a/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
+++ b/src/isa-l/crc/crc32_gzip_refl_by16_10.asm
@@ -567,3 +567,12 @@ global no_ %+ FUNCTION_NAME
 no_ %+ FUNCTION_NAME %+ :
 %endif
 %endif ; (AS_FEATURE_LEVEL) >= 10
+
+%ifidn __OUTPUT_FORMAT__, elf64
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this is compatible with IBT and SHSTK
+section .note.gnu.property  note  alloc noexec align=8
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
+%endif
diff --git a/src/isa-l/crc/crc32_gzip_refl_by8.asm b/src/isa-l/crc/crc32_gzip_refl_by8.asm
index 4384024..5982e0d 100644
--- a/src/isa-l/crc/crc32_gzip_refl_by8.asm
+++ b/src/isa-l/crc/crc32_gzip_refl_by8.asm
@@ -623,3 +623,12 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
 
 ;;;       func        core, ver, snum
 slversion crc32_gzip_refl_by8, 01,   00,  002c
+
+%ifidn __OUTPUT_FORMAT__, elf64
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this is compatible with IBT and SHSTK
+section .note.gnu.property  note  alloc noexec align=8
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
+%endif
diff --git a/src/isa-l/crc/crc32_gzip_refl_by8_02.asm b/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
index 712fe87..be9a733 100644
--- a/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
+++ b/src/isa-l/crc/crc32_gzip_refl_by8_02.asm
@@ -554,3 +554,12 @@ pshufb_shf_table:
 ;       dq 0x060504030201008f, 0x0e0d0c0b0a090807 ; shl 1  (16-15) / shr15
 dq 0x8786858483828100, 0x8f8e8d8c8b8a8988
 dq 0x0706050403020100, 0x000e0d0c0b0a0908
+
+%ifidn __OUTPUT_FORMAT__, elf64
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this is compatible with IBT and SHSTK
+section .note.gnu.property  note  alloc noexec align=8
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
+%endif
diff --git a/src/isa-l/crc/crc32_ieee_01.asm b/src/isa-l/crc/crc32_ieee_01.asm
index 368261d..614945f 100644
--- a/src/isa-l/crc/crc32_ieee_01.asm
+++ b/src/isa-l/crc/crc32_ieee_01.asm
@@ -654,3 +654,11 @@ dq 0x0706050403020100, 0x000e0d0c0b0a0908
 ;;;       func        core, ver, snum
 slversion crc32_ieee_01, 01,   06,  0011
 
+%ifidn __OUTPUT_FORMAT__, elf64
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this is compatible with IBT and SHSTK
+section .note.gnu.property  note  alloc noexec align=8
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
+%endif
diff --git a/src/isa-l/crc/crc32_ieee_02.asm b/src/isa-l/crc/crc32_ieee_02.asm
index 95d53e8..a94123e 100644
--- a/src/isa-l/crc/crc32_ieee_02.asm
+++ b/src/isa-l/crc/crc32_ieee_02.asm
@@ -650,3 +650,12 @@ pshufb_shf_table:
 ;	dq 0x060504030201008f, 0x0e0d0c0b0a090807 ; shl 1  (16-15) / shr15
 dq 0x8786858483828100, 0x8f8e8d8c8b8a8988
 dq 0x0706050403020100, 0x000e0d0c0b0a0908
+
+%ifidn __OUTPUT_FORMAT__, elf64
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this is compatible with IBT and SHSTK
+section .note.gnu.property  note  alloc noexec align=8
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
+%endif
diff --git a/src/isa-l/crc/crc32_ieee_by16_10.asm b/src/isa-l/crc/crc32_ieee_by16_10.asm
index 5c3f52a..b57b78a 100644
--- a/src/isa-l/crc/crc32_ieee_by16_10.asm
+++ b/src/isa-l/crc/crc32_ieee_by16_10.asm
@@ -583,3 +583,12 @@ global no_ %+ FUNCTION_NAME
 no_ %+ FUNCTION_NAME %+ :
 %endif
 %endif ; (AS_FEATURE_LEVEL) >= 10
+
+%ifidn __OUTPUT_FORMAT__, elf64
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this is compatible with IBT and SHSTK
+section .note.gnu.property  note  alloc noexec align=8
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
+%endif
diff --git a/src/isa-l/crc/crc32_ieee_by4.asm b/src/isa-l/crc/crc32_ieee_by4.asm
index f432640..15569ad 100644
--- a/src/isa-l/crc/crc32_ieee_by4.asm
+++ b/src/isa-l/crc/crc32_ieee_by4.asm
@@ -564,3 +564,12 @@ SHUF_MASK	dq 0x08090A0B0C0D0E0F, 0x0001020304050607
 
 ;;;       func             core, ver, snum
 slversion crc32_ieee_by4, 05,   02,  0017
+
+%ifidn __OUTPUT_FORMAT__, elf64
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this is compatible with IBT and SHSTK
+section .note.gnu.property  note  alloc noexec align=8
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
+%endif
diff --git a/src/isa-l/crc/crc32_iscsi_00.asm b/src/isa-l/crc/crc32_iscsi_00.asm
index 1a5e029..7cbc4cc 100644
--- a/src/isa-l/crc/crc32_iscsi_00.asm
+++ b/src/isa-l/crc/crc32_iscsi_00.asm
@@ -670,3 +670,11 @@ DD 0x54851c7f,0x89e3d7c4,0xeba4fdf8,0x36c23643
 ;;;       func            core, ver, snum
 slversion crc32_iscsi_00, 00,   04,  0014
 
+%ifidn __OUTPUT_FORMAT__, elf64
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this is compatible with IBT and SHSTK
+section .note.gnu.property  note  alloc noexec align=8
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
+%endif
diff --git a/src/isa-l/crc/crc32_iscsi_01.asm b/src/isa-l/crc/crc32_iscsi_01.asm
index e0f2b5e..4a1a71c 100644
--- a/src/isa-l/crc/crc32_iscsi_01.asm
+++ b/src/isa-l/crc/crc32_iscsi_01.asm
@@ -590,3 +590,11 @@ K_table:
 ;;;       func            core, ver, snum
 slversion crc32_iscsi_01, 01,   04,  0015
 
+%ifidn __OUTPUT_FORMAT__, elf64
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this is compatible with IBT and SHSTK
+section .note.gnu.property  note  alloc noexec align=8
+DD 0x00000004,0x00000010,0x00000005,0x00554e47
+DD 0xc0000002,0x00000004,0x00000003,0x00000000
+%endif
openSUSE Build Service is sponsored by