qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [Bug 1808563] [NEW] Listing the contents of / lists QEMU_LD


From: Alan Jones
Subject: [Qemu-devel] [Bug 1808563] [NEW] Listing the contents of / lists QEMU_LD_PREFIX instead
Date: Fri, 14 Dec 2018 17:39:42 -0000

Public bug reported:

Seeing this in qemu-user version 3.1.0

Demo:
$ QEMU_LD_PREFIX=$(pwd)/usr/armv7a-cros-linux-gnueabi ../run/qemu-arm 
/tmp/coreutils --coreutils-prog=ls / 
etc  lib  usr
$ ls /
boot  etc   lib     lib64   lost+found  mnt    root  sbin  sys  usr
bin   dev   export  home    lib32       net    proc  run   tmp  var
$ ls usr/armv7a-cros-linux-gnueabi
etc  lib  usr

In strace, the openat for "/" is remapped to the directory specified in 
QEMU_LD_PREFIX:
[pid  5302] openat(AT_FDCWD, "/tmp/qemu/usr/armv7a-cros-linux-gnueabi", 
O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3

As an aside, if I change the code to do chdir("/"); opendir("."); it
works fine.

** Affects: qemu
     Importance: Undecided
         Status: New

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

Title:
  Listing the contents of / lists QEMU_LD_PREFIX instead

Status in QEMU:
  New

Bug description:
  Seeing this in qemu-user version 3.1.0

  Demo:
  $ QEMU_LD_PREFIX=$(pwd)/usr/armv7a-cros-linux-gnueabi ../run/qemu-arm 
/tmp/coreutils --coreutils-prog=ls / 
  etc  lib  usr
  $ ls /
  boot  etc   lib     lib64   lost+found  mnt    root  sbin  sys  usr
  bin   dev   export  home    lib32       net    proc  run   tmp  var
  $ ls usr/armv7a-cros-linux-gnueabi
  etc  lib  usr

  In strace, the openat for "/" is remapped to the directory specified in 
QEMU_LD_PREFIX:
  [pid  5302] openat(AT_FDCWD, "/tmp/qemu/usr/armv7a-cros-linux-gnueabi", 
O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3

  As an aside, if I change the code to do chdir("/"); opendir("."); it
  works fine.

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



reply via email to

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