Date: Mon, 28 Dec 2015 16:26:19 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Andrew Turner <andrew@fubar.geek.nz> Cc: Mark Millard <markmi@dsl-only.net>, mat@FreeBSD.org, freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, Ian Lepore <ian@FreeBSD.org> Subject: Re: 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? Message-ID: <20151228142619.GR3625@kib.kiev.ua> In-Reply-To: <20151228140729.565c9dc6@zapp.Home> References: <A338272B-982F-4E1F-B87D-1E33815EA212@dsl-only.net> <0D81C2CA-BF1C-4C14-B816-A8C5F68715B5@bsdimp.com> <51EB4AAB-BC81-4282-BA4D-D329C41D660B@dsl-only.net> <8B52074F-FDEF-4119-BB04-630F9BE9E6DB@bsdimp.com> <BBAAE33E-BD65-40A3-A0B3-F3346FC08112@dsl-only.net> <DC9EE7C3-2763-44EF-91DA-AFE63C48E537@dsl-only.net> <D38C49E3-B622-49EA-9B30-3B1B2FA2E569@bsdimp.com> <118D2970-4799-46B1-81A1-0101B907C1BE@dsl-only.net> <9DA7895D-B3DE-41FD-900C-EC95BDE19728@dsl-only.net> <20151228140729.565c9dc6@zapp.Home>
next in thread | previous in thread | raw e-mail | index | archive | help
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 ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151228142619.GR3625>