qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* QEMU user mode execve
@ 2019-10-03 16:12 Mauricio Galindo
  0 siblings, 0 replies; 4+ messages in thread
From: Mauricio Galindo @ 2019-10-03 16:12 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

Hi,

I'm running QEMU in user mode and I'm running into issues when trying to
exec binaries within the emulated process given that binaries are
expected to run in the native architecture. Would it be useful to have an
option to rewrite execve(/bin/some_binary, ...) to
execve(qemu-$arch-static, [/bin/some_binary, ...], ...)?

[-- Attachment #2: Type: text/html, Size: 381 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* QEMU user mode execve
@ 2019-10-03 17:48 Mauricio Galindo
  2019-10-03 19:32 ` Michal Suchánek
  0 siblings, 1 reply; 4+ messages in thread
From: Mauricio Galindo @ 2019-10-03 17:48 UTC (permalink / raw)
  To: qemu-devel

Hi,

I'm running QEMU in user mode and I'm running into issues when trying
to exec binaries within the emulated process given that binaries are
expected to run in the native architecture. Would it be useful to have
an option to rewrite execve(/bin/some_binary, ...) to
execve(qemu-$arch-static, [/bin/some_binary, ...], ...)?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: QEMU user mode execve
  2019-10-03 17:48 Mauricio Galindo
@ 2019-10-03 19:32 ` Michal Suchánek
  2019-10-03 19:41   ` Warner Losh
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Suchánek @ 2019-10-03 19:32 UTC (permalink / raw)
  To: Mauricio Galindo; +Cc: qemu-devel

On Thu, Oct 03, 2019 at 10:48:46AM -0700, Mauricio Galindo wrote:
> Hi,
> 
> I'm running QEMU in user mode and I'm running into issues when trying
> to exec binaries within the emulated process given that binaries are
> expected to run in the native architecture. Would it be useful to have
> an option to rewrite execve(/bin/some_binary, ...) to
> execve(qemu-$arch-static, [/bin/some_binary, ...], ...)?
> 

This is handled in kernel by binfmt-misc.

Debian has nice packaging for the required configuration. They use it to
create non-native installation images.

HTH

Michal


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: QEMU user mode execve
  2019-10-03 19:32 ` Michal Suchánek
@ 2019-10-03 19:41   ` Warner Losh
  0 siblings, 0 replies; 4+ messages in thread
From: Warner Losh @ 2019-10-03 19:41 UTC (permalink / raw)
  To: Michal Suchánek; +Cc: Mauricio Galindo, QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

On Thu, Oct 3, 2019 at 1:36 PM Michal Suchánek <msuchanek@suse.de> wrote:

> On Thu, Oct 03, 2019 at 10:48:46AM -0700, Mauricio Galindo wrote:
> > Hi,
> >
> > I'm running QEMU in user mode and I'm running into issues when trying
> > to exec binaries within the emulated process given that binaries are
> > expected to run in the native architecture. Would it be useful to have
> > an option to rewrite execve(/bin/some_binary, ...) to
> > execve(qemu-$arch-static, [/bin/some_binary, ...], ...)?
> >
>
> This is handled in kernel by binfmt-misc.
>
> Debian has nice packaging for the required configuration. They use it to
> create non-native installation images.
>

FreeBSD also uses bsd-user (admittedly a much changed one from what's
upstream[*]) to build non-native packages. It uses the same binfmt stuff in
a chroot.

Warner

[*] I've rebased our work forward up through 3.1 release and hope to have
it rebased through the top of the tree shortly and have it ready for
upstreaming soon.

[-- Attachment #2: Type: text/html, Size: 1452 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-03 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-03 16:12 QEMU user mode execve Mauricio Galindo
  -- strict thread matches above, loose matches on Subject: below --
2019-10-03 17:48 Mauricio Galindo
2019-10-03 19:32 ` Michal Suchánek
2019-10-03 19:41   ` Warner Losh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).