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: <1393905983.58239.YahooMailNeo@web164001.mail.gq1.yahoo.com>
Date:	Mon, 3 Mar 2014 20:06:23 -0800 (PST)
From:	Chase Southwood <chase.southwood@...oo.com>
To:	Ian Abbott <abbotti@....co.uk>, Ian Abbott <ian.abbott@....co.uk>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Cc:	"hsweeten@...ionengravers.com" <hsweeten@...ionengravers.com>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Staging: comedi: add timeouts to while loops in s626.c

>On Monday, March 3, 2014 8:13 AM, Ian Abbott <abbotti@....co.uk> wrote:

>>On 2014-03-02 04:13, Chase Southwood wrote:
>>>On Friday, February 28, 2014 11:49 PM, Chase Southwood <chase.southwood@...oo.com> wrote:
>>>> On Friday, February 28, 2014 11:26 AM, Ian Abbott <abbotti@....co.uk> wrote:
>>>>> On 2014-02-28 07:35, Chase Southwood wrote:
>>
>> [snip]
>>
>>>> In the case of s626_send_dac(), it doesn't seem to be used in any
>>>> critical sections, so it could make use of Hartley's comedi_timeout().
>>>>
>>>> Some of the timeout errors could be propagated, especially for
>>>> s626_send_dac() which is only reachable from very few paths.
>>>
>>>
>>> Awesome, I'll swap all of my timeouts out for comedi_timeout() in s626_send_dac().
>>
>> Actually, after taking another look at this, I don't think that using comedi_timeout()
>> here is going to work, actually.
>> The context from which s626_send_dac() is called allows sleep all right, but readl() isn't
>> a comedi function and therefore it doesn't behave (in parameters or return values) as
>> the callback function parameter to comedi_timeout() requires.  So unless I'm missing
>> something particularly large here, I believe we'll have to do the timeouts here manually
>> as well.  Am I correct here, and if so, would you like the iteration based timeouts here
>> as well, or a sleep-based timeout similar to that employed by comedi_timeout()?
>
>The readl() could be done in a small callback function.  As the 
>different while loops are checking for different results from readl(), 
>It would need a different callback functions for each case, or some 
>creative use of the callback function's 'context' parameter.
>

Oh, of course.  I'll see if there's a reasonably clear way that I can use the
context parameter to use a single callback, if not I'll just define a few of them.

I'll send a patch with the new callback(s), and the timeouts in s626_send_dac()
switched to comedi_timeout(), and I'll add the timeouts that were left out last
time, and then another patch or patchset propagating everything upwards.

Thanks,
Chase

>
>-- 
>-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk>        )=-
>-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
>--

--
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