From: Borislav Petkov <bp@alien8.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Tony Luck <tony.luck@intel.com>, X86 ML <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 04/12] x86/mce: Remove noinstr annotation from mce_setup()
Date: Fri, 10 Dec 2021 15:18:33 +0100 [thread overview]
Message-ID: <YbNhuXeZm7x3bwcp@zn.tnic> (raw)
In-Reply-To: <YbHzuJmDXJ/ryWR6@hirez.programming.kicks-ass.net>
On Thu, Dec 09, 2021 at 01:16:56PM +0100, Peter Zijlstra wrote:
> Yeah, that's what it does; but *why* is that correct?
Correct, shmorect - it is the #MC handler nasty.
> I'm thinking we're well past the exception entry code and are only
> using noinstr as a means to limit the amount of code in the MCE
> handler?
Well, one of the calls to mce_gather_info() happen in #MC context. That
one calls mce_setup() and that thing calls out to
# ./arch/x86/include/asm/paravirt.h:116: PVOP_VCALL4(cpu.cpuid, eax, ebx, ecx, edx);
cmpq $0, pv_ops+176(%rip) #, pv_ops.cpu.cpuid
and you get this:
vmlinux.o: warning: objtool: pv_ops[22]: xen_cpuid
vmlinux.o: warning: objtool: pv_ops[22]: native_cpuid
vmlinux.o: warning: objtool: mce_setup()+0xa0: call to pv_ops[22]() leaves .noinstr.text section
I think this is too much and too specific text to stick in the code as a
comment.
I can stick it in the commit message if you prefer that but frankly,
seeing those instrumentation_begin/_end() sandwiches are already hints
enough in my head to read "TODO" there...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2021-12-10 14:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 11:13 [PATCH v1 00/12] x86/mce: Correct the noinstr annotation Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 01/12] x86/mce: Do not use memset to clear the banks bitmaps Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 02/12] x86/mce: Remove function-local cpus variables Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 03/12] x86/mce: Use mce_rdmsrl() in severity checking code Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 04/12] x86/mce: Remove noinstr annotation from mce_setup() Borislav Petkov
2021-12-09 12:16 ` Peter Zijlstra
2021-12-10 14:18 ` Borislav Petkov [this message]
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 05/12] x86/mce: Allow instrumentation during task work queueing Borislav Petkov
2021-12-09 12:17 ` Peter Zijlstra
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 06/12] x86/mce: Prevent severity computation from being instrumented Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 07/12] x86/mce: Mark mce_panic() noinstr Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 08/12] x86/mce: Mark mce_end() noinstr Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 09/12] x86/mce: Mark mce_read_aux() noinstr Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 10/12] x86/mce: Move the tainting outside of the noinstr region Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 11/12] x86/mce: Mark mce_timed_out() noinstr Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-08 11:13 ` [PATCH v1 12/12] x86/mce: Mark mce_start() noinstr Borislav Petkov
2021-12-13 17:35 ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-12-09 12:19 ` [PATCH v1 00/12] x86/mce: Correct the noinstr annotation Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YbNhuXeZm7x3bwcp@zn.tnic \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®