On Thu, Jan 13, 2022 at 02:20:45PM +0100, Borislav Petkov wrote:
On Thu, Jan 13, 2022 at 01:59:00PM +0100, gregkh@linuxfoundation.org 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%3Ba=su...
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@vger.kernel.org know about it.
From 487d654db3edacc31dee86b10258cc740640fad8 Mon Sep 17 00:00:00 2001 From: Borislav Petkov bp@suse.de Date: Tue, 5 Oct 2021 19:54:47 +0200 Subject: x86/mce: Remove noinstr annotation from mce_setup()
From: Borislav Petkov bp@suse.de
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@suse.de Link: https://lore.kernel.org/r/20211208111343.8130-5-bp@alien8.de Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
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
On Thu, Jan 13, 2022 at 03:31:49PM +0100, Greg KH wrote:
Any hints on how to get rid of this? More patches in the series this one came from?
Unfortunately, a whole series:
https://lore.kernel.org/r/20211208111343.8130-1-bp@alien8.de
and the 0day bot guys recently managed to trigger another warning there, which means even more fixes, even to generic code.
So what that warning tells you is that you call into instrumentable context from non-instrumentable one. But that has relevance only when someone traces the MCE code - and up until now I haven't received a single sensible use case for why that would make any sense.
So long story short, you can safely ignore it and if someone complains, ask her/him about the use case first and CC me.
:-)
On Thu, Jan 13, 2022 at 04:40:00PM +0100, Borislav Petkov wrote:
On Thu, Jan 13, 2022 at 03:31:49PM +0100, Greg KH wrote:
Any hints on how to get rid of this? More patches in the series this one came from?
Unfortunately, a whole series:
https://lore.kernel.org/r/20211208111343.8130-1-bp@alien8.de
and the 0day bot guys recently managed to trigger another warning there, which means even more fixes, even to generic code.
So what that warning tells you is that you call into instrumentable context from non-instrumentable one. But that has relevance only when someone traces the MCE code - and up until now I haven't received a single sensible use case for why that would make any sense.
So long story short, you can safely ignore it and if someone complains, ask her/him about the use case first and CC me.
:-)
Ok, will just ignore it, 5.16.y should only be alive for a few months (4?) so it's not that big of a deal, I was just trying to ensure 0-warning builds were happening as it's easier to notice when I mess something up with the stable releases.
I'll go drop this commit now, thanks.
greg k-h
linux-stable-mirror@lists.linaro.org