From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754506AbcB2WJK (ORCPT ); Mon, 29 Feb 2016 17:09:10 -0500 Received: from mail.skyhub.de ([78.46.96.112]:56541 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754453AbcB2WJH (ORCPT ); Mon, 29 Feb 2016 17:09:07 -0500 Date: Mon, 29 Feb 2016 23:09:03 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Oleg Nesterov , Andrew Cooper , Brian Gerst Subject: Re: [PATCH 02/10] x86/entry/compat: In SYSENTER, sink AC clearing below the existing FLAGS test Message-ID: <20160229220903.GH3724@pd.tnic> References: <20160229203941.GG3724@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.