Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1758691rwb; Thu, 17 Nov 2022 01:19:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf6S4GWJuWyIqU1oLPvWSYmFxMnvJVQ+ZJDpfd6M7g2GmTkkf8kN/xE0fyCgcw+noCv00KU4 X-Received: by 2002:a17:903:4091:b0:188:5240:5142 with SMTP id z17-20020a170903409100b0018852405142mr1729687plc.171.1668676753694; Thu, 17 Nov 2022 01:19:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668676753; cv=none; d=google.com; s=arc-20160816; b=hBnY3+rRVRzZVkWT43Cev5FiMre0sXMvYI1k/c3UOcRalo4MXdpr4+F55GZGe5LLAY LaiNdT31jvB66iyra9/b8KHQnLjxr3lI2MpFBNyb8Gg1nAQSCvJ0LXf99o3XG7ovu5ii LXH7RlAnkG4AFLVatupr5TSmXjibrtZ/e0FukQMVMs62fD19V63vQy6A4mjfbksrN2x7 bSrorDulgAo9jusNhhHQ4JlyoCFPWY+ciOAJDuvgtTTBLkaMQ/b3lRDADNMM+2hFemCk hoBxsu910LC/6bg4R0fLOUyfaJmvi5OjtoKtQakbTF6aOv/GaIH9dP24py2oFXUjyitA IWbw== 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=24lQ+vB2A9HKyuZWwcPYI0llW6cx4tLwTs8kPnawQG0=; b=jRJizVIxsJmeXXorLFILAX+6x/rgkBB9OidyqHX8O/7DVX0A5sl0b73blGX+n53V21 p2gs5KleKPlY0CEYyM7Wja9vg1tOrFobZ2e+4/fBvIc//yyivLnDbBBWQCRMUrRKFDhV /av2qf9ClTHZ9leqLgQ/kscbuGDLj1hy7Kv3tT1wpZiILwVNog2UNjXdBOgpDvfshkgL hmX1YfSgv9l+5A72oZVy31z9fJeFqYQ6b4RWMtbE+jDuhnTneoQxGZGWuKB0lp/svo/u N/LElR5y3Ri8K6cxtByS30Ml6I1dOquCPJYHqLJrX5S8/ZgubO4lO+C26FqDJx7lMyr7 iPAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=KJLYsWFx; 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 x3-20020a1709028ec300b00178170100fasi478167plo.337.2022.11.17.01.19.01; Thu, 17 Nov 2022 01:19:13 -0800 (PST) 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=KJLYsWFx; 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 S234819AbiKQIYc (ORCPT + 92 others); Thu, 17 Nov 2022 03:24:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234051AbiKQIY3 (ORCPT ); Thu, 17 Nov 2022 03:24:29 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDD5B27FCE for ; Thu, 17 Nov 2022 00:24:28 -0800 (PST) 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=24lQ+vB2A9HKyuZWwcPYI0llW6cx4tLwTs8kPnawQG0=; b=KJLYsWFxNDxSqACXhkvA0ynOpL J43a0H0SWNiDhsCqhpXIcKphHTLcibi61SUpuwtu3pbq0SUeEBwYDNXa2RKIeWhU/Z6eDu0d1b69r l1xSK8NY18iHb5EK1gl2T7nv5lCBwksuT0KawAmm1a5y3PZ/0DMKXmZRtLItNuXIAMyvvdGVjq3jn DWiIa4p7uiincVinbDRx/jLvl32wAz85AWuptfkYTwMg4aPjxQ5Jt+4yOn+K79W4ooCZHj3n7wqJ8 oZOmcAx5O3NIybmkLOB5FPf26OHUfMpZFTTgicv/+oa2AFEHtpN2hxvjcT+9IX3q2s7v1x9FQTnky +ov91RZw==; 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 1ovaC2-000ngc-Ue; Thu, 17 Nov 2022 08:24:19 +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 DE6E1300137; Thu, 17 Nov 2022 09:24:11 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8C4EE200FC693; Thu, 17 Nov 2022 09:24:11 +0100 (CET) Date: Thu, 17 Nov 2022 09:24:11 +0100 From: Peter Zijlstra To: Andi Kleen Cc: "Jiri Slaby (SUSE)" , linux-kernel@vger.kernel.org, Josh Poimboeuf , Jason Baron , Steven Rostedt , Ard Biesheuvel , Martin Liska , Jiri Slaby Subject: Re: [PATCH 08/46] static_call, lto: Mark static keys as __visible Message-ID: References: <20221114114344.18650-1-jirislaby@kernel.org> <20221114114344.18650-9-jirislaby@kernel.org> <20221114203433.2pskttlyqjo3gua7@two.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221114203433.2pskttlyqjo3gua7@two.firstfloor.org> 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 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 Mon, Nov 14, 2022 at 12:34:33PM -0800, Andi Kleen wrote: > On Mon, Nov 14, 2022 at 04:51:07PM +0100, Peter Zijlstra wrote: > > On Mon, Nov 14, 2022 at 12:43:06PM +0100, Jiri Slaby (SUSE) wrote: > > > From: Andi Kleen > > > > > > Symbols referenced from assembler (either directly or e.f. from > > > DEFINE_STATIC_KEY()) need to be global and visible in gcc LTO because > > > they could end up in a different object file than the assembler. This > > > can lead to linker errors without this patch. > > > > > > So mark static call functions as __visible, namely static keys here. > > > > Why doesn't llvm-lto need this? > > It has an integrated assembler that can feed this information to the LTO > symbol table, while gas cannot do that. > > There was some discussion to extend the gcc top level asm syntax to > express external symbols, but so far it doesn't exist. Urgh, that's ugly too. Why does GCC insist on ugly solutions; clang has shown it can be done sanely, follow.