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: <20170829173056.GT32112@worktop.programming.kicks-ass.net>
Date:   Tue, 29 Aug 2017 19:30:56 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Oleg Nesterov <oleg@...hat.com>
Cc:     Byungchul Park <byungchul.park@....com>, mingo@...nel.org,
        linux-kernel@...r.kernel.org, kernel-team@....com,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Dave Chinner <david@...morbit.com>, Tejun Heo <tj@...nel.org>,
        johannes@...solutions.net
Subject: Re: lockdep && recursive-read

On Tue, Aug 29, 2017 at 07:07:57PM +0200, Oleg Nesterov wrote:
> On 08/29, Oleg Nesterov wrote:
> >
> > Plus process_one_work() does lock_map_acquire_read(), I don't really
> > understand this too.
> 
> and in fact I don't understand lock_map_acquire_read() itself. I mean, read == 2
> and this code in check_prevs_add()
> 
> 		/*
> 		 * Only non-recursive-read entries get new dependencies
> 		 * added:
> 		 */
> 		if (hlock->read != 2 && hlock->check) {
> 			if (!check_prev_add(curr, hlock, next,
> 						distance, &stack_saved))
> 
> 
> Well, I forgot everything I ever knew about lockdep, unlikely I understand what
> the code above actually does. But I verified that this code
> 
> 		static DEFINE_SPINLOCK(exlk);
> 		static DEFINE_RWLOCK(rwlk);
> 
> 		spin_lock(&exlk);
> 		write_lock(&rwlk);
> 		write_unlock(&rwlk);
> 		spin_unlock(&exlk);
> 
> 		read_lock(&rwlk);
> 		spin_lock(&exlk);
> 		spin_unlock(&exlk);
> 		read_unlock(&rwlk);
> 
> runs without any warning from lockdep. Doesn't look right or I am totally
> confused...

Long standing lockdep issue that you used to know about ;-)

Boqun recently started working on it:

https://lkml.kernel.org/r/20170828151608.19636-1-boqun.feng@gmail.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ