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] [day] [month] [year] [list]
Message-ID: <24a8d381-dd13-4d19-a736-689b8880dbe1@proton.me>
Date: Mon, 05 Aug 2024 20:39:46 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Danilo Krummrich <dakr@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, Wedson Almeida Filho <wedsonaf@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, Andreas Hindborg <a.hindborg@...sung.com>, rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] rust: kernel: add `drop_contents` to `BoxExt`

On 05.08.24 11:07, Danilo Krummrich wrote:
> On Mon, Aug 05, 2024 at 10:43:57AM +0200, Alice Ryhl wrote:
>> On Sun, Aug 4, 2024 at 1:22 AM Danilo Krummrich <dakr@...nel.org> wrote:
>>>
>>> On 8/3/24 4:16 PM, Benno Lossin wrote:
>>>> Sometimes (see [1]) it is necessary to drop the value inside of a
>>>> `Box<T>`, but retain the allocation. For example to reuse the allocation
>>>> in the future.
>>>> Introduce a new function `drop_contents` that turns a `Box<T>` into
>>>> `Box<MaybeUninit<T>>` by dropping the value.
>>>
>>> Is this (and the stuff in patch 2) used somewhere? Otherwise, I think it
>>> would probably make sense to base this work on top of my allocator work.
>>
>> Yes, please see the red/black tree.
>> https://lore.kernel.org/rust-for-linux/20240727-b4-rbtree-v8-0-951600ada434@google.com/
> 
> Ok, unless preferred otherwise, I'll pick it up in the corresponding patches of
> my allocator series then.

I am not sure if we want to do that, since the allocator series is
already rather long and the red-black tree has been in review since
February...
Another way of fixing this would be if you base your allocator series on
top of this one, then you can just include it when you remove the
`BoxExit` trait.

---
Cheers,
Benno


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ