From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752954AbbBXUfS (ORCPT ); Tue, 24 Feb 2015 15:35:18 -0500 Received: from mail.skyhub.de ([78.46.96.112]:43608 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752309AbbBXUfQ (ORCPT ); Tue, 24 Feb 2015 15:35:16 -0500 Date: Tue, 24 Feb 2015 21:36:36 +0100 From: Borislav Petkov To: Denys Vlasenko Cc: Denys Vlasenko , Andy Lutomirski , Linus Torvalds , Steven Rostedt , Ingo Molnar , "H. Peter Anvin" , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , X86 ML , Linux Kernel Mailing List Subject: Re: [PATCH 1/4] x86: entry.S: tidy up several suboptimal insns Message-ID: <20150224203635.GN3420@pd.tnic> References: <1424803895-4420-1-git-send-email-dvlasenk@redhat.com> <20150224195801.GM3420@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 24, 2015 at 09:13:03PM +0100, Denys Vlasenko wrote: > They aren't equal. $1 and $2 in two lowest bits will also > be interpreted as "userspace" here. "Equal to $3" sends > a wrong message here to a human reading the code, > the code doesn't test for CPL=3, it tests for any nonzero CPL. Doh, of course. I was going to propose to make it even more explicit: andb $3, CS(%rsp)... but that's destructive. So yours makes it less misleading, actually. To me at least and obviously. :-) -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --