From: Christoph Egger on
Hi all!

As part of the VAMOS[0] research project at the University of
Erlangen we are looking at multiple integrity errors in linux'
configuration system.

x86 Kconfig implies NUMA if DISCONTIGMEM is selected (the
dependency is as [1] -- excerpt from our tool's output) meaning a
check for NUMA inside a DISCONTIGMEM is useless (in x86 specific code
not in general), so this part can be simplified as in the below patch.

Please keep me informed of this patch getting confirmed /
merged so we can keep track of it.

Regards

Christoph Egger

[0] http://vamos1.informatik.uni-erlangen.de/
[1]
(DISCONTIGMEM -> !SELECT_MEMORY_MODEL & ARCH_DISCONTIGMEM_ENABLE |DISCONTIGMEM_MANUAL)
&
(DISCONTIGMEM_MANUAL -> CHOICE_11 & ARCH_DISCONTIGMEM_ENABLE)
&
(ARCH_DISCONTIGMEM_ENABLE -> NUMA & X86_32)
[2]
config ARCH_DISCONTIGMEM_ENABLE
def_bool y
depends on NUMA && X86_32
----
From e1e14a373f7ec346c0c51f36713c4a60d087f573 Mon Sep 17 00:00:00 2001
From: Christoph Egger <siccegge(a)cs.fau.de>
Date: Wed, 19 May 2010 13:11:30 +0200
Subject: [PATCH] on x86 NUMA is implied on DISCONTIGMEM

There's a specialization on whether NUMA is selected inside a ifdef
CONFIG_DISCONTIGMEM block in arch/x86/include/asm/mmzone_32.h, however
the Kconfig model for x86 only alows DISCONTIGMEM when NUMA is set so
the !NUMA block is effectively unreachable.

Signed-off-by: Christoph Egger <siccegge(a)cs.fau.de>
---
arch/x86/include/asm/mmzone_32.h | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h
index 91df7c5..993ed50 100644
--- a/arch/x86/include/asm/mmzone_32.h
+++ b/arch/x86/include/asm/mmzone_32.h
@@ -61,11 +61,7 @@ extern s8 physnode_map[];

static inline int pfn_to_nid(unsigned long pfn)
{
-#ifdef CONFIG_NUMA
return((int) physnode_map[(pfn) / PAGES_PER_ELEMENT]);
-#else
- return 0;
-#endif
}

/*
--
1.6.3.3






--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/