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:	Wed, 16 Apr 2014 16:33:44 -0500
From:	Rob Herring <robherring2@...il.com>
To:	delicious quinoa <delicious.quinoa@...il.com>
Cc:	Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	Stephen Warren <swarren@...dotorg.org>,
	Matt Porter <matt.porter@...aro.org>,
	Koen Kooi <koen@...inion.thruhere.net>,
	Alison Chaiken <Alison_Chaiken@...tor.com>,
	Dinh Nguyen <dinh.linux@...il.com>,
	Jan Lubbe <jluebbe@...net.de>,
	Alexander Sverdlin <alexander.sverdlin@....com>,
	Michael Stickel <ms@...able.de>,
	Guenter Roeck <linux@...ck-us.net>,
	Dirk Behme <dirk.behme@...il.com>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Michael Bohan <mbohan@...eaurora.org>,
	Ionut Nicu <ioan.nicu.ext@....com>,
	Michal Simek <monstr@...str.eu>,
	Matt Ranostay <mranostay@...il.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Pete Popov <pete.popov@...sulko.com>,
	Dan Malek <dan.malek@...sulko.com>,
	Georgi Vlaev <georgi.vlaev@...sulko.com>
Subject: Re: [PATCH v3 0/7] Introducing (yet again) Device Tree Overlays

On Wed, Apr 16, 2014 at 4:23 PM, delicious quinoa
<delicious.quinoa@...il.com> wrote:
> On Thu, Apr 3, 2014 at 3:40 PM, delicious quinoa
> <delicious.quinoa@...il.com> wrote:
>> On Fri, Mar 28, 2014 at 1:27 PM, delicious quinoa
>> <delicious.quinoa@...il.com> wrote:
>>> On Tue, Mar 18, 2014 at 4:55 PM, Pantelis Antoniou
>>> <pantelis.antoniou@...sulko.com> wrote:
>>>> The following patchset introduces Device Tree overlays, a method
>>>> of dynamically altering the kernel's live Device Tree, along with
>>>> a generic interface to use it in a board agnostic manner.

[snip]

>>> I can get a NULL pointer when I apply and remove an overlay and the
>>> conditions are right.  The overlay applies correctly.  The crash is
>>> when I do the rmdir.  My overlay is:
>>>
>>> /dts-v1/;
>>> /plugin/;
>>> / {
>>>     fragment@0 {
>>>         target-path="/soc";
>>>         __overlay__ {
>>>             #address-cells = <1>;
>>>                     #size-cells = <1>;
>>>             agpio0: agpio0 {
>>>                 compatible = "altr,pio-1.0";
>>>                 reg = <0xff210040 0x10>;
>>
>> Added some printks and got a bit further with debug.  If I leave this
>> as-is, the platform device has 2 resources. We get the NULL pointer in
>> __release_resource() when releasing the first one (reg). If I remove
>> this one line ('reg =') the crash goes away.  So in this case, we are
>> ok when releasing an irq resource but get a NULL pointer when removing
>> a reg resource.  Don't know why at this point.
>
> The crash is confirmed on v4 patches as well.  The immediate cause of the crash:
>
> static int __release_resource(struct resource *old)
> {
>         struct resource *tmp, **p;
>
>         p = &old->parent->child;
>         for (;;) {
>                 tmp = *p; <===kablooey
> ...
>
> when __release_resource() is called for the reg resource, it does 'p =
> &olde->parent->child' and then crashes when it does 'tmp = *p'.
>
> Root cause: It appears that there isn't any code in drivers/of/ that
> eventually calls __request_resource() or __insert_resource() so the
> resource's parents/sibling pointers are never initialized.  Maybe I'm
> missing some patches or something.

It's probably related to this issue:

https://groups.google.com/forum/#!topic/fa.linux.kernel/CTx1ReiOjnQ
http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg63678.html

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