Skip to content

Commit

Permalink
posix: align mailboxes
Browse files Browse the repository at this point in the history
Using unaligned mailboxes with UBSAN causes fuzzing failures with
aligned data structures

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
  • Loading branch information
cujomalainey committed Sep 3, 2024
1 parent ff57b79 commit f864504
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/platform/posix/posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include <sof/schedule/ll_schedule.h>
#include <sof/lib/agent.h>

uint8_t posix_hostbox[MAILBOX_HOSTBOX_SIZE];
uint8_t posix_dspbox[MAILBOX_DSPBOX_SIZE];
uint8_t posix_stream[MAILBOX_STREAM_SIZE];
uint8_t posix_trace[MAILBOX_TRACE_SIZE];
uint8_t posix_hostbox[MAILBOX_HOSTBOX_SIZE] __aligned(8);
uint8_t posix_dspbox[MAILBOX_DSPBOX_SIZE] __aligned(8);
uint8_t posix_stream[MAILBOX_STREAM_SIZE] __aligned(8);
uint8_t posix_trace[MAILBOX_TRACE_SIZE] __aligned(8);

/* This seems like a vestige. Existing Zephyr platforms are emitting
* these markers in their linker scripts, and wrapper.c code iterates
Expand Down

0 comments on commit f864504

Please sign in to comment.