* PROBLEM: mmap_kmem()
@ 2005-08-18 8:53 Valentin Rabinovich
2005-08-18 12:34 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Valentin Rabinovich @ 2005-08-18 8:53 UTC (permalink / raw)
To: linux-kernel
Bug in mmap_kmem(), drivers/char/mem.c.
When mapping the kmem, page alingning seems to mess the address:
unsigned long long val;
val = (u64)vma->vm_pgoff << PAGE_SHIFT;
vma->vm_pgoff = ((unsigned long)val >> PAGE_SHIFT) - PAGE_OFFSET;
vma->vm_pgoff = __pa(val) >> PAGE_SHIFT;
Subtracting 0xc0000000 and shifting is made in wrong order.
Kernel: 2.6.12.3, 2.6.12.4
--
Valentin Rabinovich
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PROBLEM: mmap_kmem()
2005-08-18 8:53 PROBLEM: mmap_kmem() Valentin Rabinovich
@ 2005-08-18 12:34 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2005-08-18 12:34 UTC (permalink / raw)
To: Valentin Rabinovich; +Cc: linux-kernel
On Thu, 2005-08-18 at 11:53 +0300, Valentin Rabinovich wrote:
> Bug in mmap_kmem(), drivers/char/mem.c.
> When mapping the kmem, page alingning seems to mess the address:
>
> unsigned long long val;
> val = (u64)vma->vm_pgoff << PAGE_SHIFT;
> vma->vm_pgoff = ((unsigned long)val >> PAGE_SHIFT) - PAGE_OFFSET;
> vma->vm_pgoff = __pa(val) >> PAGE_SHIFT;
>
> Subtracting 0xc0000000 and shifting is made in wrong order.
> Kernel: 2.6.12.3, 2.6.12.4
This is already fixed in 2.6.13-rc6-git9, so you need to wait for it in
the 2.6.13 release, or better yet, download and test the git release.
-- Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-18 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-18 8:53 PROBLEM: mmap_kmem() Valentin Rabinovich
2005-08-18 12:34 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®