From owner-freebsd-sparc64@FreeBSD.ORG Mon May 29 21:40:24 2006 Return-Path: X-Original-To: freebsd-sparc64@hub.freebsd.org Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB27516B095 for ; Mon, 29 May 2006 21:40:23 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5716843D53 for ; Mon, 29 May 2006 21:40:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4TLeMaw083924 for ; Mon, 29 May 2006 21:40:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4TLeMvF083921; Mon, 29 May 2006 21:40:22 GMT (envelope-from gnats) Date: Mon, 29 May 2006 21:40:22 GMT Message-Id: <200605292140.k4TLeMvF083921@freefall.freebsd.org> To: freebsd-sparc64@FreeBSD.org From: Marius Strobl Cc: Subject: Re: sparc64/98084: kernel panic when using tap interface driver on 6_stable/sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marius Strobl List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 21:40:39 -0000 The following reply was made to PR sparc64/98084; it has been noted by GNATS. From: Marius Strobl To: Michael Ortmann Cc: freebsd-gnats-submit@freebsd.org Subject: Re: sparc64/98084: kernel panic when using tap interface driver on 6_stable/sparc64 Date: Mon, 29 May 2006 23:36:48 +0200 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 29, 2006 at 12:12:22PM +0000, Michael Ortmann wrote: > > using the tap interface on 6_stable/sparc64 will lead to kernel panic > disovered when i tried to setup openvpn, but its no openvpn issue > "cat /dev/zero >/dev/tap0" will crash the machine instantly, any time > can be 100% reproduced on my machine (u60, smp) > i compiled and installed 6_stable (world+kernel) without optimization flags but with debug flags, so its no optimization issue > kernel coredump available > it seems to be no hardware issue since its a) reproduceable and b) make buildworld/installworld runs just fine. > > my guess: tap interface driver broken for sparc64? > > == symptom == > > # cat /dev/zero >/dev/tap0 > I can't actually reproduce this via `cat /dev/zero >/dev/tap0` but I think I have an idea what's the problem. Could you please give the attached patch a try? Thanks, Marius -- This mail was scanned by AntiVir Milter. This product is licensed for non-commercial use. See www.antivir.de for details. --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="if_tap.c.diff" Index: if_tap.c =================================================================== RCS file: /mnt/alchemy/usr/data/bsd/cvs/fbsd/src/sys/net/if_tap.c,v retrieving revision 1.60 diff -u -r1.60 if_tap.c --- if_tap.c 17 May 2006 17:05:02 -0000 1.60 +++ if_tap.c 29 May 2006 19:24:06 -0000 @@ -631,11 +631,11 @@ break; case TAPSDEBUG: - tapdebug = *(intptr_t *)data; + tapdebug = *(int *)data; break; case TAPGDEBUG: - *(intptr_t *)data = tapdebug; + *(int *)data = tapdebug; break; case FIONBIO: @@ -644,7 +644,7 @@ case FIOASYNC: s = splimp(); mtx_lock(&tp->tap_mtx); - if (*(intptr_t *)data) + if (*(int *)data) tp->tap_flags |= TAP_ASYNC; else tp->tap_flags &= ~TAP_ASYNC; @@ -657,27 +657,27 @@ if (ifp->if_snd.ifq_head) { struct mbuf *mb = ifp->if_snd.ifq_head; - for(*(intptr_t *)data = 0;mb != NULL;mb = mb->m_next) - *(intptr_t *)data += mb->m_len; + for(*(int *)data = 0;mb != NULL;mb = mb->m_next) + *(int *)data += mb->m_len; } else - *(intptr_t *)data = 0; + *(int *)data = 0; splx(s); break; case FIOSETOWN: - return (fsetown(*(intptr_t *)data, &tp->tap_sigio)); + return (fsetown(*(int *)data, &tp->tap_sigio)); case FIOGETOWN: - *(intptr_t *)data = fgetown(&tp->tap_sigio); + *(int *)data = fgetown(&tp->tap_sigio); return (0); /* this is deprecated, FIOSETOWN should be used instead */ case TIOCSPGRP: - return (fsetown(-(*(intptr_t *)data), &tp->tap_sigio)); + return (fsetown(-(*(int *)data), &tp->tap_sigio)); /* this is deprecated, FIOGETOWN should be used instead */ case TIOCGPGRP: - *(intptr_t *)data = -fgetown(&tp->tap_sigio); + *(int *)data = -fgetown(&tp->tap_sigio); return (0); /* VMware/VMnet port ioctl's */ --jI8keyz6grp/JLjh--