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: <alpine.DEB.2.02.1112231325040.1834@localhost6.localdomain6>
Date:	Fri, 23 Dec 2011 13:26:49 +0100 (CET)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Lars-Peter Clausen <lars@...afoo.de>
cc:	Gilles Muller <Gilles.Muller@...6.fr>,
	Nicolas Palix <npalix.work@...il.com>,
	linux-kernel@...r.kernel.org, cocci@...u.dk, mmarek@...e.cz
Subject: Re: [Cocci] [PATCH 2/2] coccinelle: Add patch for replacing open-coded
 IS_ERR_OR_NULL



On Fri, 23 Dec 2011, Lars-Peter Clausen wrote:

> On 12/21/2011 01:10 PM, Julia Lawall wrote:
>> On Wed, 21 Dec 2011, Lars-Peter Clausen wrote:
>>
>>> On 12/20/2011 11:24 PM, Julia Lawall wrote:
>>>> For this one, I made quite a number of changes, some of which required
>>>> fixing a bug in Coccinelle...  I will try to release the bug fix
>>>> shortly. In general, though, I have added ... between the two tests.  I
>>>> also got rid of the focus on ifs in the org and report rules.
>>>>
>>>
>>> Ok, thanks. Was the removing of the ifs in related to the Coccinelle
>>> bug? I
>>> always get an error if I start a match with a conditional.
>>
>> Not at all.  The bug was that a patterm like:
>>
>>  @depends on patch@
>>  expression x;
>>  @@
>>  - IS_ERR(x)
>>  + IS_ERR_OR_NULL(x)
>>    || ...
>>  - || x == NULL
>>
>> thought that it should be applied in two ways, giving an error about a
>> double transformation of the IS_ERR call.
>>
>> Could you reproduce the example that caused problems?
>
> Hm, I can reproduce it anymore, even with my original patch, must have been
> caused by some other error I had in the semantic patch at that time.

OK, should do you want to resubmit the semantic patch that I sent you? 
The version of Coccinelle you have does not perfectly support it, but it 
should just cause failures on a few files.  The problem is only with the 
patch case, when there is the possibility to mak two calls to 
IS_ERR_OR_NULL in a single test expression, which doesn't happen 
very often.

julia
--
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