Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2906369iog; Mon, 27 Jun 2022 05:30:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vNfhenWZYlD5HX8oKavjfghuYc6gVLEjOlSyyfTq3/KKNlevVbslaoKa1sFo+oUt7bkjGw X-Received: by 2002:a63:1209:0:b0:3fc:818e:861d with SMTP id h9-20020a631209000000b003fc818e861dmr12386678pgl.62.1656333054827; Mon, 27 Jun 2022 05:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333054; cv=none; d=google.com; s=arc-20160816; b=gbrORMObyxqv5DG2NQ47p+eqAxNvJ2CA4Dn6aAy29hXhK7GOHG6KQVg0ZIJGDOm4P8 bqWqTIzVscIdiHH0qwdOZjz4E7wNoV8WkteYTInAqlMGC6yuQ72sheUP+1N+5yYXPOp4 5FaV4vZsScDiXDPxckSvXw5dJNkpU3gWtD0+8e/3lfbWPYHcnV0JkCyFePiME1SUks5K y2UC2iim3p0scOvUOvjrbE2bItPYVlhvGfINY4lyRLJwHV79+SsmnUfAzvF5uLRU/xfQ ZvEP/lLOPj34vhtRtW4BxkG3BGjn1Fa7/YGI5X/vqmkpv+4y2DllMFCOkBb8Uka3DObU h49A== 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=WfpabSCfOwwOQvnilV0B+XqQLGt7wxXlL3YV25dCm70=; b=xlTtFaXl7DEZV9whXQr4DN0yGrhCmMxiNlgrmXrJDzfG8zmjb8EW5ehDdeStUphrPC UFI+Kg0eIYnErbczxAZUi8j9vGxXPY5981MGcWjactcL1dU0p+B+dKoWBhvGU0//BBYh mQeShrita06v3qrzIqIHd/98aas7h7w6kUVgTOvBj62YXIsRd026fzoBQ697l9Zze6x0 RhR+YXfNrovWEdKig9Ce2NHUvWncF7WxoGJxLIvxGsSpiTgjM5qmviL90tZGEz71NB/+ 8boNh/EIM3G6RHHNp1rOreLdz0z+G/hc5aKanXwpJBcyIlXfZz4Ocrd8PmbyUQpuhqZe uRfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sO2jvOma; 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 b28-20020a631b1c000000b003db2ab7cae4si14142234pgb.688.2022.06.27.05.30.40; Mon, 27 Jun 2022 05:30:54 -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=sO2jvOma; 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 S235378AbiF0L3W (ORCPT + 99 others); Mon, 27 Jun 2022 07:29:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235242AbiF0L2s (ORCPT ); Mon, 27 Jun 2022 07:28:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B41876587; Mon, 27 Jun 2022 04:27:27 -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 ams.source.kernel.org (Postfix) with ESMTPS id 24796B81123; Mon, 27 Jun 2022 11:27:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5825BC341C8; Mon, 27 Jun 2022 11:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329244; bh=lkdp9TG2/+HjYn1m8Nr4MRQIkow3L5qBfoi9/2E0Trc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sO2jvOmaDBnEPtHCa9NqK2jLz7uvuzbAB3MrahEQ3Vsq94qagI2YxdR/6DRv4vIbH zpmgSf7y65JTfoA5OoV3F3laToYcVW2DivUR4lpdRKoDFgWyFiZiBZCrvVOD9OuXeK GrdvPml4hDpjUyMa5ixboAKpKWbJ+I7wUKxX5YyU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Nick Desaulniers Subject: [PATCH 5.10 099/102] modpost: fix section mismatch check for exported init/exit sections Date: Mon, 27 Jun 2022 13:21:50 +0200 Message-Id: <20220627111936.402838961@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111933.455024953@linuxfoundation.org> References: <20220627111933.455024953@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 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 --- scripts/mod/modpost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1119,7 +1119,7 @@ static const struct sectioncheck section }, /* Do not export init/exit functions or data */ { - .fromsec = { "__ksymtab*", NULL }, + .fromsec = { "___ksymtab*", NULL }, .bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL }, .mismatch = EXPORT_TO_INIT_EXIT, .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },