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:   Mon, 26 Aug 2019 00:06:38 +0300
From:   Denis Efremov <efremov@...ux.com>
To:     Markus Elfring <Markus.Elfring@....de>,
        Gilles Muller <Gilles.Muller@...6.fr>,
        Julia Lawall <julia.lawall@...6.fr>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nicolas Palix <nicolas.palix@...g.fr>, cocci@...teme.lip6.fr
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts: coccinelle: check for !(un)?likely usage



On 25.08.2019 18:30, Markus Elfring wrote:
>> +(
>> +* !likely(E)
>> +|
>> +* !unlikely(E)
>> +)
> 
> Can the following code variant be nicer?
> 
> +*! \( likely \| unlikely \) (E)
> 
> 
>> +(
>> +-!likely(E)
>> ++unlikely(E)
>> +|
>> +-!unlikely(E)
>> ++likely(E)
>> +)
> 
> I would find the following SmPL change specification more succinct.
> 
> +(
> +-!likely
> ++unlikely
> +|
> +-!unlikely
> ++likely
> +)(E)
> 
> 
>> +coccilib.org.print_todo(p[0], "WARNING use unlikely instead of !likely")
> …
>> +msg="WARNING: Use unlikely instead of !likely"
>> +coccilib.report.print_report(p[0], msg)
> 
> 1. I find such a message construction nicer without the extra variable “msg”.
> 
> 2. I recommend to make the provided information unique.
>    * How do you think about to split the SmPL disjunction in the rule “r”
>      for this purpose?
> 
>    * Should the transformation become clearer?

Thank you for the review, I will prepare v2.

> 
> Regards,
> Markus
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ