From owner-freebsd-net@FreeBSD.ORG Wed May 4 19:01:55 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 A980B16A4CE; Wed, 4 May 2005 19:01:55 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58D1D43D6D; Wed, 4 May 2005 19:01:55 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id 52F973BEC5; Wed, 4 May 2005 14:01:28 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15291-01-11; Wed, 4 May 2005 14:01:28 -0500 (CDT) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mailgate1b.savvis.net (Postfix) with ESMTP id 259FC3BE6C; Wed, 4 May 2005 14:01:28 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 4 May 2005 14:01:18 -0500 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Wed, 4 May 2005 14:01:12 -0500 Message-ID: <42791BF7.5080702@savvis.net> Date: Wed, 04 May 2005 12:01:11 -0700 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sten Spans 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> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 May 2005 19:01:12.0510 (UTC) FILETIME=[A3BD9DE0:01C550DB] X-Virus-Scanned: amavisd-new at savvis.net 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: Wed, 04 May 2005 19:01:55 -0000 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. > > I've gotten confirmation that the patch also fixes the crash > on RELENG_5/sparc64. Please commit. thanks. because no one had objections (or rather no one replied :) i went ahead and committed this. so, you all know whom to blame :) as jmg pointed out "align" cannot exceed MHLEN bytes. it it trivial to change should anyone ever require bigger "align". thanks, max >