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: <20120330141058.GA19986@infradead.org>
Date:	Fri, 30 Mar 2012 10:10:59 -0400
From:	Christoph Hellwig <hch@...radead.org>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Dave Chinner <david@...morbit.com>,
	Christoph Hellwig <hch@...radead.org>,
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	Andi Kleen <ak@...ux.intel.com>, xfs-masters@....sgi.com
Subject: Re: [PATCH 05/13] XFS: Fix lock ASSERT on UP

On Fri, Mar 30, 2012 at 04:04:57PM +0200, Andi Kleen wrote:
> It's really interesting how much you guys argue for your buggy construct
> which you clearly never tested on a UP build...


spin_is_locked always return 0 on UP builds, and given that XFS only
has !spin_is_locked asserts things will work just fine on UP builds
(not the !CONFIG_SMP and !CONFIG_XFS_DEBUG would be a common
combination).

In fact if you check the archives the one use of assert_spin_locked was
added exactly because some still tripped over the spin_is_locked
behaviour on UP relatively soon.

> Not sure if that is a hot path, but on highly contended locks every cache line
> fetch is quite expensive on larger systems.

It's not an overly contended lock.

> also I doubt the thing really catches bugs, and if it did you would be 
> probably better off with a sparse notation or so.

This one probably doesn't - the first occurance is just after a blocking
allocation, and the second one just before taking the lock.  So they
probably could as well just be removed.

The point that still stands is that lockdep_assert_held isn't actually
a useful replacement.
--
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