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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 Jan 2022 12:47:26 +0200
From:   Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
To:     Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        kernel@...labora.com, Andy Whitcroft <apw@...onical.com>,
        Joe Perches <joe@...ches.com>,
        Dwaipayan Ray <dwaipayanray1@...il.com>
Subject: Re: [PATCH] checkpatch: warn for p0 patch only if prefix is not b



On 11.01.22 12:18, Lukas Bulwahn wrote:
> Dafna,
> 
> On Mon, Jan 10, 2022 at 9:06 PM Dafna Hirschfeld
> <dafna.hirschfeld@...labora.com> wrote:
>>
>> It might be that file 'b' happens to exit. In that
>> case, if the prefix is also 'b' (which is the
>> common case) we get the falsely warning:
>>
>> patch prefix 'b' exists, appears to be a -p0 patch
>>
>> So warn only if prefix is not 'b'
>>
> 
> The checkpatch script that is maintained here is really only intended
> for its use in the kernel development. You may use checkpatch anywhere
> else, but any changes that increase complexity for those other use
> cases is really difficult to argue for inclusion in the kernel
> repository. The checkpatch script currently is already large and
> complex enough and all rules need to be understood as rough
> heuristics, not as strict rules.
> 
> So, can you point to a kernel repository where there is actually a
> file 'b' included? On a quick scan, I could not find a file 'b' in the
> current trees of the repositories on my machine.
> 
> I am just letting you know about what I have observed; I do not decide
> on the inclusion of this patch, though.

Hi, a 'b' file might make it to the source folder as an untracked file.
This actually happened to me since I was too lazy to give it a meaningful name.
Then I got this warning and it took me some time to figure out what is the problem.

Thanks,
Dafna

> 
> Lukas
> 
>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
>> ---
>>   scripts/checkpatch.pl | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 1784921c645d..72263b142e39 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -2821,7 +2821,7 @@ sub process {
>>                          $in_commit_log = 0;
>>
>>                          $p1_prefix = $1;
>> -                       if (!$file && $tree && $p1_prefix ne '' &&
>> +                       if (!$file && $tree && $p1_prefix ne '' && $p1_prefix ne 'b' &&
>>                              -e "$root/$p1_prefix") {
>>                                  WARN("PATCH_PREFIX",
>>                                       "patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
> 
>> --
>> 2.17.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ