[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrVDnXzkk=jryh4X4gO0TU9ziAK6Ecp9-OXwwXcTFucu5A@mail.gmail.com>
Date: Fri, 27 Mar 2015 14:11:48 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Denys Vlasenko <dvlasenk@...hat.com>,
Borislav Petkov <bp@...en8.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
X86 ML <x86@...nel.org>, Ingo Molnar <mingo@...nel.org>
Subject: Re: ia32_sysenter_target does not preserve EFLAGS
On Fri, Mar 27, 2015 at 1:31 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Fri, Mar 27, 2015 at 1:16 PM, Andy Lutomirski <luto@...capital.net> wrote:
>>
>> Does it matter on 32-bit kernels? There's no swapgs, so IRQs should
>> still be safe, and we have a real stack pointer before sysexit.
>
> Fair enough. On 32-bit, the only worry is the race between "return to
> user space" and "something set a thread flag", resulting in delayed
> signals and/or higher scheduling latency etc. So on 32-bit, the bug is
> much less of an issue, I agree.
Right, except for one nasty case: KVM user return notifiers. It's
possible we'd re-enter user mode with some MSRs set wrong. Yuck.
--Andy
>
> So yeah, using sysretl instead of sti+sysexit on 64-bit sounds more
> reasonable given the potential worry about sti+sysexit atomicity in
> the presense of nmi's.
>
> Linus
--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists