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, 24 Mar 2017 11:00:43 -0700
From:   Brian Norris <briannorris@...omium.org>
To:     Mark Rutland <mark.rutland@....com>
Cc:     Thierry Escande <thierry.escande@...labora.com>,
        Rob Herring <robh@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Olof Johansson <olof@...om.net>,
        Stephen Warren <swarren@...dia.com>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        Julius Werner <jwerner@...omium.org>
Subject: Re: [PATCH 5/5] firmware: google memconsole: Add ARM/ARM64 support

On Fri, Mar 24, 2017 at 12:28:59PM +0000, Mark Rutland wrote:
> On Thu, Mar 23, 2017 at 10:04:29PM +0100, Thierry Escande wrote:
> > +static const struct of_device_id coreboot_of_match[] = {
> > +	{ .compatible = "coreboot" },
> > +	{},
> > +};
> > +
> > +static struct platform_driver coreboot_table_of_driver = {
> > +	.probe = coreboot_table_of_probe,
> > +	.remove = coreboot_table_of_remove,
> > +	.driver = {
> > +		.name = "coreboot_table_of",
> > +		.of_match_table = coreboot_of_match,
> > +	},
> > +};
> > +
> > +static int __init platform_coreboot_table_of_init(void)
> > +{
> > +	struct platform_device *pdev;
> > +	struct device_node *of_node;
> > +
> > +	/* Limit device creation to the presence of /firmware/coreboot node */
> > +	of_node = of_find_node_by_path("/firmware/coreboot");
> > +	if (!of_node)
> > +		return -ENODEV;
> > +
> 
> I don't beleive that you need this module init function. Please use the
> usual DT probing infrastrucutre instead, e.g. add:
> 
> MODULE_DEVICE_TABLE(of, coreboot_of_match);
> module_platform_driver(coreboot_table_of_driver);

That doesn't work. If this node is placed under /firmware, which isn't a
proper "bus", then we have to explicitly look for the sub-device.

Due to this, the MODULE_DEVICE_TABLE() also isn't useful, because the
/firmware/coreboot/ device won't be generated automatically, and so no
matching uevent will occur.

Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ