Thread (74 messages) 74 messages, 7 authors, 2022-03-25

Re: [PATCH 39/43] x86: kmsan: handle register passing from uninstrumented code

From: Thomas Gleixner <hidden>
Date: 2021-12-17 21:52:05
Also in: linux-mm, lkml

Alexander,

On Tue, Dec 14 2021 at 17:20, Alexander Potapenko wrote:
When calling KMSAN-instrumented functions from non-instrumented
functions, function parameters may not be initialized properly, leading
to false positive reports. In particular, this happens all the time when
calling interrupt handlers from `noinstr` IDT entries.

Fortunately, x86 code has instrumentation_begin() and
It's not only x86 code:
 kernel/entry/common.c           | 3 +++
quoted hunk ↗ jump to hunk
@@ -76,6 +77,7 @@ __visible noinstr void do_syscall_64(struct pt_regs *regs, int nr)
 	nr = syscall_enter_from_user_mode(regs, nr);
 
 	instrumentation_begin();
+	kmsan_instrumentation_begin(regs);
Can we please make this something like:

       instrumentation_begin_at_entry(regs);

or some other sensible name which hides that kmsan gunk and avoids to
touch all of this again when KFOOSAN comes around?

Thanks,

        tglx


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help