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-next>] [day] [month] [year] [list]
Message-ID: <20250903131313.4365-1-work@onurozkan.dev>
Date: Wed,  3 Sep 2025 16:13:06 +0300
From: Onur Özkan <work@...rozkan.dev>
To: rust-for-linux@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
	lossin@...nel.org,
	lyude@...hat.com,
	ojeda@...nel.org,
	alex.gaynor@...il.com,
	boqun.feng@...il.com,
	gary@...yguo.net,
	a.hindborg@...nel.org,
	aliceryhl@...gle.com,
	tmgross@...ch.edu,
	dakr@...nel.org,
	peterz@...radead.org,
	mingo@...hat.com,
	will@...nel.org,
	longman@...hat.com,
	felipe_life@...e.com,
	daniel@...lak.dev,
	bjorn3_gh@...tonmail.com,
	daniel.almeida@...labora.com,
	Onur Özkan <work@...rozkan.dev>
Subject: [PATCH v6 0/7] rust: add `ww_mutex` support

Changes made in v6:
  - Added `unpinned_new` constructor for `WwClass` and updated global macros.
  - Changed all tests (and docs) to use Arc/KBox instead of `stack_pin_init`
    for `WwMutex` and `WwAcquireCtx`.
  - Added `LockKind` and `lock_common` helper to unify locking logic.
  - Added context-based and context-free locking functions for `WwMutex`.
  - Added `ww_mutex/exec` module, a high-level API with auto `EDEADLK`
    handling mechanism.

Onur Özkan (7):
  rust: add C wrappers for ww_mutex inline functions
  rust: implement `WwClass` for ww_mutex support
  rust: implement `WwMutex`, `WwAcquireCtx` and `WwMutexGuard`
  add KUnit coverage on Rust ww_mutex implementation
  rust: ww_mutex: add context-free locking functions
  rust: ww_mutex/exec: add high-level API
  add KUnit coverage on ww_mutex/exec implementation

 rust/helpers/helpers.c                 |   1 +
 rust/helpers/ww_mutex.c                |  39 ++
 rust/kernel/error.rs                   |   1 +
 rust/kernel/sync/lock.rs               |   1 +
 rust/kernel/sync/lock/ww_mutex.rs      | 634 +++++++++++++++++++++++++
 rust/kernel/sync/lock/ww_mutex/exec.rs | 324 +++++++++++++
 6 files changed, 1000 insertions(+)
 create mode 100644 rust/helpers/ww_mutex.c
 create mode 100644 rust/kernel/sync/lock/ww_mutex.rs
 create mode 100644 rust/kernel/sync/lock/ww_mutex/exec.rs

--
2.50.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ