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: <70F0607C-FFAA-412C-9412-5F5A01079C45@collabora.com>
Date: Wed, 2 Jul 2025 10:39:30 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: Tamir Duberstein <tamird@...il.com>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
 Andreas Hindborg <a.hindborg@...nel.org>,
 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>,
 Alice Ryhl <aliceryhl@...gle.com>,
 Trevor Gross <tmgross@...ch.edu>,
 Danilo Krummrich <dakr@...nel.org>,
 Matthew Wilcox <willy@...radead.org>,
 Andrew Morton <akpm@...ux-foundation.org>,
 rust-for-linux@...r.kernel.org,
 linux-kernel@...r.kernel.org,
 linux-fsdevel@...r.kernel.org,
 linux-mm@...ck.org
Subject: Re: [PATCH 3/3] rust: xarray: add `insert` and `reserve`

Hi, this is on my todo list.

Again, thanks Tamir for working on this.

> On 1 Jul 2025, at 14:04, Tamir Duberstein <tamird@...il.com> wrote:
> 
> On Tue, Jul 1, 2025 at 12:56 PM Miguel Ojeda
> <miguel.ojeda.sandonis@...il.com> wrote:
>> 
>> On Tue, Jul 1, 2025 at 6:27 PM Tamir Duberstein <tamird@...il.com> wrote:
>>> 
>>> Add `Guard::{insert,reserve}` and `Guard::{insert,reserve}_limit`, which
>>> are akin to `__xa_{alloc,insert}` in C.
>> 
>> Who will be using this? i.e. we need to justify adding code, typically
>> by mentioning the users.
> 
> Daniel, could you name your use case?

My main use case is for insert_limit.

Tyr uses xarrays to keep track of resources allocated by userspace, and we need
to impose limits on how many resources can be allocated at once.

insert_limits() provides the exact semantics needed, i.e.: insert somewhere in
the array as long as there is vacant space in the given range.

— Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ