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 8C84BC433EF for ; Tue, 28 Jun 2022 20:33:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229687AbiF1UdA (ORCPT ); Tue, 28 Jun 2022 16:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbiF1UdA (ORCPT ); Tue, 28 Jun 2022 16:33:00 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC618BF7F; Tue, 28 Jun 2022 13:32:59 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id x138so10352445pfc.3; Tue, 28 Jun 2022 13:32:59 -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=wg8+F4TuFkG1xW6NWKjkWvVt/UeHSlIng0uV9LgXC0s=; b=dqVD2Rci/rbAyFFszQrdO48V3S3apzN/yRFMOMcr7JtbtriXkLnLJitsUgfjpKK7Z+ y3wyvHK8B+WaonGnTc3snZIYrvkvrsgye37c3cz/Nv3PqEHIVjHKpCAxIUZpDcYWB1Pa W28xlLtVHPr0jPhsgbGyLDnnMxbmJtr6HZc2hIf4sJchxwIx8Trtr/D3vqK2l+XR8mcG tiRixn1dYXmdcwA1bWJVXJLvjExYl+8rbKfSTzRIlgZUBy9o5lK7liort9h1mXq8IwCQ MNSskNRcEG8URFcpPrhzcZE1KQSIfSI5e/S110Bpk2XOPXqdwAb5Kx9aH+u6bmpOrZQg xMZw== 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=wg8+F4TuFkG1xW6NWKjkWvVt/UeHSlIng0uV9LgXC0s=; b=FwTpOluSW+cHmSkkBetOPbGEZRnajbNYrlquCEKgNK5MdPR3P+qObuDg4VHpgbH6ck mXq5GbMcjlnINpSqATrp4ZZGbmdYFDfsqdqh5Ty8SeZ92JMy1ToQAJcAZHpz1o12482t YfoKgF1FtufvcupDOAlsQF6b4UGZgemZQ5ihEwRJCGGqvRwFt1Q2rbMPCz0HdGxwGU/k /1j3TQ0chd+RCzAIhPSIbUx1I/2Na2GeGbJv0bl4gbAg9KQluTmW0VDHdPRq9xxSw3ht JQ/Z9wAzb8Kz0UOuvReKl+IXGmciTSpLtLISGdNvtYWELwkHPU46KogQTAdKQeEFoZko wbHg== X-Gm-Message-State: AJIora9fNhxJiRsVrQHZBNLfNMXEQn56K1yLDsiUI+r25z0MH3MGi5VR CQXiIBXa3B0BdJMCzlC9WyU= X-Google-Smtp-Source: AGRyM1udAr2RA5pfWkYa0XVxSNy7W5KHGCo6ZXIjn694WLrbM6NtFsMcKbOusvCcRMF0+doZu0RiGw== X-Received: by 2002:a63:88c3:0:b0:40d:5f26:bfa8 with SMTP id l186-20020a6388c3000000b0040d5f26bfa8mr19136588pgd.608.1656448379122; Tue, 28 Jun 2022 13:32:59 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id x10-20020a1709027c0a00b0016a6caacaefsm9272820pll.103.2022.06.28.13.32.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jun 2022 13:32:58 -0700 (PDT) Message-ID: Date: Tue, 28 Jun 2022 13:32:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 5.4 57/60] modpost: fix section mismatch check for exported init/exit sections Content-Language: en-US To: Nick Desaulniers , Christoph Hellwig Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Masahiro Yamada , Daniel Vetter , Jessica Yu References: <20220627111927.641837068@linuxfoundation.org> <20220627111929.368555413@linuxfoundation.org> <6cd16364-f0cd-b3f3-248f-4b6d585d05ef@gmail.com> From: Florian Fainelli In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On 6/28/22 12:11, Nick Desaulniers wrote: > 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? It does and it does, thanks! > > 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 > > > -- Florian