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: <6ce428e6-3585-4ef5-af08-debef0a7c308@intel.com>
Date: Thu, 9 May 2024 17:16:13 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Steven Price <steven.price@....com>, Christoph Hellwig <hch@....de>
CC: Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>, Robin Murphy
	<robin.murphy@....com>, Joerg Roedel <joro@...tes.org>, Will Deacon
	<will@...nel.org>, "Rafael J. Wysocki" <rafael@...nel.org>, Magnus Karlsson
	<magnus.karlsson@...el.com>, <nex.sw.ncis.osdt.itp.upstreaming@...el.com>,
	<bpf@...r.kernel.org>, <netdev@...r.kernel.org>, <iommu@...ts.linux.dev>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dma: fix DMA sync for drivers not calling dma_set_mask*()

From: Steven Price <steven.price@....com>
Date: Thu, 9 May 2024 16:11:26 +0100

> On 09/05/2024 15:46, Alexander Lobakin wrote:
>> There are several reports that the DMA sync shortcut broke non-coherent
>> devices.
>> dev->dma_need_sync is false after the &device allocation and if a driver
>> didn't call dma_set_mask*(), it will still be false even if the device
>> is not DMA-coherent and thus needs synchronizing. Due to historical
>> reasons, there's still a lot of drivers not calling it.
>> Invert the boolean, so that the sync will be performed by default and
>> the shortcut will be enabled only when calling dma_set_mask*().
>>
>> Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
>> Closes: https://lore.kernel.org/lkml/46160534-5003-4809-a408-6b3a3f4921e9@samsung.com
>> Reported-by: Steven Price <steven.price@....com>
>> Closes: https://lore.kernel.org/lkml/010686f5-3049-46a1-8230-7752a1b433ff@arm.com
>> Fixes: 32ba8b823252 ("dma: avoid redundant calls for sync operations")
>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> 
> Tested-by: Steven Price <steven.price@....com>

Thank!

> 
> Thanks for the quick fix.
> 
> Note that the fixes hash (32ba8b823252) is not the one in linux-next -
> that's f406c8e4b770. If the branch is getting rebased then no problem, I
> just thought I should point that out.

Oh crap, it really should be f406. Wrong tree again >_<

Chris, would you fix it when applying or I should resend?

> 
> Thanks,
> Steve

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ