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: <20221028000913.E590AC4347C@smtp.kernel.org>
Date:   Thu, 27 Oct 2022 17:09:11 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Maxime Ripard <maxime@...no.tech>,
        Michael Turquette <mturquette@...libre.com>
Cc:     linux-kernel@...r.kernel.org,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Maxime Ripard <maxime@...no.tech>, linux-clk@...r.kernel.org
Subject: Re: [PATCH 2/4] clk: Initialize the clk_rate_request even if clk_core is NULL

Quoting Maxime Ripard (2022-10-18 06:52:57)
> Since commit c35e84b09776 ("clk: Introduce clk_hw_init_rate_request()"),
> users that used to initialize their clk_rate_request by initializing
> their local structure now rely on clk_hw_init_rate_request().
> 
> This function is backed by clk_core_init_rate_req(), which will skip the
> initialization if either the pointer to struct clk_core or to struct
> clk_rate_request are NULL.
> 
> However, the core->parent pointer might be NULL because the clock is
> orphan, and we will thus end up with our local struct clk_rate_request
> left untouched.
> 
> And since clk_hw_init_rate_request() doesn't return an error, we will
> then call a determine_rate variant with that unitialized structure.
> 
> In order to avoid this, let's clear our clk_rate_request if the pointer
> to it is valid but the pointer to struct clk_core isn't.
> 
> Fixes: c35e84b09776 ("clk: Introduce clk_hw_init_rate_request()")
> Signed-off-by: Maxime Ripard <maxime@...no.tech>
> ---

Applied to clk-fixes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ