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: <4BA5EBB4.6080805@dcl.info.waseda.ac.jp>
Date:	Sun, 21 Mar 2010 18:49:40 +0900
From:	Hitoshi Mitake <mitake@....info.waseda.ac.jp>
To:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>
CC:	Jason Baron <jbaron@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, h.mitake@...il.com,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Jens Axboe <jens.axboe@...cle.com>
Subject: Re: [PATCH RFC 00/11] lock monitor: Separate features related to
 lock

On 03/20/10 17:23, Hitoshi Mitake wrote:
 > On 03/20/10 14:56, Hitoshi Mitake wrote:
 >  > On 03/19/10 06:16, Frederic Weisbecker wrote:
 >  > >> And I have a question related to this dynamic patching approach for
 >  > lockdep.
 >  > >> If dynamic proving turning on/off is provided,
 >  > >> lockdep will be confused by inconsistency of lock acquiring log.
 >  > >>
 >  > >> Will the sequence,
 >  > >>
 >  > >> lock_acquire(l) -> turning off -> lock_release(l) -> turning on ->
 >  > >> lock_acquire(l)
 >  > >>
 >  > >> detected as double acquiring?
 >  > >>
 >  > >> Should turning on/off lockdep be done in the time
 >  > >> when every processes have no lock?
 >  > >
 >  > >
 >  > > There is almost always a process with a lock somewhere ;-)
 >  >
 >  > Yeah :)
 >  >
 >  > >
 >  > > This is not a big deal, it's very similar to unfinished scenarios
 >  > > due to the end of the tracing that can happen anytime and you miss
 >  > > a lock_release or whatever. We can also begin the tracing anytime,
 >  > > and you may receive orphan lock_release in the very beginning
 >  > > because you missed the lock_acquire that happened before the 
tracing.
 >  > >
 >  > > Any locking scenario that doesn't fit into the state machine
 >  > > or is incomplete must be considered as broken and then ignored.
 >  > >
 >  > >
 >  >
 >  > I see, thanks.
 >  > I have to fix state machine of perf lock.
 >  > Now it doesn't consider read, try and orphan events,
 >  > it is very incompletely..
 >  >
 >
 > Ah, sorry, I've mentioned that these cases might be
 > a problem for validation part of lockdep, not for events.
 >
 > If the lock and turning on/off sequence like this happened,
 > lock_acquire(l) -> turning off -> lock_release(l) -> turning on ->
 > lock_acquire(l)
 > this will confuse validator of lockdep.
 > At least, task_struct.lockdep_depth will be corrupted.
 >
 > And I have a trivial question to Ingo.
 > In lockdep, held_locks of task_struct are accessed this arithmetical way
 > prev = curr->held_locks + i;
 > Of course this is valid way, but I feel it is more simple and natural way
 > prev = curr->held_locks[i];
 >

Ah, sorry,
     prev = curr->held_locks[i];
is wrong. It's
     prev = &curr->held_locks[i];
--
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