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: <20251202-define-rust-helper-v1-5-a2e13cbc17a6@google.com>
Date: Tue, 02 Dec 2025 19:37:29 +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>, 
	Yury Norov <yury.norov@...il.com>
Subject: [PATCH 05/46] rust: bitops: add __rust_helper to helpers

This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
---
Cc: Yury Norov <yury.norov@...il.com>
---
 rust/helpers/bitops.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/rust/helpers/bitops.c b/rust/helpers/bitops.c
index 5d0861d29d3f0d705a014ae4601685828405f33b..85be08b50a7c39e0627e4a2bbeaec110bf591ee5 100644
--- a/rust/helpers/bitops.c
+++ b/rust/helpers/bitops.c
@@ -2,22 +2,25 @@
 
 #include <linux/bitops.h>
 
-void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
+__rust_helper void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
 {
 	__set_bit(nr, addr);
 }
 
-void rust_helper___clear_bit(unsigned long nr, unsigned long *addr)
+__rust_helper void rust_helper___clear_bit(unsigned long nr,
+					   unsigned long *addr)
 {
 	__clear_bit(nr, addr);
 }
 
-void rust_helper_set_bit(unsigned long nr, volatile unsigned long *addr)
+__rust_helper void rust_helper_set_bit(unsigned long nr,
+				       volatile unsigned long *addr)
 {
 	set_bit(nr, addr);
 }
 
-void rust_helper_clear_bit(unsigned long nr, volatile unsigned long *addr)
+__rust_helper void rust_helper_clear_bit(unsigned long nr,
+					 volatile unsigned long *addr)
 {
 	clear_bit(nr, addr);
 }

-- 
2.52.0.158.g65b55ccf14-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ