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] [day] [month] [year] [list]
Message-ID: <20121015005813.GB24935@opensource.wolfsonmicro.com>
Date:	Mon, 15 Oct 2012 09:58:15 +0900
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Davide Ciminaghi <ciminaghi@...dd.com>
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regmap : make lock/unlock functions customizable.

On Fri, Oct 12, 2012 at 10:24:12AM +0200, Davide Ciminaghi wrote:
> On Fri, Oct 12, 2012 at 03:26:09PM +0900, Mark Brown wrote:
> > On Mon, Oct 01, 2012 at 11:31:04PM +0200, ciminaghi@...dd.com wrote:

> > > +	struct regmap *map = (struct regmap *)__map;
> > >  	mutex_lock(&map->mutex);

> > ...you should never need to cast away from or to void, if you do there's
> > a bug somewhere.

> regmap lock/unlock original functions just received a struct regmap * .
> I needed a void * for the customized version of such functions, so just
> replaced struct regmap * with void *

You're not getting the point.  The issue is the casts, not the prototype
of the function.  If those casts when referencing the pointer do
anything at all it's masking a bug, you should never need to cast a
pointer to or from void.
--
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