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:	Sun, 2 Dec 2007 20:23:35 +0200
From:	"Pekka Enberg" <penberg@...helsinki.fi>
To:	"Vegard Nossum" <vegard.nossum@...il.com>
Cc:	"Tetsuo Handa" <penguin-kernel@...ove.sakura.ne.jp>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	"Christoph Lameter" <clameter@....com>,
	"Andrew Morton" <akpm@...ux-foundation.org>
Subject: Re: [BUG 2.6.24-rc3-git6] SLUB's ksize() fails for size > 2048.

Hi Vegard,

On 12/2/07, Vegard Nossum <vegard.nossum@...il.com> wrote:
> diff --git a/mm/slub.c b/mm/slub.c
> index 9acb413..b9f37cb 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2558,8 +2558,12 @@ size_t ksize(const void *object)
>         if (unlikely(object == ZERO_SIZE_PTR))
>                 return 0;
>
> -       page = get_object_page(object);
> +       page = virt_to_head_page(object);
>         BUG_ON(!page);
> +
> +       if (unlikely(!PageSlab(page)))
> +               return PAGE_SIZE << compound_order(page);
> +
>         s = page->slab;
>         BUG_ON(!s);

Looks good to me.

Reviewed-by: Pekka Enberg <penberg@...helsinki.fi>
--
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