From nobody Fri Nov 29 03:34:59 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17F4C1A4AA1 for ; Wed, 25 Sep 2024 23:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727307616; cv=none; b=giiJV5n9NvlwHAEGJYMWo6e+Shz7tF67n04Gn9VrS2q7NCljdktiYWZWRo4dwkitDsol/NG2eAYn4LXg5GvD3i0M8bzezXsMUydXAE7n62IWjlJEkb7t98lTVj7moK3waxsmtJrZ5TnoAc8f0RIW4fkzoGHEV3O+RDnUyV4bLWA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727307616; c=relaxed/simple; bh=CxcOGYVl0RHNxURp1Y+1xpXbMOZLvm56O9AP4mZATd8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=fHTqB59ddl84fCZriN42Km7Mk80h7SWUNx+5NOXvJ9mGVTG+l8dZ4nWTKeq/p+U5vxg0LK35fUNfJ87wDPmrJ6aVsiPU3d1zVTsiItYUiKyloEoXzzU7q2dJMutqE8kj1Onh1lCqz/xadwNTI/TEhG3slt0ZdpkSIiLTuTit0DU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--mmaurer.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=aRV+NzUG; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--mmaurer.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="aRV+NzUG" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e02fff66a83so696138276.0 for ; Wed, 25 Sep 2024 16:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727307614; x=1727912414; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=WplRKYGF+6Vdtojy3WxnxZnhza95+GyPbQDFLT+DHQA=; b=aRV+NzUGcQL4/ON7uIiCHk8jIbKQL9jQ5QyJkiVpL7vm2kJlCNj8gzPruXe8klTwfl Zi+BHkx2vbPtz78f4TDt5anS2Wb6eEdqIdUyvVzVfcbpCj5vW7Ytkrmb0NHShIm4LFif mq9PTj2fjOJp25iZVq0OpBa/MHbgZ1+rkgh8eMPwdH+Pl/ucPhCprx30plQsooIQxkTK rev4RuTRDiegtTCAXbdUBKvwwXR25AMOo+wD7W/JQYl6j2ObteqKMNwyBCxh9Uddo0yT zi+UVJj3nm7Lnk8rCO571Jzwo1xeSNreuGNM47rKJH6Y/gJqnbLPJFnHp298w9R+Hau8 kKrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727307614; x=1727912414; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WplRKYGF+6Vdtojy3WxnxZnhza95+GyPbQDFLT+DHQA=; b=CTSu657njgLjiZ2A0leyoChfG+KXjGATZcW8hKejkviXNduEV8ZoLo1/5KMjmYSaBp 7HgENngiIEqgw/cTlm6nPgJ9gahGFGkAM2O8xgLZlEAYY/geYEYm4I38xkdCemLIfAF2 Z1BysA8fLpB3fZH836FgD5j6aXbg5NsTPEDl0a6ZuM01EVSnRhy7odFhreLYBhrxbeUz WXurn+GtMPYnvZNHp9S3mOVTgU4A8eALlKKczBbLoJuNKhRimAAfBF3ZBSb19dl8XCKa 99vAKKktNtfCaQ2NfGytX2kJ4J4lmfdXsQU7ezO6s8gNonyW4JaFTqBLlVGaaUu9pEZ8 b/KQ== X-Forwarded-Encrypted: i=1; AJvYcCWe+oBymm9fEb8fws/yrdS5rsQmvGKvkUC47R+mY3jIVWZMhTT7Bqs6EYspSdnzDQr9nkKqM3uERlPHv3I=@vger.kernel.org X-Gm-Message-State: AOJu0YxfyarBKLd4b/3TwYTjb48iGLhHPboKkKqx2BXUzbEdS42GR0e6 jhQTb+QbrNVi1v44ri/LXdSyPUBUR4K41qcow+7yVFO4ACc5QLnmRLNvuRi1z58uG7N/4lUHEh8 cx88DrQ== X-Google-Smtp-Source: AGHT+IEf40pL03JKKHoArutuPYYFcfXs6+lqlBIsFYP4JGQ4Mtdii+GrGo8PKjLJPO4DM/u/M2ebjWWjQD3t X-Received: from anyblade.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:1791]) (user=mmaurer job=sendgmr) by 2002:a25:780e:0:b0:e16:6e0a:bb0b with SMTP id 3f1490d57ef6-e24d44cad51mr4791276.0.1727307613856; Wed, 25 Sep 2024 16:40:13 -0700 (PDT) Date: Wed, 25 Sep 2024 23:38:31 +0000 In-Reply-To: <20240925233854.90072-1-mmaurer@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240925233854.90072-1-mmaurer@google.com> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog Message-ID: <20240925233854.90072-17-mmaurer@google.com> Subject: [PATCH v5 16/16] export_report: Use new version info format From: Matthew Maurer To: masahiroy@kernel.org, ndesaulniers@google.com, ojeda@kernel.org, gary@garyguo.net, mcgrof@kernel.org, Alex Gaynor , Matthew Maurer Cc: rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, neal@gompa.dev, marcan@marcan.st, j@jannau.net, asahi@lists.linux.dev, linux-modules@vger.kernel.org, Boqun Feng , "=?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?=" , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The new version info format has a superset of symbols in the old format. Since this is a tool for in-tree modules, we don't need to parse the old one with this tool any longer. Signed-off-by: Matthew Maurer --- scripts/export_report.pl | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/scripts/export_report.pl b/scripts/export_report.pl index dcef915405f3..6a37df6f947f 100755 --- a/scripts/export_report.pl +++ b/scripts/export_report.pl @@ -114,31 +114,29 @@ foreach my $thismod (@allcfiles) { } =20 my $state=3D0; + # State map: + # 0 - Looking for names + # 1 - Scanning names + # 2 - Done while ( <$module> ) { chomp; if ($state =3D=3D 0) { - $state =3D 1 if ($_ =3D~ /static const struct modversion_info/); + $state =3D 1 if ($_ =3D~ /__used __section\("__version_ext_names"\)/); next; } if ($state =3D=3D 1) { - $state =3D 2 if ($_ =3D~ /__used __section\("__versions"\)/); - next; - } - if ($state =3D=3D 2) { - if ( $_ =3D~ /};/ ) { - $state =3D 3; - next; - } - if ( $_ !~ /0x[0-9a-f]+,/ ) { + if ( $_ =3D~ /;/ ) { + $state =3D 2; next; } - my $sym =3D (split /([,"])/,)[4]; + $_ =3D~ /"(.*)\\0"/; + my $sym =3D $1; my ($module, $value, $symbol, $gpl) =3D @{$SYMBOL{$sym}}; $SYMBOL{ $sym } =3D [ $module, $value+1, $symbol, $gpl]; push(@{$MODULE{$thismod}} , $sym); } } - if ($state !=3D 3) { + if ($state !=3D 2) { warn "WARNING:$thismod is not built with CONFIG_MODVERSIONS enabled\n"; $modversion_warnings++; } --=20 2.46.1.824.gd892dcdcdd-goog