* [PATCH] 2.4 and 2.5: fix /proc/kcore
@ 2002-03-15 13:28 Russell King
0 siblings, 0 replies; only message in thread
From: Russell King @ 2002-03-15 13:28 UTC (permalink / raw)
To: linux-kernel, Linus Torvalds, Marcelo Tosatti, davej
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-03-15 13:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-15 13:28 [PATCH] 2.4 and 2.5: fix /proc/kcore Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®