qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 1847467] [NEW] qemu-x86_64 segment prefixes error


From: Yves Lhuillier
Subject: [Bug 1847467] [NEW] qemu-x86_64 segment prefixes error
Date: Wed, 09 Oct 2019 10:28:24 -0000

Public bug reported:

qemu-x86_64 version 4.1.0 (qemu-x86_64 version 4.0.0 also have the
issue)

In 64-bit mode (x86_64) the DS, ES, SS or CS segment prefixes should be
ignored; qemu-x86_64 does not ignore them.

example: an x86_64 instructions preceded by FS DS (0x64 0x26) segment
prefixes have the linear address of its memory reference flat-mapped (as
if DS was in action) whereas it should be FS-mapped (offset by FS_base,
because the DS, ES, SS or CS are just ignored).


I attach a small C++ program that shows this discrepancy.

$ ./sample
I'm not in QEMU

$ qemu-x86_64 ./sample
I'm in QEMU

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: amd64

** Attachment added: "small C++ program to reproduce the bug"
   https://bugs.launchpad.net/bugs/1847467/+attachment/5295831/+files/sample.cc

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1847467

Title:
  qemu-x86_64 segment prefixes error

Status in QEMU:
  New

Bug description:
  qemu-x86_64 version 4.1.0 (qemu-x86_64 version 4.0.0 also have the
  issue)

  In 64-bit mode (x86_64) the DS, ES, SS or CS segment prefixes should
  be ignored; qemu-x86_64 does not ignore them.

  example: an x86_64 instructions preceded by FS DS (0x64 0x26) segment
  prefixes have the linear address of its memory reference flat-mapped
  (as if DS was in action) whereas it should be FS-mapped (offset by
  FS_base, because the DS, ES, SS or CS are just ignored).

  
  I attach a small C++ program that shows this discrepancy.

  $ ./sample
  I'm not in QEMU

  $ qemu-x86_64 ./sample
  I'm in QEMU

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1847467/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]