lkml.org 
[lkml]   [1999]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: to make vmalloc()/vfree() one needs to...
On Fri, 10 Dec 1999, Manfred Spraul wrote:
> vread() is only called from drivers/char/mem.c, ie it's not time
> critical.

I know that. But vread() is also suitable for /proc/kcore so I was
considering to use it there in the future (but that is not time-critical
either). Also, while we are at it, we need vwrite() because at the moment
write_kmem() just returns 0 if pos>=high_memory.

> I would either _always_ loop, or use a short (eg 64) byte temporary
> buffer on the stack.

The user address passed to vread() belongs to process' address space.
What is the worst thing that can happen to it - another thread sharing
the same address space can cause it to be unmapped. Is there no way to
prevent it from happening? Why can't I say something like
kmap_user_range(uaddr, len) (which would EFAULT if this combination is
invalid)? file_read_actor() can kmap() a page so there should be a way to
kmap() more than 1 page?

Regards,
Tigran.




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.051 / U:3.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site