diff mbox series

x86: Fixup some nits in longjmp asm implementation

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

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.
diff mbox series

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);						\