Re: [PATCH 02/10] x86/entry/compat: In SYSENTER, sink AC clearing below the existing FLAGS test

From: Borislav Petkov
Date: Mon Feb 29 2016 - 17:09:14 EST


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?

Especially since we do:

do_fast_syscall_32
|-> __get_user
|-> __get_user_nocheck
|-> __uaccess_begin which is stac()

Or are we saying, we don't need that CLAC in the beginning of
entry_SYSENTER_compat() at all because we're going to STAC anyway in
__get_user() ?

Hmmm...

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.