From owner-freebsd-net@FreeBSD.ORG Mon May 2 19:20:03 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D830816A4D2; Mon, 2 May 2005 19:20:03 +0000 (GMT) Received: from ford.blinkenlights.nl (ford.blinkenlights.nl [213.204.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36DBC43D5C; Mon, 2 May 2005 19:20:03 +0000 (GMT) (envelope-from sten@blinkenlights.nl) Received: from tea.blinkenlights.nl (tea.blinkenlights.nl [192.168.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ford.blinkenlights.nl (Postfix) with ESMTP id 9152D3F294; Mon, 2 May 2005 21:20:01 +0200 (CEST) Received: by tea.blinkenlights.nl (Postfix, from userid 101) id 346B9272; Mon, 2 May 2005 21:20:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by tea.blinkenlights.nl (Postfix) with ESMTP id 2D8F479; Mon, 2 May 2005 21:20:01 +0200 (CEST) Date: Mon, 2 May 2005 21:20:01 +0200 (CEST) From: Sten Spans To: Maksim Yevmenkin In-Reply-To: <42765799.6090201@savvis.net> Message-ID: References: <20050428135120.GB21428@cell.sick.ru> <427111BF.2050607@savvis.net> <42712BAA.4070201@elischer.org> <42715269.3010306@errno.com> <4272743A.2030003@savvis.net> <20050429182819.GP2670@funkthat.com> <42765799.6090201@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: John-Mark Gurney cc: glebius@FreeBSD.org cc: Julian Elischer cc: net@freebsd.org Subject: Re: if_tap unaligned access problem X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2005 19:20:04 -0000 On Mon, 2 May 2005, Maksim Yevmenkin wrote: > Hello, > >>>>>>> i think we have few options here: >>>>>>> >>>>>>> 1) revert back original tapwrite function that was changed in v. 1.48 >>>>>>> and set offset to 2 bytes in top mbuf >>>>>>> >>>>>>> 2) change current version of tapwrite so it would m_prepend and >>>>>>> m_pullup mbuf after m_uiotombuf >>>>>>> >>>>>>> 3) change m_uiotombuf to accept one more parameter - mbuf offset at >>>>>>> which data should be copied. there are not that many users of >>>>>>> m_uiotombuf >>> >>> please find and review the attached patch (untested) that implements >>> option (3) above. > > any objections to the attached (revised) patch? can i commit it? I've tested the code on fbsd-current alpha and it fixes the crash. I was kinda waiting for somebody to test it on sparc, but that's taking a few days longer than expected. I may run a test on one of my own sparcs to verify the results. That said, the issue seems pretty clear-cut, as is the solution. -- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem