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, 3 Nov 2014 18:23:12 +0400
From:	Ilya Dryomov <ilya.dryomov@...tank.com>
To:	SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:	Sage Weil <sage@...tank.com>,
	Ceph Development <ceph-devel@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org, trivial@...nel.org,
	Coccinelle <cocci@...teme.lip6.fr>,
	"Yan, Zheng" <zyan@...hat.com>
Subject: Re: ceph: Deletion of unnecessary checks before two function calls

On Mon, Nov 3, 2014 at 4:27 PM, SF Markus Elfring
<elfring@...rs.sourceforge.net> wrote:
>> dput() also checks for NULL argument, but the check is wrapped into
>> unlikely(), which is why I presume it wasn't picked up.  It would be
>> great if you could improve your coccinelle script to handle
>> {un,}likely() as well.
>
> Thanks for your suggestion.
>
> Should I consider any more fine-tuning for the affected script
> "list_input_parameter_validation1.cocci" in the near future?
> https://lkml.org/lkml/2014/3/5/362
> http://article.gmane.org/gmane.comp.version-control.coccinelle/3514

Make sure it at least catches stuff like:

{
    if (input) {

    }
}

{
    if (likely(input)) {

    }
}

{
    if (!input)
        return;

    ...
}

{
    if (unlikely(!input))
        return;

    ...
}

And of course each match then has to be validated manually.

>
>
>>> @@ -590,15 +589,13 @@ static void queue_realm_cap_snaps(struct ceph_snap_realm
>>> *realm)
>>
>> The patch was corrupted, that should have been a single line.  I fixed
>> it up but you may want to look into your email client settings.
>
> Thanks for your feedback.
>
> Does this example show a conflict between long comments after patch ranges and
> line length limitation for email eventually?

There is no line length limitation for email, at least one that would
be relevant here.  Patches should be sent verbatim, no line wrapping,
expandtab, etc or they won't apply.  I'd recommend git-send-email, but
if you want to make thunderbird work for patches (which is what you
seem to be using) have a look at the "Thunderbird (GUI)" section of
Documentation/email-clients.txt in the kernel tree.

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ