Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1305376

Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options
Date 2016-01-09 23:40 +0100
Message-ID <qPakW-3yt-7@gated-at.bofh.it> (permalink)
References (1 earlier) <qOPq9-5WM-11@gated-at.bofh.it> <qOQYV-6P7-1@gated-at.bofh.it> <qP5Oi-od-3@gated-at.bofh.it> <qP67D-KN-3@gated-at.bofh.it> <qP7Q7-1LE-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Jan 9, 2016 11:51 AM, "Tony Luck" <tony.luck@gmail.com> wrote:
>
> > Oh, I see.  Is it the case that the MC code can't cleanly handle the
> > case where the error was nominally recoverable but the kernel doesn't
> > know how to recover from it due to the lack of a handler that's okay
> > with it, because the handler's refusal to handle the fault wouldn't be
> > known until too late?
>
> The code is just too clunky right now.  We have a table driven
> severity calculator that we invoke on each machine check bank
> that has some valid data to report.  Part of that calculation is
> "what context am I in?". Which happens earlier in the sequence
> than "Is MCi_STATUS.MCACOD some known recoverable type".
> If I invoke the fixup code I'll change regs->ip right away ... even
> if I'm executing on some innocent bystander processor that wasn't
> the source of the machine check (the bystanders on the same
> socket can usually see something logged in one of the memory
> controller banks).

Makes sense, sort of.  But even if there is an MC fixup registered,
don't you still have to make sure to execute it on the actual victim
CPU?  After all, you don't want to fail an mcsafe copy just because a
different CPU coincidentally machine checked while the mcsafe copy has
the recoverable RIP value.

>
> There are definitely some cleanups that should be done
> in this code (e.g. figuring our context just once, not once
> per bank).  But I'm pretty sure I'll always want to know
> "am I executing an instruction with a #MC recoverable
> handler?" in a way that doesn't actually invoke the recovery.

What's wrong with:

Step 1: determine that the HW context is, in principle, recoverable.

Step 2: ask the handler to try to recover.

Step 3: if the handler doesn't recover, panic

I'm not saying that restructuring the code like this should be a
prerequisite for merging this, but I'm wondering whether it would make
sense at some point in the future.

--Andy

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v8 0/3] Machine check recovery when kernel accesses poison Tony Luck <tony.luck@intel.com> - 2016-01-09 01:20 +0100
  [PATCH v8 1/3] x86: Expand exception table to allow new handling  options Tony Luck <tony.luck@intel.com> - 2016-01-09 01:20 +0100
    Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Andy Lutomirski <luto@amacapital.net> - 2016-01-09 03:00 +0100
      Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Brian Gerst <brgerst@gmail.com> - 2016-01-09 04:50 +0100
        Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Brian Gerst <brgerst@gmail.com> - 2016-01-09 05:40 +0100
          Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Andy Lutomirski <luto@amacapital.net> - 2016-01-09 07:40 +0100
            Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Brian Gerst <brgerst@gmail.com> - 2016-01-12 00:10 +0100
              Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Andy Lutomirski <luto@amacapital.net> - 2016-01-12 00:30 +0100
              RE: [PATCH v8 1/3] x86: Expand exception table to allow new  handling options "Luck, Tony" <tony.luck@intel.com> - 2016-01-12 00:50 +0100
      Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Tony Luck <tony.luck@gmail.com> - 2016-01-09 18:50 +0100
        Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Andy Lutomirski <luto@amacapital.net> - 2016-01-09 19:10 +0100
          Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Tony Luck <tony.luck@gmail.com> - 2016-01-09 21:00 +0100
            Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Andy Lutomirski <luto@amacapital.net> - 2016-01-09 23:40 +0100
              Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling options Tony Luck <tony.luck@gmail.com> - 2016-01-10 02:20 +0100
      Re: [PATCH v8 1/3] x86: Expand exception table to allow new handling  options "Luck, Tony" <tony.luck@intel.com> - 2016-01-11 01:30 +0100
  [PATCH v8 2/3] x86, mce: Check for faults tagged in  EXTABLE_CLASS_FAULT exception table entries Tony Luck <tony.luck@intel.com> - 2016-01-09 01:20 +0100

csiph-web