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:	Tue, 9 Apr 2013 19:31:15 +0200
From:	Wim Van Sebroeck <wim@...ana.be>
To:	Guenter Roeck <linux@...ck-us.net>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
	Pádraig Brady <P@...igBrady.com>
Subject: Re: mfd: Core driver for Winbond chips

Hi Guenter,

> > > I was waiting for feedback from Wim, who submitted a similar driver, about his
> > > thoughts. Key question is how to reserve access to the shared resource - either
> > > through an exported function in the mfd driver requesting a mutex, or through
> > > request_muxed_region(). I am going back and forth myself on which one is better.
> > > 
> > > Maybe it does not really matter, but using a function has the slight advantage
> > > that it auto-loads and locks the mfd module while one of its client modules
> > > is loaded. If we use request_muxed_region, that is not the case and the client
> > > module must use another means to request and lock the mfd module.
> > > 
> > > Maybe you have an opinion ?
> > 
> > This is indeed the main issue that has to be solved. Both options will work.
> > I like the auto-load and lock, but I need to look at the request_muxed_region
> > code again first before I can see what the possible drawbacks are :-).
> > 
> One drawback of using request_muxed_region is that it needs a return value
> from superio_enter. Also, it needs some code in the client driver init function
> to ensure that the mfd driver gets loaded, and possibly a call to __module_get()
> in the client driver probe function to keep the mfd driver loaded.
> 
> winbond_superio_enter() would not need a return value and could use
> devm_request_region. We could also consider allocating the hwmon memory space in
> the mfd driver and pass it as resource to the client drivers, which would remove
> a few more lines of code from those.
> 
> Overall I am slightly in favor of using an exported function.

I looked at commit 8b6d043b7ee2d1b819dc833d677ea2aead71a0c0 (which implements
request_muxed_region). You indeed need some extra code for loading the lowl-level
mfd driver. So I am also in favour of the exported function.

Kind regards,
Wim.

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