From owner-freebsd-sparc64@FreeBSD.ORG Thu Mar 24 13:37:58 2011 Return-Path: Delivered-To: freebsd-sparc64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BA93106566B; Thu, 24 Mar 2011 13:37:58 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [IPv6:2a01:4f8:100:1043::3]) by mx1.freebsd.org (Postfix) with ESMTP id 1E8E58FC12; Thu, 24 Mar 2011 13:37:58 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.1]) by mail.vx.sk (Postfix) with ESMTP id 438F6149DDD; Thu, 24 Mar 2011 14:37:57 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk ([127.0.0.1]) by core.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id A0bWzzR8c-F0; Thu, 24 Mar 2011 14:37:55 +0100 (CET) Received: from [10.9.8.1] (chello085216231078.chello.sk [85.216.231.78]) by mail.vx.sk (Postfix) with ESMTPSA id D8704149DCD; Thu, 24 Mar 2011 14:37:54 +0100 (CET) Message-ID: <4D8B4930.7080106@FreeBSD.org> Date: Thu, 24 Mar 2011 14:37:52 +0100 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sk; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: Marius Strobl References: <20110307192239.GA31314@alchemy.franken.de> <20110310185423.GA50419@alchemy.franken.de> <20110319152838.GA8594@alchemy.franken.de> <20110321175632.GA19345@darkthrone.kvedulv.de> <20110321175933.GD2086@garage.freebsd.pl> <20110322191117.GH15528@alchemy.franken.de> <20110323232411.GC82490@darkthrone.kvedulv.de> <4D8B08E1.5060008@FreeBSD.org> <20110324111628.GO15528@alchemy.franken.de> In-Reply-To: <20110324111628.GO15528@alchemy.franken.de> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Roger Hammerstein , pjd@FreeBSD.org, freebsd-sparc64@FreeBSD.org Subject: Re: sparc64 hang with zfs v28 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 13:37:58 -0000 I agree to the patch, that is exactly what I was missing in the v15 compat code. Too bad that I don't have a sparc64 to test these things out and get smarter. I am investigating now if its possible to emulate it with qemu. Dňa 24.03.2011 12:16, Marius Strobl wrote / napísal(a): > On Thu, Mar 24, 2011 at 10:03:29AM +0100, Martin Matuska wrote: >> zfs_ioctl_compat_post() calls depending on the ioctl >> zfs_ioctl_compat_fix_stats() or zfs_ioctl_compat_pool_get_props() >> >> Both functions unpack the "zc->zc_nvlist_dst" into "nv" at the very >> beginning and I might be missing something here (works very well on >> i386/amd64) or there might be a problem elsewhere. >> >> nvlist_unpack() from libnvpair (nvpair.c) calls nvlist_xunpack(), >> issuing a nvlist_xalloc(), followerd by a nvlist_common() in >> NVS_OP_DECODE mode - that's where it dies. >> nvlist_common() deals directly with endianess. >> >> sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c >> sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c >> > > The code in zfs_ioctl_compat.c just completely misses the copyin()/ > copyout() dance. The following patch should fix this, but is compile- > tested only so far: > http://people.freebsd.org/~marius/zfs_ioctl_compat.c.diff > Which still is to be used together with: > http://people.freebsd.org/~marius/sunddi.h.diff > > I'm puzzled as to why these bugs don't cause havoc on x86 ... > > Marius >