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, 13 Dec 2011 10:15:27 -0600 (CST)
From:	Christoph Lameter <cl@...ux.com>
To:	roel <roel.kluin@...il.com>
cc:	linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: slab: too much allocated in bootstrap head arrays?

On Mon, 12 Dec 2011, roel wrote:

> In mm/slab.c kmem_cache_init() at /* 4) Replace the bootstrap head arrays */
> it kmallocs *ptr and memcpy's with sizeof(struct arraycache_init). Is this
> correct or should it maybe be with sizeof(struct arraycache) instead?

Allocating with sizeof(struct arraycache) will only allocate the header of
the array cache and not reserve space for the pointers that are part of
it. It is always wrong.

Look at alloc_arraycache() for the proper way to use struct arraycache to
calculate the number of bytes needed.

--
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