Repository navigation
Conversation
tmleman
requested review from
dbaluta,
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
October 20, 2026 12:09
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The scoped changes enable BaseFW dispatch, preserve other module mappings, and guard both initialization paths.
No open issues 🎉
What changed in this PR
Enables IPC4 fuzz testing of BaseFW (module 0) while preventing its instantiation as a pipeline component.
Changes:
- Maps fuzzed module ID 0 to the registered BaseFW driver.
- Rejects component initialization when the driver lacks a creation callback.
| File | Description |
|---|---|
| src/ipc/ipc4/helper.c | Adds BaseFW lookup and guards component creation. |
| src/ipc/ipc4/handler-user.c | Rejects initialization of non-instantiable drivers. |
Review effort: Balanced
INIT_MODULE_INSTANCE carries a host-controlled module_id. module_id 0 is BaseFW: on hardware ipc4_get_comp_drv(0) resolves the manifest entry to the registered comp_basefw driver, which only implements get/set_large_config and has no create op. comp_new_ipc4() then calls drv->ops.create() through a NULL function pointer. Reject any resolved driver without a create op before the call and return NULL so the handler reports IPC4_MOD_NOT_INITIALIZED. Apply the same check on the kernel-side lookup that precedes forwarding INIT to the user-space LL thread, so a query-only driver is never handed to comp_new_ipc4_user(). Reproduced on native_sim with a framed INIT for module 0 / instance 0, ppl_instance_id = IPC4_INVALID_PIPELINE_ID: comp_new_ipc4() now returns NULL and ipc4_init_module_instance() returns 104 (gdb-confirmed that the resolved driver is comp_basefw with ops.create == NULL). Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
native_sim fuzz builds have no rimage manifest, so ipc4_get_comp_drv() falls back to ipc4_get_fuzzer_drv(), which returned NULL for module_id 0. Every LARGE_CONFIG_GET/SET addressed to BaseFW therefore failed with IPC4_INVALID_RESOURCE_ID and src/audio/base_fw.c, one of the largest host-facing IPC4 parsers, received zero fuzzing (0.7 % line coverage over a 19-night campaign). The comment claiming BaseFW messages are "dispatched directly by base_fw.c" was wrong: the handlers resolve the driver and call drv->ops.get/set_large_config() with dev == NULL. Resolve module_id 0 the way the manifest does on hardware: by the BaseFW registry UUID through ipc4_search_for_drv(), never by list position. The 1-based module-adapter mapping for module_id > 0 and the exclusion of internal host/DAI drivers are unchanged. BaseFW remains non-instantiable because comp_new_ipc4() rejects drivers without a create op. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
PR 11324: test resultsRun date: 2026-10-20 17:14 UTC Tested commit: ead21f7f6e450c5057e2f703426f72bbfe72eab7 |
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.
This pull request unblocks the IPC path to BaseFW (module 0) during fuzz testing.