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: <fd6ef776-d861-0dc7-2809-27868ca894e3@amd.com>
Date: Thu, 28 Mar 2024 09:49:29 -0700
From: Lizhi Hou <lizhi.hou@....com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
CC: Louis Chauvet <louis.chauvet@...tlin.com>, Brian Xu <brian.xu@....com>,
	Raj Kumar Rampelli <raj.kumar.rampelli@....com>, Vinod Koul
	<vkoul@...nel.org>, Michal Simek <michal.simek@....com>, Jan Kuliga
	<jankul@...tek.krakow.pl>, <dmaengine@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
	<stable@...r.kernel.org>
Subject: Re: [PATCH 2/3] dmaengine: xilinx: xdma: Fix synchronization issue


On 3/27/24 17:23, Miquel Raynal wrote:
> Hi Lizhi,
>
>>> @@ -376,6 +378,8 @@ static int xdma_xfer_start(struct xdma_chan *xchan)
>>>    		return ret;
>>>    >   	xchan->busy = true;
>>> +	xchan->stop_requested = false;
>>> +	reinit_completion(&xchan->last_interrupt);
>> If stop_requested is true, it should not start another transfer. So I would suggest to add
>>
>>        if (xchan->stop_requested)
>>
>>                   return -ENODEV;
> Maybe -EBUSY in this case?
>
> I thought synchronize() was mandatory in-between. If that's not the
> case then indeed we need to block or error-out if a new transfer
> gets started.

Okay. It looks issue_pending is not expected between terminate_all() and 
synchronize().

This check is not needed.


Thanks,

Lizhi

>
>> at the beginning of xdma_xfer_start().
>>
>> xdma_xfer_start() is protected by chan lock.
>>
>>>    >   	return 0;
>>>    }
> Thanks,
> Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ