From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101869 invoked by alias); 11 Jan 2019 20:09:48 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 101855 invoked by uid 89); 11 Jan 2019 20:09:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=harsh, fairly, reflection, insist X-HELO: mailbackend.panix.com MIME-Version: 1.0 References: <874lafezhe.fsf@oldenburg2.str.redhat.com> In-Reply-To: <874lafezhe.fsf@oldenburg2.str.redhat.com> From: Zack Weinberg Date: Fri, 11 Jan 2019 20:09:00 -0000 Message-ID: Subject: Re: Fwd: What can a signal handler do with SIGSTKSZ? To: Florian Weimer Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-01/txt/msg00260.txt.bz2 On Fri, Jan 11, 2019 at 3:00 PM Florian Weimer wrote: > * Zack Weinberg: > > Now, if 8192 bytes is not enough to call some async-signal-safe > > functions, that's another problem and one I would like to see > > addressed by making the unwind library more space-efficient or > > something along those lines. > > Small nit: This is unrelated to async-signal-safe functions because size > considerations also apply to synchronously delivered signals, where few > (if any) restrictions exist. Yeah, I was just using "async-signal-safe functions" as a convenient proxy for "functions we know people are likely to try to call from a signal handler of any kind." I was pretty harsh on Carlos's proposal but, on further reflection, given the fairly nasty ABI compatibility constraints we're working with here (SIGSTKSZ having to be usable as the size of a statically allocated char[], for instance), I could live with _most_ of it. The only change I insist on is, by hook or by crook we _must_ find a way to make it safe to call `_exit` and `abort`. Do you think we could push the kernel people to expose the space requirement of a signal frame in some fashion that we could wrap up in a new sysconf() constant? Then we could deprecate the constants, in the same way that long ago PAGESIZE was replaced by sysconf(_SC_PAGESIZE). zw