From: Matthew Maurer <mmaurer@google.com>
To: Masahiro Yamada <masahiroy@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Miguel Ojeda <ojeda@kernel.org>, Gary Guo <gary@garyguo.net>,
Luis Chamberlain <mcgrof@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org,
rust-for-linux@vger.kernel.org,
Laura Abbott <laura@labbott.name>,
Matthew Maurer <mmaurer@google.com>
Subject: [PATCH v2 1/5] export_report: Rehabilitate script
Date: Sat, 18 Nov 2023 02:54:42 +0000 [thread overview]
Message-ID: <20231118025748.2778044-2-mmaurer@google.com> (raw)
In-Reply-To: <20231118025748.2778044-1-mmaurer@google.com>
* modules.order has .o files when in a build dir, support this
* .mod.c source layout has changed, update regexes to match
* Add a stage 3, to be more robust against additional .mod.c content
Signed-off-by: Matthew Maurer <mmaurer@google.com>
---
scripts/export_report.pl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/export_report.pl b/scripts/export_report.pl
index feb3d5542a62..dcef915405f3 100755
--- a/scripts/export_report.pl
+++ b/scripts/export_report.pl
@@ -55,6 +55,7 @@ sub collectcfiles {
open my $fh, '< modules.order' or die "cannot open modules.order: $!\n";
while (<$fh>) {
s/\.ko$/.mod.c/;
+ s/\.o$/.mod.c/;
push (@file, $_)
}
close($fh);
@@ -120,10 +121,14 @@ foreach my $thismod (@allcfiles) {
next;
}
if ($state == 1) {
- $state = 2 if ($_ =~ /__attribute__\(\(section\("__versions"\)\)\)/);
+ $state = 2 if ($_ =~ /__used __section\("__versions"\)/);
next;
}
if ($state == 2) {
+ if ( $_ =~ /};/ ) {
+ $state = 3;
+ next;
+ }
if ( $_ !~ /0x[0-9a-f]+,/ ) {
next;
}
@@ -133,7 +138,7 @@ foreach my $thismod (@allcfiles) {
push(@{$MODULE{$thismod}} , $sym);
}
}
- if ($state != 2) {
+ if ($state != 3) {
warn "WARNING:$thismod is not built with CONFIG_MODVERSIONS enabled\n";
$modversion_warnings++;
}
--
2.43.0.rc0.421.g78406f8d94-goog
next prev parent reply other threads:[~2023-11-18 2:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-18 2:54 [PATCH v2 0/5] MODVERSIONS + RUST Redux Matthew Maurer
2023-11-18 2:54 ` Matthew Maurer [this message]
2023-11-18 11:35 ` [PATCH v2 1/5] export_report: Rehabilitate script Greg KH
2023-11-18 2:54 ` [PATCH v2 2/5] modules: Refactor + kdoc elf_validity_cached_copy Matthew Maurer
2023-11-18 11:36 ` Greg KH
2023-11-18 2:54 ` [PATCH v2 3/5] modpost: Extended modversion support Matthew Maurer
2023-11-18 13:42 ` kernel test robot
2023-11-18 2:54 ` [PATCH v2 4/5] rust: Allow MODVERSIONS Matthew Maurer
2023-11-18 2:54 ` [PATCH v2 5/5] export_report: Use new version info format Matthew Maurer
2023-11-22 15:49 ` [PATCH v2 0/5] MODVERSIONS + RUST Redux Masahiro Yamada
2023-11-22 21:04 ` Matthew Maurer
2023-11-23 9:05 ` Greg KH
2023-11-23 11:38 ` Masahiro Yamada
2023-11-23 12:12 ` Greg KH
2023-11-27 19:27 ` Matthew Maurer
2023-11-28 8:05 ` Greg KH
2023-11-28 8:44 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231118025748.2778044-2-mmaurer@google.com \
--to=mmaurer@google.com \
--cc=gary@garyguo.net \
--cc=laura@labbott.name \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nicolas@fjasle.eu \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox