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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 11EB8C56201 for ; Wed, 25 Nov 2020 23:06:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A5676206D8 for ; Wed, 25 Nov 2020 23:06:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729433AbgKYXFm (ORCPT ); Wed, 25 Nov 2020 18:05:42 -0500 Received: from gate.crashing.org ([63.228.1.57]:33114 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729156AbgKYXFl (ORCPT ); Wed, 25 Nov 2020 18:05:41 -0500 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 0APN0BF2011578; Wed, 25 Nov 2020 17:00:11 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 0APN0ArB011576; Wed, 25 Nov 2020 17:00:10 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 25 Nov 2020 17:00:10 -0600 From: Segher Boessenkool To: Kees Cook Cc: Ard Biesheuvel , Miguel Ojeda , 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: <20201125230010.GC2672@gate.crashing.org> References: <20201109144425.270789-22-alexandre.chartre@oracle.com> <202011131552.4kvOb9Id-lkp@intel.com> <20201113234701.GV2672@gate.crashing.org> <20201114002624.GX2672@gate.crashing.org> <202011251156.055E59A@keescook> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202011251156.055E59A@keescook> User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Wed, Nov 25, 2020 at 11:56:40AM -0800, Kees Cook wrote: > On Sat, Nov 14, 2020 at 11:20:17AM +0100, Ard Biesheuvel wrote: > > 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; This is because it isn't clear at all what it *should* do, for some options. For others it is obvious, and it works just fine for those. (And we do not rigorously define the behaviour of almost *anything*, not in the user manual anyway!) The interface has huge usability problems. We want to wean people off of using this attribute. But claiming all kinds of FUD about it is a disservice to users: it works fine for where it does work, there is no reason for people to hurriedly change their code (or change it at all). > > 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? Sure! But please don't claim things that aren't broken are. Segher