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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 8560 invoked from network); 29 Oct 2020 14:13:12 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 29 Oct 2020 14:13:12 -0000 Received: (qmail 24228 invoked by uid 550); 29 Oct 2020 14:13:10 -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 24210 invoked from network); 29 Oct 2020 14:13:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603980778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zHqrHkxsvG5IsIYw+0isttYXEjlGWrAwqM6Zoi230JI=; b=Z1rv5pIGeimzkRZ4FD1sqtqQZTxMw2YTSYz6qyzxWMedyjwyijNGXp6t7AVIPRT362QTRu SDlqj88BXZI8gzx0557E4e0uo/rH6Q//83kINnTQTtbN+SUEuMKbW+48eLrifpzQU2nesR De8XhA/Kqop8SXBBCxNAbhj093JIoCY= X-MC-Unique: IZ0m4PnrPEekNKQ-MHIfjg-1 From: Florian Weimer To: musl@lists.openwall.com References: <20201029063448.GK534@brightrain.aerifal.cx> <20201029133839.GL534@brightrain.aerifal.cx> Date: Thu, 29 Oct 2020 15:12:21 +0100 In-Reply-To: (Alexander Monakov's message of "Thu, 29 Oct 2020 17:02:26 +0300 (MSK)") Message-ID: <87pn51ruii.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=fweimer@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Subject: Re: [musl] More thoughts on wrapping signal handling * Alexander Monakov: > On Thu, 29 Oct 2020, Alexander Monakov wrote: > >> On Thu, 29 Oct 2020, Rich Felker wrote: >> >> > Yes, I kinda hand-waved over this with the word "call", which I >> > thought about annotating with (*). In the case of SA_ONSTACK you need >> > a primitive to "call on new stack", and while the ucontext is mostly >> > not meaningful/inspectable to the signal handler (because it's >> > interrupting libc code), the saved signal mask is. You can have the >> > caller restore it (in place of SYS_[rt_]sigreturn), but the natural >> > common solution to all of these needs is having a sort of makecontext. >> >> Alternatively you could re-raise the signal to have the kernel re-deliver >> it with the correctly regenerated ucontext (and on the right stack)? >> Would that be undesirable for some reason? > > Ah, because there's no way to propagate siginfo struct. Sorry :) Yes, and that's why I think copying it into TLS space will not work, either. Thanks, Florian -- Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill