Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2476642iof; Wed, 8 Jun 2022 05:54:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxD4TDuyIpE2/AH+2P8AbS65nPWyzDtBjetayl88qgQ9tNrpBC+sPVCJysPJe+9D/DhqJzl X-Received: by 2002:a17:903:234d:b0:167:4b11:aa7 with SMTP id c13-20020a170903234d00b001674b110aa7mr26872104plh.89.1654692851050; Wed, 08 Jun 2022 05:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654692851; cv=none; d=google.com; s=arc-20160816; b=pI3hyAsFQJv6CrlM1nYJG4Gcj0NEWeJ/lre+16xqcNIFFRu+QGMidj6uFRyDhhNbZA vzUFZ/V6Y6yLAIBLOAd/bQH4yBlrFsrHW5FbcAoPCR8uLE/Dki49AVaSpEYGp8ARKf0+ ehAxX2CiKEHbnmsog7ZyEKCf0Gq3KyvJNsYgqpI6NUHrrxV6wxrjFfRWaDYK+8kb1LCF IQkPMigVrloIWhW/05/elvvo8ypM2Dynp1O3B3L5ChirHEjkXRNnoF52E8XiYMYbwmMe aRwIdoHNFo2nAtg0Mb8t5J2rYNssU//+wLVBm/esH50eIcLjTQyB2s7f1dXqY0zSweXM 1XCQ== 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; bh=olXSHoK0AVfUatuPzpksjr3kjUvIgoKcvlcJNQWKpqg=; b=Dssjis/mPDOXuQPnI3WtxYIXyEO7sVF18NLtssPNfoi0MO66GEb5tI+TGqcsnh2HLv WC6k1Zd4qNQ1ww/a+8ZQOvLcLwLxgoiTxW3Vk+M2mnLpN+WK9mtT6xDrVyBYcfbci7bT 2YNJ0xbY1DB2+sMarWDMPTgG8/0SaUAkcmP+OIEw3YBJdLjJll7oZRwWB9VJ85Pzgdi0 7VGpCjMesaSJKt03XhoyXKjLGeZYhgPhvn74tyZIrUiOyjYggEbxM04ORUfre45dr+bO vnHRrPnJtq5DXt2RDWmKlW+hA0klyTgZ4r7MreBEoGmH3Z2rctrpc2z0GPTpSp44IPC5 b+Xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d63-20020a633642000000b003fe26a0ab51si3411000pga.111.2022.06.08.05.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 05:54:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A54E623F891; Wed, 8 Jun 2022 05:27:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239180AbiFHM1k (ORCPT + 99 others); Wed, 8 Jun 2022 08:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239160AbiFHM1j (ORCPT ); Wed, 8 Jun 2022 08:27:39 -0400 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3556B2383F8; Wed, 8 Jun 2022 05:27:38 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id q26so17786771wra.1; Wed, 08 Jun 2022 05:27:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=olXSHoK0AVfUatuPzpksjr3kjUvIgoKcvlcJNQWKpqg=; b=ChxkkUQRoDL6yMY9Y9uRxuDS1I3u95QMzjFt4BpH/dj5UC3Z9kGOc9Aa1H+JjFyJZH pcB6krn8VjkViWJWFP/2hA68Ng9SNXs40Z4xxU18rPgEf7MI6xPeRhn8lF8SG/iL1jXs x915nfB9pYP31GTz3bdR1brc1PNH7KQCmo7Dr4dNIZo4I9nv2gpcLxcfVCZuFLT6A3Wg aezL3FjjhGn1UHQsExyMCAO+fPhFVTmOT8CODEIf6qzlf/S24Nc1nBmV2Sl5rL+qDre4 JHT5z3YXj5eg0rTfk65HDTMZvaNAJDelXbmjQ5Mt5THSFp0CgHQ/q9PqnIKNvRsLlj81 4Zdg== X-Gm-Message-State: AOAM530Lwqw12cxrNCdrmcl/9J2SSQGFIb2tvfNCs6W4heLBHpcA9UQ2 yH6N1zCyo19Pnjcy76NKBUE= X-Received: by 2002:a05:6000:1ac8:b0:218:4187:aab6 with SMTP id i8-20020a0560001ac800b002184187aab6mr14902511wry.236.1654691256539; Wed, 08 Jun 2022 05:27:36 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id p15-20020a05600c358f00b003973ea7e725sm35966983wmq.0.2022.06.08.05.27.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 05:27:36 -0700 (PDT) Date: Wed, 8 Jun 2022 12:27:34 +0000 From: Wei Liu To: Masahiro Yamada Cc: "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , linux-hyperv@vger.kernel.org, Stephen Rothwell , Daniel Lezcano , Michael Kelley , Thomas Gleixner , Vitaly Kuznetsov , linux-kernel@vger.kernel.org Subject: Re: [PATCH] clocksource: hyper-v: unexport __init-annotated hv_init_clocksource() Message-ID: <20220608122734.m25chzpwbr5ancnm@liuwe-devbox-debian-v2> References: <20220606050238.4162200-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220606050238.4162200-1-masahiroy@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, Jun 06, 2022 at 02:02:38PM +0900, Masahiro Yamada wrote: > 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 the only in-tree call-site, > arch/x86/kernel/cpu/mshyperv.c is never compiled as modular. > (CONFIG_HYPERVISOR_GUEST is boolean) > > Fixes: dd2cb348613b ("clocksource/drivers: Continue making Hyper-V clocksource ISA agnostic") > Reported-by: Stephen Rothwell > Signed-off-by: Masahiro Yamada Applied to hyperv-fixes. Thanks.