16 Mar 17:58
Re: [parisc-linux] Re: Example filesystem fail to init on parisc
On Thu, 2006-03-16 at 09:13 -0700, Grant Grundler wrote: > On Mon, Mar 13, 2006 at 12:26:34PM +0100, Miklos Szeredi wrote: > > OK. I'm out of ideas, CC-ing parisc-linux, maybe they can help shed > > some light on this. > > Miklos, > I took a quick look last week but didn't see anything obvious. > I was suspicious of the memcopy() calls to copy stuff to > user space. But willy me told those are fine if using the > result of kmap() (and then kunmap'ing when done). Sorry, meant to reply earlier. > > The reason appears to be that when the userspace filesystem reads from > > the FUSE device, the kernel doesn't copy any data to the userspace > > read buffer, though the correct size is returned by read(). > > > > FUSE uses a combination of get_user_pages(), kmap_atomic() and > > memcpy(). After kunmap_atomic(), flush_dcache_page() is called to > > avoid virtual aliasing. The data in the read buffer is totally > > untouched. This is wrong. A VIPT cache requires a mapping to flush on. If you kunmap, you've lost the mapping. What you should do is kmap() operate on data flush_kernel_dcache_page() kunmap()(Continue reading)
RSS Feed