linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* mmap maped memory trace
@ 2006-08-12 21:43 Nikola Gidalov
  2006-08-15 11:25 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Nikola Gidalov @ 2006-08-12 21:43 UTC (permalink / raw)
  To: linux-mm

Dear kernel experts,

I'd like to ask you how it is possible to to be notified in the driver
module whenever the user of driver writes to the mmap-ed memory from
the driver.

I'm making a virtual 8bpp framebuffer driver. The user of the fb
driver uses mmap to map the framebuffer memory. In the driver I use
the vmalloc memory and map the memory to the user space when the user
calls mmap.
Now , I'd like to intercept the "memory-write" operation to my mmaped
memory, to convert the 8bpp value to 32bpp and to write the 32bpp
value to the real framebuffer on the fly.
Changing the clients to use 32bpp framebuffer directly os not an option.

With kind regards,

Nikola

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mmap maped memory trace
  2006-08-12 21:43 mmap maped memory trace Nikola Gidalov
@ 2006-08-15 11:25 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-08-15 11:25 UTC (permalink / raw)
  To: Nikola Gidalov; +Cc: linux-mm

On Sat, 12 Aug 2006 23:43:46 +0200
"Nikola Gidalov" <ngidalov@gmail.com> wrote:

> I'd like to ask you how it is possible to to be notified in the driver
> module whenever the user of driver writes to the mmap-ed memory from
> the driver.

You would need to unmap the area and then on a fault emulate the store instruction
and fake its behaviour.

You probably don't want to go this way, it would be fairly complicated.

-Andi

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-15 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-12 21:43 mmap maped memory trace Nikola Gidalov
2006-08-15 11:25 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox