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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZoZEtLe66MZRBDLc@infradead.org>
Date: Wed, 3 Jul 2024 23:44:04 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Icenowy Zheng <uwu@...nowy.me>
Cc: Christoph Hellwig <hch@...radead.org>,
	Bjorn Helgaas <helgaas@...nel.org>,
	Jiaxun Yang <jiaxun.yang@...goat.com>,
	Christian König <christian.koenig@....com>,
	Huang Rui <ray.huang@....com>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
	bhelgaas@...gle.com, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: PCIe coherency in spec (was: [RFC PATCH 2/2] drm/ttm: downgrade
 cached to write_combined when snooping not available)

On Thu, Jul 04, 2024 at 02:40:16PM +0800, Icenowy Zheng wrote:
> > Nothing in the PCIe specifications that mandates a programming model.
> > Non-coherent DMA is extremely common in lower end devices, and
> > despite
> > all the issues that it causes well supported in Linux.
> > 
> > What are you trying to solve?
> 
> Currently the DRM TTM subsystem (and GPU drivers using it) will assume
> coherency and fail on these non-coherent systems with cryptic error
> messages (like `[drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring gfx
> test failed (-110)`) without mentioning coherency issues at all.
> 
> My original patchset tries to solve this problem by make the TTM
> subsystem sensible of coherency status (and prevent CPU-side cached
> mapping when non-coherent), but got argued by TTM maintainer and the
> maintainer says TTM's ignorance on non-coherent systems is intentional.

>From the dma mapping subsystem POV all drivers not supporting DMA
incoherent devices are buggy.  But if the drm maintaintainers disagree
(and they have in the past) there is not much I can do, especially
given the DRM is rather special in abuses of all kinds of APIs anyway.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ