[Top][All Lists]

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

Re: [Qemu-discuss] golang on linux-user

From: Jakob Bohm
Subject: Re: [Qemu-discuss] golang on linux-user
Date: Fri, 4 Mar 2016 06:14:51 +0100
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 01/03/2016 14:08, Peter Maydell wrote:
On 1 March 2016 at 13:00, Jakob Bohm <address@hidden> wrote:
As an alternative, could it be useful to look beyond the current
glibc code and see if there is a way for qemu-user to provide the
full set of Linux syscall provided facilities (including signals
and calls), without having to reserve some for itself.  The
classic test is of cause to nest qemu-user under itself to
infinite depth using the same pair of qemu-user binaries
repeatedly without them knowing their own nesting depth.

This is possible in theory, but you basically have to ditch
the idea of linking against glibc, which would be enormously
painful. This is how valgrind does things, which gives it
much more control. But since QEMU isn't a special purpose
user-mode emulation codebase it would be really awkward --
much of our system emulation assumes and makes heavy use
of not just glibc but also glib and other libraries.

No need to drop glibc.  Working around glibc (e.g. by issuing
syscalls and accessing glibc internals) would probably be enough.

Another possibility could be to make glibc issue some syscalls
through wrapper functions in the qemu code.

There are lots of possibilities once you don't treat glibc as a
black box,

For example, qemu-user could have a SIGSETXID handler which both
caters to the internal needs of qemu and its libraries but also
forwards the signal to any guest handlers (installed or default)
for that same signal.

QEMU can't register a SIGSETXID handler for its own use,
because glibc refuses to let you do that.

There's a comment in the code which notes that it might be
possible to multiplex some guest signals onto one host
signal, which would let the guest use the currently
inaccessible SIGRTMAX.

-- PMM


Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded

reply via email to

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