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:   Wed, 11 Mar 2020 19:48:52 -0700
From:   Scott Branden <scott.branden@...adcom.com>
To:     Joe Perches <joe@...ches.com>, Andy Whitcroft <apw@...onical.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH] checkpatch: always allow C99 SPDX License Identifer
 comments

Hi Joe,

On 2020-03-11 7:26 p.m., Joe Perches wrote:
> On Wed, 2020-03-11 at 12:11 -0700, Scott Branden wrote:
>> Always allow C99 comment styles if SPDK-License-Identifier is in comment
>> even if C99_COMMENT_TOLERANCE is specified in the --ignore options.
> Why is this useful?
This is useful because if you run checkpatch with 
--ignore=C99_COMMENT_TOLERANCE
right now it will warn on almost every .c file in the linux kernel due 
to the decision to
use // SPDX-License-Identifier: at the start of every c file

With this change checkpatch will stop complaining about this single 
outlier // in the file
and allow you to enforce no other C99 // style comments in the patch.

It would have been a lot nicer if /* SPDX-License-Identifier: xxxx */ 
was used instead...
>
>> Signed-off-by: Scott Branden <scott.branden@...adcom.com>
>> ---
>>   scripts/checkpatch.pl | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index a63380c6b0d2..c8b429dd6b51 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -3852,8 +3852,8 @@ sub process {
>>   			}
>>   		}
>>   
>> -# no C99 // comments
>> -		if ($line =~ m{//}) {
>> +# no C99 // comments except for SPDX-License-Identifier
>> +		if ($line =~ m{//} && $rawline !~ /SPDX-License-Identifier:/) {
>>   			if (ERROR("C99_COMMENTS",
>>   				  "do not use C99 // comments\n" . $herecurr) &&
>>   			    $fix) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ