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: <CA+CK2bDWRN__FBw1N9j9RD3EE+0pca89ASKROA6tK_CGH17gNw@mail.gmail.com>
Date: Tue, 26 Dec 2023 12:57:25 -0500
From: Pasha Tatashin <pasha.tatashin@...een.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: David Rientjes <rientjes@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>, 
	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, jernej.skrabec@...il.com, 
	jonathanh@...dia.com, joro@...tes.org, krzysztof.kozlowski@...aro.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, 
	m.szyprowski@...sung.com, paulmck@...nel.org, rdunlap@...radead.org, 
	robin.murphy@....com, samuel@...lland.org, suravee.suthikulpanit@....com, 
	sven@...npeter.dev, thierry.reding@...il.com, tj@...nel.org, 
	tomas.mudrunka@...il.com, vdumpa@...dia.com, wens@...e.org, will@...nel.org, 
	yu-cheng.yu@...el.com
Subject: Re: [PATCH v2 01/10] iommu/vt-d: add wrapper functions for page allocations

On Sun, Dec 24, 2023 at 4:48 PM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Sun, Dec 24, 2023 at 01:30:50PM -0800, David Rientjes wrote:
> > > > s/pages/page/ here and later in this file.
> > >
> > > In this file, where there a page with an "order", I reference it with
> > > "pages", when no order (i.e. order = 0), I reference it with "page"
> > >
> > > I.e.: __iommu_alloc_page vs. __iommu_alloc_pages
> > >
> >
> > Eh, the struct page points to a (potentially compound) page, not a set or
> > list of pages.  I won't bikeshed on it, but "struct page *pages" never
> > makes sense unless it's **pages or *pages[] :)
>
> I'd suggest that 'pages' also makes sense when _not_ using __GFP_COMP,
> as we do in fact allocate an array of pages in that case.
>
> That said, we shouldn't encourage the use of non-compound allocations.
> It would also be good for someone to define a memdesc for iommu memory
> like we have already for slab.  We'll need it eventually, and it'll work
> out better if someone who understands iommus (ie not me) does it.

I was thinking of adding an IOMMU page table memdesc, at least by
starting with Intel implementation.

- For efficient freeing on page-unmap we need a counter.
- We might also need a per-page page table locking (aka PTL type
lock), if the current approach I am proposing is not scalable enough.
- Access to debugfs (I am studying this now).

However, iommu memdesc would really make sense, once all the various
page table management IOMMU implementations are unified.

Pasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ