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]
Message-ID: <154394767367.88331.17679291261207728780@swboyd.mtv.corp.google.com>
Date:   Tue, 04 Dec 2018 10:21:13 -0800
From:   Stephen Boyd <sboyd@...nel.org>
To:     Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc:     mazziesaccount@...il.com, Jonathan Corbet <corbet@....net>,
        Michael Turquette <mturquette@...libre.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Russell King <linux@...linux.org.uk>,
        Andy Gross <andy.gross@...aro.org>,
        David Brown <david.brown@...aro.org>,
        Andrey Smirnov <andrew.smirnov@...il.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Rob Herring <robh@...nel.org>,
        Sebastian Reichel <sre@...nel.org>,
        Huang Shijie <sjhuang@...vatar.ai>,
        Daniel Kurtz <djkurtz@...omium.org>,
        Akshu Agrawal <akshu.agrawal@....com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org
Subject: Re: [PATCH v4 1/8] clk: clkdev/of_clk - add managed lookup and provider
 registrations

Quoting Matti Vaittinen (2018-12-03 23:13:15)
> On Mon, Dec 03, 2018 at 03:35:10PM -0800, Stephen Boyd wrote:
> 
> > If the DT doesn't have the #clock-cells property in the node being
> > registered then calling clk_get() will fail for any consumer devices
> > that point to the node with a phandle and clock specifier. I don't
> > expect us to get very far into development if that's the case.
> 
> Makes sense. So only potential thing to break is if someone out there
> has broken DT/driver - where they currently see this failure. Eg. they
> use node w/o #clock-cells as provider and where they try and fail
> controlling this clock - but ignore the error (and system just "works"
> with HW defaults). After this change they may actually succeed in
> controlling - but do control wrong clock.
> 
> Not likely scenario (sure happens somewhere) - and it involves already
> broken design. So I agree with you. Besides, you are the maintainer for
> clk framework and thus get the most of the rain if **** hits the fan =D

Yes, exactly.

> 
> > Of course, we don't fail in of_clk_add_provider() if there isn't a
> > #clock-cells property in the node, we just happily add the node to the
> > provider list and carry on. I doubt anyone is failing to specify the DT
> > property, but maybe they are, in which case we could keep not failing
> > and just add the node of whatever we're called with originally if
> > neither the parent or the passed node have the #clock-cells property. I
> > wouldn't try to go any higher than one node above the current node and
> > look for a #clock-cells though.
> 
> I think we should use parent device's node, not the paren node in DT,
> right? But I agree, we should only look "one level up in the chain".

Are these two things different? I'm suggesting looking at
device_node::parent and trying to find a #clock-cells property.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ