lkml.org 
[lkml]   [2019]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/alternatives: Use C int3 selftest but disable KASAN
On Mon, Nov 11, 2019 at 01:51:16PM -0800, Kees Cook wrote:
> Instead of using inline asm for the int3 selftest (which confuses the
> Clang's ThinLTO pass),

What is that and why do we care?

> this restores the C function but disables KASAN
> (and tracing for good measure) to keep the things simple and avoid
> unexpected side-effects. This attempts to keep the fix from commit
> ecc606103837 ("x86/alternatives: Fix int3_emulate_call() selftest stack
> corruption") without using inline asm.

See, I don't much like that. The selftest basically does a naked CALL
and hard relies on the callee saving everything if required, which is
very much against the C calling convention.

Sure, by disabling KASAN and all the other crap the compiler probably
does the right thing by accident, but it is still a C ABI violation.

We use ASM all over the kernel, why is this one a problem?

\
 
 \ /
  Last update: 2019-11-12 08:58    [W:0.153 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site