lkml.org 
[lkml]   [2008]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: AZFS file system proposal
Date
On Monday 07 July 2008, Maxim Shchetynin wrote:
> > > +           if (copy_to_user(target, (void*) pin, size)) {
> > > +                   rc = -EFAULT;
> > > +                   goto out;
> > > +           }
> >
> > Question to the powerpc folks: is copy_to_user safe for an __iomem source?
> > Should there be two copies (memcpy_fromio and copy_to_user) instead?
>
> I leave this question open.
>

Cc:'ing some more people that might have more of a clue on this question.
_memcpy_fromio does a "sync" at the start and an "eieio" at the end.
IFAICT, neither are needed here because the source is always memory.

It also handles unaligned memory accesses, which copy_to_user should
also do correctly, so it *looks* like it should work with just a
copy_to_user, but it still feels wrong to use an __iomem pointer
as the source for a copy_to_user.

Any ideas?

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

\
 
 \ /
  Last update: 2008-07-08 16:47    [W:0.151 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site