[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sshd broken with UsePrivilegeSeparation=yes on sparc64



Michiel Boland wrote this message on Sun, Jul 15, 2007 at 17:43 +0200:
> It looks like gcc mis-compiles /usr/src/crypto/openssh/monitor_fdpass.c on 
> sparc64. For some reason it optimizes away the assignment of fd on line 
> 132:
> 
>         fd = (*(int *)CMSG_DATA(cmsg));
> 
> So I guess that every call to mm_receive_fd will return an undefined 
> value.
> 
> If I add -O0 to CFLAGS in /usr/src/secure/lib/libssh/Makefile, ssh with 
> UsePrivilegeSeparation=yes works again.
> 
> So, obviously a gcc bug. I will try to generate a smaller test-case for 
> this.

Could you give us an assembly dump of the two differences?  phk thinks
there might be an issue w/ the CMSG_DATA macro, and a quick glance
makes me question it too...  It looks scare on platforms that require
aligned accesses...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
_______________________________________________
freebsd-current_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe_(_at_)_freebsd_(_dot_)_org"