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]
Date:	Mon, 26 May 2008 23:59:34 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"Dave Young" <hidave.darkstar@...il.com>
Cc:	"Greg KH" <greg@...ah.com>, matthew@....cx, kay.sievers@...y.org,
	linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH 1/3][-mm] add class_reclassify macro

On Tue, 27 May 2008 14:42:51 +0800 "Dave Young" <hidave.darkstar@...il.com> wrote:

> On Wed, May 21, 2008 at 1:21 AM, Greg KH <greg@...ah.com> wrote:
> > On Tue, May 20, 2008 at 03:02:32AM -0700, Andrew Morton wrote:
> >> On Tue, 20 May 2008 17:55:54 +0800 Dave Young <hidave.darkstar@...il.com> wrote:
> >>
> >> > Converting class semaphore to mutex cause lockdep warnings due to
> >> > class_interface_register/unregister will possible call device_add/del
> >>
> >> Shouldn't we just fix that?
> >
> > Um, no, that's a "feature" that some types of hardware and interfaces
> > require.
> >
> > This is one reason I really don't like this type of conversion, it's
> > causing lots of problems for no known gain.
> >
> > So I would just recommend dropping this patch set, the current "convert
> > class semaphore to a mutex" patch in the -mm tree is already causing
> > lockdep warnings, and trying to do something like this isn't really
> > going to solve the root problem here.
> 
> At last, I decide to give up.
> 
> Andrew, I could not do more for this issue now, you can drop the
> conversion patch if there's no suitable fix from others.
> 

If that semaphore is being used as a mutex then we should convert it to
a mutex (dammit).

Leaving it implemented as a semphore is not the proper way of
suppressing the lockdep warnings.  It would be better to convert it to
a mutex then add suitable (and suitably commented) open-coded lockdep
annotations to suppress the runtime warnings.

And afaik that's pretty much what your patch did, except you added that
unpopular macro.  If instead of the macro we were to convert that patch
to add open-coded lockdep annotation, what problems remain?

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