RE: [RFC V3] usb: rh_call_control tbuf overflow fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 9 Aug 2013, Ismail, Abdul R wrote:

> Alan,
> 
> Just wondering why we don't require the HCDs to validate the length
> instead of blindly copying the descriptor to the buffer passed in. In
> the pseudo host controller we are developing we only copy the number
> of bytes requested to the buffer passed in.

I don't know why it is done this why; that code was written a long time 
ago.  Maybe because it makes things easier for the HCDs; often a 
descriptor has to be altered in the output buffer, and it's a lot 
harder to do this correctly if the buffer might be smaller than the 
descriptor.  Allocating a single large buffer in one place takes less 
code overall than adding the size checks to every HCD.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux