lkml.org 
[lkml]   [2015]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHV2 3/3] x86, ras: Add mcsafe_memcpy() function to recover from machine checks

* Andy Lutomirski <luto@amacapital.net> wrote:

> 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.

Seconded - this is the usual pattern we use in all assembly functions.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-12-14 10:01    [W:0.092 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site