diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-05 10:36:40 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-09 13:55:51 -0300 |
commit | 25f1e16ef03a6a8fb1701c4647d46c564480d88c (patch) | |
tree | c4f2b8148ab0fe004bae19105d8f8169ab9922a7 /sysdeps/i386/i686 | |
parent | b7fc4a07f206a640e6d807d72f5c1ee3ea7a25b6 (diff) | |
download | glibc-25f1e16ef03a6a8fb1701c4647d46c564480d88c.tar.gz glibc-25f1e16ef03a6a8fb1701c4647d46c564480d88c.tar.xz glibc-25f1e16ef03a6a8fb1701c4647d46c564480d88c.zip |
i386: Remove CET support
CET is only support for x86_64, this patch reverts: - faaee1f07ed x86: Support shadow stack pointer in setjmp/longjmp. - be9ccd27c09 i386: Add _CET_ENDBR to indirect jump targets in add_n.S/sub_n.S - c02695d7764 x86/CET: Update vfork to prevent child return - 5d844e1b725 i386: Enable CET support in ucontext functions - 124bcde683 x86: Add _CET_ENDBR to functions in crti.S - 562837c002 x86: Add _CET_ENDBR to functions in dl-tlsdesc.S - f753fa7dea x86: Support IBT and SHSTK in Intel CET [BZ #21598] - 825b58f3fb i386-mcount.S: Add _CET_ENDBR to _mcount and __fentry__ - 7e119cd582 i386: Use _CET_NOTRACK in i686/memcmp.S - 177824e232 i386: Use _CET_NOTRACK in memcmp-sse4.S - 0a899af097 i386: Use _CET_NOTRACK in memcpy-ssse3-rep.S - 7fb613361c i386: Use _CET_NOTRACK in memcpy-ssse3.S - 77a8ae0948 i386: Use _CET_NOTRACK in memset-sse2-rep.S - 00e7b76a8f i386: Use _CET_NOTRACK in memset-sse2.S - 90d15dc577 i386: Use _CET_NOTRACK in strcat-sse2.S - f1574581c7 i386: Use _CET_NOTRACK in strcpy-sse2.S - 4031d7484a i386/sub_n.S: Add a missing _CET_ENDBR to indirect jump - target - Checked on i686-linux-gnu.
Diffstat (limited to 'sysdeps/i386/i686')
-rw-r--r-- | sysdeps/i386/i686/add_n.S | 25 | ||||
-rw-r--r-- | sysdeps/i386/i686/memcmp.S | 4 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/memcmp-sse4.S | 4 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S | 8 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/memcpy-ssse3.S | 4 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/memset-sse2-rep.S | 4 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/memset-sse2.S | 4 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/strcat-sse2.S | 4 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/strcpy-sse2.S | 4 |
9 files changed, 18 insertions, 43 deletions
diff --git a/sysdeps/i386/i686/add_n.S b/sysdeps/i386/i686/add_n.S index c2bc798187..bbc0cc71a2 100644 --- a/sysdeps/i386/i686/add_n.S +++ b/sysdeps/i386/i686/add_n.S @@ -44,13 +44,6 @@ ENTRY (__mpn_add_n) cfi_rel_offset (esi, 0) movl S2(%esp),%edx movl SIZE(%esp),%ecx - -#if IBT_ENABLED - pushl %ebx - cfi_adjust_cfa_offset (4) - cfi_rel_offset (ebx, 0) -#endif - movl %ecx,%eax shrl $3,%ecx /* compute count for unrolled loop */ negl %eax @@ -62,9 +55,6 @@ ENTRY (__mpn_add_n) subl %eax,%esi /* ... by a constant when we ... */ subl %eax,%edx /* ... enter the loop */ shrl $2,%eax /* restore previous value */ -#if IBT_ENABLED - leal -4(,%eax,4),%ebx /* Count for 4-byte endbr32 */ -#endif #ifdef PIC /* Calculate start address in loop for PIC. */ leal (L(oop)-L(0)-3)(%eax,%eax,8),%eax @@ -74,39 +64,29 @@ L(0): /* Calculate start address in loop for non-PIC. */ leal (L(oop) - 3)(%eax,%eax,8),%eax #endif -#if IBT_ENABLED - addl %ebx,%eax /* Adjust for endbr32 */ -#endif jmp *%eax /* jump into loop */ ALIGN (3) L(oop): movl (%esi),%eax adcl (%edx),%eax movl %eax,(%edi) - _CET_ENDBR movl 4(%esi),%eax adcl 4(%edx),%eax movl %eax,4(%edi) - _CET_ENDBR movl 8(%esi),%eax adcl 8(%edx),%eax movl %eax,8(%edi) - _CET_ENDBR movl 12(%esi),%eax adcl 12(%edx),%eax movl %eax,12(%edi) - _CET_ENDBR movl 16(%esi),%eax adcl 16(%edx),%eax movl %eax,16(%edi) - _CET_ENDBR movl 20(%esi),%eax adcl 20(%edx),%eax movl %eax,20(%edi) - _CET_ENDBR movl 24(%esi),%eax adcl 24(%edx),%eax movl %eax,24(%edi) - _CET_ENDBR movl 28(%esi),%eax adcl 28(%edx),%eax movl %eax,28(%edi) @@ -119,11 +99,6 @@ L(oop): movl (%esi),%eax sbbl %eax,%eax negl %eax -#if IBT_ENABLED - popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) -#endif popl %esi cfi_adjust_cfa_offset (-4) cfi_restore (esi) diff --git a/sysdeps/i386/i686/memcmp.S b/sysdeps/i386/i686/memcmp.S index 94600f5e53..0738ee94fd 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 - _CET_NOTRACK jmp *%ebx + 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 - _CET_NOTRACK jmp *%ebx + jmp *%ebx L(load_ecx_28): addl $0x4, %edx diff --git a/sysdeps/i386/i686/multiarch/memcmp-sse4.S b/sysdeps/i386/i686/multiarch/memcmp-sse4.S index f0b2d8429f..2cdda5f80d 100644 --- a/sysdeps/i386/i686/multiarch/memcmp-sse4.S +++ b/sysdeps/i386/i686/multiarch/memcmp-sse4.S @@ -58,7 +58,7 @@ absolute address. */ \ addl (%ebx,INDEX,SCALE), %ebx; \ /* We loaded the jump table and adjusted EDX/ESI. Go. */ \ - _CET_NOTRACK jmp *%ebx + jmp *%ebx # else # define JMPTBL(I, B) I @@ -66,7 +66,7 @@ jump table with relative offsets. INDEX is a register contains the index into the jump table. SCALE is the scale of INDEX. */ # define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \ - _CET_NOTRACK jmp *TABLE(,INDEX,SCALE) + jmp *TABLE(,INDEX,SCALE) # endif diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S index abdde55001..a7e80dcd90 100644 --- a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S +++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S @@ -64,7 +64,7 @@ absolute address. */ \ addl (%ebx,INDEX,SCALE), %ebx; \ /* We loaded the jump table. Go. */ \ - _CET_NOTRACK jmp *%ebx + jmp *%ebx # define BRANCH_TO_JMPTBL_ENTRY_VALUE(TABLE) \ addl $(TABLE - .), %ebx @@ -72,7 +72,7 @@ # define BRANCH_TO_JMPTBL_ENTRY_TAIL(TABLE, INDEX, SCALE) \ addl (%ebx,INDEX,SCALE), %ebx; \ /* We loaded the jump table. Go. */ \ - _CET_NOTRACK jmp *%ebx + jmp *%ebx #else # define PARMS 4 # define ENTRANCE @@ -84,12 +84,12 @@ absolute offsets. INDEX is a register contains the index into the jump table. SCALE is the scale of INDEX. */ # define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \ - _CET_NOTRACK jmp *TABLE(,INDEX,SCALE) + jmp *TABLE(,INDEX,SCALE) # define BRANCH_TO_JMPTBL_ENTRY_VALUE(TABLE) # define BRANCH_TO_JMPTBL_ENTRY_TAIL(TABLE, INDEX, SCALE) \ - _CET_NOTRACK jmp *TABLE(,INDEX,SCALE) + jmp *TABLE(,INDEX,SCALE) #endif .section .text.ssse3,"ax",@progbits diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S index 60cc5f14ea..713c5bdb76 100644 --- a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S +++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S @@ -64,7 +64,7 @@ absolute address. */ \ addl (%ebx, INDEX, SCALE), %ebx; \ /* We loaded the jump table. Go. */ \ - _CET_NOTRACK jmp *%ebx + jmp *%ebx # else # define PARMS 4 @@ -78,7 +78,7 @@ jump table. SCALE is the scale of INDEX. */ # define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \ - _CET_NOTRACK jmp *TABLE(, INDEX, SCALE) + jmp *TABLE(, INDEX, SCALE) # endif .section .text.ssse3,"ax",@progbits diff --git a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S index 52d046d12b..d1a047319c 100644 --- a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S +++ b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S @@ -56,7 +56,7 @@ add (%ebx,%ecx,4), %ebx; \ add %ecx, %edx; \ /* We loaded the jump table and adjusted EDX. Go. */ \ - _CET_NOTRACK jmp *%ebx + jmp *%ebx #else # define ENTRANCE # define RETURN_END ret @@ -68,7 +68,7 @@ absolute offsets. */ # define BRANCH_TO_JMPTBL_ENTRY(TABLE) \ add %ecx, %edx; \ - _CET_NOTRACK jmp *TABLE(,%ecx,4) + jmp *TABLE(,%ecx,4) #endif .section .text.sse2,"ax",@progbits diff --git a/sysdeps/i386/i686/multiarch/memset-sse2.S b/sysdeps/i386/i686/multiarch/memset-sse2.S index ac21fcb00b..2e00743477 100644 --- a/sysdeps/i386/i686/multiarch/memset-sse2.S +++ b/sysdeps/i386/i686/multiarch/memset-sse2.S @@ -56,7 +56,7 @@ add (%ebx,%ecx,4), %ebx; \ add %ecx, %edx; \ /* We loaded the jump table and adjusted EDX. Go. */ \ - _CET_NOTRACK jmp *%ebx + jmp *%ebx #else # define ENTRANCE # define RETURN_END ret @@ -68,7 +68,7 @@ absolute offsets. */ # define BRANCH_TO_JMPTBL_ENTRY(TABLE) \ add %ecx, %edx; \ - _CET_NOTRACK jmp *TABLE(,%ecx,4) + jmp *TABLE(,%ecx,4) #endif .section .text.sse2,"ax",@progbits diff --git a/sysdeps/i386/i686/multiarch/strcat-sse2.S b/sysdeps/i386/i686/multiarch/strcat-sse2.S index 7ac4827bf7..682f43ff5f 100644 --- a/sysdeps/i386/i686/multiarch/strcat-sse2.S +++ b/sysdeps/i386/i686/multiarch/strcat-sse2.S @@ -49,7 +49,7 @@ absolute address. */ \ addl (%ecx,INDEX,SCALE), %ecx; \ /* We loaded the jump table and adjusted ECX. Go. */ \ - _CET_NOTRACK jmp *%ecx + jmp *%ecx # else # define JMPTBL(I, B) I @@ -58,7 +58,7 @@ jump table. SCALE is the scale of INDEX. */ # define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \ - _CET_NOTRACK jmp *TABLE(,INDEX,SCALE) + jmp *TABLE(,INDEX,SCALE) # endif # ifndef STRCAT diff --git a/sysdeps/i386/i686/multiarch/strcpy-sse2.S b/sysdeps/i386/i686/multiarch/strcpy-sse2.S index 5c358e5e7e..a18a8ca5ba 100644 --- a/sysdeps/i386/i686/multiarch/strcpy-sse2.S +++ b/sysdeps/i386/i686/multiarch/strcpy-sse2.S @@ -64,7 +64,7 @@ absolute address. */ \ addl (%ecx,INDEX,SCALE), %ecx; \ /* We loaded the jump table and adjusted ECX. Go. */ \ - _CET_NOTRACK jmp *%ecx + jmp *%ecx # else # define JMPTBL(I, B) I @@ -73,7 +73,7 @@ jump table. SCALE is the scale of INDEX. */ # define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \ - _CET_NOTRACK jmp *TABLE(,INDEX,SCALE) + jmp *TABLE(,INDEX,SCALE) # endif .text |