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]
Date:	Wed, 29 Jul 2009 00:03:00 +0900
From:	Magnus Damm <magnus.damm@...il.com>
To:	Mike Frysinger <vapier.adi@...il.com>
Cc:	Greg KH <gregkh@...e.de>, damm@...l.co.jp,
	linux-kernel@...r.kernel.org
Subject: Re: early platform drivers vs resource lookup by name

Hi Mike,

On Mon, Jul 27, 2009 at 3:20 PM, Mike Frysinger<vapier.adi@...il.com> wrote:
> ive been toying with the new early platform driver framework and
> noticed a not-so-friendly feature wrt resource handling.  the
> platform_device_add() function will take care of making sure that
> every resource's name field is not NULL:
> int platform_device_add(struct platform_device *pdev)
> {
> ...
>        if (r->name == NULL)
>            r->name = dev_name(&pdev->dev);
> ...
>
> unfortunately, the early_platform_add_devices() function does not have
> similar code.  this leads to NULL pointer crashes if you attempt to
> use any of the "byname" resource functions (e.g.
> platform_get_resource_byname) and the resources in question arent
> fully named.
>
> is the simple fix here to add a resource loop to
> early_platform_add_devices() that makes sure all the name fields are
> non-NULL ?

I'm not aware of any available fix for this. I'm all for improving the
code as long as we don't add too many dependencies that prevents the
code from working very early on during the boot. Making it depend on
kmalloc() is for instance a bad idea. The early platform SuperH
drivers that I've hacked up do not use "byname" so this has not been
an issue for me so far

Please CC me on this address for future patches. =)

Cheers,

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