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-next>] [day] [month] [year] [list]
Date:	Thu, 27 Aug 2009 13:41:57 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Greg Ungerer <gerg@...inux.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] m68k: avoid pgprot_noncached redefinition

From: Heiko Carstens <heiko.carstens@...ibm.com>

While compiling m68k with defconfig I get tons if these warnings:

/home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:148:1: warning: "pgprot_noncached" redefined
In file included from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:138,
 from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable.h:4,
 from include/linux/mm.h:38,
 from /home2/heicarst/linux-2.6/arch/m68k/include/asm/atarihw.h:134,
 from arch/m68k/atari/debug.c:20:
include/asm-generic/pgtable.h:133:1: warning: this is the location of the previous definition

Reason for this is that asm-generic/pgtable.h gets included in pgtable_mm.h
before pgprot_noncached gets defined.
So the check "#ifndef pgprot_noncached" in the generic header file is too early.
Solve this by including the generic header file after the arch define.

Signed-off-by: Heiko Carstens <heiko.carstens@...ibm.com>
---
 arch/m68k/include/asm/pgtable_mm.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/m68k/include/asm/pgtable_mm.h
===================================================================
--- linux-2.6.orig/arch/m68k/include/asm/pgtable_mm.h
+++ linux-2.6/arch/m68k/include/asm/pgtable_mm.h
@@ -135,7 +135,6 @@ static inline void update_mmu_cache(stru
 #endif
 
 #ifndef __ASSEMBLY__
-#include <asm-generic/pgtable.h>
 
 /*
  * Macro to mark a page protection value as "uncacheable".
@@ -154,6 +153,8 @@ static inline void update_mmu_cache(stru
 	    ? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S))	\
 	    : (prot)))
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !__ASSEMBLY__ */
 
 /*
--
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