From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932477AbcARXGV (ORCPT ); Mon, 18 Jan 2016 18:06:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:35831 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932389AbcARXGT (ORCPT ); Mon, 18 Jan 2016 18:06:19 -0500 Date: Tue, 19 Jan 2016 00:05:54 +0100 From: Borislav Petkov To: "H. Peter Anvin" Cc: Andy Lutomirski , Brian Gerst , the arch/x86 maintainers , Linux Kernel Mailing List , Ingo Molnar , Denys Vlasenko , Linus Torvalds Subject: Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Message-ID: <20160118230554.GJ12651@pd.tnic> References: <1452972124-7380-1-git-send-email-brgerst@gmail.com> <20160116193658.GC32085@pd.tnic> <20160117103337.GC8549@pd.tnic> <20160118181457.GG12651@pd.tnic> <20160118183921.GH12651@pd.tnic> <569D40CE.5090506@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <569D40CE.5090506@zytor.com> 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, Jan 18, 2016 at 11:45:18AM -0800, H. Peter Anvin wrote: > I think the two-byte optimization is the real issue if there is one at > all. Well, we do optimize the jumps for a couple releases now, see recompute_jump(). So we would always get the short JMP, if made possible by how gcc lays out the code so that the target is not far away. If the JMP to the dynamic branch doesn't get nopped out anyway, that is. We have "debug-alternative" to dump exactly what happens during patching. > I don't care about the inittext, and unless I'm misremembering > completely altinstructions also get ejected. Ah yes, they do. > So I don't personally object to killing off the unsafe variant. Ok. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --