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: Fri, 28 Jun 2024 07:37:03 +0000
From: Joy Zou <joy.zou@....com>
To: Vinod Koul <vkoul@...nel.org>
CC: Frank Li <frank.li@....com>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH v1 2/2] dmaengine: fsl-edma: add edma src ID check at request
 channel


> -----Original Message-----
> From: Vinod Koul <vkoul@...nel.org>
> Sent: 2024年6月28日 15:32
> To: Joy Zou <joy.zou@....com>
> Cc: Frank Li <frank.li@....com>; imx@...ts.linux.dev;
> dmaengine@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [EXT] Re: [PATCH v1 2/2] dmaengine: fsl-edma: add edma src ID
> check at request channel
 
> On 21-06-24, 18:49, Joy Zou wrote:
> > Check src ID to detect misuse of same src ID for multiple DMA channels.
> >
> > Signed-off-by: Joy Zou <joy.zou@....com>
> > ---
> >  drivers/dma/fsl-edma-main.c | 22 ++++++++++++++++++++++
> >  1 file changed, 22 insertions(+)
> >
> > diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c
> > index d4f29ece69f5..47939d010e59 100644
> > --- a/drivers/dma/fsl-edma-main.c
> > +++ b/drivers/dma/fsl-edma-main.c
> > @@ -100,6 +100,22 @@ static irqreturn_t fsl_edma_irq_handler(int irq,
> void *dev_id)
> >       return fsl_edma_err_handler(irq, dev_id);  }
> >
> > +static bool fsl_edma_srcid_in_use(struct fsl_edma_engine *fsl_edma,
> > +u32 srcid) {
> > +     struct fsl_edma_chan *fsl_chan;
> > +     int i;
> > +
> > +     for (i = 0; i < fsl_edma->n_chans; i++) {
> > +             fsl_chan = &fsl_edma->chans[i];
> > +
> > +             if (fsl_chan->srcid && srcid == fsl_chan->srcid) {
> > +                     dev_err(&fsl_chan->pdev->dev, "The srcid is
> > + using! Can't use repeatly.");
> 
> Better message would be: "The srcid is in use, cant use!"
> 
> wdyt?
Thanks your for comments!
It's better. Will change it.
BR
Joy Zou

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ