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-next>] [day] [month] [year] [list]
Message-Id: <20250619151007.61767-1-boqun.feng@gmail.com>
Date: Thu, 19 Jun 2025 08:10:05 -0700
From: Boqun Feng <boqun.feng@...il.com>
To: linux-kernel@...r.kernel.org,
	rust-for-linux@...r.kernel.org
Cc: boqun.feng@...il.com,
	ojeda@...nel.org,
	alex.gaynor@...il.com,
	gary@...yguo.net,
	bjorn3_gh@...tonmail.com,
	benno.lossin@...ton.me,
	a.hindborg@...sung.com,
	aliceryhl@...gle.com,
	tmgross@...ch.edu,
	dakr@...nel.org,
	mingo@...hat.com,
	peterz@...radead.org,
	juri.lelli@...hat.com,
	vincent.guittot@...aro.org,
	dietmar.eggemann@....com,
	rostedt@...dmis.org,
	bsegall@...gle.com,
	mgorman@...e.de,
	vschneid@...hat.com,
	pmladek@...e.com,
	fujita.tomonori@...il.com,
	mingo@...nel.org,
	tamird@...il.com
Subject: [PATCH v4 0/2] Add Rust version of might_sleep()

Hi,

This is a v4 of Tomo's previous version:

v3: https://lore.kernel.org/rust-for-linux/20250616153604.49418-1-boqun.feng@gmail.com/
v2: https://lore.kernel.org/rust-for-linux/20250410225623.152616-1-fujita.tomonori@gmail.com/

Given Ingo's feedback [1], and the ongoing work at Rust side [2] (thanks
Alice!), I think it's better that we just start to use
Location::file_with_nul() if available, otherwise use a "this is not
supported" as file names for might_sleep() debug output, this should be
sufficient since might_sleep() only uses the file names for debug
output, and it will also trigger a stack trace when error, so some
callsite information can be gather from there too.

Having might_sleep() will unblock the support of read_poll_timeout()
[3], and then wait_gfw_boot_completion() [4] in nova. So hopefully this
will allow use moving forward.

I will a PR to tip including this updated version if no one objects.
Thanks.

Changes since v3:

* Changed the name of Kconfig per Miguel's feedback.
* Added comments on the unstable feature `file_with_nul` per Miguel's
  feedback.
* Added an example for `file_from_location()` per Miguel's feedback.
* Changed the return type from `kernel::str::CStr` to `core::ffi::CStr`
  to align with Tamir's effort [5].
* Applied the documentation change for `might_sleep()` from Tomo.

[1]: https://lore.kernel.org/rust-for-linux/aB2aAEELa3253nBh@gmail.com/
[2]: https://github.com/rust-lang/rust/issues/141727
[3]: https://lore.kernel.org/lkml/20250220070611.214262-8-fujita.tomonori@gmail.com/
[4]: https://lore.kernel.org/rust-for-linux/20250612-nova-frts-v5-12-14ba7eaf166b@nvidia.com/
[5]: https://lore.kernel.org/rust-for-linux/20250619-cstr-core-v12-0-80c9c7b45900@gmail.com/

Regards,
Boqun

Boqun Feng (1):
  rust: Introduce file_from_location()

FUJITA Tomonori (1):
  rust: task: Add Rust version of might_sleep()

 init/Kconfig        |  3 +++
 rust/helpers/task.c |  6 ++++++
 rust/kernel/lib.rs  | 43 +++++++++++++++++++++++++++++++++++++++++++
 rust/kernel/task.rs | 24 ++++++++++++++++++++++++
 4 files changed, 76 insertions(+)

-- 
2.39.5 (Apple Git-154)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ