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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 B1290C56202 for ; Wed, 25 Nov 2020 19:56:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47D542075A for ; Wed, 25 Nov 2020 19:56:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="L3yrAGPv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729184AbgKYT4o (ORCPT ); Wed, 25 Nov 2020 14:56:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729179AbgKYT4n (ORCPT ); Wed, 25 Nov 2020 14:56:43 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6F1AC0613D4 for ; Wed, 25 Nov 2020 11:56:43 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id w202so3328434pff.10 for ; Wed, 25 Nov 2020 11:56:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ofTfkWYUWnDt5Dg5+/2L55KSQmDXwtOEr3R/0BWmNYw=; b=L3yrAGPvbaTitddy0cqyIp1refT32nFo6YSuUputNyvwSu6hZjI8dmlMJmsCaSE/Bn OnICAbIZLLdClhTVcMvHoRyyKB9g8SPKVZ/Rl0Cod+RKbreLJiFlls7lP2sPyesIe/yL yckbZydtpa+oJXMwFyPfcInCcdojhx5okP2CY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ofTfkWYUWnDt5Dg5+/2L55KSQmDXwtOEr3R/0BWmNYw=; b=qev5H7iT9PNGUDZ26jxLJ6UFlfhLfcxVqQz8zRc3lBP4mDKP5uhNRDUPk3RF4UWfS2 5ut0CjYtUry7D+x9kNsw4E7A6dwF4FyMQGwrmIETsQKbi7ZWNXY27obT27wfYjVunY+U GzBCxHQhc3n7FKH5MqCCrIcYSw41oq6Yoi10Ey/8ekl/tzI/9OI89Rumi9Yi45AQmZsU RrR41DIEmIR3iCFJ1NVGcNcNUnpFXarVDp4HdoELgdaDY//8drPxWTaB/QUnpAiXopF3 /csy2norpyiddkaCQCsx1b8Hm024YVs9vl+IGPvMPXxmj778FP1HQAE2jrU7KNwRsAx1 mygw== X-Gm-Message-State: AOAM533ziHn2OglVq3JqspSvjYgthm3RXzHWRjqbodgVGpSNXCtqDu7b 5Gt8YSRuEBqrBp5X+rG2p68kgA== X-Google-Smtp-Source: ABdhPJzQhi/Py9Zyz40HgkfxhSpyqTzgMA9lYXSulHzx6T+Jt8RVj3aLuq3t9fAGdxQNbu7tcCyesQ== X-Received: by 2002:a17:90a:7e0f:: with SMTP id i15mr5940956pjl.77.1606334203332; Wed, 25 Nov 2020 11:56:43 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id t8sm2694156pfe.65.2020.11.25.11.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 11:56:42 -0800 (PST) Date: Wed, 25 Nov 2020 11:56:40 -0800 From: Kees Cook To: Ard Biesheuvel Cc: Miguel Ojeda , Segher Boessenkool , Nick Desaulniers , Alexandre Chartre , kbuild-all@lists.01.org, clang-built-linux , linux-toolchains@vger.kernel.org, kernel test robot , Arvind Sankar Subject: Re: [RFC][PATCH 21/24] x86/entry: Disable stack-protector for IST entry C handlers Message-ID: <202011251156.055E59A@keescook> References: <20201109144425.270789-22-alexandre.chartre@oracle.com> <202011131552.4kvOb9Id-lkp@intel.com> <20201113234701.GV2672@gate.crashing.org> <20201114002624.GX2672@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Sat, Nov 14, 2020 at 11:20:17AM +0100, Ard Biesheuvel wrote: > On Sat, 14 Nov 2020 at 02:59, Miguel Ojeda > wrote: > > > > On Sat, Nov 14, 2020 at 1:27 AM Segher Boessenkool > > wrote: > > > > > > But you cannot limit yourself to the greatest common denominator: the > > > kernel wants to use many features only available on newer compiler > > > versions, too; this is no different. > > > > What we do is conditionally enable both new and differentiating > > features. We don't break GCC or LLVM just because the other introduces > > a new shiny feature, nor we break builds with old compilers (except > > when raising the minimum supported version). > > > > That is why we need a level of indirection in things like attributes > > nowadays, and why patches like the above are not ideal anymore > > (regardless of which attribute we are talking about). > > > > In spite of the apparent difference of opinion here, there are two > irrefutable facts about __attribute__((optimize)) on GCC that can only > lead to the conclusion that we must never use it in Linux: > - the GCC developers refuse to rigorously define its behavior, so we > don't know what it actually does; > - it has been observed to nullify unrelated command line arguments in > unexpected and undocumented ways. > > So it does not matter whether you call that quirky or something else, > there is no way we can make meaningful use of it, and therefore, > abstracting or parameterizing any of its uses should be avoided as > well. Perhaps it's worth adding this to CodingStyle or deprecated.rst? -- Kees Cook From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6643474298022508012==" MIME-Version: 1.0 From: Kees Cook To: kbuild-all@lists.01.org Subject: Re: [RFC][PATCH 21/24] x86/entry: Disable stack-protector for IST entry C handlers Date: Wed, 25 Nov 2020 11:56:40 -0800 Message-ID: <202011251156.055E59A@keescook> In-Reply-To: List-Id: --===============6643474298022508012== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Sat, Nov 14, 2020 at 11:20:17AM +0100, Ard Biesheuvel wrote: > On Sat, 14 Nov 2020 at 02:59, Miguel Ojeda > wrote: > > > > On Sat, Nov 14, 2020 at 1:27 AM Segher Boessenkool > > wrote: > > > > > > But you cannot limit yourself to the greatest common denominator: the > > > kernel wants to use many features only available on newer compiler > > > versions, too; this is no different. > > > > What we do is conditionally enable both new and differentiating > > features. We don't break GCC or LLVM just because the other introduces > > a new shiny feature, nor we break builds with old compilers (except > > when raising the minimum supported version). > > > > That is why we need a level of indirection in things like attributes > > nowadays, and why patches like the above are not ideal anymore > > (regardless of which attribute we are talking about). > > > = > In spite of the apparent difference of opinion here, there are two > irrefutable facts about __attribute__((optimize)) on GCC that can only > lead to the conclusion that we must never use it in Linux: > - the GCC developers refuse to rigorously define its behavior, so we > don't know what it actually does; > - it has been observed to nullify unrelated command line arguments in > unexpected and undocumented ways. > = > So it does not matter whether you call that quirky or something else, > there is no way we can make meaningful use of it, and therefore, > abstracting or parameterizing any of its uses should be avoided as > well. Perhaps it's worth adding this to CodingStyle or deprecated.rst? -- = Kees Cook --===============6643474298022508012==--