[PATCH] x86: Fix SYSRETQ disassembly
H.J. Lu
hjl.tools@gmail.com
Sun Oct 4 22:34:42 GMT 2020
On Sun, Oct 4, 2020 at 2:57 PM Borislav Petkov <bp@suse.de> wrote:
>
> On Sun, Oct 04, 2020 at 02:52:39PM -0700, H.J. Lu wrote:
> > I can't reproduce it with your testcase. Please show me how to reproduce it.
>
> [boris@zn: /home/share/src/binutils/build> cat /tmp/sysretq.c
> #include <errno.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
>
> int main(void)
> {
>
> asm volatile("sysretq");
>
> return 0;
> }
>
> [boris@zn: /home/share/src/binutils/build> gcc -Wall -o /tmp/sysretq{,.c}
> [boris@zn: /home/share/src/binutils/build> ./binutils/objdump -d /tmp/sysretq | grep -A 10 "<main>:"
> 0000000000001125 <main>:
> 1125: 55 push %rbp
> 1126: 48 89 e5 mov %rsp,%rbp
> 1129: 48 0f 07 rex.W sysret
> 112c: b8 00 00 00 00 mov $0x0,%eax
> 1131: 5d pop %rbp
> 1132: c3 ret
> 1133: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 113a: 00 00 00
> 113d: 0f 1f 00 nopl (%rax)
>
I opened:
https://sourceware.org/bugzilla/show_bug.cgi?id=26705
--
H.J.
More information about the Binutils
mailing list