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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Dec 2008 22:34:21 +0300
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	linux-kernel@...r.kernel.org, Matt Mackall <mpm@...enic.com>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [PATCH] Do not pass the SLAB flags as GFP in slob
	kmem_cache_create

[Catalin Marinas - Wed, Dec 10, 2008 at 05:36:33PM +0000]
| It looks like the kmem_cache_create() function in the slob allocator
| passes the SLAB flags as GFP flags to the slob_alloc() function. The
| patch changes this call to pass GFP_KERNEL as the other allocators seem
| to do.
| 
| Signed-off-by: Catalin Marinas <catalin.marinas@....com>
| Cc: Matt Mackall <mpm@...enic.com>
| ---
|  mm/slob.c |    2 +-
|  1 files changed, 1 insertions(+), 1 deletions(-)
| 
| diff --git a/mm/slob.c b/mm/slob.c
| index ff5a98d..dce9258 100644
| --- a/mm/slob.c
| +++ b/mm/slob.c
| @@ -538,7 +538,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
|  	struct kmem_cache *c;
|  
|  	c = slob_alloc(sizeof(struct kmem_cache),
| -		flags, ARCH_KMALLOC_MINALIGN, -1);
| +		GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1);
|  
|  	if (c) {
|  		c->name = name;
|

Hi Catalin,

this would make the following line in slob_alloc

	...
	if (unlikely((gfp & __GFP_ZERO) && b))
		memset(b, 0, size);
 	...

useless. Not sure if it will be good :)

---
Some  CC: added

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