Subject: Re: unaligned access problems with new (in-tree) ssh
To: Simon Burge <simonb@wasabisystems.com>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-crypto
Date: 10/20/2000 00:51:59
Simon Burge wrote:

> Hi folks,
> 
> Just a quick note that quite rarely I see the new in-tree ssh (well, the
> kernel) on my alpha spit out thousands of lines of unaligned accesses,
> with only ever two pc's:
> 
> 	pc=0x12001b95c 
> 	pc=0x12001b9b0 
> 
> and these are in the swap_bytes function (kinda funny that when you
> think about it!):
> 
> 	000000012001b900 t swap_bytes
> 	000000012001b9c0 T cipher_mask1
> 
> I installed the new ssh on October 7, and I couldn't count the number of
> times I use ssh a day (cvs stuff, etc) and I've seen this maybe three
> times all up.  I haven't looked into this at all yet - it's sleep time
> but I want to get a note of the problem down while I remember and will
> have a look myself if no one beats me to it.

Well, this happened again just now, but unfortunately I hadn't acted
on Nathan's suggestion of "sysctl -w machdep.unaligned_sigbus=1" (so,
I forgot about it! ssh was also setuid so I wouldn't have got a core
anyway).  However, I left a syslog in swap_butes(), and this time it
logged that the arguments to swap_bytes() were:

Oct 20 00:33:35 thoreau ssh: swap_bytes: src = 0x120141004, dst_ = 0x120150000, dst = 0x120150000, n = 8

which is _exactly_ the same as every other time it's called.  So nothing
enlightening yet...

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Sales, Support and Service:  http://www.wasabisystems.com/