From: David Laight <David.Laight@ACULAB.COM>
To: "'Andy Lutomirski'" <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
X86 ML <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Brian Gerst <brgerst@gmail.com>,
Kees Cook <keescook@chromium.org>
Subject: RE: [PATCH] LDT improvements
Date: Fri, 8 Dec 2017 16:46:51 +0000 [thread overview]
Message-ID: <34ab84c5fbb849209c9d3877e89cab23@AcuMS.aculab.com> (raw)
In-Reply-To: <CALCETrWCoduoc9B336gg82qcN8nVJ4PwA508FLXnMzrin7nAfA@mail.gmail.com>
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.)
SWAPGS is a PITA, should have been SAVEGS, LOAD_KERNEL_GS, and READ_SAVED_GS.
David
next prev parent reply other threads:[~2017-12-08 16:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 7:22 Andy Lutomirski
2017-12-07 12:43 ` Borislav Petkov
2017-12-07 17:08 ` Andy Lutomirski
2017-12-07 17:23 ` Thomas Gleixner
2017-12-07 18:21 ` Andy Lutomirski
2017-12-08 7:34 ` Ingo Molnar
2017-12-08 9:34 ` Thomas Gleixner
2017-12-08 9:44 ` Ingo Molnar
2017-12-08 9:55 ` Thomas Gleixner
2017-12-08 11:31 ` Ingo Molnar
2017-12-08 16:38 ` Andy Lutomirski
2017-12-08 17:37 ` Thomas Gleixner
2017-12-08 17:42 ` Andy Lutomirski
2017-12-08 17:48 ` Peter Zijlstra
2017-12-08 13:20 ` Andy Lutomirski
2017-12-08 13:55 ` David Laight
2017-12-08 14:06 ` Peter Zijlstra
2017-12-08 16:20 ` Peter Zijlstra
2017-12-08 16:33 ` Andy Lutomirski
2017-12-08 16:46 ` David Laight [this message]
2017-12-08 16:47 ` Andy Lutomirski
2017-12-08 17:29 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34ab84c5fbb849209c9d3877e89cab23@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome