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: <1225293796.9315.4.camel@lappy.programming.kicks-ass.net>
Date:	Wed, 29 Oct 2008 16:23:16 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Linux Kernel list <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 1/2] lockdep: implement full check without irq checking

On Thu, 2008-10-23 at 21:44 +0200, Johannes Berg wrote: 
> This patch implements a new check type "3" which means "full validation
> but without irq tracing" in order to allow some certain fake locks that
> are only added for deadlock detection to not cause inconsistent state
> warnings which would be inappropriate for them.

This thing worries me, can you help my exhausted brain a long a little..

So I take it the idea is to couple the lock chains of the site calling
del_timer_sync and the actual timer.

We do this by holding a fake lock while executing the timer, so that its
lock chain starts with that lock.

We then acquire the fake lock on del_timer_sync so as to establish a
relation.

Now you get warnings about using a lock in hardirq context that was
previously used !irq-safe, right?

So why not simply write something like:


del_timer_sync():

  local_irq_save(flags);
  lock_aquire(my fake timer lock);
  lock_release(...);
  local_irq_restore(flags);

and make that conditional CONFIG_PROVE_LOCKING and or wrap it up
somewhere..



--
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