linux-toolchains.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Alexandre Chartre <alexandre.chartre@oracle.com>,
	kbuild-all@lists.01.org,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	linux-toolchains@vger.kernel.org,
	kernel test robot <lkp@intel.com>,
	Arvind Sankar <nivedita@alum.mit.edu>
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	[thread overview]
Message-ID: <202011251156.055E59A@keescook> (raw)
In-Reply-To: <CAMj1kXGb6LGrDiM-oSxnt6zcCouKyhkNC+vK_PLCCWQWOSPpeQ@mail.gmail.com>

On Sat, Nov 14, 2020 at 11:20:17AM +0100, Ard Biesheuvel wrote:
> On Sat, 14 Nov 2020 at 02:59, Miguel Ojeda
> <miguel.ojeda.sandonis@gmail.com> wrote:
> >
> > On Sat, Nov 14, 2020 at 1:27 AM Segher Boessenkool
> > <segher@kernel.crashing.org> 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

  reply	other threads:[~2020-11-25 19:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201109144425.270789-22-alexandre.chartre@oracle.com>
     [not found] ` <202011131552.4kvOb9Id-lkp@intel.com>
2020-11-13 18:59   ` [RFC][PATCH 21/24] x86/entry: Disable stack-protector for IST entry C handlers Nick Desaulniers
2020-11-13 19:39     ` Alexandre Chartre
2020-11-13 19:45       ` Nick Desaulniers
2020-11-13 23:47     ` Segher Boessenkool
2020-11-14  0:01       ` Miguel Ojeda
2020-11-14  0:26         ` Segher Boessenkool
2020-11-14  1:58           ` Miguel Ojeda
2020-11-14 10:20             ` Ard Biesheuvel
2020-11-25 19:56               ` Kees Cook [this message]
2020-11-25 23:00                 ` Segher Boessenkool
2020-11-26  6:40                   ` Ard Biesheuvel
2020-11-26 20:22                     ` Segher Boessenkool
2020-11-26 21:05                       ` Arvind Sankar
2020-11-26 22:00                       ` Ard Biesheuvel
2020-11-14  0:11       ` Nick Desaulniers
2020-11-14  0:43         ` Segher Boessenkool
2020-11-14  0:48           ` Nick Desaulniers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202011251156.055E59A@keescook \
    --to=keescook@chromium.org \
    --cc=alexandre.chartre@oracle.com \
    --cc=ardb@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-toolchains@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=nivedita@alum.mit.edu \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).