lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200807081642.19507.arnd@arndb.de>
Date:	Tue, 8 Jul 2008 16:42:18 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Maxim Shchetynin <maxim@...ux.vnet.ibm.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linuxppc-dev@...abs.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Segher Boessenkool <segher@...nel.crashing.org>,
	Gunnar von Boehn <VONBOEHN@...ibm.com>,
	Mark Nelson <markn@....ibm.com>
Subject: Re: AZFS file system proposal

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ