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 2106CC433ED for ; Wed, 14 Apr 2021 10:12:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F0FAE613C1 for ; Wed, 14 Apr 2021 10:12:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232934AbhDNKNO (ORCPT ); Wed, 14 Apr 2021 06:13:14 -0400 Received: from mail.skyhub.de ([5.9.137.197]:47620 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232631AbhDNKNK (ORCPT ); Wed, 14 Apr 2021 06:13:10 -0400 Received: from zn.tnic (p200300ec2f0e8f0047b5d8db40ec11d2.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:8f00:47b5:d8db:40ec:11d2]) (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 A0D021EC0528; Wed, 14 Apr 2021 12:12:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1618395168; 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=v5HUY65OS78ET9NFUwXyXqIOqxRqJhTJ7DiNehOvsA4=; b=RLeFPTKrvHtvaFERYcN8XC52g3wEm7k4DwS6AYJnuoN3Fa0h+ssGq1e/w04BP0lfeeejkt MkUVJAyxPy6m7LbMD1Kukk60nerb9KyLenIMkWrfVmJB5B8J3uZmWyrICZDCZzYf6LXPEO 3QHxyMi4wTomiOkxRs9v3XriVFHWRB0= Date: Wed, 14 Apr 2021 12:12:50 +0200 From: Borislav Petkov To: "Bae, Chang Seok" , Florian Weimer Cc: Andy Lutomirski , "Cooper, Andrew" , Boris Ostrovsky , "Gross, Jurgen" , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , X86 ML , "Brown, Len" , "Hansen, Dave" , "H. J. Lu" , Dave Martin , Jann Horn , Michael Ellerman , Carlos O'Donell , "Luck, Tony" , "Shankar, Ravi V" , 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: <20210414101250.GD10709@zn.tnic> References: <20210316065215.23768-1-chang.seok.bae@intel.com> <20210316065215.23768-6-chang.seok.bae@intel.com> <20210325185435.GB32296@zn.tnic> <20210326103041.GB25229@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-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 10:30:23PM +0000, Bae, Chang Seok wrote: > On Mar 26, 2021, at 03:30, Borislav Petkov wrote: > > On Thu, Mar 25, 2021 at 09:56:53PM -0700, Andy Lutomirski wrote: > >> 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. > > Hi Boris, > > Let me clarify some details as preparing to include this in a revision. > > So, IIUC, a number needs to be assigned for this new SIGFAIL. At a glance, not > sure which one to pick there in signal.h -- 1-31 fully occupied and the rest > for 33 different real-time signals. > > Also, perhaps, force_sig(SIGFAIL) here, instead of return -1 -- to die with > SIGSEGV. I think this needs to be decided together with userspace people so that they can act accordingly and whether it even makes sense to them. Florian, any suggestions? Subthread starts here: https://lkml.kernel.org/r/CALCETrXQZuvJQrHDMst6PPgtJxaS_sPk2JhwMiMDNPunq45YFg@mail.gmail.com Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette