From: Borislav Petkov <bp@alien8.de>
To: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
tony.luck@intel.com, x86@kernel.org
Subject: Re: [PATCH] x86/mce: Schedule mce_setup() on correct CPU for CPER decoding
Date: Thu, 15 Jun 2023 17:20:31 +0200 [thread overview]
Message-ID: <20230615152031.GCZIssPyJjGcikn9iA@fat_crate.local> (raw)
In-Reply-To: <20230417162006.3292715-1-yazen.ghannam@amd.com>
On Mon, Apr 17, 2023 at 04:20:06PM +0000, Yazen Ghannam wrote:
> @@ -97,20 +102,13 @@ int apei_smca_report_x86_error(struct cper_ia_proc_ctx *ctx_info, u64 lapic_id)
> if (ctx_info->reg_arr_size < 48)
> return -EINVAL;
>
> - mce_setup(&m);
> -
> - m.extcpu = -1;
> - m.socketid = -1;
> -
> - for_each_possible_cpu(cpu) {
> - if (cpu_data(cpu).initial_apicid == lapic_id) {
> - m.extcpu = cpu;
> - m.socketid = cpu_data(m.extcpu).phys_proc_id;
> + for_each_possible_cpu(cpu)
> + if (cpu_data(cpu).initial_apicid == lapic_id)
> break;
> - }
> - }
>
> - m.apicid = lapic_id;
> + if (smp_call_function_single(cpu, __mce_setup, &m, 1))
I can see the following call-chain from NMI context which is a no-no:
ghes_notify_nmi
|-> ghes_in_nmi_spool_from_list
|-> ghes_in_nmi_queue_one_entry
|-> __ghes_panic
|-> __ghes_print_estatus
|-> cper_estatus_print
|-> cper_estatus_print_section
|-> cper_print_proc_ia
|-> arch_apei_report_x86_error
|-> apei_smca_report_x86_error
|-> smp_call_function_single
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2023-06-15 15:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 16:20 [PATCH] x86/mce: Schedule mce_setup() on correct CPU for CPER decoding Yazen Ghannam
2023-04-17 17:17 ` Luck, Tony
2023-04-17 17:28 ` Yazen Ghannam
2023-04-17 17:39 ` Luck, Tony
2023-06-09 14:26 ` Yazen Ghannam
2023-06-15 15:20 ` Borislav Petkov [this message]
2023-06-15 15:34 ` Yazen Ghannam
2023-06-15 16:20 ` Borislav Petkov
2023-06-15 17:02 ` Yazen Ghannam
2023-06-15 17:39 ` Yazen Ghannam
2023-06-15 17:54 ` Luck, Tony
2023-06-16 14:16 ` Yazen Ghannam
2023-06-16 16:05 ` Luck, Tony
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=20230615152031.GCZIssPyJjGcikn9iA@fat_crate.local \
--to=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yazen.ghannam@amd.com \
/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