Patchwork V2 [PATCH 2/5] i386/sub_n.S: Add a missing _CET_ENDBR to indirect jump target

login
register
mail settings
Submitter H.J. Lu
Date Jan. 8, 2020, 4:15 p.m.
Message ID <20200108161535.6141-3-hjl.tools@gmail.com>
Download mbox | patch
Permalink /patch/37260/
State New
Headers show

Comments

H.J. Lu - Jan. 8, 2020, 4:15 p.m.
Add a missing _CET_ENDBR to indirect jump targe in sysdeps/i386/sub_n.S.
---
 sysdeps/i386/sub_n.S | 1 +
 1 file changed, 1 insertion(+)
Adhemerval Zanella Netto - Jan. 9, 2020, 9:13 p.m.
LGTM thanks.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

On 08/01/2020 13:15, H.J. Lu wrote:
> diff --git a/sysdeps/i386/sub_n.S b/sysdeps/i386/sub_n.S
> index caac89177b..16ebd9169b 100644
> --- a/sysdeps/i386/sub_n.S
> +++ b/sysdeps/i386/sub_n.S
> @@ -91,6 +91,7 @@ L(oop):	movl	(%esi),%eax
>  	movl	8(%esi),%eax
>  	sbbl	8(%edx),%eax
>  	movl	%eax,8(%edi)
> +	_CET_ENDBR
>  	movl	12(%esi),%eax
>  	sbbl	12(%edx),%eax
>  	movl	%eax,12(%edi)

Patch

diff --git a/sysdeps/i386/sub_n.S b/sysdeps/i386/sub_n.S
index caac89177b..16ebd9169b 100644
--- a/sysdeps/i386/sub_n.S
+++ b/sysdeps/i386/sub_n.S
@@ -91,6 +91,7 @@  L(oop):	movl	(%esi),%eax
 	movl	8(%esi),%eax
 	sbbl	8(%edx),%eax
 	movl	%eax,8(%edi)
+	_CET_ENDBR
 	movl	12(%esi),%eax
 	sbbl	12(%edx),%eax
 	movl	%eax,12(%edi)