Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp946407rdb; Fri, 17 Nov 2023 18:58:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7JaiwpOvS9USstOFqfnpLD4Lx11vnJ7MwfDsmcm1gi3UMWbLIeL/G+zuOlhOCW0liv0NC X-Received: by 2002:a17:902:8f86:b0:1cc:6597:f40b with SMTP id z6-20020a1709028f8600b001cc6597f40bmr1752323plo.36.1700276337196; Fri, 17 Nov 2023 18:58:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700276337; cv=none; d=google.com; s=arc-20160816; b=AIeJJPRQQ5IlBb8WkZi6ULWaGZjJJtbrb7cPHk5nglWExsBdcmCL4Dd3D2WJ8Y2ox+ k7KTiJ1BcdvGh3iDrO/6uqoplGks2pXrF11tB5Sm4RTY46v95ivZhAoWaEZuIeOm6pH/ ioT59o6UlJnVjFHOnyf/Vkc2aHWX19qCvrqgBdgs/aP1UsPHWFmh2ygBjsf18oFElqIz mjwAw8DkiTjmeXt/KeEKt/tDhG4/BjFUYUmdMcBHfQf4BSgCMjmlIbJTKRVYG8Xoa0u7 B/15VuF6X0B6X2K7HWTy62YvS4wvRgq+gbV+dXGyXolURUOMWo91hisX8YEtuCP1naVw XHrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=Ua0IE78OI3V4iuwp2QSoKWUWADgF+ZXc9DJoA62znV8=; fh=tvII/HPajp/NlqnxeuWRc9nIfYr8jgLiigCgB7HTnyI=; b=YS8phGV2DBad832tpUNgPz/xOjqp7ZY/G4YoXW1id9cb2R44359MxY1IW8sMEHseOv SzNJFq+pN4sqsJh/SGQ9wXAkT6K2v8HIMqIcnVydCti48LpvhmP2ak9ksZdfM9EwBgDn hvz3xO6xxTgvtjdXKc8+ehLkd5/pqghNTBieKh6vVg17o7BH7c2/x7eWcpRQAXljjkmP OLXyUdfWzkXGXH1z19kxllFvF4e4qhJxZyxWpRLVLLshkVB9rrR5JsHEm1uhKULx7dXn y7CxKNoHUUR44U9RGxOfnIMY55MfV4OFo3p7gxxKxXlSKAUjKJdP7dIQ5CQSZG0kWrNP iyUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=F3jRmmh2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bi7-20020a170902bf0700b001cf5085cfe9si603498plb.425.2023.11.17.18.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 18:58:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=F3jRmmh2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5F0D681DE391; Fri, 17 Nov 2023 18:58:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232891AbjKRC6N (ORCPT + 99 others); Fri, 17 Nov 2023 21:58:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232854AbjKRC6L (ORCPT ); Fri, 17 Nov 2023 21:58:11 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4B72120 for ; Fri, 17 Nov 2023 18:58:08 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5bc3be6a91bso29617217b3.1 for ; Fri, 17 Nov 2023 18:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700276288; x=1700881088; 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=Ua0IE78OI3V4iuwp2QSoKWUWADgF+ZXc9DJoA62znV8=; b=F3jRmmh2EUK+OfbPUNe20oapoSvEhNicFeHmxJ/ixVlLf1ZBkP22OAHd1hmZUCvZsu 1VaOG1HutflZuwff1N+aB+ElGpfYHHU4huPgCGLS5IZyL4BRRPQ8VynifDc2AdQB3/AZ LQr8z+SzK+8PjJn21ItvbT/PJLJ3KSP9engLbXThkfCdz9Z12vPovpZ/s8mLqf9A+mXq wEG/0DJy8KVjt0wODrqkkmyxJO2w+loCUzYFLF6rD6dw6h9bxF5mjwovRIMujp1TbwC4 WYN/glhBqY5rX8A4edfLXeIaR7hNqbYMSTGlnh669YFyHe0NwOxbEmVhM3L7YXwH/IKe ou1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700276288; x=1700881088; 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=Ua0IE78OI3V4iuwp2QSoKWUWADgF+ZXc9DJoA62znV8=; b=aCPZQa2DRY4KobAkV78LsXJpuFRkivk3xb0WLBMgVYzbVYr7O85p5byZcR9RaqpxqZ 5BM4/FMfXUOer7zPEfgWYECZve9Lmz0fGJhJOugHVPOuGHFgnmgEYqw5fjiCT+Eaz0Sz P7UdCSWZLhjc+DKT43tn7ZMsIPS+vy52F9jrGC/SZmCsGcKvLafg014/U6TcuXu3mIvU xuJtJOi1N8sbJ6LLBkemtNqT1Ii/q8oEbllR+fViyF4HHDTsOfFnD3JJmWWw77cE0AYX ixUrbnR/+qJR9XMQy08Sb+soqkBABRdlNUV6x7yy+fJtBm1TxWvQRxLKVzTFRKlQHFrh uiMA== X-Gm-Message-State: AOJu0Yx5dH2zQdrtC8YDO7oq0xL7zXcift3nZhTmK0H4VyQnVvgx5A/g 4FgCrVk+HkjyGz0v6MmauZ6fJ1kDaFry X-Received: from anyblade.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:1791]) (user=mmaurer job=sendgmr) by 2002:a25:e6c1:0:b0:daf:3e84:d016 with SMTP id d184-20020a25e6c1000000b00daf3e84d016mr29963ybh.2.1700276288083; Fri, 17 Nov 2023 18:58:08 -0800 (PST) Date: Sat, 18 Nov 2023 02:54:42 +0000 In-Reply-To: <20231118025748.2778044-1-mmaurer@google.com> Mime-Version: 1.0 References: <20231118025748.2778044-1-mmaurer@google.com> X-Mailer: git-send-email 2.43.0.rc0.421.g78406f8d94-goog Message-ID: <20231118025748.2778044-2-mmaurer@google.com> Subject: [PATCH v2 1/5] export_report: Rehabilitate script From: Matthew Maurer To: Masahiro Yamada , Nick Desaulniers , Miguel Ojeda , Gary Guo , Luis Chamberlain Cc: Nathan Chancellor , Nicolas Schier , 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 , Matthew Maurer Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 17 Nov 2023 18:58:47 -0800 (PST) * 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 --- 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