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: Sun, 28 Apr 2024 21:36:32 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Chen Ni <nichen@...as.ac.cn>
Cc: inki.dae@...sung.com, sw0312.kim@...sung.com, kyungmin.park@...sung.com,
	airlied@...il.com, daniel@...ll.ch, krzk@...nel.org,
	alim.akhtar@...sung.com, m.szyprowski@...sung.com,
	dri-devel@...ts.freedesktop.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/exynos: Add check for dma_set_max_seg_size

On Mon, Apr 29, 2024 at 10:38:33AM +0800, Chen Ni wrote:
> Add check for the return value of dma_set_max_seg_size() and return
> the error if it fails in order to catch the error.
> 
> Fixes: ddfd4ab6bb08 ("drm/exynos: Fix dma_parms allocation")
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>

With my dma-mapping hat maintainer on I think we should remove the
return value from it.  It can only return -EIO or 0, and the first
only if the bus has not set up a dma_params structure for the device.
I'd much rather WARN_ON() on that, as it is is a grave error to either
call dma_set_max_seg_size on a device that is on a bus that doesn't
support DMA at all, or for the bus maintainer to accidentlaly drop it.

Feel free to add the patch if exynos has a strict error checking policy,
but it's rather pointless and I'll add removing the return value to my
ever growing TODO list.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ