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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 0C302C54FCB for ; Sat, 25 Apr 2020 22:25:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF4F520706 for ; Sat, 25 Apr 2020 22:25:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DUXzjlY0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726306AbgDYWZJ (ORCPT ); Sat, 25 Apr 2020 18:25:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726232AbgDYWZI (ORCPT ); Sat, 25 Apr 2020 18:25:08 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57211C09B04F for ; Sat, 25 Apr 2020 15:25:08 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id b1so7520053qtt.1 for ; Sat, 25 Apr 2020 15:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xuQcmX1KuUHGcvDHgPS1loxSumVbQobQeCIW/Qnf+WU=; b=DUXzjlY0Gb6oeL/I2LT28x1KTxIhrpTcB8nsZp0Bj6bBweC03HPMYVSwd8cOGoavMV pPZu+ng+/FIsmudg/jkmH4Mf1+sXsDntxyGjEnwqAsgLxmrJwdTKPuJvZk1vvlqSaUtF AI51Wt7EKHFOEqDfoSMQmAJto565MqJtsgyRSaWQK0yZkIADmeo0ZQ1B6MZ8POxeBqj6 rjBSjKWMF2C4sssgW/Qf+pinfy1pA9Gt47I6tK284HM1w3iGCELctfTm5+v+qfVN1rTf EGLW5NS/0jUXu10M22D0ezOtNRlTj3EF6BjOZStMkpD0mKCVbRLyMJgGRKuHxvuxFzoy NriQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=xuQcmX1KuUHGcvDHgPS1loxSumVbQobQeCIW/Qnf+WU=; b=f35mfBoZmRtlYiFKN4bzSLjcX437r4KmuPxCfHiWRanL3iQ9b4ohDdLfJ/ZD1N54S2 p/SWOolDV4iZNgyHbi4QpAl4liOmzpYabM4pQpcYlRpW549luh9WadgS9QhJes1wV6U6 aTT6rcP7KF6mQNj7/7fB/hHYQJpveEg7opR9EtAIff3SZkeGPRQlD+itJ8iJC00RMmif kkqYXPWu3Gvzrg3yE9zWwXOLNPxZAZVD3m5gCCV1BQADhbblNmzcOjdcve6LHi8rlbm/ mc0jzdacwdr6Db/P64WqRinMgyvEHBo3yUF+04/rGSMCfIFNyo6fSk1CuzvFCvIsIGRQ r2DQ== X-Gm-Message-State: AGi0PubWKNZoynEuSMbleAGxrwofiTOBqFcMoS7ev3/wcgIFUFsUpy7A Vd6cpQvqG9QDgJxRuiU04bY= X-Google-Smtp-Source: APiQypLxynL7JE9q+IReY89tAIdlSibLu7fiLFyDHSVDYQXBdXJyuz24+DnZFevMiJ8c7hxElV6KNA== X-Received: by 2002:aed:2de7:: with SMTP id i94mr16651310qtd.248.1587853506847; Sat, 25 Apr 2020 15:25:06 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id i5sm6631996qtw.97.2020.04.25.15.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Apr 2020 15:25:06 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Sat, 25 Apr 2020 18:25:04 -0400 To: Segher Boessenkool Cc: Borislav Petkov , Arvind Sankar , Jakub Jelinek , jgross@suse.com, x86@kernel.org, Kees Cook , Peter Zijlstra , linuxppc-dev@lists.ozlabs.org, Michael Matz , Nick Desaulniers , LKML , Sergei Trofimovich , clang-built-linux , Ingo Molnar , Paul Mackerras , Andy Lutomirski , "H. Peter Anvin" , =?utf-8?Q?Fr=C3=A9d=C3=A9ric_Pierret_=28fepitre=29?= , Thomas Gleixner , Martin =?utf-8?B?TGnFoWth?= , boris.ostrovsky@oracle.com Subject: Re: [PATCH] x86: Fix early boot crash on gcc-10, next try Message-ID: <20200425222504.GA1080319@rani.riverdale.lan> References: <20200423125300.GC26021@zn.tnic> <20200423161126.GD26021@zn.tnic> <20200425014657.GA2191784@rani.riverdale.lan> <20200425085759.GA24294@zn.tnic> <20200425150440.GA470719@rani.riverdale.lan> <20200425173140.GB24294@zn.tnic> <20200425183701.GE17645@gate.crashing.org> <20200425185313.GD24294@zn.tnic> <20200425191549.GF17645@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200425191549.GF17645@gate.crashing.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 25, 2020 at 02:15:49PM -0500, Segher Boessenkool wrote: > On Sat, Apr 25, 2020 at 08:53:13PM +0200, Borislav Petkov wrote: > > On Sat, Apr 25, 2020 at 01:37:01PM -0500, Segher Boessenkool wrote: > > > That is a lot more typing then > > > asm(""); > > > > That's why a macro with a hopefully more descriptive name would be > > telling more than a mere asm(""). > > My point is that you should explain at *every use* of this why you cannot > have tail calls *there*. This is very unusual, after all. > > There are *very* few places where you want to prevent tail calls, that's > why there is no attribute for it. > > > Segher Well, there is -fno-optimize-sibling-calls, but we wouldn't be able to use it via the optimize attribute for the same reason we couldn't use no-stack-protector. 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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 0DA49C54FCB for ; Sat, 25 Apr 2020 22:27:09 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B17D520706 for ; Sat, 25 Apr 2020 22:27:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DUXzjlY0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B17D520706 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alum.mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 498lyf3RYGzDqcN for ; Sun, 26 Apr 2020 08:27:06 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::841; helo=mail-qt1-x841.google.com; envelope-from=niveditas98@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=alum.mit.edu Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=DUXzjlY0; dkim-atps=neutral Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 498lwT5yGyzDqNK for ; Sun, 26 Apr 2020 08:25:11 +1000 (AEST) Received: by mail-qt1-x841.google.com with SMTP id k12so11195691qtm.4 for ; Sat, 25 Apr 2020 15:25:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xuQcmX1KuUHGcvDHgPS1loxSumVbQobQeCIW/Qnf+WU=; b=DUXzjlY0Gb6oeL/I2LT28x1KTxIhrpTcB8nsZp0Bj6bBweC03HPMYVSwd8cOGoavMV pPZu+ng+/FIsmudg/jkmH4Mf1+sXsDntxyGjEnwqAsgLxmrJwdTKPuJvZk1vvlqSaUtF AI51Wt7EKHFOEqDfoSMQmAJto565MqJtsgyRSaWQK0yZkIADmeo0ZQ1B6MZ8POxeBqj6 rjBSjKWMF2C4sssgW/Qf+pinfy1pA9Gt47I6tK284HM1w3iGCELctfTm5+v+qfVN1rTf EGLW5NS/0jUXu10M22D0ezOtNRlTj3EF6BjOZStMkpD0mKCVbRLyMJgGRKuHxvuxFzoy NriQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=xuQcmX1KuUHGcvDHgPS1loxSumVbQobQeCIW/Qnf+WU=; b=G96UP9bc0/vOHFK/i+7BddOue06ELGg2OO2tr5+P25UHK8y/LIQE7dAJtVTQ5M2qM8 QWojlbDXp5//0RcjD8Gf4d9IJDlovBeb7uibn9v3ydv/xgPLTHmTLNlcnCrzOxmdmKaB OfrTI/QS6nyTOVABCwFxuOnwqbp1zYZeDZo0iYJ+bVvSauX3QzIuo6XDSqAZh9VCmgCf sgt6P2vCpFm0ImOSJ84YoT7v/LsoM7t5pRc82JaUHvvoP0ICrTi2847HIJKEf9ITyJzu rwAL0S0Ivx29s/yXpriLT1uxehoHmC3GwOCGevVJ00SkV4ref+OBG7RxpNGdSx4jO70o gK1g== X-Gm-Message-State: AGi0PuaZrxKcD2NQr36wWhXS3+4xPiud3VJam9P5oCR+3J7On58tUPcx mJ2SV+exVvCWOvnn5GFmT8E= X-Google-Smtp-Source: APiQypLxynL7JE9q+IReY89tAIdlSibLu7fiLFyDHSVDYQXBdXJyuz24+DnZFevMiJ8c7hxElV6KNA== X-Received: by 2002:aed:2de7:: with SMTP id i94mr16651310qtd.248.1587853506847; Sat, 25 Apr 2020 15:25:06 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id i5sm6631996qtw.97.2020.04.25.15.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Apr 2020 15:25:06 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Sat, 25 Apr 2020 18:25:04 -0400 To: Segher Boessenkool Subject: Re: [PATCH] x86: Fix early boot crash on gcc-10, next try Message-ID: <20200425222504.GA1080319@rani.riverdale.lan> References: <20200423125300.GC26021@zn.tnic> <20200423161126.GD26021@zn.tnic> <20200425014657.GA2191784@rani.riverdale.lan> <20200425085759.GA24294@zn.tnic> <20200425150440.GA470719@rani.riverdale.lan> <20200425173140.GB24294@zn.tnic> <20200425183701.GE17645@gate.crashing.org> <20200425185313.GD24294@zn.tnic> <20200425191549.GF17645@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200425191549.GF17645@gate.crashing.org> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jakub Jelinek , jgross@suse.com, Michael Matz , Kees Cook , =?utf-8?Q?Fr=C3=A9d=C3=A9ric_Pierret_=28fepitre=29?= , Peter Zijlstra , Martin =?utf-8?B?TGnFoWth?= , x86@kernel.org, Nick Desaulniers , LKML , Sergei Trofimovich , clang-built-linux , Arvind Sankar , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Paul Mackerras , Thomas Gleixner , linuxppc-dev@lists.ozlabs.org, boris.ostrovsky@oracle.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sat, Apr 25, 2020 at 02:15:49PM -0500, Segher Boessenkool wrote: > On Sat, Apr 25, 2020 at 08:53:13PM +0200, Borislav Petkov wrote: > > On Sat, Apr 25, 2020 at 01:37:01PM -0500, Segher Boessenkool wrote: > > > That is a lot more typing then > > > asm(""); > > > > That's why a macro with a hopefully more descriptive name would be > > telling more than a mere asm(""). > > My point is that you should explain at *every use* of this why you cannot > have tail calls *there*. This is very unusual, after all. > > There are *very* few places where you want to prevent tail calls, that's > why there is no attribute for it. > > > Segher Well, there is -fno-optimize-sibling-calls, but we wouldn't be able to use it via the optimize attribute for the same reason we couldn't use no-stack-protector.