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: <6d4e8c19-6cb8-b242-3efb-0854ee2a107f@roeck-us.net>
Date:   Thu, 2 Jan 2020 06:17:37 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Stephen Boyd <sboyd@...nel.org>,
        Michael Turquette <mturquette@...libre.com>
Cc:     linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
        Jerome Brunet <jbrunet@...libre.com>
Subject: Re: [PATCH v2] clk: Warn about critical clks that fail to enable

On 1/1/20 4:55 PM, Stephen Boyd wrote:
> If we don't warn here users of the CLK_IS_CRITICAL flag may not know
> that their clk isn't actually enabled because it silently fails to
> enable. Let's print a warning in that case so developers find these
> problems faster.
> 
> Suggested-by: Jerome Brunet <jbrunet@...libre.com>
> Cc: Guenter Roeck <linux@...ck-us.net>
> Signed-off-by: Stephen Boyd <sboyd@...nel.org>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
> 
> Changes from v1:
>   * Switched to pr_warn and indicated clk name
> 
>   drivers/clk/clk.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 772258de2d1f..b03c2be4014b 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -3427,13 +3427,18 @@ static int __clk_core_init(struct clk_core *core)
>   		unsigned long flags;
>   
>   		ret = clk_core_prepare(core);
> -		if (ret)
> +		if (ret) {
> +			pr_warn("%s: critical clk '%s' failed to prepare\n",
> +			       __func__, core->name);
>   			goto out;
> +		}
>   
>   		flags = clk_enable_lock();
>   		ret = clk_core_enable(core);
>   		clk_enable_unlock(flags);
>   		if (ret) {
> +			pr_warn("%s: critical clk '%s' failed to enable\n",
> +			       __func__, core->name);
>   			clk_core_unprepare(core);
>   			goto out;
>   		}
> 
> base-commit: 12ead77432f2ce32dea797742316d15c5800cb32
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ