Crash in 2.4.17/ptrace
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
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")
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
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