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: <20231011051100.GB32642@lst.de>
Date:   Wed, 11 Oct 2023 07:11:00 +0200
From:   Christoph Hellwig <hch@....de>
To:     Robin Murphy <robin.murphy@....com>
Cc:     Christoph Hellwig <hch@....de>, Jia He <justin.he@....com>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] dma-mapping: fix dma_addressing_limited if
 dma_range_map can't cover all system RAM

On Tue, Oct 10, 2023 at 10:40:44AM +0100, Robin Murphy wrote:
> On 2023-10-10 08:48, Christoph Hellwig wrote:
>> dma_addressing_limited is called for every dma (direct) map, and this
>> new code is way to heavy for that.  We'll need to cache the information
>> somehow.
>
> But is it? That was my instinctive reaction as well, but AFAICS it is only 
> actually used by drivers in setup paths, either directly or via 
> dma_max_mapping_size(). The dma_capable() check which we *do* use for every 
> actual mapping still just checks whether the given physical address exists 
> in the range map. I believe the underlying problem here is when 
> dma_capable() say the mapping needs bouncing, but then it's too big for 
> that to succeed, since dma_max_mapping_size() gave the wrong answer to 
> start with.

Ah, indeed, I somehw misremembered calling it in the mapping code.

Justing, can you still respin this a bit, add a prep patch to move
dma_addressing_limited so that it is exported instead of the new
low-level helper, and fix up coding style issues like the overly
long lines of possible?  If it's not perfect I'll fix up the rest
later.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ