From: Borislav Petkov <bp@alien8.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/mce: Initialize "bank" when we find a fatal error in mce_no_way_out()
Date: Sat, 2 Feb 2019 16:33:18 +0100 [thread overview]
Message-ID: <20190202153318.GD27822@zn.tnic> (raw)
In-Reply-To: <20190201183616.GA24278@agluck-desk>
On Fri, Feb 01, 2019 at 10:36:17AM -0800, Luck, Tony wrote:
> > so it'll be more robust if we moved it there.
>
> It would be redundant to move it there for both
> existing uses.
Maybe. But if the bank write happens there, it won't be "forgotten"
again.
I don't care what the functions are called. If they need to do something
more, like *fully* populating struct mce so that a proper record gets
logged further down the line, then we need to make them do so. That's
the point I'm trying to make.
Sure, the stable fix should be simple for easier backporting but in
order to avoid this thing happening again in the future, we should
probably look at unifying and making those paths easier to use.
Right now we have
1. mce_setup() - initial population of struct mce, called from
mce_gather_info(), a.o.
2. mce_gather_info() collects global regs
3. mce_read_aux() reading aux regs
and at the very end, we hand it into mce_log().
And in-between we poke (or don't poke) in some fields.
IOW, if the struct mce finishing population is concentrated in a single
function, it will be much harder to forget setting such fields in the
future.
In this case, the devil is in the detail so I'll have a look at this
when more time.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
next prev parent reply other threads:[~2019-02-02 15:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 0:33 [PATCH] x86/mce: Initialize "bank" when we find a fatal error in mce_no_way_out() Tony Luck
2019-02-01 9:55 ` Borislav Petkov
2019-02-01 18:36 ` Luck, Tony
2019-02-02 15:33 ` Borislav Petkov [this message]
2019-02-03 12:36 ` [tip:x86/urgent] x86/MCE: Initialize mce.bank in the case of " tip-bot for Tony Luck
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=20190202153318.GD27822@zn.tnic \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.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