aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/step.c
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2022-11-02 12:06:11 +0100
committerAndrew Morton <akpm@linux-foundation.org>2022-11-08 15:57:24 -0800
commitba54d194f8daad8943802d6dfe06e205f882c391 (patch)
treef0b6971ef0ef09d4a5ffa01ab24c8885d2478aa7 /arch/x86/kernel/step.c
parentkmsan: make sure PREEMPT_RT is off (diff)
downloadlinux-dev-ba54d194f8daad8943802d6dfe06e205f882c391.tar.xz
linux-dev-ba54d194f8daad8943802d6dfe06e205f882c391.zip
x86/traps: avoid KMSAN bugs originating from handle_bug()
There is a case in exc_invalid_op handler that is executed outside the irqentry_enter()/irqentry_exit() region when an UD2 instruction is used to encode a call to __warn(). In that case the `struct pt_regs` passed to the interrupt handler is never unpoisoned by KMSAN (this is normally done in irqentry_enter()), which leads to false positives inside handle_bug(). Use kmsan_unpoison_entry_regs() to explicitly unpoison those registers before using them. Link: https://lkml.kernel.org/r/20221102110611.1085175-5-glider@google.com Signed-off-by: Alexander Potapenko <glider@google.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: Marco Elver <elver@google.com> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/x86/kernel/step.c')
0 files changed, 0 insertions, 0 deletions