Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp201555iof; Mon, 6 Jun 2022 01:26:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlvMpxIigeLDkIYaPLT7rDTaHoaWHcPJp6FID5GInR0nYWvqeZI/3lsMi/jZigQnsql8lV X-Received: by 2002:a05:6a00:3491:b0:51c:1d3b:b0b0 with SMTP id cp17-20020a056a00349100b0051c1d3bb0b0mr3764279pfb.68.1654503968775; Mon, 06 Jun 2022 01:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654503968; cv=none; d=google.com; s=arc-20160816; b=z7vnn2DDtAEBLneQ9LPDRqJ//1q7yD1SAFyji429JK+gZnvGYps8IFCx4m+v22nqah V5Tj/Jw8DYw/Hgx+KyvvxaYS2vVoEQfpGqKi+ip5Tl2F7JI1IaucstRiNOwEs2ts0Z5A V0T1MNdUvKTovXdNdFwVqUtILZ/5ErF4zmkDu5jQ2X1rSgrSbGlS7d0O9PuSAzpcLxgS 0EkYJFK2YuprNK+qgwAtoE1HyHb4Dzx5zcOIr4jCCEI5sxWfYQYj2ajeYhf35FefMW/A B+nK4Gzebqiz1xvZ1wtRUnW8j7wDAaIkWWTFethkM4Gasc7Tx+CinbeKoDufFntUBqHC q1nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=55gnPINtsFPFd2IhvtfL5C51CaXoml0DfEKveP/xXyE=; b=tAMblw2zz80PdpXArrN1lmAlUzeDjIj8gkkAAH71VY9CytOgW4fBsJ04+biYG9DpMz bO0S3qXZUUIm/O3eTrsFUhnCbvfKmuQf1FkwMzPYYD5H6rhdxj+uLXZJ8DEOVa5gqq38 o7XOmDEMQw/zC9A450xk/8D+HpGp/ErE/DaDC4IvSbo3nEGvnM/m0MlyrtOnf1b6wypJ GuMhCW4zwvWXw3SKOy2vSsRi3WaD/fSy134d8bWwcxK8QrBKQ77eP/ZuQyUWf0M5Kq7e kvQlV/UGMWeurIbdCgFO7Hur2RCITHWD0XTw36vOyRVAcqMijGTnJbv1azo2TXlFfyPF Sibw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FY14aHG+; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 36-20020a630e64000000b003db7de734bdsi16843182pgo.747.2022.06.06.01.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 01:26:08 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FY14aHG+; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EC42173563; Mon, 6 Jun 2022 01:09:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231621AbiFFIJc (ORCPT + 99 others); Mon, 6 Jun 2022 04:09:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231495AbiFFIJb (ORCPT ); Mon, 6 Jun 2022 04:09:31 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B807D5EDEA; Mon, 6 Jun 2022 01:09:29 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id x17so18765833wrg.6; Mon, 06 Jun 2022 01:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=55gnPINtsFPFd2IhvtfL5C51CaXoml0DfEKveP/xXyE=; b=FY14aHG+M1ivaNxoVyt6bw617tg7SLpmHKJkKnw7ZiBFa5bcMH28PRhbF+5/CxEB4M RWPw5VAU3V8FsqwgzENi2il9HokLiJ8/fX8mE8TDBR3hWvJkacNEF+ErJKm9tHl7RaB+ npldND8zTlpuqQsFRhYByq9G+D4Rnstqaxn3Bi56xRS2uT6Di07qbbS0s52dunRaqaCC K7yISRTRLLu4/QXGVd+wO+NorRCg958iO5PSHn8wCNESTQTickgj7RU28Mtrdu/leXNh 0iOXFuJiyJ/CeYgIwRwkvOTKjJarPOO26jtKGRF4jZLOLnPHZx5wvC5WTL2AgPiWiwyK 0tUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=55gnPINtsFPFd2IhvtfL5C51CaXoml0DfEKveP/xXyE=; b=fQas94U0twhcYI7nNfTl4cGk7kf6CuvIpQLcV2sY4i06feks2yTtZ8SGDyYPzkn6cC m/eLgirnQhH2kjLwnwTjHMrd37P+WXC/wLzeaaBxvM8dy5W7XvUrQe+t7tF0wDbyenIK nvabE3CxnRbb92aEF6lCLRiY0Az9TRkW0qkuEU0jCYQl/pqQh2BGq+IpVPO91AnQa+AZ sEnLWV1lELBQrMH/bSEdBI5vE+9h3tGPke+4pQVWw51DGuKZUsl3fhi7b21R4jio5hg+ M78fDHhxTTuBEo6uwn76WmEPQy8MLuTiheFursTKubApKDCn5Nm2gTpzSY4zhVVGKr2N cTWw== X-Gm-Message-State: AOAM533Dn0JcsKx+GZoPfqbCTINrDNA2pdxe6xNxvuirTzuq1JefPfh0 QeSQnfwcfvLFOVHgxHjXc7M= X-Received: by 2002:adf:ed41:0:b0:210:20a5:26c2 with SMTP id u1-20020adfed41000000b0021020a526c2mr19871874wro.603.1654502968088; Mon, 06 Jun 2022 01:09:28 -0700 (PDT) Received: from ?IPV6:2a01:cb05:86cb:1c00:f508:89e3:8d18:b335? (2a01cb0586cb1c00f50889e38d18b335.ipv6.abo.wanadoo.fr. [2a01:cb05:86cb:1c00:f508:89e3:8d18:b335]) by smtp.gmail.com with ESMTPSA id y3-20020a7bcd83000000b0039747cf8354sm16206206wmj.39.2022.06.06.01.09.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jun 2022 01:09:27 -0700 (PDT) Message-ID: <53818857-18b8-c7d8-8003-43452c9aa003@gmail.com> Date: Mon, 6 Jun 2022 10:09:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 1/3] net: mdio: unexport __init-annotated mdio_bus_init() Content-Language: en-US To: Masahiro Yamada , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Eric Dumazet , Paolo Abeni , Stephen Rothwell , Andrew Lunn , Heiner Kallweit , Russell King , linux-kernel@vger.kernel.org References: <20220606045355.4160711-1-masahiroy@kernel.org> <20220606045355.4160711-2-masahiroy@kernel.org> From: Florian Fainelli In-Reply-To: <20220606045355.4160711-2-masahiroy@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 6/6/2022 6:53 AM, 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, > drivers/net/phy/phy_device.c is never compiled as modular. > (CONFIG_PHYLIB is boolean) > > Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") > Reported-by: Stephen Rothwell > Signed-off-by: Masahiro Yamada Reviewed-by: Florian Fainelli -- Florian