From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 7E839211B4 for ; Fri, 11 Jan 2019 20:09:50 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=KmJX Hxo73TtVcI2wlE/7pv6t80PQwANU+aRuwsuYZkVMLNodwFVabZoqtkVZnHomq6y2 9i9nvhLAII9cxY1Nb40No+gXKOG8/RENGBTv2f/eoy99cSqTuCUAEALGAuQFHf9O LlgewcqwQsRZbdfWNi6gO7XKpZklovkMbg0YNxA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=1hqaL6qkTT RovoV+XzurYfgdDQc=; b=ALwKQWQwtIDAegaN/ErrGv5bNaQ5IHlJl+Fw0UN3zm BfmLwLgrTXBlFH8W9IPw8LWrdi2dRhlzmwOf3Q8a8gNHN0/BQvmMq2shbGqwBaz2 M8xnWS+x2JsVzccJbxCQpC7VUyx6/56FuSnWIfc4F2SC1oyk37XSQHSRFb5RGNMM A= 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-Unsubscribe: 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-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 15:09:33 -0500 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" 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