public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] bug in mmap_kmem
@ 2001-06-19 10:34 Yoav Etsion
  2001-06-19 11:00 ` Scsi Dead2
  0 siblings, 1 reply; 2+ messages in thread
From: Yoav Etsion @ 2001-06-19 10:34 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Tsafrir Dan

Hi,

The problem is that mmaping a segment <addr,len> from /dev/kmem gives
differnet results than reading the same <addr,len>.

It seems that the bug is that mmap_kmem is a macro for mmap_mem (for
/dev/mem).
mmap_mem maps a _physical_ offset into a vm area vma, while mmap_kmem
should map a _virtual_ offset into a vm area. 

I hacked it to work by copying mmap_mem to mmap_kmem and adding __pa() in
the proper assginment, but I don't know how to check if the offset is
valid in the kernel virtual memory. Maybe someone who knows the mm code
better can fix this?

Thanks,

Yoav Etsion


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

end of thread, other threads:[~2001-06-19 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-19 10:34 [BUG] bug in mmap_kmem Yoav Etsion
2001-06-19 11:00 ` Scsi Dead2

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