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: <ZCXZMNj7aOKbC7Ev@boqun-archlinux>
Date:   Thu, 30 Mar 2023 11:47:12 -0700
From:   Boqun Feng <boqun.feng@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Wedson Almeida Filho <wedsonaf@...il.com>,
        rust-for-linux@...r.kernel.org, Miguel Ojeda <ojeda@...nel.org>,
        Alex Gaynor <alex.gaynor@...il.com>,
        Gary Guo <gary@...yguo.net>,
        Björn Roy Baron <bjorn3_gh@...tonmail.com>,
        linux-kernel@...r.kernel.org,
        Wedson Almeida Filho <walmeida@...rosoft.com>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>
Subject: Re: [PATCH 03/13] rust: lock: introduce `Mutex`

On Thu, Mar 30, 2023 at 03:01:08PM +0200, Peter Zijlstra wrote:
> On Thu, Mar 30, 2023 at 01:39:44AM -0300, Wedson Almeida Filho wrote:
> > From: Wedson Almeida Filho <walmeida@...rosoft.com>
> > 
> > This is the `struct mutex` lock backend and allows Rust code to use the
> > kernel mutex idiomatically.
> 
> What, if anything, are the plans to support the various lockdep
> annotations? Idem for the spinlock thing in the other patch I suppose.

FWIW:

*	At the init stage, SpinLock and Mutex in Rust use initializers
	that are aware of the lockdep, so everything (lockdep_map and
	lock_class) is all set up.

*	At acquire or release time, Rust locks just use ffi to call C
	functions that have lockdep annotations in them, so lockdep
	should just work.

In fact, I shared some same worry as you, so I already work on adding
lockdep selftests for Rust lock APIs, will send them shortly, although
they are just draft.

Regards,
Boqun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ