Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp635980iog; Mon, 13 Jun 2022 09:35:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s3kSkWwHz31JdLbInP48ERwl0TFdXJ0KAwR3wohcOZKMZJzjwl+M0FvsRu26161VKqnbF6 X-Received: by 2002:a17:902:7202:b0:167:79d1:f with SMTP id ba2-20020a170902720200b0016779d1000fmr466130plb.3.1655138145992; Mon, 13 Jun 2022 09:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655138145; cv=none; d=google.com; s=arc-20160816; b=Hgj45B0p2ACQVvpdtV19k1tavV7iyMGBUQ6J3/+VPcfu0Ugewd0jLa7rRpogkaqd7b Nx57PVEqijiXs3gsyqbhLKvoDx2l38aSZIGHSS7C2eDdqqQrdumkfaQEalbN6fClTlWd +Ait6n1BFpJeU9RNfpKs9W2APe2pL1zd13oOX50S6NLIik7kWQt9kjJsTFt3b5W1cgrq okscT4ZeEIaWGFHp55bNjRyIOA5yAR1/qayU8V+pSIOxOf6eKax4XTBeAVjpgEkBBHjQ Beafd6q7/EwYEcyeEhoRWKinkByQFKlb6mJeP2daiRYWzQmdcK8FiEyMTlGgTaHhTfHM Bk9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rUgxjX5dmGh9INyXT40mJYqtUaQpsjl6X4gj4Sm5AKk=; b=IPjxxQrDtXvuK1Bv1C4t28mX8N8XfqW8GjgfsPdcSwd85UwGD9VJK1UPDNMVkXRwrd 9/zAxQg7xA0ufeolf9PE2gnwke3qy0nxiV8mcd6gbAmPFHBG2lkn/Tw40SlYts3uIirL MVph6HCNFHZu3z4bCXc6UElXi7mvU6Ov6nbpy8CHneLpgbFEoEom9VFv/arh9Jfmt5Oi Ps0i2p+0sATgoDmZqpozfvryAxe5NW1QPhwo1GU9sauErJzp7dE9gt7VbvTwA82I24m5 y7NbsUJ6C0pGO+HU1HL+MccY5GY7dF5X1UCt3e+8TCCCldRvkOxep8DTzP/XMbDvd2uF OhKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CfABduFJ; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf25-20020a056a000d9900b004fa3a8e003fsi7764821pfb.246.2022.06.13.09.35.23; Mon, 13 Jun 2022 09:35:45 -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=@linuxfoundation.org header.s=korg header.b=CfABduFJ; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359287AbiFMNPq (ORCPT + 99 others); Mon, 13 Jun 2022 09:15:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359242AbiFMNJn (ORCPT ); Mon, 13 Jun 2022 09:09:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5CDD38D9F; Mon, 13 Jun 2022 04:19:38 -0700 (PDT) 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 57D1660EAE; Mon, 13 Jun 2022 11:19:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67574C34114; Mon, 13 Jun 2022 11:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655119177; bh=4oxHm1p9md4OCeao8DceTL8n6o67+unER+HdBMgk2n8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CfABduFJgM4RGCTakR26/ijHcnL61kPWSOVTxlasP1XyTVZn31Mm+L04xnAmeyvqh mpIleytIu1EG7opMlccmThy0XF/YGQoTMH7KPZUQP4wZ0cSSTFCjXixrHwqHqU4z7h kJDiU/RV/4E0K0y8X3sxanMIx01TCdtjNN3Q1IEk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Rothwell , Masahiro Yamada , Oleksandr Tyshchenko , Stefano Stabellini , Juergen Gross , Sasha Levin Subject: [PATCH 5.15 142/247] xen: unexport __init-annotated xen_xlate_map_ballooned_pages() Date: Mon, 13 Jun 2022 12:10:44 +0200 Message-Id: <20220613094927.261176974@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094922.843438024@linuxfoundation.org> References: <20220613094922.843438024@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 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,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 From: Masahiro Yamada [ Upstream commit dbac14a5a05ff8e1ce7c0da0e1f520ce39ec62ea ] EXPORT_SYMBOL and __init is a bad combination because the .init.text section is freed up after the initialization. Hence, modules cannot use symbols annotated __init. The access to a freed symbol may end up with kernel panic. modpost used to detect it, but it has been broken for a decade. Recently, I fixed modpost so it started to warn it again, then this showed up in linux-next builds. There are two ways to fix it: - Remove __init - Remove EXPORT_SYMBOL I chose the latter for this case because none of the in-tree call-sites (arch/arm/xen/enlighten.c, arch/x86/xen/grant-table.c) is compiled as modular. Fixes: 243848fc018c ("xen/grant-table: Move xlated_setup_gnttab_pages to common place") Reported-by: Stephen Rothwell Signed-off-by: Masahiro Yamada Reviewed-by: Oleksandr Tyshchenko Acked-by: Stefano Stabellini Link: https://lore.kernel.org/r/20220606045920.4161881-1-masahiroy@kernel.org Signed-off-by: Juergen Gross Signed-off-by: Sasha Levin --- drivers/xen/xlate_mmu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/xen/xlate_mmu.c b/drivers/xen/xlate_mmu.c index 34742c6e189e..f17c4c03db30 100644 --- a/drivers/xen/xlate_mmu.c +++ b/drivers/xen/xlate_mmu.c @@ -261,7 +261,6 @@ int __init xen_xlate_map_ballooned_pages(xen_pfn_t **gfns, void **virt, return 0; } -EXPORT_SYMBOL_GPL(xen_xlate_map_ballooned_pages); struct remap_pfn { struct mm_struct *mm; -- 2.35.1