From owner-freebsd-net Fri May 31 14:30:38 2002 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id DCBE237B406 for ; Fri, 31 May 2002 14:30:33 -0700 (PDT) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id OAA58663; Fri, 31 May 2002 14:12:39 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g4VLBff02718; Fri, 31 May 2002 14:11:41 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200205312111.g4VLBff02718@arch20m.dellroad.org> Subject: Re: m_split() considered harmful In-Reply-To: "from Julian Elischer at May 31, 2002 01:52:18 pm" To: Julian Elischer Date: Fri, 31 May 2002 14:11:41 -0700 (PDT) Cc: Archie Cobbs , Bosko Milekic , freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 Julian Elischer writes: > > It's not clear whether the caller of M_TRAILINGSPACE()/M_LEADINGSPACE() > > is responsible for checking for writability, or the macros themselves. > > It seems to make more sense that the caller would be responsible... > > why would you call M_TRAILINGSPACE() unless you wanted to write > > something in there? > > M_TRAILINGSPACE is called to ask > "How much writable room is there after hte data here? That's the other interpretation :-) > your patch looks better now > I'm wouldering however if any code other than that looks at ext_size Like I said, I did an exhaustive search. The most interesting example is sbdrop(). You can see for yourself.. there aren't that many files: vi `(cd /sys && find . -type f -print | xargs grep -lw ext_size)` -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message