All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Eric Paris <eparis@redhat.com>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH v2] flex_array: Change behaviour on zero size allocations
Date: Fri, 11 Feb 2011 10:25:15 +0100	[thread overview]
Message-ID: <20110211092515.GA29583@secunet.com> (raw)
In-Reply-To: <1297184561.6737.12074.camel@nimitz>

On Tue, Feb 08, 2011 at 09:02:41AM -0800, Dave Hansen wrote:
> 
> The rest of this patch looks good.  When you resend, you need to break
> this up in to at least two patches: one to change 'end' to
> 'nr_elements' (or something else) and the one to handle zero-sized
> elements and arrays.

Ok.

> 
> I also think we need to remove the ability to do zero-sized elements.
> Unless there's some new code that I'm missing, I don't see any of the
> existing security policy code which would be able to do that.
> 

Well, from the selinux policy point of view we don't need the ability
to handle zero-sized elements. But why you want to remove it? I don't
see a reason why zero-sized elements should be handled different form
zero number of elements. This could again produce a pitfall for potential
new flex_array users.

Anyway, for the moment I'm just interested to load my selinux policy.
So we could return -EINVAL is somebody tries to allocate with element
size zero if you think it should be like that.

Steffen

      reply	other threads:[~2011-02-11  9:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 12:29 [PATCH v2] flex_array: Change behaviour on zero size allocations Steffen Klassert
2011-02-08 17:02 ` Dave Hansen
2011-02-11  9:25   ` Steffen Klassert [this message]

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=20110211092515.GA29583@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.