[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
Date: Thu, 21 Dec 2023 04:15:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272965 --- 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 doesn't help for vlans (unless HW strips header), for various protocol encapsulations 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 conform 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 affected structures... -- You are receiving this mail because: You are the assignee for the bug.