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: <49A02D08.7040509@cs.helsinki.fi>
Date:	Sat, 21 Feb 2009 18:34:16 +0200
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Vegard Nossum <vegard.nossum@...il.com>
CC:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Ingo Molnar <mingo@...e.hu>,
	Dave Hansen <dave@...ux.vnet.ibm.com>
Subject: Re: [PATCH] kmemcheck: add hooks for the page allocator

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@...ux.vnet.ibm.com>
> Signed-off-by: Vegard Nossum <vegard.nossum@...il.com>

Acked-by: Pekka Enberg <penberg@...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 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