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] [day] [month] [year] [list]
Message-ID: <2060588.1759270166@warthog.procyon.org.uk>
Date: Tue, 30 Sep 2025 23:09:26 +0100
From: David Howells <dhowells@...hat.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: dhowells@...hat.com, Boqun Feng <boqun.feng@...il.com>,
    Ingo Molnar <mingo@...hat.com>, Li RongQing <lirongqing@...du.com>,
    Linus Torvalds <torvalds@...ux-foundation.org>,
    Peter Zijlstra <peterz@...radead.org>,
    Waiman Long <longman@...hat.com>, Will Deacon <will@...nel.org>,
    linux-kernel@...r.kernel.org
Subject: Re: [RFC 2/1] seqlock: make the read_seqbegin_or_lock() API more simple and less error-prone ?

Oleg Nesterov <oleg@...hat.com> wrote:

> 
> Can we improve this API?

It would also be nice to fix the static lock-balance detection stuff that you
get when you enable advanced checking during a kernel build.  It doesn't
seem to understand seqlocks.

> 	-	nextseq = 0;
> 	+	seq = 0;

Perhaps an init function or macro that hides this bit?

	void init_read_seqlock(int *seq)
	{
		*seq = 0;
	}

	init_read_seqlock(&seq);

or:

	#define INIT_READ_SEQBEGIN 0

	seq = INIT_READ_SEQBEGIN;

Though if we can fold the whole loop inside a macro, that might make it easier
to use.

d_walk() in fs/dcache.c might give you issues, though.

David


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ