From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D6FBCCA481 for ; Tue, 28 Jun 2022 19:15:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235174AbiF1TP2 (ORCPT ); Tue, 28 Jun 2022 15:15:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235696AbiF1TM2 (ORCPT ); Tue, 28 Jun 2022 15:12:28 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A141366B0 for ; Tue, 28 Jun 2022 12:12:03 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id a39so14941792ljq.11 for ; Tue, 28 Jun 2022 12:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nFFSUfbIlnfGEOyywbDGgiZf7UOcQCwXH88vizRPb54=; b=QMGSWZMtfiJD3l0VtJHwCLztNiH9/QdWHd1qMkxVRBBfxwdZXg2eMFZDZjTdTy3ECw C/KQlSA3z+4RLgJA7MiVQuBx0uJwo8NS6prEyRSLqpmHd9wUj9d8X3SIPLb7KDavXMGp HFuF+E7rFfOqJ2ahYwZAlyA4WHHcH8+eJseap1Mn9SRHjTt5y9b2fQDyq+1E3DEPiE9E LE5iP3WMCbHmXpceA5Pv7TtH8lVuRbjeBDn2XfJAv74YdPKWXQRCk32wQKzxtwFb5nx0 pSje8cLaIjnZEcJzX+X+TR63VDvW78xmRnegA3OqOwdyJ3ezc4AZLcl38Vl2dV9Fofl3 VP0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nFFSUfbIlnfGEOyywbDGgiZf7UOcQCwXH88vizRPb54=; b=ZNP9pMWfw0Mk/HK4n9KsRpj304ncXH5mSp7dpx/XSMELg0ppUGor5oKEta1Aix0IXr x63iqWzWWqMUNS1Jhps//toiIpHP1Q+gIgkDSaHQAyK5+LhLSzEkI+rc29UaWfu2AQIT Ox34h7RKioMpSw6J3qQPARidxOj4okEaz+Omb4GonifjXGNkuou21hz4e0mhzWjcGVm7 c/2KGmM2E/cvX60c60JEN714NhezB3lljMIR8yvglJ47z65CP1GQMiVa3ILoXGueIYlS BOyQosPh5+c2paINsc8bxERmwpeAFiAkZueRG8Yd4hyGqfXMhQnp98GA8FozuxLWPb0t 7PZQ== X-Gm-Message-State: AJIora+IKvo15rPmbrdMOkWY1g+/YdC597rqHd2K65eHYwiohtE103zO VCctzW0U3QJ1t2rGva85fkMHbiZXMSM7GEVHHsKP+Q== X-Google-Smtp-Source: AGRyM1tKzrCGxL2pKnCFouk/qMWj7OnMdrj1Sp+cy9DCiQ5Llnl85UhvXElzp7m4kVPeXCxDXo9KHYgFQpyxMbkAuNQ= X-Received: by 2002:a05:651c:d4:b0:25a:91c6:d9b1 with SMTP id 20-20020a05651c00d400b0025a91c6d9b1mr10338005ljr.400.1656443521986; Tue, 28 Jun 2022 12:12:01 -0700 (PDT) MIME-Version: 1.0 References: <20220627111927.641837068@linuxfoundation.org> <20220627111929.368555413@linuxfoundation.org> <6cd16364-f0cd-b3f3-248f-4b6d585d05ef@gmail.com> In-Reply-To: <6cd16364-f0cd-b3f3-248f-4b6d585d05ef@gmail.com> From: Nick Desaulniers Date: Tue, 28 Jun 2022 12:11:50 -0700 Message-ID: Subject: Re: [PATCH 5.4 57/60] modpost: fix section mismatch check for exported init/exit sections To: Florian Fainelli , Christoph Hellwig Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Masahiro Yamada , Daniel Vetter , Jessica Yu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 27, 2022 at 10:03 AM Florian Fainelli wrote: > > On 6/27/22 04:22, Greg Kroah-Hartman wrote: > > From: Masahiro Yamada > > > > commit 28438794aba47a27e922857d27b31b74e8559143 upstream. > > > > Since commit f02e8a6596b7 ("module: Sort exported symbols"), > > EXPORT_SYMBOL* is placed in the individual section ___ksymtab(_gpl)+ > > (3 leading underscores instead of 2). > > > > Since then, modpost cannot detect the bad combination of EXPORT_SYMBOL > > and __init/__exit. > > > > Fix the .fromsec field. > > > > Fixes: f02e8a6596b7 ("module: Sort exported symbols") > > Signed-off-by: Masahiro Yamada > > Reviewed-by: Nick Desaulniers > > Signed-off-by: Greg Kroah-Hartman > > This commit causes the following warning to show up on my kernel builds > used for testing 5.4 stable candidates: > > WARNING: vmlinux.o(___ksymtab+drm_fb_helper_modinit+0x0): Section > mismatch in reference from the variable __ksymtab_drm_fb_helper_modinit > to the function .init.text:drm_fb_helper_modinit() > The symbol drm_fb_helper_modinit is exported and annotated __init > Fix this by removing the __init annotation of drm_fb_helper_modinit or > drop the export. Thanks for the report. Looks like the patch is "working as intended." It looks like drm_fb_helper_modinit was deleted outright in commit bf22c9ec39da ("drm: remove drm_fb_helper_modinit") in v5.12-rc1. Florian, can you test if that cherry-picks cleanly and resolves the issue for you? Maybe let's check with Christoph if it's ok to backport bf22c9ec39da to stable 5.10 and 5.4? > > The kernel configuration to reproduce this is located here (this is 5.10 > but works in 5.4 as well): > > https://gist.github.com/2c3e8edd5ceb089c8040db724073d941 > > Same applies to the 5.10, 5.15 and 5.18 stable queues FWIW. > -- > Florian -- Thanks, ~Nick Desaulniers