Skip to contentSkip to conversation

Crash in 2.4.17/ptrace

PATCH? Manfred Spraul 3 participants 4 messages Jan 28, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines
Quoted 3 lines

Not with this patch, I'm afraid. For your testing purposes you could just remove the VALID_PAGE() test in

mm/memory.c:get_page_map(),

Quoted 4 lines
Quoted 1 line

and then gdb should be able to get at the framebuffer.

I'm sure there's a good reason to not do that in general. Mind enlightening me?

Please don't do it at all.
The test is there to ensure that there is a 'struct page' for address found in the pages tables.
For framebuffers addresses, there is no page structure, and then the page reference count updates read/write to random memory.

--
Manfred

#1 lore raw
Quoted 2 lines

For framebuffers addresses, there is no page structure, and then the page reference count updates read/write to random memory.

If it is a physical pci bus object why do we need to refcount it, surely "no page" is ok. Its just up to the driver not to do anything stupid and the core code to honour the pci/pci transfer quirks (or when faced with a hard one just say "no")

#2 lore raw

From: "Alan Cox" <[email protected]>

Quoted 8 lines
Quoted 2 lines

For framebuffers addresses, there is no page structure, and then the page reference count updates read/write to random memory.

If it is a physical pci bus object why do we need to refcount it, surely "no page" is ok. Its just up to the driver not to do anything stupid and the core code to honour the pci/pci transfer quirks (or when faced with a hard one just say "no")

With multi-threaded apps, munmap() during O_DIRECT is possible. vma structures don't contain a reference count.

For ptrace, taking the physical address from the PTE and ioremapping it temporarily would work, but ...

--
Manfred

#3 lore raw
In reply to Manfred Spraul
Quoted 7 lines · Alan Cox
Quoted 2 lines

For framebuffers addresses, there is no page structure, and then the page reference count updates read/write to random memory.

If it is a physical pci bus object why do we need to refcount it, surely "no page" is ok. Its just up to the driver not to do anything stupid and the core code to honour the pci/pci transfer quirks (or when faced with a hard one just say "no")

So, is there a clear interface by which access_process_vm ought to be able to get at the mapped framebuffer, or should get_user_pages just punt off it?

Signature · 2 lines
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer