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:	Thu, 19 Mar 2009 11:05:48 -0400 (EDT)
From:	Christoph Lameter <cl@...ux-foundation.org>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc:	Mel Gorman <mel@....ul.ie>,
	Linux Memory Management List <linux-mm@...ck.org>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Rik van Riel <riel@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Nick Piggin <npiggin@...e.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Lin Ming <ming.m.lin@...el.com>,
	Zhang Yanmin <yanmin_zhang@...ux.intel.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 24/27] Convert gfp_zone() to use a table of precalculated
 values

On Thu, 19 Mar 2009, KAMEZAWA Hiroyuki wrote:

> I wonder why you have to make the bad caller work insane way ?
> Is this bad ?
> ==
> const int gfp_zone_table[GFP_ZONEMASK] = {
> 	ZONE_NORMAL,		/* 00 No flags set */
> 	ZONE_DMA,		/* 01 Only GFP_DMA set */
> 	ZONE_HIGHMEM,		/* 02 Only GFP_HIGHMEM set */
> 	BAD_ZONE,		/* 03 GFP_HIGHMEM and GFP_DMA set */
> 	ZONE_DMA32,		/* 04 Only GFP_DMA32 set */
> 	BAD_ZONE,		/* 05 GFP_DMA and GFP_DMA32 set */
> 	BAD_ZONE,		/* 06 GFP_DMA32 and GFP_HIGHMEM set */
> 	BAD_ZONE,		/* 07 GFP_DMA, GFP_DMA32 and GFP_DMA32 set */
> 	ZONE_MOVABLE,		/* 08 Only ZONE_MOVABLE set */
> 	ZONE_DMA,		/* 09 MOVABLE + DMA */
> 	ZONE_MOVABLE,		/* 0A MOVABLE + HIGHMEM */
> 	BAD_ZONE,		/* 0B MOVABLE + DMA + HIGHMEM */
> 	ZONE_DMA32,		/* 0C MOVABLE + DMA32 */
> 	BAD_ZONE,		/* 0D MOVABLE + DMA + DMA32 */
> 	BAD_ZONE,		/* 0E MOVABLE + DMA32 + HIGHMEM */
> 	BAD_ZONE		/* 0F MOVABLE + DMA32 + HIGHMEM + DMA
> };
> ==

It would work if we could check for BAD_ZONE with a VM_BUG_ON or a
BUILD_BUG_ON. If I get some time I will look into this.

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