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.2 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 4BE2DC55ABD for ; Fri, 13 Nov 2020 23:52:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 105D820791 for ; Fri, 13 Nov 2020 23:52:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725981AbgKMXwY (ORCPT ); Fri, 13 Nov 2020 18:52:24 -0500 Received: from gate.crashing.org ([63.228.1.57]:60783 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgKMXwY (ORCPT ); Fri, 13 Nov 2020 18:52:24 -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 0ADNl2Ne002336; Fri, 13 Nov 2020 17:47:02 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 0ADNl1rc002333; Fri, 13 Nov 2020 17:47:01 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 13 Nov 2020 17:47:01 -0600 From: Segher Boessenkool To: Nick Desaulniers Cc: Alexandre Chartre , kbuild-all@lists.01.org, clang-built-linux , linux-toolchains@vger.kernel.org, kernel test robot , Arvind Sankar , Ard Biesheuvel , Miguel Ojeda Subject: Re: [RFC][PATCH 21/24] x86/entry: Disable stack-protector for IST entry C handlers Message-ID: <20201113234701.GV2672@gate.crashing.org> References: <20201109144425.270789-22-alexandre.chartre@oracle.com> <202011131552.4kvOb9Id-lkp@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org Hi! On Fri, Nov 13, 2020 at 10:59:26AM -0800, Nick Desaulniers wrote: > The `optimize` attribute is both non-portable across toolchains (hence > this warning) Like *all* GCC extensions. > and a little quirky in GCC. How so? Don't spread FUD please, say what *is* wrong, then people can decide for themselves whether they want it or not. We (GCC) do document it as: Not every optimization option that starts with the -f prefix specified by the attribute necessarily has an effect on the function. The 'optimize' attribute should be used for debugging purposes only. It is not suitable in production code. The optimize attribute is for setting/resetting flags on a function granularity. Not all flags can be flipped per function. The SSP flags work fine though, AFAIK. But don't use it for production, there are no guarantees. Cheers, Segher