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

From: Ingo Molnar
Date: Mon Dec 14 2015 - 03:36:35 EST



* Andy Lutomirski <luto@xxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/