lkml.org 
[lkml]   [2020]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PANIC: double fault in fixup_bad_iret
On Mon, Jun 01, 2020 at 02:40:31PM +0200, Marco Elver wrote:
> I think Peter wanted to send a patch to add __no_kcsan to noinstr:
> https://lkml.kernel.org/r/20200529170755.GN706495@hirez.programming.kicks-ass.net
>
> In the same patch we can add __no_sanitize_address to noinstr. But:
>
> - We're missing a definition for __no_sanitize_undefined and
> __no_sanitize_coverage.

Do those function attributes actually work? Because the last time I
played with some of that I didn't.

Specifically: unmarked __always_inline functions must not generate
instrumentation when they're inlined into a __no_*san function.

(and that fails to build on some GCC versions, and I think fails to
actually work on the rest of them, but I'd have to double check)

> - We still need the above blanket no-instrument for x86 because of
> GCC. We could guard it with "ifdef CONFIG_CC_IS_GCC".

Right; so all of GCC is broken vs that function attribute stuff? Any
plans of getting that fixed? Do we have GCC that care?

Does the GCC plugin approach sound like a viable alternative
implementation of all this?

Anyway, we can make it:

KASAN := SANITIZER_HAS_FUNCTION_ATTRIBUTES

or something, and only make that 'y' when the compiler is sane.

> Not sure what the best strategy is to minimize patch conflicts. For
> now I could send just the patches to add missing definitions. If you'd
> like me to send all patches (including modifying 'noinstr'), let me
> know.

If you're going to do patches anyway, might as well do that :-)

\
 
 \ /
  Last update: 2020-06-02 11:42    [W:0.054 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site