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:	Thu, 19 Nov 2015 12:44:11 -0600
From:	Rob Herring <robh@...nel.org>
To:	Brian Norris <computersforpeace@...il.com>
Cc:	Julia Lawall <julia.lawall@...6.fr>,
	Kishon Vijay Abraham I <kishon@...com>,
	kernel-janitors@...r.kernel.org,
	Gregory Fong <gregory.0xf0@...il.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	Andrew Lunn <andrew@...n.ch>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Jason Cooper <jason@...edaemon.net>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add
 missing of_node_put)

On Wed, Nov 18, 2015 at 1:05 PM, Brian Norris
<computersforpeace@...il.com> wrote:
> (changing subject, add devicetree@...r.kernel.org)
>
> On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote:
>> On Tue, 17 Nov 2015, Brian Norris wrote:
>> > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote:
>> > > Is this something that should be checked for elsewhere?
>> >
>> > I expect the same sort of problem shows up plenty of other places. I
>> > don't think many people use CONFIG_OF_DYNAMIC, so the effects of these
>> > failures probably aren't felt by many.

The "problem" is non-existent because either CONFIG_OF_DYNAMIC is off
or where it is used is limited (memory and cpus on PSeries) and now
overlays. Overlays have the potential to be problematic, but we should
manage ref counting for overlays in a completely different way. What
that looks like, I don't know. I'll leave that to the person that
cares about removing overlays.

>> basically, this says that a structure field is initilized to a device node
>> value, the structure is returned by the containing function, and the
>> containing function contains no of_node_get at all.  Certainly this is
>> quite constrained, but it does produce a number of examples.

I've got no idea if this is right or not.

>> drivers/of/pdt.c, function of_pdt_create_node
>
> Not real sure about this one.

SPARC. Stay away.

>
>> Any idea whether these need of_node_get?  In all cases the device node
>> value comes in as a parameter.
>
> I'm really not an expert on this stuff. I just saw a potential problem
> that I happen to be looking at in other subsystems, and I wanted to know
> what others thought. I think this discussion should include the DT folks
> and the subsystems in question. For one, I'm as interested as anyone in
> getting this todo clarified:
>
> Documentation/devicetree/todo.txt
> - Document node lifecycle for CONFIG_OF_DYNAMIC

Step 2 after figuring out it can't be documented is "define a new way
to handle dynamic DT refcounting aka how to get rid of
of_node_get/put."

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