From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751287AbcAUXgd (ORCPT ); Thu, 21 Jan 2016 18:36:33 -0500 Received: from terminus.zytor.com ([198.137.202.10]:33551 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750758AbcAUXga (ORCPT ); Thu, 21 Jan 2016 18:36:30 -0500 Subject: Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init To: Borislav Petkov References: <569D40CE.5090506@zytor.com> <20160118230554.GJ12651@pd.tnic> <3D4E057B-AB03-4C12-B59D-774E8954C742@zytor.com> <20160118232547.GK12651@pd.tnic> <20160119135714.GD15071@pd.tnic> <569F072B.1020504@zytor.com> <20160120103345.GA23350@pd.tnic> <108BC768-CF19-4F71-BF6D-70FF2252ADB8@zytor.com> <20160121221442.GB300@pd.tnic> <20160121225641.GC300@pd.tnic> Cc: Andy Lutomirski , Brian Gerst , the arch/x86 maintainers , Linux Kernel Mailing List , Ingo Molnar , Denys Vlasenko , Linus Torvalds From: "H. Peter Anvin" Message-ID: <56A16B6C.2070208@zytor.com> Date: Thu, 21 Jan 2016 15:36:12 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160121225641.GC300@pd.tnic> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/21/16 14:56, Borislav Petkov wrote: > > so this is silly: we're basically jumping after the JMP instruction > itself. So that will be the case on !X86_BUG_SYSRET_SS_ATTRS CPUs. > Still a two-byte and now even a useless JMP. > > The right thing to do would be to generate a NOP simply. > OK, so gcc isn't as clever as I thought. -hpa