From: Xixin Liu <liuxixin@kylinos.cn>
To: arm-scmi@vger.kernel.org
Cc: sudeep.holla@arm.com, cristian.marussi@arm.com,
mturquette@baylibre.com, sboyd@kernel.org,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, liuxixin@kylinos.cn
Subject: [PATCH v2 0/5] firmware/clk: arm_scpi hardening (leak, OPP bounds, cpufreq)
Date: Tue, 28 Jul 2026 09:04:02 +0800 [thread overview]
Message-ID: <cover.v2.1785200642.git.liuxixin@kylinos.cn> (raw)
In-Reply-To: <cover.1785118770.git.liuxixin@kylinos.cn>
Hi Sudeep,
Thanks for reviewing v1.
This v2 hardens the OF SCPI firmware and clock paths against a few
real defects found while reviewing linux-next:
1) device_node leak in scpi_dev_domain_id() after
of_parse_phandle_with_args()
2) DVFS OPP count from SCP trusted beyond MAX_DVFS_OPPS (OOB read /
bad OPP table size)
3) DVFS index used as clock rate without an upper bound check
4) scpi-cpufreq registered once only, and cleared on register failure
so remove() does not unregister an ERR_PTR
5) use PLATFORM_DEVID_NONE instead of bare -1 for the scpi-cpufreq
platform device id (readability; Fixes the original registration)
Changes since v1:
- 2/5: add Fixes: 8cb7cf56c9fe ("firmware: add support for ARM System
Control and Power Interface(SCPI) protocol")
- 3/5: add Fixes: cd52c2a4b5c4 ("clk: add support for clocks provided by
SCP(System Control Processor)")
- 4/5: correct commit message (scpi_clocks_probe; multi-DVFS child
overwrites the first good cpufreq_dev with ERR_PTR(-EEXIST)) and
add Fixes: 9490f01e2471 / 67bcc2c5f1da
All per maintainer feedback; code unchanged.
- add 5/5: clk: scpi: use PLATFORM_DEVID_NONE for scpi-cpufreq
(readability; Fixes: 9490f01e2471)
- Rebased onto linux-next next-20260727 (0d33d21e47d9); 2/5 context
updated for kmalloc_obj() (logic unchanged).
Please review.
Thanks,
Xixin Liu
---
Xixin Liu (5):
firmware: arm_scpi: fix device_node leak in scpi_dev_domain_id
firmware: arm_scpi: reject DVFS OPP count above MAX_DVFS_OPPS
clk: scpi: bound-check DVFS index in scpi_dvfs_recalc_rate
clk: scpi: register scpi-cpufreq once and clear on failure
clk: scpi: use PLATFORM_DEVID_NONE for scpi-cpufreq
drivers/clk/clk-scpi.c | 10 ++++++++--
drivers/firmware/arm_scpi.c | 9 ++++++---
2 files changed, 13 insertions(+), 6 deletions(-)
--
2.53.0
next prev parent reply other threads:[~2026-07-28 3:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 2:19 [PATCH v1 0/4] firmware/clk: arm_scpi hardening (leak, OPP bounds, cpufreq) Xixin Liu
2026-07-27 2:19 ` [PATCH v1 1/4] firmware: arm_scpi: fix device_node leak in scpi_dev_domain_id Xixin Liu
2026-07-27 2:19 ` [PATCH v1 3/4] clk: scpi: bound-check DVFS index in scpi_dvfs_recalc_rate Xixin Liu
2026-07-27 20:01 ` Sudeep Holla
2026-07-27 2:19 ` [PATCH v1 2/4] firmware: arm_scpi: reject DVFS OPP count above MAX_DVFS_OPPS Xixin Liu
2026-07-27 19:49 ` Sudeep Holla
2026-07-27 19:59 ` Sudeep Holla
2026-07-27 2:19 ` [PATCH v1 4/4] clk: scpi: register scpi-cpufreq once and clear on failure Xixin Liu
2026-07-27 20:06 ` Sudeep Holla
2026-07-28 1:04 ` Xixin Liu [this message]
2026-07-28 0:50 ` [PATCH v2 3/5] clk: scpi: bound-check DVFS index in scpi_dvfs_recalc_rate Xixin Liu
2026-07-28 0:50 ` [PATCH v2 1/5] firmware: arm_scpi: fix device_node leak in scpi_dev_domain_id Xixin Liu
2026-07-28 0:50 ` [PATCH v2 4/5] clk: scpi: register scpi-cpufreq once and clear on failure Xixin Liu
2026-07-28 0:50 ` [PATCH v2 2/5] firmware: arm_scpi: reject DVFS OPP count above MAX_DVFS_OPPS Xixin Liu
2026-07-28 1:27 ` [PATCH v2 5/5] clk: scpi: use PLATFORM_DEVID_NONE for scpi-cpufreq Xixin Liu
2026-07-28 9:52 ` Sudeep Holla
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=cover.v2.1785200642.git.liuxixin@kylinos.cn \
--to=liuxixin@kylinos.cn \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=sudeep.holla@arm.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