11.0-CURRENT (r292413) on a rpi2b: arm-gnueabi-freebsd/bin/ar, _fseeko, and memset vs memory alignment (SCTRL bit[1]=1?): Explains the Bus error?

Konstantin Belousov kostikbel at gmail.com
Mon Dec 28 14:26:32 UTC 2015


On Mon, Dec 28, 2015 at 02:07:29PM +0000, Andrew Turner wrote:
> There was some concern about reading non-naturally aligned data in the
> kernel not being atomic, this could be checked by, in debug
> configurations, enabling alignment checks on entry to the kernel and
> disabling them on exit. We could also have a flag for clang to tell it
> we are in the kernel, there is already something similar for iOS.

What do you mean ? Non-aligned reads are non-atomic on all known
arches, including x86. In the Core2 time this non-atomicity became
easily observable due to the microacrhitecture changes, which happens
simultaneously with a mis-aligned bug in DPCPU code. I do not think we
ever depend on the atomicity of the unaligned reads in MI and in x86 MD
code since then, why would arm differ there ?


More information about the freebsd-toolchain mailing list