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: <20251202-define-rust-helper-v1-36-a2e13cbc17a6@google.com>
Date: Tue, 02 Dec 2025 19:38:00 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: rust-for-linux@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Alice Ryhl <aliceryhl@...gle.com>, 
	Danilo Krummrich <dakr@...nel.org>, Abdiel Janulgue <abdiel.janulgue@...il.com>, 
	Daniel Almeida <daniel.almeida@...labora.com>, Robin Murphy <robin.murphy@....com>, 
	Andreas Hindborg <a.hindborg@...nel.org>
Subject: [PATCH 36/46] rust: scatterlist: add __rust_helper to helpers

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
---
Cc: Danilo Krummrich <dakr@...nel.org>
Cc: Abdiel Janulgue <abdiel.janulgue@...il.com>
Cc: Daniel Almeida <daniel.almeida@...labora.com>
Cc: Robin Murphy <robin.murphy@....com>
Cc: Andreas Hindborg <a.hindborg@...nel.org>
---
 rust/helpers/scatterlist.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/rust/helpers/scatterlist.c b/rust/helpers/scatterlist.c
index 80c956ee09ab4119a0951709c6f339a2a2c23894..f3c41ea5e20162d670d37557165de71325356351 100644
--- a/rust/helpers/scatterlist.c
+++ b/rust/helpers/scatterlist.c
@@ -2,23 +2,25 @@
 
 #include <linux/dma-direction.h>
 
-dma_addr_t rust_helper_sg_dma_address(struct scatterlist *sg)
+__rust_helper dma_addr_t rust_helper_sg_dma_address(struct scatterlist *sg)
 {
 	return sg_dma_address(sg);
 }
 
-unsigned int rust_helper_sg_dma_len(struct scatterlist *sg)
+__rust_helper unsigned int rust_helper_sg_dma_len(struct scatterlist *sg)
 {
 	return sg_dma_len(sg);
 }
 
-struct scatterlist *rust_helper_sg_next(struct scatterlist *sg)
+__rust_helper struct scatterlist *rust_helper_sg_next(struct scatterlist *sg)
 {
 	return sg_next(sg);
 }
 
-void rust_helper_dma_unmap_sgtable(struct device *dev, struct sg_table *sgt,
-				   enum dma_data_direction dir, unsigned long attrs)
+__rust_helper void rust_helper_dma_unmap_sgtable(struct device *dev,
+						 struct sg_table *sgt,
+						 enum dma_data_direction dir,
+						 unsigned long attrs)
 {
 	return dma_unmap_sgtable(dev, sgt, dir, attrs);
 }

-- 
2.52.0.158.g65b55ccf14-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ