Re: [PATCH] kernel: use kcalloc instead kmalloc/memset

From: Arjan van de Ven
Date: Fri Aug 05 2005 - 05:43:31 EST


On Fri, 2005-08-05 at 12:32 +0200, Roman Zippel wrote:
> Hi,
>
> On Fri, 5 Aug 2005, Arjan van de Ven wrote:
>
> > > This would imply a similiar kmalloc() would be useful as well.
> > > Second, how relevant is it for the kernel?
> >
> > we've had a non-negliable amount of security holes because of this
>
> So why don't we have a similiar kmalloc()?

nope kmalloc is not an array allocator
>
> > > Is that really the best place
> > > to check for rogue user parameters?
> >
> > it makes it easy and safe. Of course you can and should check it in all
> > users. Just that using a safer API is generally better than forcing
> > everyone to do it themselves.
>
> How exactly does this make it a "safe API"? Even if it checks for this one
> case, it still makes the user suspectible for allocating big amounts of
> unswappable memory.

128Kb max.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/