x86/mce: Prevent severity computation from being instrumented
authorBorislav Petkov <bp@suse.de>
Wed, 13 Oct 2021 07:47:50 +0000 (09:47 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 13 Dec 2021 13:12:48 +0000 (14:12 +0100)
commit0a5b288e85bbef5227bb6397e31fcf1d7ba9142a
treeb1c369dfbc7a2bd5f313b5d76af40261da7a2eae
parent4fbce464db81a42f9a57ee242d6150ec7f996415
x86/mce: Prevent severity computation from being instrumented

Mark all the MCE severity computation logic noinstr and allow
instrumentation when it "calls out".

Fixes

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

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