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]
Date:	Tue, 17 Apr 2012 22:43:22 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	David Smith <dsmith@...hat.com>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	Larry Woodman <lwoodman@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: hlist_for_each_entry && pos (Was: task_work_queue)

On 04/16, Paul E. McKenney wrote:
>
> On Thu, Apr 12, 2012 at 06:00:59AM +0200, Oleg Nesterov wrote:
> >
> > hlist_for_each_entry_*() do not need "pos", it can be
> >
> > 	#define hlist_for_each_entry(pos, head, member)					\
> > 		for (pos = (void*)(head)->first;					\
> > 		pos && ({ pos = hlist_entry((void*)pos, typeof(*pos), member); 1; });	\
> > 		pos = (void*)(pos)->member.next)
> >
> > The only problem, is there any possibility to change the callers
> > somehow??? I even wrote the script which converts them all, but the
> > patch is huge.
> >
> > Please see the old (2008-04-21) message I sent to lkml below, today
> > the diffstat is even "worse":
> >
> > 	152 files changed, 611 insertions(+), 906 deletions(-)
> >
> > and the patch size is 242k.
> >
> > No? we can't?
>
> Maybe this needs a phased approach:
>
> 1.	Add a new API name without the "pos" argument.

and this is the first (or main?) problem. Which name??

> 2.	Send individual patches to the uses, which allows time to
> 	clean up stragglers.
>
> 3.	Remove the old API name.  If any patches from #2 have been
> 	ignored, push them with the removal patch.
>
> 4.	Rename the new API name to the old one, if desired.

Yes, this is much safer, I agree. But I'm afraid that 2. will be
never finished.

And 4. is not trivial anyway, even if it is trivial to generate
the obviously correct patch. Too many trees I guess.


This reminds me I promised to check the code generation. Will do
anyway. But I do not expect any improvement, just it should not
be worse. The only point is too make the usage more simple (you
seem to agree). But at the same time I agree with "the pain
changing the interface" from Linus.

Oleg.

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