Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754017AbbGWSM5 (ORCPT ); Thu, 23 Jul 2015 14:12:57 -0400 Received: from smtprelay0061.hostedemail.com ([216.40.44.61]:55546 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753201AbbGWSMv (ORCPT ); Thu, 23 Jul 2015 14:12:51 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3872:3874:4321:5007:6119:6261:6742:7514:7875:9036:10004:10400:10848:10967:11026:11232:11658:11914:12043:12296:12438:12517:12519:12740:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: end21_188b0fb79f518 X-Filterd-Recvd-Size: 2834 Date: Thu, 23 Jul 2015 14:12:47 -0400 From: Steven Rostedt To: Jason Baron Cc: Peter Zijlstra , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Mikulas Patocka , Paul Mackerras , Arnaldo Carvalho de Melo , Kees Cook , Andrea Arcangeli , Vince Weaver , "hillf.zj" , Valdis Kletnieks , "linux-kernel@vger.kernel.org" Subject: Re: Kernel broken on processors without performance counters Message-ID: <20150723141247.32d760eb@gandalf.local.home> In-Reply-To: <55B12570.4070709@gmail.com> References: <20150721154959.GS19282@twins.programming.kicks-ass.net> <20150721161215.GU19282@twins.programming.kicks-ass.net> <20150721181553.GA3378@nazgul.tnic> <55AE9471.1000601@gmail.com> <20150722042403.GA6345@nazgul.tnic> <55AFCDA4.5010406@gmail.com> <20150723104215.GH25159@twins.programming.kicks-ass.net> <20150723113450.67db0152@gandalf.local.home> <20150723170811.GJ25159@twins.programming.kicks-ass.net> <55B12570.4070709@gmail.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1251 Lines: 33 On Thu, 23 Jul 2015 13:33:36 -0400 Jason Baron wrote: > On 07/23/2015 01:08 PM, Peter Zijlstra wrote: > > On Thu, Jul 23, 2015 at 11:34:50AM -0400, Steven Rostedt wrote: > >> On Thu, 23 Jul 2015 12:42:15 +0200 > >> Peter Zijlstra wrote: > >> > >>> static __always_inline bool arch_static_branch_jump(struct static_key *key, bool inv) > >>> { > >>> if (!inv) { > >>> asm_volatile_goto("1:" > >>> "jmp %l[l_yes]\n\t" > >> And what happens when this gets converted to a two byte jump? > >> > > That would be bad, how can we force it to emit 5 bytes? > hmm....I don't think that's an issue, the patching code can > detect if its a 2-byte jump - 0xeb, or 5-byte: 0xe9, and do > the correct no-op. Same going the other way. See the code > I posted a few mails back. In fact, this gets us to the > smaller 2-byte no-ops in cases where we are initialized > to jump. > Ah right, and I already have the code that checks that (from the original plan). -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/