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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f6889ce1-f1e0-438d-a9e6-4340a92cb6ef@gmail.com>
Date: Mon, 4 Nov 2024 11:36:26 +0200
From: Abdiel Janulgue <abdiel.janulgue@...il.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: rust-for-linux@...r.kernel.org, daniel.almeida@...labora.com,
 a.hindborg@...nel.org, linux-kernel@...r.kernel.org, dakr@...hat.com,
 airlied@...hat.com, miguel.ojeda.sandonis@...il.com, wedsonaf@...il.com,
 Andreas Hindborg <a.hindborg@...sung.com>
Subject: Re: [PATCH v3 2/2] rust: add dma coherent allocator abstraction.



On 04/11/2024 11:31, Alice Ryhl wrote:
> On Mon, Nov 4, 2024 at 10:07 AM Abdiel Janulgue
> <abdiel.janulgue@...il.com> wrote:
>> +/// Abstraction of dma_alloc_coherent
>> +///
>> +/// # Invariants
>> +///
>> +/// For the lifetime of an instance of CoherentAllocation, the cpu address is a valid pointer
>> +/// to an allocated region of consistent memory and we hold a reference to the device.
>> +pub struct CoherentAllocation<T: Add> {
> 
> Requiring `T: Add` is very unusual. Why?
> 
> I don't even see any additions anywhere.
> 
> Alice

Background here:
https://lore.kernel.org/all/ee45ae5f-133d-4d38-bb4a-d3515790feb4@gmail.com/

Basically this aims to restrict the abstraction to non-ZST types. Are 
there better (clever) ways to do this?

Thanks!

/Abdiel


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ