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: <5552F81C.2010301@ti.com>
Date:	Wed, 13 May 2015 10:07:08 +0300
From:	Tero Kristo <t-kristo@...com>
To:	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Mike Turquette <mturquette@...aro.org>,
	Stephen Boyd <sboyd@...eaurora.org>,
	<linux-omap@...r.kernel.org>, <linux-clk@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [RFT PATCH 0/8] clk: ti: Fix possible ERR_PTR dereferences from
 clk_get_sys

On 05/13/2015 09:54 AM, Krzysztof Kozlowski wrote:
> Hi,
>
>
> clk_get_sys() may return ERR_PTR but the drivers immediately
> dereferenced the return value. This could lead to oops.
>
> I tried only to fix possible ERR_PTR dereference and to not change
> the logic. This is why some of the patches look quite complex.
> For example in clk-7xx driver proceeds to next clocks if first one fails.
>
> WARNING:
> The patchset was only compile tested (plus static checkers), as
> I do not have the hardware. I am kindly asking for tests.
>
>
> Best regards,
> Krzysztof

Hi Krzysztof,

These should be rather fixed by using assigned-clock-parents / 
assigned-clock-rates DT properties and removing the offending legacy 
code from clk-* files. Patch #1 is good to go as is.

-Tero

>
>
> Krzysztof Kozlowski (8):
>    clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference
>    clk: ti: clk-2xxx: Prevent possible ERR_PTR dereference
>    clk: ti: clk-3xxx: Prevent possible ERR_PTR dereference
>    clk: ti: clk-33xx: Prevent possible ERR_PTR dereference
>    clk: ti: clk-43xx: Prevent possible ERR_PTR dereference
>    clk: ti: clk-43xx: Prevent possible ERR_PTR dereference
>    clk: ti: clk-54xx: Prevent possible ERR_PTR dereference
>    clk: ti: clk-7xx: Prevent possible ERR_PTR dereference
>
>   drivers/clk/ti/clk-2xxx.c     | 18 ++++++++++++----
>   drivers/clk/ti/clk-33xx.c     |  9 +++++---
>   drivers/clk/ti/clk-3xxx.c     | 18 ++++++++++++----
>   drivers/clk/ti/clk-43xx.c     |  3 ++-
>   drivers/clk/ti/clk-44xx.c     | 16 ++++++++++----
>   drivers/clk/ti/clk-54xx.c     | 47 +++++++++++++++++++++++++++-------------
>   drivers/clk/ti/clk-7xx.c      | 50 +++++++++++++++++++++++++------------------
>   drivers/clk/ti/clk-dra7-atl.c |  5 +++++
>   8 files changed, 114 insertions(+), 52 deletions(-)
>

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