Re: fuse, get_user_pages, flush_anon_page, aliasing caches and all that again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 21, 2006 at 05:29:42PM +0100, Arjan van de Ven wrote:
> 
> > So, given all this additional complexity _and_ that it would only be
> > safe on non-preempt UP, the question becomes: is using get_user_pages()
> > to access the current processes memory space legal?  Given the above,
> > I would say not.
> 
> I'd say that copy_from_user is the right api for this, not
> get_user_pages + kmap hacks...

I would tend to agree.

So the question then comes down to: is there really an issue with using
copy_*_user in fuse.

Bearing in mind that get_user_pages() simulates page faults in the
memory it is trying to access, we're going to either take simulated
page faults at that time, or real page faults in copy_*_user.

(I was just about to test a hacked up implementation of flush_anon_page()
on my test system, but it seems its ethernet interface has warmed up
too much and won't obtain a link with my switch... which makes download
of kernels impossible.  Hence it's going to have to wait a few hours for
it to cool down.)

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux