On Thu, Jan 13, 2022 at 02:20:45PM +0100, Borislav Petkov wrote: > On Thu, Jan 13, 2022 at 01:59:00PM +0100, gregkh@xxxxxxxxxxxxxxxxxxx wrote: > > > > This is a note to let you know that I've just added the patch titled > > > > x86/mce: Remove noinstr annotation from mce_setup() > > > > to the 5.15-stable tree which can be found at: > > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary > > > > The filename of the patch is: > > x86-mce-remove-noinstr-annotation-from-mce_setup.patch > > and it can be found in the queue-5.15 subdirectory. > > > > If you, or anyone else, feels it should not be added to the stable tree, > > please let <stable@xxxxxxxxxxxxxxx> know about it. > > > > > > From 487d654db3edacc31dee86b10258cc740640fad8 Mon Sep 17 00:00:00 2001 > > From: Borislav Petkov <bp@xxxxxxx> > > Date: Tue, 5 Oct 2021 19:54:47 +0200 > > Subject: x86/mce: Remove noinstr annotation from mce_setup() > > > > From: Borislav Petkov <bp@xxxxxxx> > > > > commit 487d654db3edacc31dee86b10258cc740640fad8 upstream. > > > > Instead, sandwitch around the call which is done in noinstr context and > > mark the caller - mce_gather_info() - as noinstr. > > > > Also, document what the whole instrumentation strategy with #MC is going > > to be in the future and where it all is supposed to be going to. > > > > Signed-off-by: Borislav Petkov <bp@xxxxxxx> > > Link: https://lore.kernel.org/r/20211208111343.8130-5-bp@xxxxxxxxx > > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > > --- > > arch/x86/kernel/cpu/mce/core.c | 26 ++++++++++++++++++++------ > > 1 file changed, 20 insertions(+), 6 deletions(-) > > I wonder how that can ever be stable material... or are you backporting > something else and you need this? I was trying to get rid of this build warning I see with 5.16: vmlinux.o: warning: objtool: mce_setup()+0x22: call to memset() leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check()+0x9b: call to mce_gather_info() leaves .noinstr.text section But with this commit applied I now see this: vmlinux.o: warning: objtool: mce_gather_info()+0x5f: call to v8086_mode.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check()+0x183: call to memset() leaves .noinstr.text section So it didn't help that much. Any hints on how to get rid of this? More patches in the series this one came from? thanks, greg k-h