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-next>] [day] [month] [year] [list]
Message-ID: <20250718103359.1026240-1-abdiel.janulgue@gmail.com>
Date: Fri, 18 Jul 2025 13:33:33 +0300
From: Abdiel Janulgue <abdiel.janulgue@...il.com>
To: acourbot@...dia.com,
	dakr@...nel.org,
	jgg@...pe.ca,
	lyude@...hat.com
Cc: 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 <lossin@...nel.org>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>,
	Trevor Gross <tmgross@...ch.edu>,
	Tamir Duberstein <tamird@...il.com>,
	FUJITA Tomonori <fujita.tomonori@...il.com>,
	linux-kernel@...r.kernel.org (open list),
	Andrew Morton <akpm@...ux-foundation.org>,
	Randy Dunlap <rdunlap@...radead.org>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Caleb Sander Mateos <csander@...estorage.com>,
	Petr Tesarik <petr@...arici.cz>,
	Sui Jingfeng <sui.jingfeng@...ux.dev>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Robin Murphy <robin.murphy@....com>,
	airlied@...hat.com,
	iommu@...ts.linux.dev (open list:DMA MAPPING HELPERS),
	rust-for-linux@...r.kernel.org,
	Abdiel Janulgue <abdiel.janulgue@...il.com>
Subject: [PATCH v3 0/2] rust: add initial scatterlist abstraction

Hi all,

This is v3 of the rust scatterlist abstraction incorporating feedback
and code from Alexandre Courbot.

Changes since v3:
- After further discussion it seems we need a variant of typestate after
  all. A major change for this version is to introduce unsafe methods only
  when using one of the constructors for a SG table. Otherwise nothing in
  the interface should need to be unsafe.

Changes since v2:
- Drop typestate pattern. Introduce SGTablePages trait to enforce ownership
  of the pages to SGTable.

Link to v2: https://lore.kernel.org/lkml/20250626203247.816273-1-abdiel.janulgue@gmail.com/

Abdiel Janulgue (2):
  rust: add initial scatterlist abstraction
  samples: rust: add sample code for scatterlist abstraction

 rust/bindings/bindings_helper.h |   1 +
 rust/helpers/helpers.c          |   1 +
 rust/helpers/scatterlist.c      |  30 +++
 rust/kernel/dma.rs              |  18 ++
 rust/kernel/lib.rs              |   1 +
 rust/kernel/scatterlist.rs      | 405 ++++++++++++++++++++++++++++++++
 samples/rust/rust_dma.rs        |  49 +++-
 7 files changed, 504 insertions(+), 1 deletion(-)
 create mode 100644 rust/helpers/scatterlist.c
 create mode 100644 rust/kernel/scatterlist.rs


base-commit: 23b128bba76776541dc09efaf3acf6242917e1f0
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ