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: <20250410.215926.1864188340028703395.fujita.tomonori@gmail.com>
Date: Thu, 10 Apr 2025 21:59:26 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: dakr@...nel.org
Cc: fujita.tomonori@...il.com, rust-for-linux@...r.kernel.org,
 abdiel.janulgue@...il.com, daniel.almeida@...labora.com,
 robin.murphy@....com, a.hindborg@...nel.org, ojeda@...nel.org,
 alex.gaynor@...il.com, boqun.feng@...il.com, gary@...yguo.net,
 bjorn3_gh@...tonmail.com, benno.lossin@...ton.me, aliceryhl@...gle.com,
 tmgross@...ch.edu, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] rust: conditionally compile dma abstraction based
 on CONFIG_HAS_DMA

On Wed, 9 Apr 2025 11:07:02 +0200
Danilo Krummrich <dakr@...nel.org> wrote:

> On Wed, Apr 09, 2025 at 02:55:01PM +0900, FUJITA Tomonori wrote:
>> Make dma abstraction conditional on CONFIG_HAS_DMA.
> 
> I'm not convinced that this is the correct fix. This would require drivers to
> depend on CONFIG_HAS_DMA if they want to use the DMA API. The C side does not do
> this either.
>
> Instead, for functions like dma_alloc_attrs(), there is an empty implementation
> if CONFIG_HAS_DMA is not set [1].

Good point.

> However, this definition is not picked up by bindgen. Hence, I think the actual
> fix would be to introduce the corresponding Rust helpers.
> 
> [1] https://elixir.bootlin.com/linux/v6.13.7/source/include/linux/dma-mapping.h#L189

I'll go with that approach for the next version.

Thanks,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ