[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250316-vec-set-len-v1-0-60f98a28723f@gmail.com>
Date: Sun, 16 Mar 2025 18:31:59 -0400
From: Tamir Duberstein <tamird@...il.com>
To: Danilo Krummrich <dakr@...nel.org>,
Andrew Ballance <andrewjballance@...il.com>,
Alice Ryhl <aliceryhl@...gle.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>, Trevor Gross <tmgross@...ch.edu>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
Tamir Duberstein <tamird@...il.com>
Subject: [PATCH 0/2] rust: alloc: split `Vec::set_len` into
`Vec::{inc,dec}_len`
This series is the product of a discussion[0] on the safety requirements
of `set_len`.
The patches adding `truncate`[1] and `clear`[2] will need to be updated
in light of this series.
Link: https://lore.kernel.org/all/20250315154436.65065-1-dakr@kernel.org/ [0]
Link: https://lore.kernel.org/all/20250316111644.154602-2-andrewjballance@gmail.com/ [1]
Link: https://lore.kernel.org/all/20250311-iov-iter-v1-4-f6c9134ea824@google.com/ [2]
Signed-off-by: Tamir Duberstein <tamird@...il.com>
---
Tamir Duberstein (2):
rust: alloc: replace `Vec::set_len` with `inc_len`
rust: alloc: add `Vec::dec_len`
rust/kernel/alloc/kvec.rs | 34 ++++++++++++++++++++++++----------
rust/kernel/str.rs | 2 +-
rust/kernel/uaccess.rs | 2 +-
3 files changed, 26 insertions(+), 12 deletions(-)
---
base-commit: cf25bc61f8aecad9b0c45fe32697e35ea4b13378
change-id: 20250316-vec-set-len-99be6cc48374
Best regards,
--
Tamir Duberstein <tamird@...il.com>
Powered by blists - more mailing lists