[Linux-ia64] forwarded message from Russell King

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2002-03-16 06:41:58
I thought I'd forward this bug-report as I won't be able to act on it
before leaving for vacation.

	--david


attached mail follows:


As mentioned on May 11 on LKML, here is a patch to fix /proc/kcore for
architectures which do not have RAM located at physical address 0.

I did say I'd send this on Monday, however I only got feedback from the
ia64 people, and /proc/kcore is already broken on their machines anyway.
(They need to fix it up; they place modules below PAGE_OFFSET, which
breaks our generated ELF core header).

So I've decided to send it a few days early.

Please apply.

--- orig/fs/proc/kcore.c	Fri Mar 15 10:14:44 2002
+++ linux/fs/proc/kcore.c	Fri Mar 15 11:18:21 2002
@@ -381,8 +381,13 @@
 			return tsz;
 	}
 #endif
-	/* fill the remainder of the buffer from kernel VM space */
-	start = (unsigned long)__va(*fpos - elf_buflen);
+	
+	/*
+	 * Fill the remainder of the buffer from kernel VM space.
+	 * We said in the ELF header that the data which starts
+	 * at 'elf_buflen' is virtual address PAGE_OFFSET. --rmk
+	 */
+	start = PAGE_OFFSET + (*fpos - elf_buflen);
 	if ((tsz = (PAGE_SIZE - (start & ~PAGE_MASK))) > buflen)
 		tsz = buflen;
 		


-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Received on Fri Mar 15 11:43:31 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:07 EST