[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANpmjNM48j4D7F+cgUrrof38d3nLuQjbW6pz3nTwxcZ5Q+GJqQ@mail.gmail.com>
Date: Thu, 4 Jun 2020 11:52:18 +0200
From: Marco Elver <elver@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
"the arch/x86 maintainers" <x86@...nel.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
kasan-dev <kasan-dev@...glegroups.com>,
LKML <linux-kernel@...r.kernel.org>,
Will Deacon <will@...nel.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [PATCH 0/9] x86/entry fixes
On Thu, 4 Jun 2020 at 08:00, Marco Elver <elver@...gle.com> wrote:
>
> On Wed, 3 Jun 2020 at 21:10, Marco Elver <elver@...gle.com> wrote:
> >
> > On Wed, 3 Jun 2020 at 20:16, Peter Zijlstra <peterz@...radead.org> wrote:
> > >
> > > On Wed, Jun 03, 2020 at 06:07:22PM +0200, Peter Zijlstra wrote:
> > > > On Wed, Jun 03, 2020 at 04:47:54PM +0200, Marco Elver wrote:
> > >
> > > > > With that in mind, you could whitelist "__ubsan_handle"-prefixed
> > > > > functions in objtool. Given the __always_inline+noinstr+__ubsan_handle
> > > > > case is quite rare, it might be reasonable.
> > > >
> > > > Yes, I think so. Let me go have dinner and then I'll try and do a patch
> > > > to that effect.
> > >
> > > Here's a slightly more radical patch, it unconditionally allows UBSAN.
> > >
> > > I've not actually boot tested this.. yet.
> > >
> > > ---
> > > Subject: x86/entry, ubsan, objtool: Whitelist __ubsan_handle_*()
> > > From: Peter Zijlstra <peterz@...radead.org>
> > > Date: Wed Jun 3 20:09:06 CEST 2020
> > >
> > > The UBSAN instrumentation only inserts external CALLs when things go
> > > 'BAD', much like WARN(). So treat them similar to WARN()s for noinstr,
> > > that is: allow them, at the risk of taking the machine down, to get
> > > their message out.
> > >
> > > Suggested-by: Marco Elver <elver@...gle.com>
> > > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> >
> > This is much cleaner, as it gets us UBSAN coverage back. Seems to work
> > fine for me (only lightly tested), so
> >
> > Acked-by: Marco Elver <elver@...gle.com>
> >
> > Thanks!
>
> I was thinking that if we remove __no_sanitize_undefined from noinstr,
> we can lift the hard compiler restriction for UBSAN because
> __no_sanitize_undefined isn't used anywhere. Turns out, that attribute
> isn't broken on GCC <= 7, so I've sent v2 of my series:
> https://lkml.kernel.org/r/20200604055811.247298-1-elver@google.com
Now that hopefully KASAN/KCSAN/UBSAN are fine, I'm looking at adding a
patch for KCOV:
https://lkml.kernel.org/r/20200604095057.259452-1-elver@google.com
Will that work?
Thanks,
-- Marco
Powered by blists - more mailing lists