lkml.org 
[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ubsan: Require GCC-8+ or Clang to use UBSAN
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

\
 
 \ /
  Last update: 2021-02-10 03:00    [W:0.147 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site