HomeFreeBSD

vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned

Description

vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned

Some 32-bit architectures, e.g., armv7, require strict 8-byte
alignment while doing atomic 64-bit access. Hence aligning to the
pointer type (4-byte alignment) does not meet the requirement on
those architectures.

Make the space allocated by vnet_data_alloc() sufficent aligned to
avoid unaligned access.

PR: 265639
Diagnosed by: markj
Reviewed by: jhb, markj
Co-authored-by: jhb
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D55560

(cherry picked from commit 32beb3ae71cb320dbe4190a01c036943d99083b3)
(cherry picked from commit 973d607b284ba68e63f0386af44c28bfde15add2)
(cherry picked from commit baee504b868b9417c815c0de6474a0d6e5d6b4ac)

Details

Provenance
zleiAuthored on Feb 28 2026, 11:35 AM
Reviewer
jhb
Differential Revision
D55560: vnet: Ensure space allocated by vnet_data_alloc() is properly aligned
Parents
rGf2f74aeca530: libiscsiutil: Record dependency on libmd
Branches
Unknown
Tags
Unknown