From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B983AC433C1 for ; Fri, 26 Mar 2021 10:31:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8911F61A4F for ; Fri, 26 Mar 2021 10:31:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbhCZKbQ (ORCPT ); Fri, 26 Mar 2021 06:31:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbhCZKaq (ORCPT ); Fri, 26 Mar 2021 06:30:46 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2841FC0613AA; Fri, 26 Mar 2021 03:30:45 -0700 (PDT) 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1616754643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=W+8JSi+jUutInDYaNQdxHTb+gXqbdXr/OzLah6NLmkM=; b=OIayWCHp1dvLNkQjVAGc5/tMcCL43oiq0F0QPBO48+ycq2QZFnxx6DAmc7uY7ssnR3Cdrc nNG4CohAjAxZbAb910qTZMgQjwGNDscbhlcl9ddipRaX3ZW9fFA5K3I+jMnMtW2r/DcHqD W6ebeYOTP/HQajqeSQOvsPocTnxQlOs= 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: Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org 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