[PATCH?] Crash in 2.4.17/ptrace

Daniel Jacobowitz (dan@debian.org)
Mon, 28 Jan 2002 15:32:10 -0500


I've been debugging frame buffer graphics lately, and encountering a
very annoying problem. If the debugee has /dev/fb/0 mapped, and I try
to print out the contents of a pointer into that buffer, GDB crashes in
kernel/ptrace.c:access_process_vm. The problem seems to be that
get_user_pages returns a NULL page. Something as simple as this
prevents the crash:

--- 2.4.18-pre7/2.4.18-pre7/kernel/ptrace.c Fri Dec 21 12:42:04 2001
+++ 2.4.17/kernel-source-2.4.17/kernel/ptrace.c Mon Jan 28 15:30:39 2002
@@ -160,6 +160,18 @@ int access_process_vm(struct task_struct

flush_cache_page(vma, addr);

+#if 1
+ if (!page)
+ {
+ /* FIXME: Writes? */
+ if (!write) memset (buf, 0, bytes);
+ len -= bytes;
+ buf += bytes;
+ continue;
+ }
+#endif
+
+
maddr = kmap(page);
if (write) {
memcpy(maddr + offset, buf, bytes);

Of course, I would much rather be able to see the contents of the
framebuffer. Any suggestions?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer
-
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/