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: <20080418120456.68a663d7.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Fri, 18 Apr 2008 12:04:56 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Shi Weihua <shiwh@...fujitsu.com>
Cc:	akpm@...ux-foundation.org, balbir@...ux.vnet.ibm.com,
	xemul@...nvz.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	hugh@...itas.com
Subject: Re: [PATCH] memcgroup: check and initialize page->cgroup in
 memmap_init_zone

On Fri, 18 Apr 2008 10:46:30 +0800
Shi Weihua <shiwh@...fujitsu.com> wrote:

> In this patch, the Author Hugh Dickins said 
> "...memmap_init_zone doesn't need it either, ...
> Linux assumes pointers in zeroed structures are NULL pointers."
> But it seems it's not always the case, so we should check and initialize
> page->cgroup anyways.
> 
Hmm...strange. (I never see this with 2.6.25 + Primequest) 
What memory model are you using ? CONFIG_SPRASEMEM_VMEMMAP ?


>  	for (pfn = start_pfn; pfn < end_pfn; pfn++) {
>  		/*
> @@ -2535,6 +2536,9 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
>  		set_page_links(page, zone, nid, pfn);
>  		init_page_count(page);
>  		reset_page_mapcount(page);
> +		pc = page_get_page_cgroup(page);
> +		if (pc) 
> +			page_reset_bad_cgroup(page);
>  		SetPageReserved(page);
>  
BTW, page_reset_page_cgroup, defined as this
==
#define page_reset_bad_cgroup(page)     ((page)->page_cgroup = 0)
==
Should be
==
#define page_reset_bad_cgroup(page)     ((page)->page_cgroup = 0UL)
==
...I'll write a patch.

Thanks,
-Kame


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