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:	Tue, 21 Jul 2009 15:35:24 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Dave Hansen <dave@...ux.vnet.ibm.com>
Cc:	containers@...ts.linux-foundation.org, bblum@...gle.com,
	linux-kernel@...r.kernel.org, menage@...gle.com,
	vda.linux@...glemail.com, mikew@...gle.com
Subject: Re: [RFCv2][PATCH] flexible array implementation

On Tue, 21 Jul 2009 15:09:05 -0700
Dave Hansen <dave@...ux.vnet.ibm.com> wrote:

> On Tue, 2009-07-21 at 15:00 -0700, Dave Hansen wrote:
> > 
> > The interface is dirt simple.  4 functions:
> >         alloc_flex_array()
> >         free_flex_array()
> >         flex_array_put()
> >         flex_array_get()
> > 
> > put() appends an item into the array while get() takes
> > indexes and does array-style access.
> 
> I need to update this description, but the kerneldoc comments are up to
> date.
> 
> That reminds me...  People will get somewhat weird behavior if they mix
> flex_array_append() and flex_array_put().  Is that OK?  Should
> flex_array_put() modify ->nr_elements to point to the element past the
> one that was just put()?  Should we perhaps drop the append() function
> and the ->nr_elements variable completely?

I'd say that we can drop ->append.  C arrays don't have an `append', and
callers trivially append stuff to arrays all the time.  `for (i = 0; i < ....'
--
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