[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250602114047.GA298147@ziepe.ca>
Date: Mon, 2 Jun 2025 08:40:47 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Alexandre Courbot <acourbot@...dia.com>
Cc: Abdiel Janulgue <abdiel.janulgue@...il.com>, dakr@...nel.org,
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 Sat, May 31, 2025 at 09:54:20PM +0900, Alexandre Courbot wrote:
> So if I understood your idea correctly, this would mean creating the
> SGTable and mapping it in one call, eschewing the typestate entirely?
Probably no need for a type state
> And the `SGTable` would own the backing data, and only release it upon
> destruction and unmapping?
But I don't think you can do this, it is not allowed to pin kmalloc
memory for instance so you have to do something as you showed to tie
the lifetime to the kmalloc across the sgtable lifetime.
Jason
Powered by blists - more mailing lists