mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Michael Forney <mforney@mforney.org>
To: musl@lists.openwall.com
Subject: Re: [musl] qemu-user and musl
Date: Thu, 29 Oct 2020 00:37:22 -0700	[thread overview]
Message-ID: <3BLFYULF50JCZ.2CFAX0M3JJP1V@mforney.org> (raw)
In-Reply-To: <20201029031121.GJ534@brightrain.aerifal.cx>

Rich Felker <dalias@libc.org> wrote:
> I think that's okay, and I'm merging the patch now (thanks for
> reminding me!), but I'm not sure if it will work still. The signal
> number used as SIGTIMER is considered an implementation-reserved
> internal signal by musl, and as such it can't be poked at by any of
> the public signal API -- and even if it could be, poking at it would
> break things.

Doesn't qemu's signal translating code solve this problem? As of
[0], it maps target signals starting at 32 to host signal SIGRTMIN
+ sig - 32 (previously, it just swapped __SIGRTMIN and __SIGRTMAX).
So the target libc's reserved signal maps to some free RT signal
on the host, and that's what ends up in the sigev_signo passed to
the host libc.

I wrote a simple test program that used SIGEV_THREAD, and it seemed
to work after applying James' patch.

[0] https://github.com/qemu/qemu/commit/6bc024e713fd35eb5fddbe16acd8dc92d27872a9

      reply	other threads:[~2020-10-29  7:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 23:50 Michael Forney
2020-10-29  2:24 ` Érico Nogueira
2020-10-29  3:11 ` Rich Felker
2020-10-29  7:37   ` Michael Forney [this message]

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=3BLFYULF50JCZ.2CFAX0M3JJP1V@mforney.org \
    --to=mforney@mforney.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).