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: <alpine.DEB.2.21.1909081019020.3340@hadrien>
Date:   Sun, 8 Sep 2019 10:23:58 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Markus Elfring <Markus.Elfring@....de>
cc:     Coccinelle <cocci@...teme.lip6.fr>,
        Gilles Muller <Gilles.Muller@...6.fr>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nicolas Palix <nicolas.palix@...g.fr>,
        Petr Strnad <strnape1@....cvut.cz>,
        Wen Yang <wen.yang99@....com.cn>,
        LKML <linux-kernel@...r.kernel.org>,
        Allison Randal <allison@...utok.net>,
        Enrico Weigelt <lkml@...ux.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Yi Wang <wang.yi59@....com.cn>
Subject: Re: Coccinelle: pci_free_consistent: Checking when constraints



On Sun, 8 Sep 2019, Markus Elfring wrote:

> Hello,
>
> I have taken another look at a known script for the semantic patch language.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/free/pci_free_consistent.cocci?id=950b07c14e8c59444e2359f15fd70ed5112e11a0#n2
>
> The following SmPL code is used there so far.
>
> …
> ... when != pci_free_consistent(x,y,id,z)
>     when != if (id) { ... pci_free_consistent(x,y,id,z) ... }
>     when != if (y) { ... pci_free_consistent(x,y,id,z) ... }
> …
>
>
> It is specified that a specific function call should be excluded
> in a source code search.
> I do not see a need to repeat the specification twice that such a call
> could eventually happen also within a branch of another if statement.
> How do you think about to omit possibly redundant SmPL code at this place?

Have you actually run the rule and checked the impact of your proposed
change?

The when exists below these lines has an impact.  I believe that the rule
is ok as is.  A single path may have no call to pci_free_consistent, but
if it has that call under one of the mentioned ifs, then the path is still
ok, and not something that an error should be reported about.

julia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ