Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp653986iog; Thu, 30 Jun 2022 07:45:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sV6CT9EOi7A9ZSxapgLs62JYs1B+ey2aQmeNQVgHMeydxpc32XV7xvi44PNQ7aOJZrQGEJ X-Received: by 2002:a05:6402:254c:b0:435:c541:fc8d with SMTP id l12-20020a056402254c00b00435c541fc8dmr12256206edb.385.1656600333616; Thu, 30 Jun 2022 07:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656600333; cv=none; d=google.com; s=arc-20160816; b=LcUx5LzZ/vFErFnoONFlLQE+ef5jz6rTLquw+xroHo4g3T0K8iA/KwRI1QoK9+r1go y6Klzg6+rBY4ruHDfqACO9zmRQx6el0L1/vGTPwguvoYq7xUKZSymvRelrKm28SnucSf XNLbb1jzz4uvhv7hsSpay8DICtw/qqTfhqxuBsokTyDkX60IZquDbILt8L2kqH925Bb5 Ijn0BJBfnY8Pm2W2MhJmJmlSHJYO06J2zna2Zlke7tRuSkzWgNg3B6sd2V/J1CFy0DzU btGromu1GqmMjZxgDCHOp8CvsHH2Eqxb95er/N2a8lf/43gdHMNRffTXwdGXWbeOVEBx Z0kw== 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=hp/fJtAs6w4xO1v8VfbFi1PAR6KAPAytqOv49/6RIG0=; b=Lz0gfnDEJx1wrYyykuKmxu3sBEdDlvXjETP+t8NvtZHOajXeXzj7r/wSCQsmOcwUbf RUpQU8wGU+z4In7Ngg+2v3eaHxsc3ykIlMWyV5xLbxdjSpkyaWBtnPRfPsmE7APpVciU XO2c2lR4w7neNG0CwjHYHs8rGdtyvEgVeX6D3HlBzSY/GRbJjbqtolqsmnRHNVC0iqbf wbuPRyUKAAfH9RgZ0rVHanOYQ3G6dyNALD483ABQ9h0phPabuUo0CAr+iby1EAfTAp2g X6szdUkhqHIr04dBHugYZCqAcs8L5z4wccCMnq+Yp0Pd9mIAAEmZ13tFAqKxEp8jXqXN P/SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=in7F1oFJ; 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 f22-20020a056402329600b004388a694c92si164856eda.558.2022.06.30.07.45.05; Thu, 30 Jun 2022 07:45:33 -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=in7F1oFJ; 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 S236341AbiF3OBv (ORCPT + 99 others); Thu, 30 Jun 2022 10:01:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236795AbiF3N7g (ORCPT ); Thu, 30 Jun 2022 09:59:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7CD16052B; Thu, 30 Jun 2022 06:52:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 42F076204B; Thu, 30 Jun 2022 13:52:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CE52C34115; Thu, 30 Jun 2022 13:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656597138; bh=pvaZMhBBFG39Bo6daaoajB0nwnmd/BP7dDY+pRnff6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=in7F1oFJkVMKYwQMv1Oc5G6uqTva+C9zepAWpmXKr33nIQGU7Ro+oBNGtVRI/atNT F6O4qh0F8eCvTYcpEABWyAkpWryF8NWQzz9aLrL0n1dJDKI8TyrqhKtHw/rMjlgSmf NEZYucDg7+BOMxzBgdm/YjEQbqCDyiOllLLY24qE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Nick Desaulniers Subject: [PATCH 4.19 40/49] modpost: fix section mismatch check for exported init/exit sections Date: Thu, 30 Jun 2022 15:46:53 +0200 Message-Id: <20220630133235.059910863@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220630133233.910803744@linuxfoundation.org> References: <20220630133233.910803744@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 @@ -1066,7 +1066,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 },