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, 10 Jun 2008 00:12:50 +0300
From:	"Pekka Enberg" <penberg@...helsinki.fi>
To:	"Andrew Morton" <akpm@...ux-foundation.org>
Cc:	"Christoph Lameter" <clameter@....com>, dada1@...mosbay.com,
	kosaki.motohiro@...fujitsu.com, nickpiggin@...oo.com.au,
	hugh@...itas.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vmallocinfo: Add NUMA informations

On Tue, Jun 10, 2008 at 12:05 AM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
> yup.  Oh well, it's not a big deal.
>
> Except the inlined
>
>        if (n != 0 && size > ULONG_MAX / n)
>                return NULL;
>
> is a bit bloaty/inefficient.  I expect that it's often the case that
> one of `n' and `size' is not a compile-time constant.

I think it was out-of-line at first but then somebody made it inline
as an optimization...

On Tue, Jun 10, 2008 at 12:05 AM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
> otoh, there's one good thing about kcalloc: it actually checks for
> multiplicative overflows, whereas the open-coded version often forgets
> to do that.

Yes. That's why we did kcalloc() in the first place. kzalloc() (aka
akpmalloc) came in much later.
--
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