lkml.org 
[lkml]   [2015]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHV5 3/3] x86, ras: Add __mcsafe_copy() function to recover from machine checks
From
On Sun, Dec 27, 2015 at 4:18 AM, Andy Lutomirski <luto@amacapital.net> wrote:
> I think I can save you some pondering. This old patch gives two flag
> bits. Feel free to borrow the patch, but you'll probably want to
> change the _EXTABLE_CLASS_XYZ macros:
>
> https://git.kernel.org/cgit/linux/kernel/git/luto/linux.git/commit/?h=strict_uaccess_fixups/patch_v1&id=16644d9460fc6531456cf510d5efc57f89e5cd34

Thanks!

I took that, and some of Boris's changes, and stirred it altogether at:

git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git mcsafev6

First commit is just your patch from above (patch wouldn't apply it
directly because of other nearby changes, but I think I didn't break
it)

Second commit pulls the core of fixup_exception() into separate
functions for each class

Third adds a new class that provides the fault number to the fixup
code in regs->ax.

Fourth is just a jumble of the rest .. needs to be split into two
parts (one for machine check handler, second to add __mcsafe_copy())

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?

-Tony


\
 
 \ /
  Last update: 2015-12-31 00:41    [W:0.123 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site