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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpo=m-s4+q+4v2v+8nzC32FRzJAb58no2hZLV_5QqTj4wig@mail.gmail.com>
Date:	Tue, 22 Jan 2013 15:10:53 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:	Vinod Koul <vinod.koul@...el.com>, linux-kernel@...r.kernel.org,
	spear-devel <spear-devel@...t.st.com>
Subject: Re: [PATCH 2/2] dw_dmac: return proper residue value

On 22 January 2013 14:52, Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> On Tue, 2013-01-22 at 13:41 +0530, Viresh Kumar wrote:
>> > +       spin_lock_irqsave(&dwc->lock, flags);
>> > +       if (list_empty(&dwc->active_list)) {
>>
>> can this every happen?
>
> In the same way as in dwc_scan_descriptors().
> For example when transfer is done.

My point was, because scan_descriptor() is just called, if the transfer
is over by now, we must have returned back, else we reach this place
and so this may never be true.

>> Over that, cyclic case can be handled before taking any locks.
>
> Does the user is responsible to follow specific workflow for cyclic API?

not sure.

>> Just before above line got executed, we called dwc_scan_descriptors(), which
>> also scans through the llis to see where we are.. What about updating
>> first->residue
>> there, so that we don't traverse it twice?
>
> The dwc_scan_descriptors traverses the chain and returns immediately if
> it found a match. But to calculate residue we have to traverse from that
> point to the end of the chain along with current DMA register check.

Hey, you can start subtracting individual lengths of descriptors from
total length
in scan descriptors() and that should give you what you want.
--
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