From: Andy Lutomirski <luto@amacapital.net>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Lutomirski <luto@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
linux-nvdimm <linux-nvdimm@ml01.01.org>, X86 ML <x86@kernel.org>
Subject: Re: [PATCHV2 3/3] x86, ras: Add mcsafe_memcpy() function to recover from machine checks
Date: Fri, 11 Dec 2015 14:55:45 -0800 [thread overview]
Message-ID: <CALCETrUFQXPB9HM8O+4UfMij7nodfrWtjicy0XNhOiWCka+4yw@mail.gmail.com> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F39F82FED@ORSMSX114.amr.corp.intel.com>
On Fri, Dec 11, 2015 at 2:45 PM, Luck, Tony <tony.luck@intel.com> wrote:
>>> But a machine check safe copy_from_user() would be useful
>>> current generation cpus that broadcast all the time.
>>
>> Fair enough.
>
> Thanks for spending the time to look at this. Coaxing me to re-write the
> tail of do_machine_check() has made that code much better. Too many
> years of one patch on top of another without looking at the whole context.
>
> Cogitate on this series over the weekend and see if you can give me
> an Acked-by or Reviewed-by (I'll be adding a #define for BIT(63)).
I can't review the MCE decoding part, because I don't understand it
nearly well enough. The interaction with the core fault handling
looks fine, modulo any need to bikeshed on the macro naming (which
I'll refrain from doing).
I still think it would be better if you get rid of BIT(63) and use a
pair of landing pads, though. They could be as simple as:
.Lpage_fault_goes_here:
xorq %rax, %rax
jmp .Lbad
.Lmce_goes_here:
/* set high bit of rax or whatever */
/* fall through */
.Lbad:
/* deal with it */
That way the magic is isolated to the function that needs the magic.
Also, at least renaming the macro to EXTABLE_MC_PA_IN_AX might be
nice. It'll keep future users honest. Maybe some day there'll be a
PA_IN_AX flag, and, heck, maybe some day there'll be ways to get info
for non-MCE faults delivered through fixup_exception.
--Andy
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-12-11 22:56 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 19:13 [PATCHV2 0/3] Machine check recovery when kernel accesses poison Tony Luck
2015-12-10 21:58 ` [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables Tony Luck
2015-12-11 20:06 ` Andy Lutomirski
2015-12-11 21:01 ` Luck, Tony
2015-12-12 10:11 ` Borislav Petkov
2015-12-14 17:58 ` Ross Zwisler
2015-12-14 22:27 ` Borislav Petkov
2015-12-15 1:00 ` Luck, Tony
2015-12-15 9:46 ` Borislav Petkov
2015-12-15 10:44 ` Borislav Petkov
2015-12-11 0:14 ` [PATCHV2 2/3] x86, ras: Extend machine check recovery code to annotated ring0 areas Tony Luck
2015-12-11 20:08 ` Andy Lutomirski
2015-12-15 11:43 ` Borislav Petkov
2015-12-15 23:46 ` Luck, Tony
2015-12-11 0:21 ` [PATCHV2 3/3] x86, ras: Add mcsafe_memcpy() function to recover from machine checks Tony Luck
2015-12-11 20:09 ` Andy Lutomirski
2015-12-11 21:19 ` Luck, Tony
2015-12-11 21:32 ` Konrad Rzeszutek Wilk
2015-12-11 21:50 ` Andy Lutomirski
2015-12-11 22:17 ` Luck, Tony
2015-12-11 22:20 ` Dan Williams
2015-12-11 22:26 ` Andy Lutomirski
2015-12-11 22:35 ` Luck, Tony
2015-12-11 22:38 ` Andy Lutomirski
2015-12-11 22:45 ` Luck, Tony
2015-12-11 22:55 ` Andy Lutomirski [this message]
2015-12-14 8:36 ` Ingo Molnar
2015-12-14 19:46 ` Luck, Tony
2015-12-14 20:11 ` Andy Lutomirski
2015-12-15 13:11 ` Borislav Petkov
2015-12-15 17:45 ` Dan Williams
2015-12-15 17:53 ` Luck, Tony
2015-12-15 18:21 ` Borislav Petkov
2015-12-15 18:27 ` Dan Williams
2015-12-15 18:35 ` Dan Williams
2015-12-15 18:39 ` Borislav Petkov
2015-12-15 19:19 ` Elliott, Robert (Persistent Memory)
2015-12-15 19:28 ` Borislav Petkov
2015-12-15 20:25 ` Elliott, Robert (Persistent Memory)
2015-12-21 17:33 ` Borislav Petkov
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=CALCETrUFQXPB9HM8O+4UfMij7nodfrWtjicy0XNhOiWCka+4yw@mail.gmail.com \
--to=luto@amacapital.net \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=luto@kernel.org \
--cc=mingo@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