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: <20130917082805.GF20661@gmail.com>
Date:	Tue, 17 Sep 2013 10:28:05 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	John Stultz <john.stultz@...aro.org>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Li Zefan <lizefan@...wei.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 1/2] [RFC v2] seqcount: Add lockdep functionality to
 seqcount/seqlock structures


* John Stultz <john.stultz@...aro.org> wrote:

> On 09/13/2013 05:19 PM, John Stultz wrote:
> > Currently seqlocks and seqcounts don't support lockdep.
> >
> > After running across a seqcount related deadlock in the timekeeping
> > code, I used a less-refined and more focused varient of this patch
> > to narrow down the cause of the issue.
> >
> > This is a first-pass attempt to properly enable lockdep functionality
> > on seqlocks and seqcounts.
> >
> > Since seqcounts are used in the vdso gettimeofday code, I've provided
> > lockdep accessors.
> >
> > I've also handled one cases where there were nested seqlock writers
> > and there may be more edge cases.
> 
> Oof.
> 
> So I just noticed there's a bunch of places in the network code that use
> fairly deeply embedded seqcounter: u64_stats_sync. There's almost never
> an explicit initialization, as they assume they're zeroed when
> allocated, but this causes trouble with the lockdep key initialization.
> 
> I'll have to go through each of these (about 25 cases) and make them
> call seqcount_init(), but since I'm heading to plumbers tomorrow I might
> not get to it until next week.
> 
> Anyway, let me know if you have any other thoughts on the patches.

Explicit initialization is generally a bonus for readability, 
debuggability and ease of development, we enforce that for spinlocks as 
well.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ