Commit 3ed1b24
committed
fuzz: posix: mirror IPC4 payload into MAILBOX_HOSTBOX
On real hardware (and in the IPC3 harness path) the host kernel deposits
the IPC payload into the hostbox shared-memory region before the DSP
firmware is signalled. Many IPC4 handlers consume their payload by
reading from MAILBOX_HOSTBOX_BASE directly -- for example
LARGE_CONFIG_SET / LARGE_CONFIG_GET, vendor config, SET_DX and
SET_PIPELINE_STATE in sof/src/ipc/ipc4/handler-user.c and
ipc/ipc4/handler-kernel.c. Until now the posix fuzz harness only
populated the IPC3 hostbox; in IPC4 builds the region stayed
zero-filled, so those handlers either rejected the message early or
operated on uninitialised data instead of on the fuzzer-controlled
bytes.
Lift the existing mailbox mirror copy out of the IPC3-only branch so
it runs for both major versions. posix_hostbox is sized to
SOF_IPC_MSG_MAX_SIZE (see Commit "fuzz: posix: size MAILBOX_HOSTBOX
from SOF_IPC_MSG_MAX_SIZE"), so the copy length is correct for both
targets. Update the function comment to record the new contract.
This immediately exposes additional reachable code in the IPC4 build
(payload decoders that previously saw only zeros) without affecting
IPC3 behaviour.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent de4aa32 commit 3ed1b24
1 file changed
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
149 | 172 | | |
150 | 173 | | |
151 | 174 | | |
152 | 175 | | |
153 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
154 | 181 | | |
155 | 182 | | |
156 | 183 | | |
| |||
0 commit comments