On Thu, Mar 05, 2020 at 04:23:11PM +0100, Dmitry Vyukov wrote:
Compilers just don't allow this: asking to inline sanitized
into a non-sanitized function. But I don't know the ptrace/alternative
code good enough to suggest the right alternative (don't call
user_mode, copy user_mode, or something else).
Does it work if we inline into a .c file and build it with:
KASAN_SANITIZE := n
UBSAN_SANITIZE := n
KCOV_INSTRUMENT := n
Which would be effectively the very same, just more cumbersome.
Maybe we could replace no_sanitize with calls to
kasan_disable_current/kasan_enable_current around the section of code
where you don't want to see kasan reports.
It's not that we don't want to see the reports, the problem is that the
execution context is too fragile to call into random code. We've not yet
completely set up a normal C environment, even though we're more or less
This is very early exception entry where we still need to frob hardware
state and set up things.