lkml.org 
[lkml]   [2017]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] LDT improvements
On Fri, Dec 8, 2017 at 8:46 AM, David Laight <David.Laight@aculab.com> wrote:
> From: Andy Lutomirski
>> Sent: 08 December 2017 16:34
>
>> #GP on IRET is a failure, and we have disgusting code to handle it.
>
> Is that the trap in kernel space when the on-stack segment registers
> are invalid?
> Definitely needs horrid code...
>
>> #PF on IRET would not be a failure -- it's a case where IRET should be
>> retried. Our crap that fixes up #GP would get that wrong and leave us
>> with the wrong GSBASE.
>
> If the user code page isn't present then the fault happens after the
> return to user mode, not on the IRET instruction in kernel mode.
> So it is not really any different to returning to a NOP at the end
> of a resident page when the page following is absent.
> (Or any other invalid %ip value.)

I mean: if the user CS or SS is not accessed and the LDT is RO, then
we get #PF on the IRET instruction, I think. Dealing with that is
truly awful.

\
 
 \ /
  Last update: 2017-12-08 17:48    [W:0.086 / U:1.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site