Skip to content
Commit b6dd960b authored by Daniel Leung's avatar Daniel Leung Committed by Anas Nashif
Browse files

kernel: userspace: fix dynamic kernel object alignment



Previous commit 55350a93 fixing
address-of-packed-mem warnings uncovered an issue with
the alignment of dynamic kernel objects. On 64-bit platforms,
the alignment is 16 bytes instead of 4/8 bytes (as in pointer,
void *). This changes the function of mapping between kernel
object types and alignments to use the dynamic object struct
as basis for alignment instead of simply using pointers.

This also uncomments the assertion added in the previous commit
55350a93 so that we can keep
an eye on the alignment in the future. Note that the assertion
is moved after checking if the incoming kernel object is
dynamically allocated. Static kernel objects are not subjected
to this alignment requirement.

Fixes #41062

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent 1e32d447
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment