Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp652126iog; Thu, 30 Jun 2022 07:43:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tirR/rMabQP9VBT3XXnpwGeRuG3EVgkFQxFVjDGqjHyIM+CL1ukaNQBWH2h/T1SO5nsYxL X-Received: by 2002:a17:902:c94b:b0:16a:3f98:84fd with SMTP id i11-20020a170902c94b00b0016a3f9884fdmr15893983pla.70.1656600200659; Thu, 30 Jun 2022 07:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656600200; cv=none; d=google.com; s=arc-20160816; b=X9Pn40APCDs5FSLDIAKZ9fGaJSC/xKXjSaXoZ22Q7qOqafeleTwLJ6/W0ImGU0Z7oY VloYEH+OpvjTOWe/XoVcjAHr3nNxED7w0r2tAY72GNUVeZHYdir1AkbBADIbuCrYWjeI z8Y0DRn/+3Y72sadbHhp1jCiF/QHN26kjiptGrh0p51CHtt8hWhOih+mrt0uzYRVsLlu Btgx0moanprM0LZlWS9xE8TMwq2WUYNAFMEfoSP5EjFUM8FN9GWeBhpJv5A43fkuoxEM Mb+qdcKHveFix5pHYnIl2yq4a156WEVZE+BMrHvMg/3pOhdPNzrWwx5xagv6QZ+6w1Vb BCgg== 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=Y2vSYDTPDm8UQaAErofZvSuHxdDsZeBLC2OLZC+jK/8=; b=nroMAnoN1RHG4LjCYH8IKVvogXRkouFeg9G9x3I9kJIJfSDZeiU6urru6VSodErvCK jRhC2AehJExijGOdA7fD6sUXj8XU2Qd1ymiccJM1//A1D3gaoLOjf9sTd30N3J4D1Alj uCwVryTTeQf1RR3+vwkMXhe9RvPNzHWRkZlGOxOkIXDQTngTiFvfJ+UEuAINoAEVwiN7 bOffgIvbkfJwr5GcNFz39cpEARrHUIEYZ/2wdolOBdkutRS5lULEvcZ/eGwxEuLK19Sw 9e8hxpN2HTFrOLFxJz/paJAT1gMvMzQIaE2pVrtD01ktdu2bImDqCUAUTyuxhU26/0kg 9F6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MYojxU4g; 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 p15-20020a635b0f000000b00407e25d4528si28237661pgb.5.2022.06.30.07.43.08; Thu, 30 Jun 2022 07:43:20 -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=MYojxU4g; 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 S236205AbiF3OCQ (ORCPT + 99 others); Thu, 30 Jun 2022 10:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236095AbiF3OAE (ORCPT ); Thu, 30 Jun 2022 10:00:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFCA744757; Thu, 30 Jun 2022 06:52:32 -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 741DD61FF6; Thu, 30 Jun 2022 13:52:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7918CC34115; Thu, 30 Jun 2022 13:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656597149; bh=UqT7Ezn9pWtS5CRV1aEcCh3rXLPAeHPdmaWs4yzft/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MYojxU4gfvzWikI2hbQDO2aGvYejBX72TiEURtea81v0rH8KXtzrPLzu0vWZGP5T9 LGtKncYZlYRJLjHj0ro+qE/NP3cSYsmsjGxRLZN2gdKxmCfv++Ipo9PQ0m46t5wtEf 7kW2XkttGa9zE7H6lQ3ud5idxV4uJHP6jnBifpks= 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 Subject: [PATCH 4.19 44/49] xen: unexport __init-annotated xen_xlate_map_ballooned_pages() Date: Thu, 30 Jun 2022 15:46:57 +0200 Message-Id: <20220630133235.173427029@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220630133233.910803744@linuxfoundation.org> References: <20220630133233.910803744@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=-7.5 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 commit dbac14a5a05ff8e1ce7c0da0e1f520ce39ec62ea upstream. 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: Greg Kroah-Hartman --- drivers/xen/xlate_mmu.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/xen/xlate_mmu.c +++ b/drivers/xen/xlate_mmu.c @@ -262,4 +262,3 @@ int __init xen_xlate_map_ballooned_pages return 0; } -EXPORT_SYMBOL_GPL(xen_xlate_map_ballooned_pages);