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] [day] [month] [year] [list]
Date:	Tue, 4 Sep 2012 12:39:58 +0000
From:	Liu Qiang-B32616 <B32616@...escale.com>
To:	Dan Williams <djbw@...com>
CC:	"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"vinod.koul@...el.com" <vinod.koul@...el.com>,
	Phillips Kim-R1AAHA <R1AAHA@...escale.com>,
	"herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"arnd@...db.de" <arnd@...db.de>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	Li Yang-R58472 <r58472@...escale.com>,
	Tabi Timur-B04825 <B04825@...escale.com>
Subject: RE: [PATCH v7 6/8] fsl-dma: use spin_lock_bh to instead of
 spin_lock_irqsave

> -----Original Message-----
> From: dan.j.williams@...il.com [mailto:dan.j.williams@...il.com] On
> Behalf Of Dan Williams
> Sent: Sunday, September 02, 2012 4:41 PM
> To: Liu Qiang-B32616
> Cc: linux-crypto@...r.kernel.org; linuxppc-dev@...ts.ozlabs.org; linux-
> kernel@...r.kernel.org; vinod.koul@...el.com; Phillips Kim-R1AAHA;
> herbert@...dor.hengli.com.au; davem@...emloft.net; arnd@...db.de;
> gregkh@...uxfoundation.org; Li Yang-R58472; Tabi Timur-B04825
> Subject: Re: [PATCH v7 6/8] fsl-dma: use spin_lock_bh to instead of
> spin_lock_irqsave
> 
> On Thu, Aug 9, 2012 at 1:23 AM,  <qiang.liu@...escale.com> wrote:
> > From: Qiang Liu <qiang.liu@...escale.com>
> >
> > The use of spin_lock_irqsave() is a stronger locking mechanism than is
> > required throughout the driver. The minimum locking required should be
> > used instead. Interrupts will be turned off and context will be saved,
> > there is needless to use irqsave.
> >
> > Change all instances of spin_lock_irqsave() to spin_lock_bh().
> > All manipulation of protected fields is done using tasklet context or
> > weaker, which makes spin_lock_bh() the correct choice.
> 
> It seems you are coordinating fsl-dma copy and talitos xor operations.
>  It looks like fsl-dma will be called through
> talitos_process_pending()->dma_run_dependencies(), which is
> potentially called in hard irq context.
> 
> This all comes back to the need to fix raid offload to manage the
> channels explicitly rather than the current dependency chains.
So you mean I must implement talitos_run_dependencies() and fsldma_run_dependencies()? Invoke async_tx->callback() respectively.
How about avoiding irq context in talitos?

> 
> --
> Dan


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