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: <d3c1a0a9a29f6edfb36d97889d3498e1968500c0.camel@perches.com>
Date:   Thu, 10 Jan 2019 12:24:53 -0800
From:   Joe Perches <joe@...ches.com>
To:     Vadim Bendebury <vbendeb@...omium.org>,
        linux-kernel@...r.kernel.org
Cc:     apw@...onical.com
Subject: Re: [PATCH] checkpatch: allow reporting C99 style comments

On Wed, 2019-01-09 at 21:01 -0800, Vadim Bendebury wrote:
> Presently C99 style comments are removed unconditionally before actual
> patch validity check happens. This is a problem for some third party
> projects which use checkpatch.pl but do not allow C99 style comments.
> 
> This patch adds yet another variable, named C99_COMMENT_TOLERANCE. If
> it is included in the --ignore command line or config file options
> list, C99 comments in the patch are reported as errors.
> 
> Tested by processing a patch with a C99 style comment, it passes the
> check just fine unless '--ignore C99_COMMENT_TOLERANCE' is present in
> .checkpatch.conf.

I'm not a big fan of the name but I can't think of
anything much better.

And the location of the added test isn't good.

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -61,7 +61,6 @@ my $codespellfile = "/usr/share/codespell/dictionary.txt";
>  my $conststructsfile = "$D/const_structs.checkpatch";
>  my $typedefsfile = "";
>  my $color = "auto";
> -my $allow_c99_comments = 1;

Keep this here.
 
>  sub help {
>  	my ($exitcode) = @_;
> @@ -1250,6 +1249,8 @@ sub sanitise_line {
>  	my $off = 0;
>  	my $c;
>  
> +	my $allow_c99_comments = !defined $ignore_type{"C99_COMMENT_TOLERANCE"};
> +

And add this test as a new line near line 1015 like

 my $vname;
+$allow_c99_comments = !defined $ignore_type{"C99_COMMENT_TOLERANCE"};
 for my $filename (@ARGV) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ