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


Groups > linux.kernel > #1299776

Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover from machine checks

From Tony Luck <tony.luck@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover from machine checks
Date 2015-12-31 21:40 +0100
Message-ID <qLSaS-IE-5@gated-at.bofh.it> (permalink)
References (7 earlier) <qK96a-F3-3@gated-at.bofh.it> <qK96a-F3-5@gated-at.bofh.it> <qKdt7-3t2-1@gated-at.bofh.it> <qKisO-6KS-13@gated-at.bofh.it> <qLyvw-4Y8-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Dec 30, 2015 at 3:32 PM, Tony Luck <tony.luck@gmail.com> wrote:
> Fifth is just a hack because I clearly didn't understand what I was
> doing in parts 2&3 because my new class shows up as '3' not '1'!
>
> Andy: Can you explain the assembler/linker arithmetic for the class?

Never mind ... figured it out.

The fixup entry in the extable is:

label - . + 0x2000000 - BIAS

The "label - ." part evaluates to a smallish negative value (because
the .fixup section is bundled in towards the end of .text, and the
ex_table section comes right after.

Then you add 0x20000000 to get a positive number, then *subtract*
the BIAS.  I'd picked BIAS = 0x40000000 thinking that would show
up directly in class bits. But 0x1ffff000 - 0x40000000 is 0xdffff000
so bits 31 & 31 are both set, and this is class3

I switched to BIAS 0xC0000000 ... and now I get class 1 entries
(bit31=0, bit30=1).

New patch series coming soon.

-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCHV4 0/3] Machine check recovery when kernel accesses poison Tony Luck <tony.luck@intel.com> - 2015-12-24 22:10 +0100
  [PATCHV4 2/3] x86, ras: Extend machine check recovery code to annotated  ring0 areas Tony Luck <tony.luck@intel.com> - 2015-12-24 22:20 +0100
  [PATCHV4 1/3] x86, ras: Add new infrastructure for machine check fixup  tables Tony Luck <tony.luck@intel.com> - 2015-12-24 22:20 +0100
  [PATCHV4 3/3] x86, ras: Add __mcsafe_copy() function to recover from  machine checks Tony Luck <tony.luck@intel.com> - 2015-12-24 22:20 +0100
    Re: [PATCHV4 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Borislav Petkov <bp@alien8.de> - 2015-12-24 22:50 +0100
      [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover from  machine checks Tony Luck <tony.luck@intel.com> - 2015-12-25 01:20 +0100
        Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Borislav Petkov <bp@alien8.de> - 2015-12-25 13:00 +0100
          Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks "Luck, Tony" <tony.luck@intel.com> - 2015-12-25 21:10 +0100
            Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Borislav Petkov <bp@alien8.de> - 2015-12-26 11:40 +0100
              Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Andy Lutomirski <luto@amacapital.net> - 2015-12-26 16:00 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Tony Luck <tony.luck@gmail.com> - 2015-12-27 03:10 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Andy Lutomirski <luto@amacapital.net> - 2015-12-27 03:20 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Andy Lutomirski <luto@amacapital.net> - 2015-12-27 03:20 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Tony Luck <tony.luck@gmail.com> - 2015-12-27 08:00 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Borislav Petkov <bp@alien8.de> - 2015-12-27 11:20 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Andy Lutomirski <luto@amacapital.net> - 2015-12-27 13:30 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover from machine checks Boris Petkov <bp@alien8.de> - 2015-12-27 14:30 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Andy Lutomirski <luto@amacapital.net> - 2015-12-27 14:30 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Borislav Petkov <bp@alien8.de> - 2015-12-27 14:40 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Andy Lutomirski <luto@amacapital.net> - 2015-12-27 14:50 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Dan Williams <dan.j.williams@intel.com> - 2015-12-28 03:50 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Andy Lutomirski <luto@amacapital.net> - 2015-12-27 13:20 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Tony Luck <tony.luck@gmail.com> - 2015-12-31 00:40 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Tony Luck <tony.luck@gmail.com> - 2015-12-31 21:40 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Andy Lutomirski <luto@amacapital.net> - 2015-12-31 22:30 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Tony Luck <tony.luck@gmail.com> - 2016-01-01 23:30 +0100
                Re: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover  from machine checks Andy Lutomirski <luto@amacapital.net> - 2016-01-03 04:50 +0100

csiph-web