From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 1817A3954C07 for ; Tue, 6 Oct 2020 17:00:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1817A3954C07 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A31C1D6E; Tue, 6 Oct 2020 10:00:26 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A660A3F66B; Tue, 6 Oct 2020 10:00:24 -0700 (PDT) Date: Tue, 6 Oct 2020 18:00:21 +0100 From: Dave Martin To: Dave Hansen Cc: "H.J. Lu" , "Chang S. Bae" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , the arch/x86 maintainers , Len Brown , Michael Ellerman , Tony Luck , "Ravi V. Shankar" , GNU C Library , linux-arch , Linux API , LKML Subject: Re: [RFC PATCH 0/4] x86: Improve Minimum Alternate Stack Size Message-ID: <20201006170020.GB6642@arm.com> References: <20200929205746.6763-1-chang.seok.bae@intel.com> <20201005134534.GT6642@arm.com> <20201006092532.GU6642@arm.com> <20201006152553.GY6642@arm.com> <7663eff0-6c94-f6bf-f3e2-93ede50e75ed@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7663eff0-6c94-f6bf-f3e2-93ede50e75ed@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2020 17:00:28 -0000 On Tue, Oct 06, 2020 at 08:33:47AM -0700, Dave Hansen wrote: > On 10/6/20 8:25 AM, Dave Martin wrote: > > Or are people reporting real stack overruns on x86 today? > > We have real overruns. We have ~2800 bytes of XSAVE (regisiter) state > mostly from AVX-512, and a 2048 byte MINSIGSTKSZ. Right. Out of interest, do you believe that's a direct consequence of the larger kernel-generated signal frame, or does the expansion of userspace stack frames play a role too? In practice software just assumes SIGSTKSZ and then ignores the problem until / unless an actual stack overflow is seen. There's probably a lot of software out there whose stack is theoretically too small even without AVX-512 etc. in the mix, especially when considering the possibility of nested signals... Cheers ---Dave