lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 Sep 2021 11:40:00 +0200
From:   Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Doc Mailing List <linux-doc@...r.kernel.org>
Cc:     Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        "Jonathan Corbet" <corbet@....net>, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] scripts: get_abi.pl: better generate regex from what fields

Using repeating sequencies of .* seem to slow down the
processing speed on some cases. Also, currently, a "."
character is not properly handled as such.

Change the way regexes are created, in order to produce
better search expressions.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---

To mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH 0/2] at: https://lore.kernel.org/all/cover.1632994565.git.mchehab+huawei@kernel.org/

 scripts/get_abi.pl | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
index 2f3674bb3c9e..6212f58b69c6 100755
--- a/scripts/get_abi.pl
+++ b/scripts/get_abi.pl
@@ -842,8 +842,8 @@ sub undefined_symbols {
 
 			# Convert what into regular expressions
 
-			$what =~ s,/\.\.\./,/*/,g;
-			$what =~ s,\*,.*,g;
+			# Escape dot characters
+			$what =~ s/\./\xf6/g;
 
 			# Temporarily change [0-9]+ type of patterns
 			$what =~ s/\[0\-9\]\+/\xff/g;
@@ -859,6 +859,8 @@ sub undefined_symbols {
 			$what =~ s/[\{\<\[]([\w_]+)(?:[,|]+([\w_]+)){1,}[\}\>\]]/($1|$2)/g;
 
 			# Handle wildcards
+			$what =~ s,\*,.*,g;
+			$what =~ s,/\xf6..,/.*,g;
 			$what =~ s/\<[^\>]+\>/.*/g;
 			$what =~ s/\{[^\}]+\}/.*/g;
 			$what =~ s/\[[^\]]+\]/.*/g;
@@ -891,6 +893,13 @@ sub undefined_symbols {
 			# Special case: IIO ABI which a parenthesis.
 			$what =~ s/sqrt(.*)/sqrt\(.*\)/;
 
+			# Simplify regexes with multiple .*
+			$what =~ s#(?:\.\*){2,}##g;
+#			$what =~ s#\.\*/\.\*#.*#g;
+
+			# Recover dot characters
+			$what =~ s/\xf6/\./g;
+
 			my $leave = get_leave($what);
 
 			my $added = 0;
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ