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: <20141012195857.GA5153@saruman>
Date:	Sun, 12 Oct 2014 14:58:57 -0500
From:	Felipe Balbi <balbi@...com>
To:	Al Viro <viro@...IV.linux.org.uk>
CC:	David Cohen <david.a.cohen@...ux.intel.com>, <balbi@...com>,
	<gregkh@...uxfoundation.org>, <mina86@...a86.com>,
	<r.baldyga@...sung.com>, <linux-usb@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>,
	Qiuxu Zhuo <qiuxu.zhuo@...el.com>
Subject: Re: [PATCH v2] usb: ffs: fix regression when
 quirk_ep_out_aligned_size flag is set

On Sun, Oct 12, 2014 at 08:12:28PM +0100, Al Viro wrote:
> On Wed, Oct 08, 2014 at 02:12:18PM -0700, David Cohen wrote:
> >  		use_mm(io_data->mm);
> >  		for (i = 0; i < io_data->nr_segs; i++) {
> > +			size_t len = min_t(size_t, ret - pos,
> > +					io_data->iovec[i].iov_len);
> > +			if (!len)
> > +				break;
> >  			if (unlikely(copy_to_user(io_data->iovec[i].iov_base,
> > -						 &io_data->buf[pos],
> > -						 io_data->iovec[i].iov_len))) {
> > +						 &io_data->buf[pos], len))) {
> >  				ret = -EFAULT;
> >  				break;
> >  			}
> > -			pos += io_data->iovec[i].iov_len;
> > +			pos += len;
> 
> Hmm...  This is really asking for something like
> 	if (copy_to_iter(io_data->buf, ret, <something>) != ret)
> 		ret = -EFAULT;
> with <something> being an iov_iter instead of iovec.  It would be really
> nice to have that thing switched to ->read_iter/->write_iter, dropping
> ->read/->write/->aio_read/->aio_write; I'm not familiar enough with that
> code to do it on my own, though, so it would require some help from
> maintainers...

cool, Michal, if you're too busy lately, I can look at that one myself.
I suppose the test application we have under tool/usb is good enough for
validation ?

cheers

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ