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-next>] [day] [month] [year] [list]
Message-Id: <20240820-scripts-fix-get_abi-xyz-v1-1-6f6aea9b638b@baylibre.com>
Date: Tue, 20 Aug 2024 11:40:18 -0500
From: David Lechner <dlechner@...libre.com>
To: linux-kbuild@...r.kernel.org
Cc: Masahiro Yamada <masahiroy@...nel.org>, 
 Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>, 
 Mauro Carvalho Chehab <mchehab@...nel.org>, linux-kernel@...r.kernel.org, 
 David Lechner <dlechner@...libre.com>
Subject: [PATCH] scripts/get_abi.pl: more strict matching of [XYZ]

When using `scripts/get_abi.pl undefined --search-string=iio` to try to
find undocumented ABI's in the IIO subsystem, no matches were found.

This was due to the fact that we have documented a directory naming
pattern:

	What: /sys/bus/iio/devices/iio:deviceX

which gets translated to the regex

	/sys/.*/iio\:device.*

which matches everything under every iio:device directory, causing any
attributes below this directory to incorrectly be filtered out as
already documented.

This patch makes the matching more strict by changing the replacement
for [XYZ] from .* to [^/]* so that we don't match the directory
separator. This way documenting directories won't filter out everything
contained in the directory as already being documented.

Signed-off-by: David Lechner <dlechner@...libre.com>
---
get_maintainers.pl didn't pick up any matches for this patch, so I guess
this would go through the kbuild tree? (Since MAINTAINERS says:
"KERNEL BUILD + files below scripts/ (unless maintained elsewhere)")
---
 scripts/get_abi.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
index de1c0354b50c..f65158694852 100755
--- a/scripts/get_abi.pl
+++ b/scripts/get_abi.pl
@@ -867,7 +867,7 @@ sub undefined_symbols {
 			$what =~ s/\{[^\}]+\}/.*/g;
 			$what =~ s/\[[^\]]+\]/.*/g;
 
-			$what =~ s/[XYZ]/.*/g;
+			$what =~ s/[XYZ]/[^\/]*/g;
 
 			# Recover [0-9] type of patterns
 			$what =~ s/\xf4/[/g;

---
base-commit: 521b1e7f4cf0b05a47995b103596978224b380a8
change-id: 20240820-scripts-fix-get_abi-xyz-0ab0b9b62719

Best regards,
-- 
David Lechner <dlechner@...libre.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ