Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5901225rwb; Mon, 14 Nov 2022 11:04:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf40oORmNTdkWsAP53EWS/ILW2TR9KxtYEYoT/RpDMQN2/0PIqN7jifN0QT31pXEdcYz0Nlr X-Received: by 2002:a17:90a:fc7:b0:212:c06c:47ba with SMTP id 65-20020a17090a0fc700b00212c06c47bamr15226331pjz.131.1668452689940; Mon, 14 Nov 2022 11:04:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668452689; cv=none; d=google.com; s=arc-20160816; b=uB1jTbD5FS0eAhuZrobvmeIKFyugqEYmZn2Vg9QWgaBwOkGUITocQz8v66Pm1Fq8TO CwAEviFyRPbjfhQZYD8zyENp0ZZGff8Wczz6+ADeWGLacc2tzEfHU2+k8wym6oJdHSbL IPD4Q5ybAa4bP0mtLJEiiUf1Wr3E+p1JKjcBBev2RcBBH8wqcPBfYdVtAVrRs77xhPUf jluCgScDf7ysOX5BjfO/UQsXK/WS/Mv/+t/bhOMXKALWBgI2Y1J+k6yTK9BLlM8jMklE 4WcQGP+yPQJsimYQlgdr3joAYEW+8O/t+WX8YS1b+M5ELRrxtFlrU11LL8RUfCQBUtRM Qz4w== 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=IQm84dPqhmbjexQWRzWm6OGEb7+jcJM08ZXe5/DT4Zw=; b=qkqDJzplfBBAIDDT4+tFrHfWw/3cpobw4V5SUIxMAwx932mWzOsdoNxqjbPt+xpsUq i92dB/9WLxVgv5owX8dXmwDFjJCE0zSA6IA6eh6hRGfon7NgfkGfx35Q8pqPFCUVNBHh /ZCzjTSyzG+WuCrfliSxOeLPQkQxXZbksF5gKSulz+azAh5e1/XIYfJ2zusYTqSNKbDd bsaqN7NNQ2hJqtpPTbQOiVtTbnQW2utiIf0752mf8EqlndrIp6TgFdDjYenJe8D/1grt TefPoGQNFdw1DcWd5ZN4W4sh4h5otUmRB4QKEc3oy4mpeWm+P1u2aCcgoGqzljinM0g5 CucA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YNAtHG/Z"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m16-20020a63ed50000000b0046afa55b6a5si9749156pgk.708.2022.11.14.11.04.37; Mon, 14 Nov 2022 11:04:49 -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=@kernel.org header.s=k20201202 header.b="YNAtHG/Z"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236268AbiKNS5Y (ORCPT + 89 others); Mon, 14 Nov 2022 13:57:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiKNS5W (ORCPT ); Mon, 14 Nov 2022 13:57:22 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF3DA1C405 for ; Mon, 14 Nov 2022 10:57:21 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8A66B61366 for ; Mon, 14 Nov 2022 18:57:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6249C433D6; Mon, 14 Nov 2022 18:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668452241; bh=dqtnDCRCSgBFtivgXi8hVlUMz8eeEw/iDCweBbGxILw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YNAtHG/ZFiR8hnpoTpbNMdeN+M4V9GjLLoaPwkRom6Nre+4ygMdJjhTnExj7Rs2Rl wJXdMdzTNJW/G543NcBc3VQkihuM/uCC5C243Xk+aZzcMi+LuQkfRo68toaUGP/dak k0KLGvAJImJH2F5UewQc03uEw6wwCpjLELUDuGTdn8trtkzRycIIXsBSh/CnIAZuRF DAFQ7lYx2SsgMhKlqPOFCzXv17NyFMvWpLxrnWlD0vqlcD/WJHuQmMDEZQJLTxCMgC jGtsWZwQzdr5x5lpAYi/bOu/8aN92FOsWp9Yx5p5wyeMujzlGn3CUWhhJB9lFKZG2Q cIPoBsd4ZttnA== Date: Mon, 14 Nov 2022 10:57:18 -0800 From: Josh Poimboeuf To: "Jiri Slaby (SUSE)" Cc: linux-kernel@vger.kernel.org, Andi Kleen , Peter Zijlstra , 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: <20221114185718.kladzjm4ulcnq7bj@treble> References: <20221114114344.18650-1-jirislaby@kernel.org> <20221114114344.18650-9-jirislaby@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221114114344.18650-9-jirislaby@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: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. > > Cc: Peter Zijlstra > Cc: Josh Poimboeuf > Cc: Jason Baron > Cc: Steven Rostedt > Cc: Ard Biesheuvel > Signed-off-by: Andi Kleen > Signed-off-by: Martin Liska > Signed-off-by: Jiri Slaby > --- > include/linux/static_call.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/linux/static_call.h b/include/linux/static_call.h > index df53bed9d71f..e629ab0c4ca3 100644 > --- a/include/linux/static_call.h > +++ b/include/linux/static_call.h > @@ -182,7 +182,7 @@ extern long __static_call_return0(void); > > #define DEFINE_STATIC_CALL(name, _func) \ > DECLARE_STATIC_CALL(name, _func); \ > - struct static_call_key STATIC_CALL_KEY(name) = { \ > + __visible struct static_call_key STATIC_CALL_KEY(name) = { \ Why not __visible_on_lto? -- Josh