summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-07-18 07:54:45 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-07-18 07:56:58 -0700
commit7e119cd5828768eca6547494242699ea76fa30c0 (patch)
tree64c4c654da12cd6dbca1985476681a634760edbc
parent03aaf49b68d380492a7e7459817c6e926f96f0ef (diff)
downloadglibc-7e119cd5828768eca6547494242699ea76fa30c0.tar.gz
glibc-7e119cd5828768eca6547494242699ea76fa30c0.tar.xz
glibc-7e119cd5828768eca6547494242699ea76fa30c0.zip
i386: Use _CET_NOTRACK in i686/memcmp.S
	* sysdeps/i386/i686/memcmp.S (memcmp): Add _CET_NOTRACK before
	indirect jump to jump table.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/i386/i686/memcmp.S4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d44a62ae6c..dba41dbde8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2018-07-18  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/i386/i686/memcmp.S (memcmp): Add _CET_NOTRACK before
+	indirect jump to jump table.
+
+2018-07-18  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/x86_64/multiarch/memcpy-ssse3.S
 	(BRANCH_TO_JMPTBL_ENTRY): Add _CET_NOTRACK before indirect jump
 	to jump table.
diff --git a/sysdeps/i386/i686/memcmp.S b/sysdeps/i386/i686/memcmp.S
index a0bc9ec97c..3259076cd7 100644
--- a/sysdeps/i386/i686/memcmp.S
+++ b/sysdeps/i386/i686/memcmp.S
@@ -80,7 +80,7 @@ L(not_1):
 	LOAD_JUMP_TABLE_ENTRY (L(table_32bytes), %ecx)
 	addl	%ecx, %edx
 	addl	%ecx, %esi
-	jmp	*%ebx
+	_CET_NOTRACK jmp *%ebx
 
 	ALIGN (4)
 L(28bytes):
@@ -326,7 +326,7 @@ L(32bytesormore):
 	LOAD_JUMP_TABLE_ENTRY (L(table_32bytes), %ecx)
 	addl	%ecx, %edx
 	addl	%ecx, %esi
-	jmp	*%ebx
+	_CET_NOTRACK jmp *%ebx
 
 L(load_ecx_28):
 	addl	$0x4, %edx