linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Andrey Rybainin <ryabinin.a.a@gmail.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-kernel@vger.kernel.org,
	Randy Dunlap <rdunlap@infradead.org>,
	dvyukov@google.com
Subject: Re: [PATCH] ubsan: Require GCC-8+ or Clang to use UBSAN
Date: Tue, 9 Feb 2021 16:21:21 -0800	[thread overview]
Message-ID: <202102091619.8D6D5B4@keescook> (raw)
In-Reply-To: <e47d2395-8b54-bbb4-a3fb-e428c99edf22@gmail.com>

On Wed, Feb 10, 2021 at 02:17:57AM +0300, Andrey Rybainin wrote:
> >>>> Subject: ubsan: Require GCC-8+ or Clang to use UBSAN
> >>>>
> >>>> Just like how we require GCC-8.2 for KASAN due to compiler bugs, require
> >>>> a sane version of GCC for UBSAN.
> >>>>
> >>>> Specifically, before GCC-8 UBSAN doesn't respect -fwrapv and thinks
> >>>> signed arithmetic is buggered.
> >>>
> >>> Actually removing CONFIG_UBSAN_SIGNED_OVERFLOW would give us the same
> >>> effect without restricting GCC versions.
> >>
> >> Is that preferable?  Always happy to remove code, just need some
> >> justification behind it.
> > 
> > Is Peter's patch acceptable or do you want to do something else?
> 
> I do prefer to just remove the code, I'll send the patch shortly.

I have a specific goal of getting both signed and unsigned overflow
detection working sanely, so removing this entirely from the kernel
really makes working on that difficult. :)

I view the primary problem as compiler-specific. I'd much rather we
correctly mask against versions (or better yet, behaviors).

-- 
Kees Cook

      reply	other threads:[~2021-02-10  1:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23  5:04 [PATCH] mm/uaccess: Use 'unsigned long' to placate UBSAN warnings, again Josh Poimboeuf
2020-12-23  7:18 ` Randy Dunlap
2021-01-07 10:06   ` David Laight
2021-01-04 15:13 ` Peter Zijlstra
2021-01-06 23:37   ` Kees Cook
2021-01-07  0:06     ` Randy Dunlap
2021-01-07 21:07       ` Kees Cook
2021-01-13 23:27         ` Josh Poimboeuf
2021-01-07 10:51     ` Dmitry Vyukov
2021-01-14 10:59   ` [PATCH] ubsan: Require GCC-8+ or Clang to use UBSAN Peter Zijlstra
2021-01-14 11:09     ` Andrey Ryabinin
2021-01-18 17:53       ` Josh Poimboeuf
2021-02-09 18:24         ` Josh Poimboeuf
2021-02-09 23:17           ` Andrey Rybainin
2021-02-10  0:21             ` Kees Cook [this message]

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=202102091619.8D6D5B4@keescook \
    --to=keescook@chromium.org \
    --cc=dvyukov@google.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).