From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754016AbbJGPEw (ORCPT ); Wed, 7 Oct 2015 11:04:52 -0400 Received: from mail.skyhub.de ([78.46.96.112]:48951 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753227AbbJGPEv (ORCPT ); Wed, 7 Oct 2015 11:04:51 -0400 Date: Wed, 7 Oct 2015 17:05:09 +0200 From: Borislav Petkov To: Brian Gerst Cc: Andy Lutomirski , the arch/x86 maintainers , Linux Kernel Mailing List , Denys Vlasenko , Linus Torvalds Subject: Re: [PATCH v2 05/36] x86/entry/64/compat: Fix SYSENTER's NT flag before user memory access Message-ID: <20151007150509.GA23710@nazgul.tnic> References: <19eb235828b2d2a52c53459e09f2974e15e65a35.1444091584.git.luto@kernel.org> <20151007111038.GC5046@nazgul.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 Wed, Oct 07, 2015 at 10:33:10AM -0400, Brian Gerst wrote: > This is an optimization, since NT is unlikely to be set. The forward > branch is usually predicted as not taken, and it keeps these rarely > used instructions out of the hot cache. Ah, slick. Because branch predictors mark new branches as not taken and this particular one will remain non-taken in the majority of the cases. I think this warrants a mention in the comment above it though... -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --