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=-4.0 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 B08FE211B5 for ; Mon, 14 Jan 2019 16:31:48 +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:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=K+e8I yFLPega188y8jF4/l98SMkLHEBguYMnhH3wToTwcY1UzeXrVCXYG+mDDZBGAM/Af vE+i1+Z8jjNZgQ++qjWbtAgWBQ6UOJX9oMUFC00e7a31dRRHxo2vQhHu/1CkLE6b 2MbwdpXnC0aAOBEvMLsiI9ePiZhyekCv//efHQ= 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:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=eh122hH0ITm xgzNlnCP/03vpqGc=; b=qWYQfTIf55uSR54RMBtacsLMqqElVoes/4fW5xOy5xc XiIG5DkHSEQrLfSys+dduCJN5x28Sdm5iC/0UOtl5KgdMyMdxz+xmqd+9a+AsJul YAoDM5ZWmolp1J839TzcTUCwBrhIbuHGLVmlHAlGLGjINsDmmwwpqwn5JnT06/lQ = Received: (qmail 108864 invoked by alias); 14 Jan 2019 16:31:46 -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 108853 invoked by uid 89); 14 Jan 2019 16:31:46 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.redhat.com From: Florian Weimer To: Carlos O'Donell Cc: Szabolcs Nagy , Zack Weinberg , Christian Brauner , nd , GNU C Library Subject: Re: Fwd: What can a signal handler do with SIGSTKSZ? References: <874lafezhe.fsf@oldenburg2.str.redhat.com> <87sgxzdjl4.fsf@oldenburg2.str.redhat.com> <61925098-4669-b478-9baf-644818d26a44@arm.com> <87d0ozb4c8.fsf@oldenburg2.str.redhat.com> <0a995c61-62d6-7b09-8b5d-1d77b33a242d@redhat.com> Date: Mon, 14 Jan 2019 17:31:35 +0100 In-Reply-To: <0a995c61-62d6-7b09-8b5d-1d77b33a242d@redhat.com> (Carlos O'Donell's message of "Mon, 14 Jan 2019 11:22:53 -0500") Message-ID: <87va2r9p5k.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain * Carlos O'Donell: > On 1/14/19 11:18 AM, Florian Weimer wrote: >> * Szabolcs Nagy: >> >>> i think proposing sysconf(_SC_{MIN}SIGSTKSZ) for posix is the >>> right solution with the kernel providing an upper bound of the >>> stack frame in AT_MINSIGSTKSZ (as it already does on aarch64). >> >> It's still a bit nasty for process migration, but at least it should for >> VM migration. I think that would be a reasonable compromise. >> >> Of course, we'd still need a way to determine how much we should add on >> top of AT_MINSIGSTKSZ for the application developer's benefit. 8-) > > The value of SIGSTKSZ seems to be a "culturally relevant detail" that will > probably be impossible to pin down to a real value. The embedded folks have tooling for this: avoid recursive calls, documenting stack size requirements, all that. There are few things in GCC we could use (but I don't think upstream focus is on C/C++ in this area). Then we could have some hard numbers and also statically verify them. With callbacks, things get more complicated obviously, but I think it would still be manageable. Thanks, Florian