Repository navigation
Commit 58a8d62
ipc4: helper: unlock module instance verbs on native_sim
ipc4_get_comp_drv() returned NULL unconditionally on native_sim because
the RIMAGE_MANIFEST guard (Intel ADSP ACE/CAVS only) was the sole path
to a driver UUID lookup. Every INIT_INSTANCE call therefore failed with
IPC4_MOD_NOT_INITIALIZED before creating any comp_dev, making the entire
module instance verb surface (CONFIG_GET/SET, LARGE_CONFIG on real
modules, BIND, UNBIND, DELETE_INSTANCE) unreachable from the fuzzer.
Resolve module drivers on native_sim from a small fuzzer-only helper,
ipc4_get_fuzzer_drv(), called from the CONFIG_ARCH_POSIX_LIBFUZZER branch
of ipc4_get_comp_drv() so the heavily-used manifest lookup path is left
untouched. It mirrors the IPC3 whitebox hack in posix/ipc.c: module_id is
a 1-based index into the runtime component driver list, counting only
instantiable module-adapter drivers so the fuzzer's module_id space
matches what a real signed manifest exposes. Drivers with no ops.create,
and internal gateway drivers (SOF_COMP_HOST/DAI) that are never IPC4
modules, are skipped (otherwise a module_id could land on an
unconfigurable component or a NULL create op).
module_id 0 (BaseFW) intentionally resolves to NULL: BaseFW is never
created as a pipeline component, its messages are dispatched directly by
base_fw.c. A tr_err() logs any module_id that maps to no driver to help
developers and agents triage. The change is inactive in all non-fuzz
builds.
Measured impact (UBSan IPC4, seed=1, 20 s, small corpus):
cov ~558 -> ~3974 (~7x lift from previously dead module instance paths)
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent ffa52df commit 58a8d62
1 file changed
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1344 | 1344 | | |
1345 | 1345 | | |
1346 | 1346 | | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
1347 | 1409 | | |
1348 | 1410 | | |
1349 | 1411 | | |
| |||
1361 | 1423 | | |
1362 | 1424 | | |
1363 | 1425 | | |
| 1426 | + | |
| 1427 | + | |
1364 | 1428 | | |
1365 | 1429 | | |
1366 | 1430 | | |
| |||
0 commit comments