From: "H. Peter Anvin" <hpa@zytor.com>
To: Borislav Petkov <bp@alien8.de>,
Denys Vlasenko <vda.linux@googlemail.com>
Cc: Andy Lutomirski <luto@amacapital.net>,
Linus Torvalds <torvalds@linux-foundation.org>,
Brian Gerst <brgerst@gmail.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
Ingo Molnar <mingo@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Oleg Nesterov <oleg@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Alexei Starovoitov <ast@plumgrid.com>,
Will Drewry <wad@chromium.org>, Kees Cook <keescook@chromium.org>,
the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/asm/entry/32: Restore %ss before SYSRETL if necessary
Date: Thu, 23 Apr 2015 14:37:27 -0700 [thread overview]
Message-ID: <55396617.4020303@zytor.com> (raw)
In-Reply-To: <20150423211015.GS28327@pd.tnic>
On 04/23/2015 02:10 PM, Borislav Petkov wrote:
> On Thu, Apr 23, 2015 at 10:01:16PM +0200, Denys Vlasenko wrote:
>> Naturally, CS can't be NULL, and up until today
>> I thought SS also can't. But the bit is probably implemented
>> for all eight cached descriptors.
>
> There's this section about NULL selector in APM v2. It says that NULL
> selectors are used to invalidate segment registers and software can load
> a NULL selector in SS in CPL0.
>
> So, if an interrupt happens and as you quoted earlier that SS gets set
> to NULL as a result of an interrupt, there's that SS leak causing the SS
> exception.
>
Yes, the NULL SS is a special thing in 64-bit mode. I agree that
context-switching it is probably the way to go; it should be cheap
enough. We might even be able to conditionalize it on an X86_BUG_ flag.
-hpa
next prev parent reply other threads:[~2015-04-23 21:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 12:34 [PATCH] x86/asm/entry/32: Restore %ss before SYSRETL if necessary Denys Vlasenko
2015-04-23 15:22 ` Linus Torvalds
2015-04-23 15:50 ` Andy Lutomirski
2015-04-23 16:05 ` Linus Torvalds
2015-04-23 16:11 ` Borislav Petkov
2015-04-23 16:06 ` Brian Gerst
2015-04-23 16:13 ` Linus Torvalds
2015-04-23 16:27 ` Andy Lutomirski
2015-04-23 20:01 ` Denys Vlasenko
2015-04-23 21:10 ` Borislav Petkov
2015-04-23 21:37 ` H. Peter Anvin [this message]
2015-04-23 21:46 ` Borislav Petkov
2015-04-23 22:29 ` Andy Lutomirski
2015-04-23 22:31 ` H. Peter Anvin
2015-04-23 22:38 ` Andy Lutomirski
2015-04-23 22:52 ` H. Peter Anvin
2015-04-23 22:55 ` Andy Lutomirski
2015-04-23 23:04 ` Linus Torvalds
2015-04-23 23:22 ` Denys Vlasenko
2015-04-24 0:59 ` H. Peter Anvin
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=55396617.4020303@zytor.com \
--to=hpa@zytor.com \
--cc=ast@plumgrid.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=fweisbec@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--cc=vda.linux@googlemail.com \
--cc=wad@chromium.org \
--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