x86: Fixup some nits in longjmp asm implementation

Message ID 20240105220030.3668998-1-goldstein.w.n@gmail.com
State Committed
Commit b96a2eba2fcca37deea221a18c998ee0084a5d21
Headers
Series x86: Fixup some nits in longjmp asm implementation |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed

Commit Message

Noah Goldstein Jan. 5, 2024, 10 p.m. UTC
  Replace a stray `nop` with a `.p2align` directive.
---
 sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

H.J. Lu Jan. 5, 2024, 10:29 p.m. UTC | #1
On Fri, Jan 5, 2024 at 2:00 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> Replace a stray `nop` with a `.p2align` directive.
> ---
>  sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
> index 9aa24620b9..9d9732afdc 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
> +++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
> @@ -57,8 +57,8 @@ longjmp_msg:
>         cfi_def_cfa_offset(16);                                         \
>         LOAD_MSG;                                                       \
>         call    HIDDEN_JUMPTARGET(__fortify_fail);                      \
> -       nop;                                                            \
>         cfi_restore_state;                                              \
> +       .p2align 3, 5;                                                          \
>  .Lok2:                                                                 \
>         movq    %r10, %rdi;                                             \
>         cfi_restore (%rdi);                                             \
> --
> 2.34.1
>

LGTM.

Thanks.
  

Patch

diff --git a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
index 9aa24620b9..9d9732afdc 100644
--- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
@@ -57,8 +57,8 @@  longjmp_msg:
 	cfi_def_cfa_offset(16);						\
 	LOAD_MSG;							\
 	call	HIDDEN_JUMPTARGET(__fortify_fail);			\
-	nop;								\
 	cfi_restore_state;						\
+	.p2align 3, 5;								\
 .Lok2:									\
 	movq	%r10, %rdi;						\
 	cfi_restore (%rdi);						\