From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6505 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Possible bug: MINSIGSTKSZ values Date: Fri, 14 Nov 2014 22:18:43 -0500 Message-ID: <20141115031843.GA3679@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1416021546 678 80.91.229.3 (15 Nov 2014 03:19:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2014 03:19:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6518-gllmg-musl=m.gmane.org@lists.openwall.com Sat Nov 15 04:19:00 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XpTt4-0006Y1-HZ for gllmg-musl@m.gmane.org; Sat, 15 Nov 2014 04:18:58 +0100 Original-Received: (qmail 24242 invoked by uid 550); 15 Nov 2014 03:18:57 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24234 invoked from network); 15 Nov 2014 03:18:56 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6505 Archived-At: Currently musl has MINSIGSTKSZ hard-coded as 2048. This is insufficient to store the ucontext_t for many archs. I'd like to keep it small on archs where that's possible, but the current value might not even work for modern x86 with large AVX state, etc. that needs to be saved. I don't have a proposed fix yet, but I think we should survey the values that are needed for different archs and either make it vary per-arch, or if they're all comparable, just increase the value to something that works for all archs. Note that the min pthread stack size is also well below the size of ucontext_t for many archs, but I don't think this is a problem. If you make a thread with a stack smaller than MINSIGSTKSZ+epsilon, you just need to start it with all signals blocked and leave them blocked (or avoid using signal handlers at all). Rich