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: <20080711231923.0f827113@linux360.ro>
Date:	Fri, 11 Jul 2008 23:19:23 +0300
From:	Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
To:	"Pekka Enberg" <penberg@...helsinki.fi>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	"Christoph Lameter" <cl@...ux-foundation.org>
Subject: Re: [RFC PATCH 4/5] kmemtrace: SLUB hooks.

On Fri, 11 Jul 2008 11:45:59 +0300
"Pekka Enberg" <penberg@...helsinki.fi> wrote:

> Hi Eduard-Gabriel,
> 
> On Thu, Jul 10, 2008 at 9:06 PM, Eduard - Gabriel Munteanu
> <eduard.munteanu@...ux360.ro> wrote:
> > This adds hooks for the SLUB allocator, to allow tracing with
> > kmemtrace.
> >
> > Signed-off-by: Eduard - Gabriel Munteanu
> > <eduard.munteanu@...ux360.ro>
> 
> > @@ -205,7 +206,13 @@ void *__kmalloc(size_t size, gfp_t flags);
> >
> >  static __always_inline void *kmalloc_large(size_t size, gfp_t
> > flags) {
> > -       return (void *)__get_free_pages(flags | __GFP_COMP,
> > get_order(size));
> > +       unsigned int order = get_order(size);
> > +       void *ret = (void *) __get_free_pages(flags, order);
> > +
> > +       kmemtrace_mark_alloc(KMEMTRACE_KIND_KERNEL, _THIS_IP_, ret,
> > +                            size, PAGE_SIZE << order, flags);
> 
> Oh, I missed this on the first review. Here we have, like in SLOB,
> page allocator pass-through, so wouldn't KIND_PAGES be more
> appropriate?

The rationale was to be able to trace how kmalloc()s perform, no matter
what the allocator does behind the scenes. Presumably, the developer
would know what kmalloc() really does with an allocation request.

Does this sound okay?


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