Re: armv7 unaligned access in libcrypto

2017-12-30 Thread Philip Guenther
On Fri, 29 Dec 2017, Mark Kettenis wrote: > > Date: Fri, 29 Dec 2017 21:21:04 +1100 > > From: Jonathan Gray > > > > On Fri, Dec 29, 2017 at 10:47:06AM +0100, Mark Kettenis wrote: > > > The Aarch32 assembly code in libcrypto assumes that armv7 supports > > > unaligned access. It

Re: armv7 unaligned access in libcrypto

2017-12-29 Thread Mark Kettenis
> Date: Fri, 29 Dec 2017 21:21:04 +1100 > From: Jonathan Gray > > On Fri, Dec 29, 2017 at 10:47:06AM +0100, Mark Kettenis wrote: > > The Aarch32 assembly code in libcrypto assumes that armv7 supports > > unaligned access. It does, but only if you don't enable the bit that > >

Re: armv7 unaligned access in libcrypto

2017-12-29 Thread Jonathan Gray
On Fri, Dec 29, 2017 at 10:47:06AM +0100, Mark Kettenis wrote: > The Aarch32 assembly code in libcrypto assumes that armv7 supports > unaligned access. It does, but only if you don't enable the bit that > makes it trap on unaligned access. And we enable that bit on OpenBSD. > So doing a SHA256

armv7 unaligned access in libcrypto

2017-12-29 Thread Mark Kettenis
The Aarch32 assembly code in libcrypto assumes that armv7 supports unaligned access. It does, but only if you don't enable the bit that makes it trap on unaligned access. And we enable that bit on OpenBSD. So doing a SHA256 of an unaligned buffer (something ftp(1) ends up doing) you SIGBUS.