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: <78DB1F66-9DF5-4679-ADC4-177BED5D4FDE@collabora.com>
Date: Mon, 12 May 2025 08:19:48 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: Abdiel Janulgue <abdiel.janulgue@...il.com>
Cc: 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: [RFC PATCH 0/2] scatterlist rust bindings

Hi Abdiel,

> On 12 May 2025, at 06:53, Abdiel Janulgue <abdiel.janulgue@...il.com> wrote:
> 
> Hi,
> 
> Here are the scatterlist bindings that has been brewing for a while in my
> local tree while working with Nova code. The bindings are used mostly to
> build the radix3 table from the GSP firmware which is loaded via dma.
> This interface can be used on top of existing kernel scatterlist objects
> or to allocate a new one from scratch.
> 
> Some questions still need to be resolved, which mostly come from
> the DeviceSGTable::dma_map() function. Primarily, what if you call
> bindings::dma_map_sgtable() on an already mapped sg_table? From my

Perhaps we should introduce a type for buffers which are known to be mapped. Then
we can simply not offer the option to map for that type.

> experiments it doesn't seem to do anything and no indication is returned if
> the call succeeded or not. Should we save the "mapping info" to a list
> everytime we call DeviceSGTable::dma_map more than once?

What mapping info are you referring to?

> 
> Hoping this initial submission will generate some discussion. I'd like to
> acknowledge valuable feedback from Danilo Krummrich and Lyude
> Paul in shaping this up.
> 
> Abdiel Janulgue (2):
>  rust: add initial scatterlist bindings
>  samples: rust: add sample code for scatterlist bindings
> 
> rust/bindings/bindings_helper.h |   1 +
> rust/helpers/helpers.c          |   1 +
> rust/helpers/scatterlist.c      |  25 +++
> rust/kernel/lib.rs              |   1 +
> rust/kernel/scatterlist.rs      | 275 ++++++++++++++++++++++++++++++++
> samples/rust/rust_dma.rs        |  14 +-
> 6 files changed, 316 insertions(+), 1 deletion(-)
> create mode 100644 rust/helpers/scatterlist.c
> create mode 100644 rust/kernel/scatterlist.rs
> 
> 
> base-commit: dd21715de3dfa6f6457432ce909e5f7eb142a7d2
> -- 
> 2.43.0
> 
> 

— Daniel 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ