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: <Pine.LNX.4.64.0805092007110.24814@schroedinger.engr.sgi.com>
Date:	Fri, 9 May 2008 20:07:54 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Sam Ravnborg <sam@...nborg.org>
cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	travis@....com
Subject: Re: [patch 6/6] x86: Add checks for virtual addresses in __phys_addr()

We also need to address this issue with __pa expected to be a constant in 
32 bit code. Sigh.


---
 arch/x86/kernel/doublefault_32.c |    2 +-
 include/asm-x86/page_32.h        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/include/asm-x86/page_32.h
===================================================================
--- linux-2.6.orig/include/asm-x86/page_32.h	2008-05-09 19:32:47.000000000 -0700
+++ linux-2.6/include/asm-x86/page_32.h	2008-05-09 19:32:55.000000000 -0700
@@ -65,7 +65,7 @@ typedef struct page *pgtable_t;
 
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_DEBUG_VM
-unsigned long __phys_addr(unsigned long x)
+extern unsigned long __phys_addr(unsigned long x);
 #else
 #define __phys_addr(x)	((x) - PAGE_OFFSET)
 #endif
Index: linux-2.6/arch/x86/kernel/doublefault_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/doublefault_32.c	2008-05-09 19:40:08.000000000 -0700
+++ linux-2.6/arch/x86/kernel/doublefault_32.c	2008-05-09 19:40:45.000000000 -0700
@@ -66,6 +66,6 @@ struct tss_struct doublefault_tss __cach
 		.ds		= __USER_DS,
 		.fs		= __KERNEL_PERCPU,
 
-		.__cr3		= __pa(swapper_pg_dir)
+		.__cr3		= (unsigned long)swapper_pg_dir - PAGE_OFFSET
 	}
 };

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