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: <79c397ee-b71b-470e-9184-401b4b96a0d2@arm.com>
Date: Tue, 28 Nov 2023 22:59:33 +0000
From: Robin Murphy <robin.murphy@....com>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: akpm@...ux-foundation.org, alex.williamson@...hat.com,
 alim.akhtar@...sung.com, alyssa@...enzweig.io, asahi@...ts.linux.dev,
 baolu.lu@...ux.intel.com, bhelgaas@...gle.com, cgroups@...r.kernel.org,
 corbet@....net, david@...hat.com, dwmw2@...radead.org, hannes@...xchg.org,
 heiko@...ech.de, iommu@...ts.linux.dev, jasowang@...hat.com,
 jernej.skrabec@...il.com, jgg@...pe.ca, jonathanh@...dia.com,
 joro@...tes.org, kevin.tian@...el.com, krzysztof.kozlowski@...aro.org,
 kvm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-doc@...r.kernel.org, linux-fsdevel@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 linux-rockchip@...ts.infradead.org, linux-samsung-soc@...r.kernel.org,
 linux-sunxi@...ts.linux.dev, linux-tegra@...r.kernel.org,
 lizefan.x@...edance.com, marcan@...can.st, mhiramat@...nel.org,
 mst@...hat.com, m.szyprowski@...sung.com, netdev@...r.kernel.org,
 paulmck@...nel.org, rdunlap@...radead.org, samuel@...lland.org,
 suravee.suthikulpanit@....com, sven@...npeter.dev, thierry.reding@...il.com,
 tj@...nel.org, tomas.mudrunka@...il.com, vdumpa@...dia.com,
 virtualization@...ts.linux.dev, wens@...e.org, will@...nel.org,
 yu-cheng.yu@...el.com
Subject: Re: [PATCH 06/16] iommu/dma: use page allocation function provided by
 iommu-pages.h

On 2023-11-28 10:50 pm, Pasha Tatashin wrote:
> On Tue, Nov 28, 2023 at 5:34 PM Robin Murphy <robin.murphy@....com> wrote:
>>
>> On 2023-11-28 8:49 pm, Pasha Tatashin wrote:
>>> Convert iommu/dma-iommu.c to use the new page allocation functions
>>> provided in iommu-pages.h.
>>
>> These have nothing to do with IOMMU pagetables, they are DMA buffers and
>> they belong to whoever called the corresponding dma_alloc_* function.
> 
> Hi Robin,
> 
> This is true, however, we want to account and observe the pages
> allocated by IOMMU subsystem for DMA buffers, as they are essentially
> unmovable locked pages. Should we separate IOMMU memory from KVM
> memory all together and add another field to /proc/meminfo, something
> like "iommu -> iommu pagetable and dma memory", or do we want to
> export DMA memory separately from IOMMU page tables?

These are not allocated by "the IOMMU subsystem", they are allocated by 
the DMA API. Even if you want to claim that a driver pinning memory via 
iommu_dma_ops is somehow different from the same driver pinning the same 
amount of memory via dma-direct when iommu.passthrough=1, it's still 
nonsense because you're failing to account the pages which iommu_dma_ops 
gets from CMA, dma_common_alloc_pages(), dynamic SWIOTLB, the various 
pools, and so on.

Thanks,
Robin.

> Since, I included DMA memory, I specifically removed mentioning of
> IOMMU page tables in the most of places, and only report it as IOMMU
> memory. However, since it is still bundled together with SecPageTables
> it can be confusing.
> 
> Pasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ