All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Ingo Molnar <mingo@elte.hu>,
	Dave Hansen <dave@linux.vnet.ibm.com>
Subject: Re: [PATCH] kmemcheck: add hooks for the page allocator
Date: Sat, 21 Feb 2009 18:34:16 +0200	[thread overview]
Message-ID: <49A02D08.7040509@cs.helsinki.fi> (raw)
In-Reply-To: <1235223364-2097-5-git-send-email-vegard.nossum@gmail.com>

Vegard Nossum wrote:
> This adds support for tracking the initializedness of memory that
> was allocated with the page allocator. Highmem requests are not
> tracked.
> 
> Cc: Dave Hansen <dave@linux.vnet.ibm.com>
> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>

> +void kmemcheck_pagealloc_alloc(struct page *page, unsigned int order,
> +			       gfp_t gfpflags)
> +{
> +	int pages;
> +
> +	if (gfpflags & (__GFP_HIGHMEM | __GFP_NOTRACK))
> +		return;
> +
> +	pages = 1 << order;
> +
> +	/*
> +	 * NOTE: We choose to track GFP_ZERO pages too; in fact, they
> +	 * can become uninitialized by copying uninitialized memory
> +	 * into them.
> +	 */
> +
> +	/* XXX: Can use zone->node for node? */
> +	kmemcheck_alloc_shadow(page, order, gfpflags, -1);

Yes, you can.

WARNING: multiple messages have this Message-ID (diff)
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Ingo Molnar <mingo@elte.hu>,
	Dave Hansen <dave@linux.vnet.ibm.com>
Subject: Re: [PATCH] kmemcheck: add hooks for the page allocator
Date: Sat, 21 Feb 2009 18:34:16 +0200	[thread overview]
Message-ID: <49A02D08.7040509@cs.helsinki.fi> (raw)
In-Reply-To: <1235223364-2097-5-git-send-email-vegard.nossum@gmail.com>

Vegard Nossum wrote:
> This adds support for tracking the initializedness of memory that
> was allocated with the page allocator. Highmem requests are not
> tracked.
> 
> Cc: Dave Hansen <dave@linux.vnet.ibm.com>
> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>

> +void kmemcheck_pagealloc_alloc(struct page *page, unsigned int order,
> +			       gfp_t gfpflags)
> +{
> +	int pages;
> +
> +	if (gfpflags & (__GFP_HIGHMEM | __GFP_NOTRACK))
> +		return;
> +
> +	pages = 1 << order;
> +
> +	/*
> +	 * NOTE: We choose to track GFP_ZERO pages too; in fact, they
> +	 * can become uninitialized by copying uninitialized memory
> +	 * into them.
> +	 */
> +
> +	/* XXX: Can use zone->node for node? */
> +	kmemcheck_alloc_shadow(page, order, gfpflags, -1);

Yes, you can.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2009-02-21 16:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21 13:36 Vegard Nossum
2009-02-21 13:36 ` Vegard Nossum
2009-02-21 13:36 ` [PATCH] kmemcheck: disable fast string operations on P4 CPUs Vegard Nossum
2009-02-21 13:36   ` Vegard Nossum
2009-02-21 16:21   ` Pekka Enberg
2009-02-21 16:21     ` Pekka Enberg
2009-02-22  3:13   ` H. Peter Anvin
2009-02-22  3:13     ` H. Peter Anvin
2009-02-22 10:51     ` Vegard Nossum
2009-02-22 10:51       ` Vegard Nossum
2009-02-21 13:36 ` [PATCH] kmemcheck: rip out REP instruction emulation Vegard Nossum
2009-02-21 13:36   ` Vegard Nossum
2009-02-21 16:21   ` Pekka Enberg
2009-02-21 16:21     ` Pekka Enberg
2009-02-21 13:36 ` [PATCH] kmemcheck: add hooks for page- and sg-dma-mappings Vegard Nossum
2009-02-21 13:36   ` Vegard Nossum
2009-02-21 16:22   ` Pekka Enberg
2009-02-21 16:22     ` Pekka Enberg
2009-02-21 17:13     ` Vegard Nossum
2009-02-21 17:13       ` Vegard Nossum
2009-02-21 17:15       ` Pekka Enberg
2009-02-21 17:15         ` Pekka Enberg
2009-02-21 13:36 ` [PATCH] kmemcheck: add hooks for the page allocator Vegard Nossum
2009-02-21 13:36   ` Vegard Nossum
2009-02-21 15:23   ` Ingo Molnar
2009-02-21 15:23     ` Ingo Molnar
2009-02-21 16:34   ` Pekka Enberg [this message]
2009-02-21 16:34     ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49A02D08.7040509@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=dave@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=vegard.nossum@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.