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:   Fri, 1 Jul 2022 16:09:05 +0100
From:   Cristian Marussi <cristian.marussi@....com>
To:     Sudeep Holla <sudeep.holla@....com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        james.quinlan@...adcom.com, Jonathan.Cameron@...wei.com,
        f.fainelli@...il.com, etienne.carriere@...aro.org,
        vincent.guittot@...aro.org, daniel.lezcano@...aro.org,
        tarek.el-sherbiny@....com, adrian.slatineanu@....com,
        souvik.chakravarty@....com, wleavitt@...vell.com,
        wbartczak@...vell.com
Subject: Re: [PATCH v3 8/9] firmware: arm_scmi: Add scmi_driver optional
 setup/teardown callbacks

On Fri, Jul 01, 2022 at 03:09:46PM +0100, Sudeep Holla wrote:
> On Mon, Jun 27, 2022 at 01:30:37PM +0100, Cristian Marussi wrote:
> > Add optional .setup and .teardown methods to the scmi_driver descriptor:
> > such callbacks, if provided, will be called by the SCIM core at driver
> > registration time, so that, an SCMI driver, registered as usual with the
> > module_scmi_driver() helper macro, can provide custom callbacks to be
> > run once for all at module load/unload time to perform specific setup
> > or teardown operations before/after .probe and .remove steps.
> >
> 
> What can't the driver call this setup/teardown on its own before/after
> calling scmi_driver_register/unregister ?

> 
> Based on the usage in 9/9, I guess it is mainly to use the
> module_scmi_driver ? If so, I would avoid using that or have another
> macro to manage this setup/teardown(once there are multiple users for that).
> IMO, it doesn't make sense to add callbacks to do things that are outside
> the scope of scmi drivers. No ?
>

This is exactly what I was doing in fact :D at first ... defining a normal
init/exit from where I called what I needed at first and then ivoke the
scmi_driver_register()...so bypassing/not using the module_scmi-driver macro
indeed...then I realized I needed something similar also for the SCMI Test
driver, so I tried to unify; in both cases indeed the required ops to be
done before the scmi_driver_register are NOT scmi related things.

So I can drop this if you prefer and use bare module_init/exit that
calls scmi_driver_register() after having setup what needed for the
specific driver initialization (before probe)...I was not really
convinced it was worth this level of unification.

Thanks,
Cristian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ