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: <288ba4d2-b7db-46cf-b979-341a58613fc0@redhat.com>
Date: Fri, 31 Oct 2025 10:38:32 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Alice Ryhl <aliceryhl@...gle.com>, Lyude Paul <lyude@...hat.com>
Cc: linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
 Benno Lossin <lossin@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
 Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
 Boqun Feng <boqun.feng@...il.com>, Waiman Long <longman@...hat.com>,
 Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
 Gary Guo <gary@...yguo.net>, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, Andreas Hindborg <a.hindborg@...nel.org>,
 Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>
Subject: Re: [PATCH v4] rust: lock: Export Guard::do_unlocked()

On 10/31/25 10:31, Alice Ryhl wrote:
> I do agree that this behavior has a lot of potential to surprise
> users, but I don't think it's incorrect per se. It was done
> intentionally for Condvar, and it's not unsound. Just surprising.

Yes, I agree that it is not unsound.`

For conditional variables, wait() is clearly going to release the mutex 
to wait for someone else so the surprise factor is much less.  Having it 
return a new guard would be closer to std::sync::Condvar::wait, but it'd 
add churn and I'm not sure how much you all care about consistency with 
std.  std has the extra constraint of poisoned locks so it doesn't 
really have a choice.

Paolo

> Of course, that doesn't mean we can't change it. Condvar could be
> updated to use ownership in that way, and doing say may be a good
> idea.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ