Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vz@kernel.org>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>
Cc: Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Taniya Das <taniya.das@oss.qualcomm.com>,
	Melody Olvera <melody.olvera@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH 2/2] clk: qcom: gcc-qdu1000: Add sentinel to GPLL0 even post divider table
Date: Fri, 27 Nov 2026 14:03:50 +0200	[thread overview]
Message-ID: <ec5e728c-e266-4df2-bdeb-6564444a7222@kernel.org> (raw)
In-Reply-To: <67b17c55-e87c-464d-8c1d-fb015041be2f@oss.qualcomm.com>

On 11/27/26 13:04, Konrad Dybcio wrote:
> On 11/25/26 10:34 PM, Vladimir Zapolskiy wrote:
>> The GPLL0 even output post divider table is not terminated by an empty
>> entry, the table is passed to divider_determine_rate(), and the generic
>> clock divider helpers iterate over a table until they find an entry with
>> a zero divider, thus they may read past the end of the array.
> 
> But there's a .num_post_div?

That is used by driver/clk/qcom/clk-alpha-pll.c internally. In fact, and
in my opinion, it might be better to remove it and to rely on a sentinel
only, if you also find it wanted and acceptable.

And if you look at clk_trion_pll_postdiv_determine_rate() or
clk_alpha_pll_postdiv_fabia_determine_rate(), then, as it is stated, it
becomes clear that the table without the sentinel is passed down to clock
framework functions, and that's the critical problem fixed by this changeset.

-- 
Best wishes,
Vladimir

  parent reply	other threads:[~2026-11-27 12:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 21:34 [PATCH 0/2] clk: qcom: Add missing post divider table sentinels Vladimir Zapolskiy
2026-11-25 21:34 ` [PATCH 1/2] clk: qcom: camcc-sc8280xp: Add sentinels to post divider tables Vladimir Zapolskiy
2026-11-27 11:40   ` Bryan O'Donoghue
2026-11-25 21:34 ` [PATCH 2/2] clk: qcom: gcc-qdu1000: Add sentinel to GPLL0 even post divider table Vladimir Zapolskiy
2026-11-27 11:04   ` Konrad Dybcio
2026-11-27 11:40     ` Bryan O'Donoghue
2026-11-27 12:03     ` Vladimir Zapolskiy [this message]
2026-11-27 11:41   ` Bryan O'Donoghue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec5e728c-e266-4df2-bdeb-6564444a7222@kernel.org \
    --to=vz@kernel.org \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bmasney+clk@redhat.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=jbrunet+clk@baylibre.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=melody.olvera@oss.qualcomm.com \
    --cc=sboyd@kernel.org \
    --cc=taniya.das@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox