From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Eric Paris <eparis@redhat.com>
Cc: steffen.klassert@secunet.com, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov,
sds@tycho.nsa.gov
Subject: Re: [PATCH 3/3] flex_array: allow 0 length elements
Date: Tue, 26 Apr 2011 13:46:20 -0700 [thread overview]
Message-ID: <1303850780.9308.17380.camel@nimitz> (raw)
In-Reply-To: <20110426014543.1740.89115.stgit@paris.rdu.redhat.com>
On Mon, 2011-04-25 at 21:45 -0400, Eric Paris wrote:
> allow elements of 0 length. We already allow flex_arrays with 0
> elements, but
> this patch allow us to have elements that are 0 bytes long.
>
> Based-on-patch-by: Steffen Klassert <steffen.klassert@secunet.com>
> Signed-off-by: Eric Paris <eparis@redhat.com>
I'd like to see a bit of the history in the changelog. kmalloc(0)
returns NULL, and we'd effectively like to do the same since flex_arrays
really are like a mini allocator. The 0-sized elements come from
userspace and we *have* to handle them in the security code, etc...
The code looks good, though.
Acked-by: Dave Hansen <dave@linux.vnet.ibm.com>
-- Dave
next prev parent reply other threads:[~2011-04-26 20:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 1:45 [PATCH 1/3] flex_array: flex_array_prealloc takes a number of elements, not an end Eric Paris
2011-04-26 1:45 ` [PATCH 2/3] flex_arrays: allow zero length flex arrays Eric Paris
2011-04-26 18:57 ` Andrew Morton
2011-04-26 20:38 ` Dave Hansen
2011-04-26 20:44 ` Eric Paris
2011-04-26 1:45 ` [PATCH 3/3] flex_array: allow 0 length elements Eric Paris
2011-04-26 18:57 ` Andrew Morton
2011-04-26 20:46 ` Dave Hansen [this message]
2011-04-26 18:56 ` [PATCH 1/3] flex_array: flex_array_prealloc takes a number of elements, not an end Andrew Morton
2011-04-26 19:06 ` Eric Paris
2011-04-26 20:32 ` Dave Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1303850780.9308.17380.camel@nimitz \
--to=dave@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=eparis@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=steffen.klassert@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox