x86/mce: Move the tainting outside of the noinstr region
authorBorislav Petkov <bp@suse.de>
Tue, 2 Nov 2021 07:14:44 +0000 (08:14 +0100)
committerBorislav Petkov <bp@suse.de>
Mon, 13 Dec 2021 13:13:35 +0000 (14:13 +0100)
commit75581a203e63210aabb1336c8c9cb65a7858b596
treebe6f9303a1ab68da1b077bea6d10f8f214dd5bcc
parentdb6c996d6ce45dfb44891f0824a65ecec216f47a
x86/mce: Move the tainting outside of the noinstr region

add_taint() is yet another external facility which the #MC handler
calls. Move that tainting call into the instrumentation-allowed part of
the handler.

Fixes

  vmlinux.o: warning: objtool: do_machine_check()+0x617: call to add_taint() leaves .noinstr.text section

While at it, allow instrumentation around the mce_log() call.

Fixes

  vmlinux.o: warning: objtool: do_machine_check()+0x690: call to mce_log() leaves .noinstr.text section

Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211208111343.8130-11-bp@alien8.de
arch/x86/kernel/cpu/mce/core.c