[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMzpN2iXOvUSVXpaFpT0056B-N0zqQg0i1hQFSyWf-kAToAsFQ@mail.gmail.com>
Date: Mon, 29 Feb 2016 17:33:16 -0500
From: Brian Gerst <brgerst@...il.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Andy Lutomirski <luto@...capital.net>,
Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Oleg Nesterov <oleg@...hat.com>,
Andrew Cooper <andrew.cooper3@...rix.com>
Subject: Re: [PATCH 02/10] x86/entry/compat: In SYSENTER, sink AC clearing
below the existing FLAGS test
On Mon, Feb 29, 2016 at 5:09 PM, Borislav Petkov <bp@...en8.de> wrote:
> On Mon, Feb 29, 2016 at 12:45:58PM -0800, Andy Lutomirski wrote:
>> I don't think so. Sensible user programs shouldn't set AC in the first place.
>
> Then I'm most likely missing something: so before this patch, we did
> unconditionally CLAC thus disallowing kernel access to user pages. Why
> don't we need it anymore and need to pay attention only to user rFLAGS?
SYSENTER doesn't save EFLAGS so we have to fudge it by pushing the
kernel's flags. Most user programs never set AC, so by adding it to
the test for flags to clear we can avoid the CLAC or POPF in the
common case that it is already clear.
--
Brian Gerst
Powered by blists - more mailing lists