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: <1307424738.1651.7.camel@Joe-Laptop>
Date:	Mon, 06 Jun 2011 22:32:18 -0700
From:	Joe Perches <joe@...ches.com>
To:	Julia Lawall <julia@...u.dk>
Cc:	H Hartley Sweeten <hartleys@...ionengravers.com>,
	cocci <cocci@...u.dk>, vinod.koul@...el.com,
	dan.j.williams@...el.com,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [Cocci] [RFC] Convert "resource->end - resource->start + 1" to
 resource_size(resource) via coccinelle

On Tue, 2011-06-07 at 07:07 +0200, Julia Lawall wrote:
> On Mon, 6 Jun 2011, Joe Perches wrote:
> > Perhaps do a treewide update via:
> > $ cat resource.cocci
> > @@
> > struct resource *ptr;
> > @@
> > - ptr->end - ptr->start + 1
> > + resource_size(ptr)
> > $ spatch -sp_file resource.cocci linux-2.6/
> There might be some cases that have the +1 in a different place, or that 
> have some parentheses.
> I suspect that a lot of these non-uses of resource_size still exist.

True enough.

Cocci already handles the parens case
"(foo->end-foo->start)+1"

There are some uses of end+1-start and
1+end-start that weren't converted by
the patch I sent.


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