From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28948 invoked from network); 29 Oct 2020 07:37:39 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 29 Oct 2020 07:37:39 -0000 Received: (qmail 30301 invoked by uid 550); 29 Oct 2020 07:37:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 30278 invoked from network); 29 Oct 2020 07:37:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=date:to:subject:from:references:in-reply-to:message-id:user-agent :mime-version:content-transfer-encoding; bh=vGbcpTZYIkeC2bQ4blSB0O0t74dMcZjVZzpCN+0DH6s=; b=NDNR4GwSGUxWEByBb47pamkWq9fEtjYUD2nPdQBTSPKp856ttNBQ3TNC820HhPNAGB Tks4NFse4Fg2VzjtakmR4XCIPS/5YOvmWpTu1nuHSkW4kuMf9MQKbvLbNM+GgossF0GL Be+Ji/1P5sUbA/dSlvQ4+4ByLHuE0FsMb/fbyfqtAqXf4O5+Tk7/qET9+hK5Z4azVxs4 Od4navo+OvIgERk3ng9xNDWGh0ZIgZD0GuwoBkUSCbmUhhRbxgd+S9txYXZVhEAJpk0Q ykztuz5uzQ+lBUq6ndx+GnrhXOaH2dYkDR3C4zEEyILBI3g1v7i1EANHbVoN1kwBAYF5 mKUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:to:subject:from:references:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=vGbcpTZYIkeC2bQ4blSB0O0t74dMcZjVZzpCN+0DH6s=; b=QPSGNk/x2Az+IRp20fE8lWORlVFjSGQhvwC2+YSCdFVA7oguyWa7hjFs+Qtnkfs0su 6pKKEeTsuYJuspYdHbL+M1tLq0HOuT6P2h1FangTx66A39uMaewnjuPIFiTpiUx3d4A/ YKNOpPhSOksAFOb2GFp/XU2cHTOgv6VgdtGw9t8+Zw8pm5lC+Opwwl5RVyW6hr7rPB/q yEXHUC2DWSNfP3SBWXSmvx9VQvqgWpkqA/vKt4v0roLc4B0R01ucimx+sdnPzt/i5Ckz dKGqDtD+rSH2jN/js4qQjzYho1qHzo6zSufEiVB1A4k2Ae8rYmEz3MbbnoAOd9uNnza4 4+tg== X-Gm-Message-State: AOAM530VKZIbKAPIY+mltXIGXi5qwP3xoO5ZJDVX8taDuRF6o8oWfPc3 qDYR21ysjIG/SEdkMazhYyb623tKm+zXmR3QttY= X-Google-Smtp-Source: ABdhPJzonLH0pvHqZBl7hUCq3CPmmL9l1HdNE4D9Hv6SEG7p6SgnmUfZVJGJjIZhx7kRvt4r+yS+ag== X-Received: by 2002:a17:902:b70a:b029:d2:6391:a80f with SMTP id d10-20020a170902b70ab02900d26391a80fmr2772168pls.0.1603957043976; Thu, 29 Oct 2020 00:37:23 -0700 (PDT) Date: Thu, 29 Oct 2020 00:37:22 -0700 To: musl@lists.openwall.com From: Michael Forney References: <3634W4XGB9R4L.2UYZLDJ6W0AET@mforney.org> <20201029031121.GJ534@brightrain.aerifal.cx> In-Reply-To: <20201029031121.GJ534@brightrain.aerifal.cx> Message-Id: <3BLFYULF50JCZ.2CFAX0M3JJP1V@mforney.org> User-Agent: mblaze/1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] qemu-user and musl Rich Felker 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/6bc024e713fd35eb5fddbe16acd8dc92d27= 872a9