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]
Date:	Thu, 4 Aug 2016 13:44:29 -0400
From:	Robert Foss <robert.foss@...labora.com>
To:	Oliver Neukum <oneukum@...e.com>
Cc:	pprabhu@...omium.org, gregkh@...uxfoundation.org,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
	Guenter Roeck <groeck@...gle.com>,
	Ben Chan <benchan@...omium.org>
Subject: Re: [PACTH v1] cdc-wdm: Clear read pipeline in case of error



On 2016-08-03 06:39 AM, Oliver Neukum wrote:
> On Tue, 2016-08-02 at 10:37 -0400, Robert Foss wrote:
>>
>> On 2016-08-02 09:59 AM, Oliver Neukum wrote:
>>> On Tue, 2016-08-02 at 09:54 -0400, Robert Foss wrote:
>>>>
>>>> On 2016-08-02 08:23 AM, Oliver Neukum wrote:
>>>>> On Thu, 2016-07-28 at 14:19 -0400, robert.foss@...labora.com wrote:
>>>>>> From: Prathmesh Prabhu <pprabhu@...omium.org>
>>>>>>
>>>>>> Implemented queued response handling. This queue is processed every
>>>>>> time the
>>>>>> WDM_READ flag is cleared.
>>>>>>
>>>>>> In case of a read error, userspace may not actually read the data,
>>>>>> since the
>>>>>> driver returns an error through wdm_poll. After this, the underlying
>>>>>> device may
>>>>>> attempt to send us more data, but the queue is not processed. While
>>>>>> userspace is
>>>>>> also blocked, because the read error is never cleared.
>>>>>
>>>>> Could you explain why user space cannot just read more data?
>>>>> That will clear the error.
>>>>
>>>> Userspace certainly could read more data, but for the case when
>>>> userspace doesn't read and clear a potential an error, we still would
>>>> like to not be stuck if the device sends more data. space
>>>>
>>>> I hope that answers your question, if not I'll try to be more elaborate.
>>>
>>> Clear, but why does that require the suppression of an error condition?
>>> errors should always be delivered.
>>
>> The goal is not to clear the error condition, but that is required to
>> not stay stuck.
>
> How can that depend on what we return to user space?
> In the driver we can continue just ignoring errors.
> Now, if user space stops reading because we reported an error,
> that is the decision user space has made. We cannot ignore errors
> in the kernel because we don't like what user space does when it
> sees the error.

So perhaps the better solution is to be more intelligent about how 
desc->rerr is written to during after an error to be able to maintain 
the error condition?

>
> 	Regards
> 		Oliver
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ