From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by sourceware.org (Postfix) with ESMTPS id DCEB43858024 for ; Fri, 26 Mar 2021 10:30:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DCEB43858024 Received: from zn.tnic (p200300ec2f075f005a8cb2de3dea7159.dip0.t-ipconnect.de [IPv6:2003:ec:2f07:5f00:5a8c:b2de:3dea:7159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id A9CA41EC0527; Fri, 26 Mar 2021 11:30:43 +0100 (CET) Date: Fri, 26 Mar 2021 11:30:41 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: "Chang S. Bae" , Andrew Cooper , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , X86 ML , Len Brown , Dave Hansen , "H. J. Lu" , Dave Martin , Jann Horn , Michael Ellerman , Carlos O'Donell , Tony Luck , "Ravi V. Shankar" , libc-alpha , linux-arch , Linux API , LKML Subject: Re: [PATCH v7 5/6] x86/signal: Detect and prevent an alternate signal stack overflow Message-ID: <20210326103041.GB25229@zn.tnic> References: <20210316065215.23768-1-chang.seok.bae@intel.com> <20210316065215.23768-6-chang.seok.bae@intel.com> <20210325185435.GB32296@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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: Fri, 26 Mar 2021 10:30:46 -0000 On Thu, Mar 25, 2021 at 09:56:53PM -0700, Andy Lutomirski wrote: > Nope. on_sig_stack() is a horrible kludge and won't work here. We > could have something like __on_sig_stack() or sp_is_on_sig_stack() or > something, though. Yeah, see my other reply. Ack to either of those carved out helpers. > I figure that the people whose programs spontaneously crash should get > a hint why if they look at dmesg. Maybe the message should say > "overflowed sigaltstack -- try noavx512"? I guess, as long as it is ratelimited. I mean, we can remove it later if it starts gettin' annoying. > We really ought to have a SIGSIGFAIL signal that's sent, double-fault > style, when we fail to send a signal. Yeap, we should be able to tell userspace that we couldn't send a signal, hohumm. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette