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: <9f1339ba-624c-9975-cd7e-d8fcab1da158@wanadoo.fr>
Date:   Fri, 16 Apr 2021 20:03:53 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Joe Perches <joe@...ches.com>, apw@...onical.com,
        dwaipayanray1@...il.com, lukas.bulwahn@...il.com
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] checkpatch: Improve ALLOC_ARRAY_ARGS test

Le 16/04/2021 à 19:03, Joe Perches a écrit :
> On Fri, 2021-04-16 at 18:51 +0200, Christophe JAILLET wrote:
>> Le 16/04/2021 à 18:11, Joe Perches a écrit :
>>> On Fri, 2021-04-16 at 17:58 +0200, Christophe JAILLET wrote:
>>>> The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested
>>>> Add the corresponding check.
>>> []
>>>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>>> []
>>>> @@ -7006,9 +7006,9 @@ sub process {
>>>>    		}
>>>>    
>>>>
>>>>
>>>>    # check for alloc argument mismatch
>>>> -		if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
>>>> +		if ($line =~ /\b(devm_|)(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
>>>
>>> Perhaps nicer using
>> I'll send a V2.
>>
>> Thx for the feedback.
>>
>> CJ
>>
>>>
>>> 		if ($line =~ /\b((?:devm_)?(?:kcalloc|kmalloc_array))\s*\*\s*sizeof\b/) {
> 
> The \* above should be \(.
> 

Yes I've seen it when I tested the updated test case.

> I can't type and apparently I don't proofread either.
> I offer the excuse that the * and ( are adjacent on my keyboard...
> 

Well, you should try with a French keyboard :)
Anyway, thanks for taking time for the update.

CJ

> cheers, Joe
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ