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] [day] [month] [year] [list]
Message-ID: <0712b0d8d777777a3f91f5c394f410e3196a80ac.camel@perches.com>
Date:   Sat, 15 Jul 2023 06:53:29 -0700
From:   Joe Perches <joe@...ches.com>
To:     Jonas Gorski <jonas.gorski@...il.com>,
        Andy Whitcroft <apw@...onical.com>,
        Dwaipayan Ray <dwaipayanray1@...il.com>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>,
        Rob Herring <robh@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch: ignore /dev/null being added for file path
 checks

On Sat, 2023-07-15 at 11:58 +0200, Jonas Gorski wrote:
> In e.g. schema to yaml conversion patches, a file may be deleted,
> causing checkpatch in strict mode to complain about files outside of the
> bindings directory being modified:
> 
>   ./scripts/checkpatch.pl --strict --showfile 0001-dt-bindings-spi-convert-spi-brcm63xx.txt-to-YAML.patch

Please send this patch file

>   dev/null:72: WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst
>   total: 0 errors, 1 warnings, 0 checks, 79 lines checked
> 
> Since this isn't a real file, skip any further checks based on the
> file's location.
> 
> Fixes: 133712a2ec84 ("checkpatch: DT bindings should be a separate patch")
> Signed-off-by: Jonas Gorski <jonas.gorski@...il.com>


> ---
>  scripts/checkpatch.pl | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 880fde13d9b8..30de47909460 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2856,6 +2856,12 @@ sub process {
>  			$realfile =~ s@^([^/]*)/@@ if (!$file);
>  			$in_commit_log = 0;
>  
> +			# "/dev/null" being added means a file was actually
> +			# deleted, no need for further file location checks
> +			if ($line eq "+++ /dev/null") {
> +				next;
> +			}
> +
>  			$p1_prefix = $1;
>  			if (!$file && $tree && $p1_prefix ne '' &&
>  			    -e "$root/$p1_prefix") {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ