Repository navigation
Conversation
tmleman
requested review from
dbaluta,
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
October 6, 2026 13:45
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The corrected index matches the POSIX clock table and resolves the reported invalid access.
Review effort: Balanced
Findings: None
What changed in this PR
Corrects the POSIX CPU frequency index to prevent an out-of-bounds clock-table access in basefw_config().
Changes:
- Sets the sole POSIX CPU frequency index to
0.
| File | Description |
|---|---|
src/platform/posix/include/platform/lib/clk.h |
Aligns the frequency index with the single registered clock entry. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
posix_clk_init() registers a single clock_info with a single frequency
entry, but CPU_LPRO_FREQ_IDX / CPU_LOWEST_FREQ_IDX were defined as 1.
basefw_config() passes CPU_LOWEST_FREQ_IDX to clock_get_freq(), which
computes clocks_get() + 1 and reads one struct past the table:
SEGV on unknown address 0x40b1fc80 (READ)
#0 clock_get_freq src/lib/clk.c:48
thesofproject#1 basefw_config src/audio/base_fw.c:163
Found by libFuzzer IPC4/ASan.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
PR 11274: test resultsRun date: 2026-10-06 15:05 UTC Tested commit: 1c783f663e81aeddd0d83de9864d17f725866f29 |
tmleman
requested review from
abonislawski,
piotrhoppeintel,
softwarecki and
wjablon1
October 7, 2026 07:27
lgirdwood
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
posix_clk_init() registers a single clock_info with a single frequency entry, but CPU_LPRO_FREQ_IDX / CPU_LOWEST_FREQ_IDX were defined as 1. basefw_config() passes CPU_LOWEST_FREQ_IDX to clock_get_freq(), which computes clocks_get() + 1 and reads one struct past the table:
Found by libFuzzer IPC4/ASan.