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: <153255129875.48062.4075642035553635128@swboyd.mtv.corp.google.com>
Date:   Wed, 25 Jul 2018 13:41:38 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Michael Turquette <mturquette@...libre.com>,
        Nicholas Mc Guire <hofrat@...dl.org>
Cc:     Kees Cook <keescook@...omium.org>, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, Nicholas Mc Guire <hofrat@...dl.org>
Subject: Re: [PATCH 1/2] drivers: clk: st: warn on iomap failure

Quoting Nicholas Mc Guire (2018-07-15 03:18:23)
>  While the return value of clkgen_get_register_base() is being checked
> at the call site, there is no indication of failure cause thus making
> diagnosis of the issues hard. The WARN_ON() allows to determine the
> cause of failure.
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@...dl.org>
> ---
> 
> Problem found by an experimental coccinelle script
> 
> Patch was compile tested with: multi_v7_defconfig (implies
> CONFIG_ARCH_STI=y)
> 
> Patch is against 4.18-rc4 (localversion-next is next-20180713)
> 
>  drivers/clk/st/clkgen-pll.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/st/clkgen-pll.c b/drivers/clk/st/clkgen-pll.c
> index cbb5184..aeb30ab 100644
> --- a/drivers/clk/st/clkgen-pll.c
> +++ b/drivers/clk/st/clkgen-pll.c
> @@ -647,6 +647,7 @@ static void __iomem * __init clkgen_get_register_base(
>                 return NULL;
>  
>         reg = of_iomap(pnode, 0);
> +       WARN_ON(!reg);
>  
>         of_node_put(pnode);
>         return reg;

Shouldn't the caller blow up on NULL pointer access? This patch doesn't
seem useful, sorry.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ