All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <Laurent@vivier.eu>
To: qemu-devel@nongnu.org
Subject: [Bug 1829459] Re: qemu seems to lack support for pid namespace.
Date: Thu, 02 Jan 2020 12:09:03 -0000	[thread overview]
Message-ID: <157796694364.27180.5017209461803201706.malone@chaenomeles.canonical.com> (raw)
In-Reply-To: 155806778498.21734.945063058665872727.malonedeb@chaenomeles.canonical.com

PID namespace prevents to execute some syscalls, even if you use --map-
root-user. This is managed at kernel level by the capabilities.

Could you try to do the exact same thing with the native architecture
binaries in the chroot to see if the problem really comes from qemu-
user?

Could you try to use the latest unshare version (util-linux package)
that adds a "--keep-caps" parameter (v2.35-rc1) to preserve the
capabilities?

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

Title:
  qemu seems to lack support for pid namespace.

Status in QEMU:
  New

Bug description:
  # Version

  qemu-4.0.0
  glibc-2.28

  # commands used to launch qemu-aarch64 in user mode.

  : ${QEMU_BINFMT_FLAGS:=OC}

  printf '%s\n' ':qemu-
  aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin
  /qemu-aarch64:'"${QEMU_BINFMT_FLAGS}"
  >/proc/sys/fs/binfmt_misc/register

  > sudo cp /usr/bin/qemu-aarch64 $RPI/usr/bin
  > sudo chroot $RPI /bin/ksh -l

  # host

  Gentoo Linux amd64

  # Guest

  Gentoo Linux aarch64

  # The problem that I have

  "emerge" program fails due to the error, "qemu: qemu_thread_create: Invalid argument".
  "emerge" is Gentoo's package manager that compiles and installs packages.

  # Workaround

  Disable pid-sandbox in emerge.

  # How to reproduce the issue

  Execute

  unshare --pid -- echo hello world

  or

  python -c "import portage.process; portage.process.spawn(['echo',
  'hello', 'world'], unshare_pid=True)"

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


  parent reply	other threads:[~2020-01-02 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17  4:36 [Qemu-devel] [Bug 1829459] [NEW] qemu: qemu_thread_create: Invalid argument crocket
2019-12-29 13:32 ` [Bug 1829459] Re: qemu seems to lack support for pid namespace crocket
2020-01-02 12:09 ` Laurent Vivier [this message]
2020-01-02 13:28 ` crocket
2020-01-02 13:28 ` crocket
2020-01-02 13:55 ` crocket
2021-01-06 19:43 ` -
2021-05-05 11:28 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=157796694364.27180.5017209461803201706.malone@chaenomeles.canonical.com \
    --to=laurent@vivier.eu \
    --cc=1829459@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.