Page MenuHomeFreeBSD

Teach DTrace that unaligned accesses are allowed on aarch64, not just x86.
ClosedPublic

Authored by rwatson on Mar 22 2021, 1:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 10:25 AM
Unknown Object (File)
Sat, May 4, 7:08 PM
Unknown Object (File)
Sat, May 4, 9:48 AM
Unknown Object (File)
Sat, May 4, 9:47 AM
Unknown Object (File)
Sun, Apr 28, 11:05 PM
Unknown Object (File)
Sun, Apr 28, 6:12 PM
Unknown Object (File)
Fri, Apr 26, 5:21 PM
Unknown Object (File)
Sun, Apr 21, 11:11 AM

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 37982
Build 34871: arc lint + arc unit

Event Timeline

I wonder if we should be checking for __NO_STRICT_ALIGNMENT (and defining it for architectures other than x86)

I wonder if we should be checking for __NO_STRICT_ALIGNMENT (and defining it for architectures other than x86)

Hmm. I didn't know that existed.

I think it is the right goal, but I don't think we should aim for it in this patch. Not least, I'm not easily set up to test the various other cases covered by that define currently.

This revision is now accepted and ready to land.Mar 22 2021, 1:42 PM

I wonder if we should be checking for __NO_STRICT_ALIGNMENT (and defining it for architectures other than x86)

Hmm. I didn't know that existed.

I think it is the right goal, but I don't think we should aim for it in this patch. Not least, I'm not easily set up to test the various other cases covered by that define currently.

Note that the architecture must be truly totally alignment-agnostic for __NO_STRICT_ALIGNMENT to work. If aarch64 still has restrictions on some instructions (such as ldm/stm) the compiler may generate those for accessing network data in unaligned packet headers (I ran into this on arm32, where ipv6 address accesses got optimized into ldm instructions to load all 16 bytes at once).