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