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, 20 Oct 2016 01:16:28 -0700
From:   Joe Perches <joe@...ches.com>
To:     Jerome Forissier <jerome.forissier@...aro.org>,
        Andy Whitcroft <apw@...onical.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch: don't match against empty $const_structs

On Thu, 2016-10-20 at 10:12 +0200, Jerome Forissier wrote:
> When $conststructsfile does not exist or is empty, we may get false
> warnings such as:
> WARNING: struct  should normally be const
> 
> Fix that by not running the string match if $const_structs is empty.

Why should $const_structs ever be empty?

> Signed-off-by: Jerome Forissier <jerome.forissier@...aro.org>
> ---
>  scripts/checkpatch.pl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index a8368d1..722a319 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -6010,7 +6010,8 @@ sub process {
>  		}
>  
>  # check for various structs that are normally const (ops, kgdb, device_tree)
> -		if ($line !~ /\bconst\b/ &&
> +		if ($const_structs ne "" &&
> +		    $line !~ /\bconst\b/ &&
>  		    $line =~ /\bstruct\s+($const_structs)\b/) {
>  			WARN("CONST_STRUCT",
>  			     "struct $1 should normally be const\n" .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ