Repository navigation
Commit 2e3a715
committed
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.
Add a CONFIG_ARCH_POSIX_LIBFUZZER branch that mirrors the existing IPC3
whitebox hack in posix/ipc.c: treat module_id as a 1-based index into
the runtime comp_driver list. module_id 0 (BaseFW, handled separately
and having no create callback) is excluded. Drivers without an ops.create
callback are skipped during the index walk so the fuzzer's module_id
space only maps to instantiable components, otherwise a module_id that
lands on such a driver would cause a NULL function pointer call. Return
the resolved driver directly instead of a redundant UUID re-lookup.
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 1469c18 commit 2e3a715
1 file changed
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1361 | 1361 | | |
1362 | 1362 | | |
1363 | 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 | + | |
| 1409 | + | |
| 1410 | + | |
1364 | 1411 | | |
1365 | 1412 | | |
1366 | 1413 | | |
| |||
0 commit comments