x86/uaccess: instrument copy_from_user_nmi()
authorAlexander Potapenko <glider@google.com>
Wed, 2 Nov 2022 11:06:08 +0000 (12:06 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 8 Nov 2022 23:57:24 +0000 (15:57 -0800)
commit11385b2612004298ac2fbc9877e73f1410cfd3c0
tree6ebf69f3e37db3ae51e8931c3514aece93ad699e
parentcbadaf71f7cf9e67c073eec673c6c050cecd0ec8
x86/uaccess: instrument copy_from_user_nmi()

Make sure usercopy hooks from linux/instrumented.h are invoked for
copy_from_user_nmi().  This fixes KMSAN false positives reported when
dumping opcodes for a stack trace.

Link: https://lkml.kernel.org/r/20221102110611.1085175-2-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Marco Elver <elver@google.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/lib/usercopy.c