Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp101097rwb; Fri, 2 Sep 2022 10:50:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR5rkGqZRc7dAPgEwmL58Pi6Cz1udiskfcJ+i2h6AA0/xynYzDrw+Z3fg8cWSTvKgZQATFS8 X-Received: by 2002:a17:907:746:b0:741:4a1b:cb1f with SMTP id xc6-20020a170907074600b007414a1bcb1fmr20543461ejb.370.1662141026634; Fri, 02 Sep 2022 10:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662141026; cv=none; d=google.com; s=arc-20160816; b=ciHLX3iKRAWwqcmID6kp11SvigDCz2esljRTCEjosYBVsWB5idGtxdw9nSk5hMixds t3T/RMS9ueeyxhNqGALdnI9wXIVVkkkE+2HXckCig5Hf7tJQh5eMUIu/W7Oo2IAHzYK9 dAm23+81wVRbNG+uc0R9yHINC58OTBtkkm0Fc15SEfQ+xAvXKv8ot5KPGRaNuKa0F4pZ 7uu9/K3To7IZcKVbNIjbN4cOL8aPiUQJJObszO/NvwFLf29bdoMD5edwSntRFr8z3nGP QkUBMPmm+Mj8wTQBElV+En9NB8Z7LXI2U2ZUg8bQopo2Sjxe8RXf4eN+FGoeiEPjTF1r iz2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZvPsgCeBrb7LWKubupD95PymNZTXgE+09rpNPKxSDsQ=; b=NxWy1z+J5IxCNEsjM4pIp7wWSQPqMG9fnDNsEd75ycGR8P8M0dSVy6V31ZsrE8eVgW ip69fVphsJMO9q6bdTsCbsiQQyPgWfWpGfqyyMjfvYp+51DVgecJrLdMWGisk+tgxwZt aTolzLKIjF+ddS+KZv0aVHuUeuzeXdo9bdc7olwN3kMqNsML4a6DCaDsvSDB0tjha4q8 GSi25XXKdmnosiBM5nhjEC3qYwQBfKp5smFI3w5jltt3+Iw+lzLSzthkDHY5Kh2bEUwf 1k319mL4q5PYPMD0DCKIA+aSPvlZvaUSePiuT+u9RgTwBV5mqWZNHQnc/ClBGxyYliaS itng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=a1BCGo9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 10-20020a170906310a00b0073d6c94fc3dsi1746135ejx.162.2022.09.02.10.50.01; Fri, 02 Sep 2022 10:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=a1BCGo9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236332AbiIBRc7 (ORCPT + 99 others); Fri, 2 Sep 2022 13:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235473AbiIBRc5 (ORCPT ); Fri, 2 Sep 2022 13:32:57 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8201F63D2 for ; Fri, 2 Sep 2022 10:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZvPsgCeBrb7LWKubupD95PymNZTXgE+09rpNPKxSDsQ=; b=a1BCGo9k8KoOfgDYOLcmYlWFRs cQiL3DIDFiNJbCRcrM7r27xu5inS1bKUEulFYS/R+kVUbVeO8NtMFriLHH1IEjd/0y83dXXsNfP4i zEOapOx3Hj1RK7IdHz2ZBB9BUZrD7OyWmB6ZjIZeXDEsgAMj2uCZZXpGqENi2RtjlwJv0SnEwhYc3 5xIetADZmOeNpIXU5x7+lHjIazPpaIYIZoGigNdHxS1vsnBSrRh2uJOKn9aHZ5sZ73/ynFUgoQaGa wkDE+B7aryhfG/nUdFclUf2EvfRK2w212fR3dzakwYoNISjx2oZZSai/sVn8Hch98VXW4i4SFgETk YxwVLk/Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUAWr-007Cpr-El; Fri, 02 Sep 2022 17:32:29 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 2E9643002A3; Fri, 2 Sep 2022 19:32:27 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 15F9E2B9048DE; Fri, 2 Sep 2022 19:32:27 +0200 (CEST) Date: Fri, 2 Sep 2022 19:32:27 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Tim Chen , Josh Poimboeuf , Andrew Cooper , Pawan Gupta , Johannes Wikner , Alyssa Milburn , Jann Horn , "H.J. Lu" , Joao Moreira , Joseph Nuzman , Steven Rostedt , Juergen Gross , Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann , K Prateek Nayak , Eric Dumazet Subject: Re: [PATCH v2 08/59] x86/build: Ensure proper function alignment Message-ID: References: <20220902130625.217071627@infradead.org> <20220902130947.190618587@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 02, 2022 at 09:51:17AM -0700, Linus Torvalds wrote: > On Fri, Sep 2, 2022 at 6:55 AM Peter Zijlstra wrote: > > > > --- a/arch/x86/include/asm/linkage.h > > +++ b/arch/x86/include/asm/linkage.h > > @@ -14,9 +14,10 @@ > > > > #ifdef __ASSEMBLY__ > > > > -#if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16) > > -#define __ALIGN .p2align 4, 0x90 > > -#define __ALIGN_STR __stringify(__ALIGN) > > +#if CONFIG_FUNCTION_ALIGNMENT == 16 > > +#define __ALIGN .p2align 4, 0x90 > > +#define __ALIGN_STR __stringify(__ALIGN) > > +#define FUNCTION_ALIGNMENT 16 > > #endif > > Ugh. > > Why is this conditional on that alignment being 16? There is a DEBUG case that increases the thing to 32.