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: <20150316085208.GA14918@localhost>
Date:	Mon, 16 Mar 2015 09:52:08 +0100
From:	Johan Hovold <johan@...nel.org>
To:	Peter Hung <hpeter@...il.com>
Cc:	Johan Hovold <johan@...nel.org>, gregkh@...uxfoundation.org,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	tom_tsai@...tek.com.tw, peter_hong@...tek.com.tw,
	Peter Hung <hpeter+linux_kernel@...il.com>
Subject: Re: [PATCH V8 02/10] USB: f81232: implement RX bulk-in EP

On Mon, Mar 16, 2015 at 10:53:38AM +0800, Peter Hung wrote:
> Hello,
> 
> Johan Hovold 於 2015/3/14 下午 07:48 寫道:
> > On Thu, Feb 26, 2015 at 06:02:08PM +0800, Peter Hung wrote:
> >> -	if (!urb->actual_length)
> >> +	if ((urb->actual_length < 2) || (urb->actual_length % 2))
> >>   		return;
> >
> > Not parsing short data (e.g. not divisible by 2) is OK I guess. You
> > could also just discard the last odd byte, but that's up to you.
> >
> > Either way, I think you should add a dev_warn here rather than just
> > silently drop it.
> 
> With F81232, when it first submit with interrupt URB, it will response 
> once with 1 bytes data. The data is hw current LSR, but it useless on 
> open. It's should necessary with receiving data. When the device is 
> working good, it's should acked with even size data.

Ok, thanks for clarifying that.

> To avoid confusing to user, I'll keep it without warning message.

Yes, skip the warning, but could you a short comment about this (e.g.
the 1-byte packet on open) before you do the size check?

Thanks,
Johan
--
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