Re: [PATCH v2] x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue
From: H. Peter Anvin
Date: Sun Apr 26 2015 - 21:32:57 EST
In case it matters:
Acked-by: H. Peter Anvin <hpa@xxxxxxxxx>
On April 26, 2015 5:51:26 PM PDT, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>Just a heads-up to the x86 people: I'm going to merge this directly,
>since I'm doing -rc1 momentarily, and without this patch 32-bit
>user-land on a 64-bit kernel is flaky on all AMD CPU's. Which I don't
>want for -rc1.
>
> Linus
>
>On Sun, Apr 26, 2015 at 4:47 PM, Andy Lutomirski <luto@xxxxxxxxxx>
>wrote:
>> AMD CPUs don't reinitialize the SS descriptor on SYSRET, so SYSRET
>> with SS == 0 results in an invalid usermode state in which SS is
>> apparently equal to __USER_DS but causes #SS if used.
>>
>> Work around the issue by setting SS to __KERNEL_DS __switch_to, thus
>> ensuring that SYSRET never happens with SS set to NULL.
--
Sent from my mobile phone. Please pardon brevity and lack of formatting.
--
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/