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: <20240726202610.GU26599@noisy.programming.kicks-ass.net>
Date: Fri, 26 Jul 2024 22:26:10 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Lyude Paul <lyude@...hat.com>
Cc: rust-for-linux@...r.kernel.org, Danilo Krummrich <dakr@...hat.com>,
	airlied@...hat.com, Ingo Molnar <mingo@...hat.com>,
	Will Deacon <will@...nel.org>, Waiman Long <longman@...hat.com>,
	Miguel Ojeda <ojeda@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>,
	Wedson Almeida Filho <wedsonaf@...il.com>,
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <benno.lossin@...ton.me>,
	Andreas Hindborg <a.hindborg@...sung.com>,
	Alice Ryhl <aliceryhl@...gle.com>,
	Martin Rodriguez Reboredo <yakoyoku@...il.com>,
	Trevor Gross <tmgross@...ch.edu>,
	Valentin Obst <kernel@...entinobst.de>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] rust: sync: Add IrqSpinLock

On Fri, Jul 26, 2024 at 04:21:09PM -0400, Lyude Paul wrote:
> On Fri, 2024-07-26 at 09:48 +0200, Peter Zijlstra wrote:
> > On Thu, Jul 25, 2024 at 06:27:52PM -0400, Lyude Paul wrote:
> > > A variant of SpinLock that is expected to be used in noirq contexts, and
> > > thus requires that the user provide an kernel::irq::IrqDisabled to prove
> > > they are in such a context upon lock acquisition. This is the rust
> > > equivalent of spin_lock_irqsave()/spin_lock_irqrestore().
> > 
> > So aside from the horrendous camel-case thing, why are you naming this
> 
> Also - sorry I didn't notice this comment before, but I wanted to respond
> since it seems like you may not be aware: camel case is mandated as part of
> the rust standard:
> 
> https://rust-lang.github.io/api-guidelines/naming.html
> 
> Of course the kernel has its own coding standards that we need to conform to
> within reason! But if we tried to ignore camel casing for rust code we'd end
> up with rust code where everything would be mixed between types from core
> being camel cased and types from kernel crates not being camel cased.

Yeah, I'm aware, it is one of the very many reasons I find it very very
hard to like Rust :/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ