Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2921699iog; Mon, 27 Jun 2022 05:50:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vfDEHiDB07xek3ePpDPrWJhLJMFH9wAajxH5XbcBXcawJ1yZN8vGF/xZ8gwW3otpvfctm3 X-Received: by 2002:a17:902:cecd:b0:16a:5cab:4721 with SMTP id d13-20020a170902cecd00b0016a5cab4721mr14694117plg.104.1656334211548; Mon, 27 Jun 2022 05:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656334211; cv=none; d=google.com; s=arc-20160816; b=mF2BQZhyGCgGozhc2obxSIHfuET9T82E7r1rz0TPWDakFPvNnS/N/BItsSIDXJCP2d vL0krGX8AQSZGigwL/8T/gG1/WWAUqcSi+xpdg1HPLfru0E5mv4wiuuxCFs1dyGJ1n2K 6GD+Zgn7yc8lHAPlDGzPEetqh1OaofvQjUV7V0PJZIWH+6OL05KZWygwqiuJ24LqYtpt m/yGAzr766GX0cxtaC3s1bfkiSvDJYH3/iJJdIXOWerQZVCTOjdWXKZYDUXhssKlYAB+ W1nZu1jlUXqXE8gXR7osOS6zPAJl6BtuMpnJTHYdnFrZJPVGmpIcWJzN9wUyz1aaZyOv cEdg== 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=vQjI1P2A8np8Qv0/QJ6gENJYYv8lqmalySJXYA/lPU0=; b=n5zOdr/yIF/q/k4GwtyYMWecDwUo8DN9M2q0W2VYT/3e5miv07DrfrLFg5udywlM0A 0ODAw4wFMrThJi51lmfwIuHE/NWiTOpkL1n8ppcVIA1eiWoftYJ3CLIOWJlWEuRCJipQ hIekae/9UqZaKBUiB/UmEcMoxC7oAIMezyYWdLik8DTDZPhkMy9hB91as1uDDSgk9uhx eJ1OfGPt0nTgCElVqczURPLwDPGNQ7qgeUMudsPrgn4cUid6AVNKzPku+aT7GWfZDtmi 8DJge/M4fEsacOoPkn6tVSUMDCSd6lTT2/MHUgpjfqM36kUqN34fYSnffbpmxZgiDBSC T19Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y1gRgF3H; 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 hk8-20020a17090b224800b001ecd7df15a5si13111142pjb.46.2022.06.27.05.49.59; Mon, 27 Jun 2022 05:50:11 -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=Y1gRgF3H; 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 S239578AbiF0MAQ (ORCPT + 99 others); Mon, 27 Jun 2022 08:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238873AbiF0Lwp (ORCPT ); Mon, 27 Jun 2022 07:52:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38EDCDEF0; Mon, 27 Jun 2022 04:46:13 -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 CFDB3B80DFB; Mon, 27 Jun 2022 11:46:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3378CC3411D; Mon, 27 Jun 2022 11:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656330370; bh=0XtH9daK+YtVDvHzZgQYKMzXRKtZ8b7buUfhpDwfnyc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y1gRgF3HFzGayn1IfPDGA9UZ2xKnh3G1vttiUCRwJQZlVW8XetICLsi8mI6if2n15 pAx5jV46Kl00qb62rNsCheZ4iszZ7BjZiQiBhgj+NJtuhnyQ7TWTqt7Nfhu8Asul3h HAkPnSIYuDnr5FsGRdNXPIu0ZuEUPBooMJfOtoCQ= 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.18 173/181] modpost: fix section mismatch check for exported init/exit sections Date: Mon, 27 Jun 2022 13:22:26 +0200 Message-Id: <20220627111949.701269142@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111944.553492442@linuxfoundation.org> References: <20220627111944.553492442@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 @@ -1115,7 +1115,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 },