From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935490AbeAKR4m (ORCPT + 1 other); Thu, 11 Jan 2018 12:56:42 -0500 Received: from merlin.infradead.org ([205.233.59.134]:40730 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932621AbeAKR4k (ORCPT ); Thu, 11 Jan 2018 12:56:40 -0500 Date: Thu, 11 Jan 2018 18:56:26 +0100 From: Peter Zijlstra To: Linus Torvalds Cc: David Woodhouse , Josh Poimboeuf , the arch/x86 maintainers , Linux Kernel Mailing List , Thomas Gleixner , Andi Kleen , Paul Turner , Greg Kroah-Hartman , Tim Chen , Dave Hansen , Kees Cook , Andy Lutomirski , Jiri Kosina , One Thousand Gnomes Subject: Re: [PATCH 2/3] objtool: Ignore retpoline alternatives Message-ID: <20180111175626.GJ6176@hirez.programming.kicks-ass.net> References: <1515688058.22302.366.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 11, 2018 at 09:29:48AM -0800, Linus Torvalds wrote: > Secondly, we use lots of the the "small numbers for local labels" both > in inline asm and in *.S files. > > I think doing > > jne 1f > ... > 1: > > is a _hell_ of a lot more legible than > > jne .LPrefix_% > ... > .LPrefix_% > > unless you have some *major* reason to use an explicit label name. Small number maybe; but the value at hand was a random 999 or so, which is not a small number. But I find a descriptive label ever so much better than a random number. > Sure, if you grew up writing perl, and think that an illegible mess of > random characters is a requirement for programming, then the ".L%" > format looks natural. I grew up on BASIC and have bad memories of random big number goto. I'll take those random trailing character any day if it includes human readable bits before. > But if you're an actual human, the "small numbers as labels" is fine. I find descriptive labels much nicer than random numbers, I'll take some crazy characters if so required. Consider the retpoline thing: call .Lset_up_target .Lcapture_spec: pause jmp .Lcapture_spec .Lset_up_target: mov %r11, (%rsp); ret; over: call 2f 1: pause jmp 1b 2: mov %r11, (%rsp) ret give me the first any day of the week.