lkml.org 
[lkml]   [2013]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: On the correctness of dbe3ed1c078c193be34326728d494c5c4bc115e2
On 09/01/2013 08:58 AM, Linus Torvalds wrote:
> On Sun, Sep 1, 2013 at 5:20 AM, H. Peter Anvin <hpa@zytor.com> wrote:
>>
>> This has the end result that we treat a user space instruction which
>> touches a privileged data structure that then page faults (e.g. a
>> segment load which causes #PF on the GDT) as a user-space fault.
>>
>> This seems very wrong to me, since such a #PF would indicate a serious
>> error in the kernel.
>
> Not necessarily. Don't we basically do exactly that for the F00F bug
> workaround, for example?
>
> Linus
>

Actually, from looking at it, the F00F workaround is broken *exactly*
because of this patch. By forcing PF_USER to set, we go into the
if (error_code & PF_USER) branch of __bad_area_semaphore(), which means
we *don't* do the F00F checking, and will deliver a SIGSEGV with the IDT
address to the user space process instead of SIGILL.

-hpa



\
 
 \ /
  Last update: 2013-09-01 18:41    [W:0.043 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site