From owner-freebsd-net Fri May 31 13: 0:38 2002 Delivered-To: freebsd-net@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id E3CDA37B400 for ; Fri, 31 May 2002 13:00:18 -0700 (PDT) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020531200016.QZLH11426.rwcrmhc51.attbi.com@InterJet.elischer.org>; Fri, 31 May 2002 20:00:16 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA29665; Fri, 31 May 2002 12:54:40 -0700 (PDT) Date: Fri, 31 May 2002 12:54:39 -0700 (PDT) From: Julian Elischer To: Bosko Milekic Cc: Archie Cobbs , freebsd-net@FreeBSD.ORG Subject: Re: m_split() considered harmful In-Reply-To: <20020531145938.A71219@unixdaemons.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, 31 May 2002, Bosko Milekic wrote: > > I don't remember why the ext_size here was this originally (as you > mention, it was imported that way), but it certainly seems bogus and > you catching it now is hopefully going to solve some really wierd and > difficult-to-debug problems we've had involving mbufs over the years. > It was imported from FreeBSD-1.x by rod. The size argument was for two reasons. 1/ to allow the M_LEADINGSPACE and M_TRAILINGSPACE calculations to be done if it was a single reference object. 2/ to allow the free function (in the case of non cluster external objects) to know what sized object they had in the case that they needed this information. I know because I added it, because I needed to do both of these at TRW in '90-'95 under MACH/BSD and when I moved the code to FreeBSD1.x it cam along.. there was no M_LEADINGSPACE/M_TRAILINGSPACE macro at that time.. I did it in my code explicitly. It was not used in standard code because only in my own protocol stack did I know that the damned object was not shared and writable.. This has improved with time.. Having the size set to 0 however stopped users from hitting cases where the WRITABILITY of the ext objext has not been correctly tracked as it always returns "not enough space" (sometimes -ve). If we change this we need to audit the WRITABILTY.. e.g. it is not checked in M_TRAILINGSPACE Julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message