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: <20110204021641.4f7fc66a@queued.net>
Date:	Fri, 4 Feb 2011 02:16:41 -0800
From:	Andres Salomon <dilinger@...ued.net>
To:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	Russell King <linux@....linux.org.uk>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	linux-kernel@...r.kernel.org, Richard Purdie <rpurdie@...ys.net>,
	Sascha Hauer <kernel@...gutronix.de>,
	linux-arm-kernel@...ts.infradead.org,
	Liam Girdwood <lrg@...mlogic.co.uk>
Subject: Re: [PATCH 15/19] mc13xxx: mfd_cell is now implicitly available to
 drivers

On Fri, 4 Feb 2011 10:34:58 +0100
Uwe Kleine-König <u.kleine-koenig@...gutronix.de> wrote:

> Hello Andres,
> 
> On Wed, Feb 02, 2011 at 08:20:15PM -0800, Andres Salomon wrote:
> > 
> > No need to explicitly set the cell's platform_data/data_size.
> > 
> > In this case, move the various platform_data pointers
> > to driver_data.  All of the clients which make use of it
> > are also changed.
> > 
> > Mfd-core makes a copy of platform_data, but driver_data keeps a
> > pointer to the original data.  Because each cell's platform_data
> > previously pointed to a local (stack) variable, the various ARM
> > mach types that set the pdata are updated to keep the memory around.
> I didn't get this even after reading it 5 times.  You wrote in the
> subject that drivers now have access to mfd_cell.  I don't see where
> e.g. drivers/leds/leds-mc13783.c uses that?!  Does this depend on some
> mfd-changes I don't see and this is just a first step?
> 
> After reading the changes I think I understood:
> 
>  - You made things that were passed as platform_data before available
>    via driver_data.

Right.  And as someone pointed out, this doesn't really work as well as
I'd hoped, so I'll have to refine my approach.  Ideally, something
simpler..


>  - Because platform_data is copied and driver_data is not at register
>    time, the data being platform_data cannot be __initdata or stack
>    local anymore, so this needs fixing.
> 
> In sum this results in .data becoming bigger (which is bad).
> 
> And I think this patch has a conceptual problem, too.  In my opionion
> platform_data is the point to hand over platform specific data to a
> driver.  driver_data is something that is private to the driver and
> has to be considered opaque for the platform.  The driver was sort of
> OK before ...


I'll be sending updated patches once I've reworked things.
--
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