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: <aDnMUNCEJ8yhrKbX@cassiopeiae>
Date: Fri, 30 May 2025 17:18:40 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Alexandre Courbot <acourbot@...dia.com>,
	Abdiel Janulgue <abdiel.janulgue@...il.com>, lyude@...hat.com,
	Miguel Ojeda <ojeda@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>,
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <benno.lossin@...ton.me>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
	Valentin Obst <kernel@...entinobst.de>,
	open list <linux-kernel@...r.kernel.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Robin Murphy <robin.murphy@....com>, airlied@...hat.com,
	rust-for-linux@...r.kernel.org,
	"open list:DMA MAPPING HELPERS" <iommu@...ts.linux.dev>,
	Petr Tesarik <petr@...arici.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Sui Jingfeng <sui.jingfeng@...ux.dev>,
	Randy Dunlap <rdunlap@...radead.org>,
	Michael Kelley <mhklinux@...look.com>
Subject: Re: [PATCH 1/2] rust: add initial scatterlist bindings

On Fri, May 30, 2025 at 11:50:26AM -0300, Jason Gunthorpe wrote:
> On Fri, May 30, 2025 at 11:44:26PM +0900, Alexandre Courbot wrote:
> 
> > I would be fully on board with a simpler design, definitely. The reason
> > why I've tried to keep some doors open is that as you mentioned
> > scatterlist is used in many different ways, and I am not familiar enough
> > with all these uses to draw a line and say "we will never ever need to
> > do that".
> 
> I think it would be better to grow as needed. It is hard to speculate.
> 
> We also have the new two step DMA API, so it may very well be the only
> use for this stuff is very simple mappings of VVec like things for
> DMA, and maybe this all gets rewritten to use the new DMA API and not
> scatterlist.
> 
> Having a rust user facing API that allows for that would be a great
> thing.
> 
> IOW I would maybe reframe the task here, it is not to create simple
> naive wrappers around scatterlist but to provide a nice rust API to go
> from VVec/etc to DMA mapping of that VVec/etc.

I agree, this is likely to be the main use-case and I also think it makes sense
to focus more on exposing higher level APIs in this respect. We can still expose
more low level API details if actually needed.

However, also for the API details we do not expose to drivers, we should aim for
creating safe abstractions for internal use if reasonable.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ