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]
Message-ID: <3513adb04d17156242c92121a7aec4515c39bcf5.camel@perches.com>
Date: Fri, 12 Jan 2024 10:48:59 -0800
From: Joe Perches <joe@...ches.com>
To: Will McVicker <willmcvicker@...gle.com>, Andy Whitcroft
 <apw@...onical.com>,  Dwaipayan Ray <dwaipayanray1@...il.com>, Lukas
 Bulwahn <lukas.bulwahn@...il.com>
Cc: linux-kbuild@...r.kernel.org, kernel-team@...roid.com, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] checkpatch: allow build files to reference other
 build files

On Fri, 2024-01-12 at 10:34 -0800, Will McVicker wrote:
> Add an exception to the EMBEDDED_FILENAME warning for build files. This
> fixes the below warnings where the Kconfig and Makefile files reference
> other similarly named build files.
> 
>   WARNING:EMBEDDED_FILENAME: It's generally not useful to have the
>   filename in the file
>   #24: FILE: Kconfig:34:
>   +source "drivers/willmcvicker/Kconfig"
> 
>   WARNING:EMBEDDED_FILENAME: It's generally not useful to have the
>   filename in the file
>   #36: FILE: Makefile:667:
>   +	} > Makefile

No need to wrap here I think.

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -3785,7 +3785,9 @@ sub process {
>  		}
>  
>  # check for embedded filenames
> -		if ($rawline =~ /^\+.*\b\Q$realfile\E\b/) {
> +		if ($rawline =~ /^\+.*\b\Q$realfile\E\b/ &&
> +			$realfile !~ /Kconfig.*/ &&
> +			$realfile !~ /Makefile.*/) {

Align to open parenthesis please.
It's not useful to have .* before the /

So perhaps better to be

		if ($rawline =~ /^\+.*\b\Q$realfile\E\b/ &&
		    $realfile !~ /(?:Kconfig|Makefile)/) {
	
>  			WARN("EMBEDDED_FILENAME",
>  			     "It's generally not useful to have the filename in the file\n" . $herecurr);
>  		}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ