Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Dec 2023 04:15:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 272965] 14.0-ALPHA1 too: armv7 'Alignment Fault' on read panic during udp_input for kyua's sys/netinet6/exthdr:exthdr ; other udp_input related panics
Message-ID:  <bug-272965-227-Re1D1GBK3K@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-272965-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-272965-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272965

--- Comment #10 from Michal Meloun <mmel@FreeBSD.org> ---
(In reply to Warner Losh from comment #8)
Unfortunately, I can't agree with that. Aligning the input mbuf is only
papering over the real problem and can only work for trivial cases.  It doe=
sn't
help for vlans (unless HW strips header), for various protocol encapsulatio=
ns
and most importantly it doesn't work at all for IPv6 :(

The real problem is that our network stack uses undefined behavior. We can
alias a byte buffer to a structure only if the given buffer pointer is conf=
orm
with the desired structure alignment, otherwise the behavior is undefined. =
This
is, strictly speaking , required for every architecture. The only way we can
reduce the required alignment is by using the packed attribute for the affe=
cted
structures...

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272965-227-Re1D1GBK3K>