From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965184AbeALUg1 (ORCPT + 1 other); Fri, 12 Jan 2018 15:36:27 -0500 Received: from mail-wr0-f180.google.com ([209.85.128.180]:36553 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964851AbeALUg0 (ORCPT ); Fri, 12 Jan 2018 15:36:26 -0500 X-Google-Smtp-Source: ACJfBotfiuEmUOg2aaOUk7pgIX2B9YYXOkleSH1zdOufOailJ7a+fm8aVWZP9PqonQRPYXZVTEnhWQ== Date: Fri, 12 Jan 2018 21:36:21 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: Linus Torvalds , 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: <20180112203621.yjoymm3qfmsvpt76@gmail.com> References: <1515688058.22302.366.camel@infradead.org> <20180111175626.GJ6176@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180111175626.GJ6176@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: * Peter Zijlstra wrote: > > 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. Absolutely, in fact I detest what we have: +#define __FILL_RETURN_BUFFER(reg, nr, sp) \ + mov $(nr/2), reg; \ +771: \ + call 772f; \ +773: /* speculation trap */ \ + pause; \ + jmp 773b; \ +772: \ + call 774f; \ +775: /* speculation trap */ \ + pause; \ + jmp 775b; \ +774: \ + dec reg; \ + jnz 771b; \ + add $(BITS_PER_LONG/8) * nr, sp; I mean, WTF?? Also, note that this: > call .Lset_up_target > .Lcapture_spec: > pause > jmp .Lcapture_spec > .Lset_up_target: > mov %r11, (%rsp); > ret; > becomes even more readable with a bit more human-readability improvements: call .L_set_up_target .L_capture_spec: pause jmp .L_capture_spec .L_set_up_target: mov %r11, (%rsp) ret I.e. the underscores in the label names, the tabs and the newlines create better vertical and horizontal separation between the syntactical elements and provide grouping of larger constructs. Thanks, Ingo