From owner-freebsd-current@FreeBSD.ORG Sun Jul 15 18:17:37 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E54B16A400 for ; Sun, 15 Jul 2007 18:17:37 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 27C2113C474 for ; Sun, 15 Jul 2007 18:17:37 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (aunog515ksw3xx2l@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l6FIHX1R035543; Sun, 15 Jul 2007 11:17:33 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l6FIHWGX035542; Sun, 15 Jul 2007 11:17:32 -0700 (PDT) (envelope-from jmg) Date: Sun, 15 Jul 2007 11:17:32 -0700 From: John-Mark Gurney To: Michiel Boland Message-ID: <20070715181732.GR1221@funkthat.com> Mail-Followup-To: Michiel Boland , freebsd-current@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-current@freebsd.org Subject: Re: sshd broken with UsePrivilegeSeparation=yes on sparc64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2007 18:17:37 -0000 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."