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: <70412586-7b40-4230-bc21-504a865e3376@gmail.com>
Date: Fri, 23 Jan 2026 17:39:48 +0100
From: Dirk Behme <dirk.behme@...il.com>
To: Beata Michalska <beata.michalska@....com>, dakr@...nel.org,
 ojeda@...nel.org, rust-for-linux@...r.kernel.org
Cc: abdiel.janulgue@...il.com, daniel.almeida@...labora.com,
 aliceryhl@...gle.com, robin.murphy@....com, a.hindborg@...nel.org,
 boqun.feng@...il.com, gary@...yguo.net, bjorn3_gh@...tonmail.com,
 lossin@...nel.org, tmgross@...ch.edu, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] rust: dma: allow drivers to tune max segment size

On 23.01.26 14:13, Beata Michalska wrote:
> Make dma_set_max_seg_size() available to Rust so drivers can perform
> standard DMA setup steps.
> 
> Signed-off-by: Beata Michalska <beata.michalska@....com>
> ---
> 
> v2:
> - Aligned safety requirements
> 
>  rust/helpers/dma.c |  5 +++++
>  rust/kernel/dma.rs | 17 +++++++++++++++++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/rust/helpers/dma.c b/rust/helpers/dma.c
> index 2afa32c21c94..220b9308830f 100644
> --- a/rust/helpers/dma.c
> +++ b/rust/helpers/dma.c
> @@ -40,3 +40,8 @@ size_t rust_helper_dma_max_mapping_size(struct device *dev)
>  {
>  	return dma_max_mapping_size(dev);
>  }
> +
> +void rust_helper_dma_set_max_seg_size(struct device *dev, unsigned int size)
> +{
> +	dma_set_max_seg_size(dev, size);
> +}

I was about to ask "please add __rust_helper" [1]. But looking into
driver-core-next it looks like some of the function in dma.c have
__rust_helper (from [1]) and some don't (from [2]). Is this by
intention or was this an omission in [2]?

Best regards

Dirk

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git/commit/rust/helpers/dma.c?h=driver-core-next&id=8a03afe94763108537e33b48378bbc7472b4cc9d

[2]
https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git/commit/rust/helpers/dma.c?h=driver-core-next&id=d8932355f8c5673106eca49abd142f8fe0c1fe8b



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ