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]
Message-Id: <1209139823.5323.5.camel@calx>
Date:	Fri, 25 Apr 2008 11:10:22 -0500
From:	Matt Mackall <mpm@...enic.com>
To:	Bryan Wu <cooloney@...nel.org>
Cc:	lethal@...ux-sh.org, linux-kernel@...r.kernel.org,
	Yi Li <yi.li@...log.com>,
	Christoph Lameter <christoph@...eter.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/1] [mm/slob] fix bug - when slob allocates "struct
	kmem_cache", it does not force alignment.

On Fri, 2008-04-25 at 18:57 +0800, Bryan Wu wrote:
> From: Yi Li <yi.li@...log.com>
> 
> This may trigger misaligned memory access exception.
> 
> Signed-off-by: Yi Li <yi.li@...log.com>
> Signed-off-by: Bryan Wu <cooloney@...nel.org>

Looks good, thanks. Christoph, do you want to take this or should it go
through Andrew?

Acked-by: Matt Mackall <mpm@...enic.com>

> ---
>  mm/slob.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/slob.c b/mm/slob.c
> index e2c3c0e..6038cba 100644
> --- a/mm/slob.c
> +++ b/mm/slob.c
> @@ -533,7 +533,8 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
>  {
>  	struct kmem_cache *c;
>  
> -	c = slob_alloc(sizeof(struct kmem_cache), flags, 0, -1);
> +	c = slob_alloc(sizeof(struct kmem_cache),
> +		flags, ARCH_KMALLOC_MINALIGN, -1);
>  
>  	if (c) {
>  		c->name = name;
-- 
Mathematics is the supreme nostalgia of our time.

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