From owner-freebsd-hackers Tue Mar 27 23:35:12 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 1440537B71C; Tue, 27 Mar 2001 23:35:01 -0800 (PST) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 28 Mar 2001 08:35:00 +0100 (BST) To: Brian Somers Cc: David Malone , freebsd-hackers@freebsd.org, freebsd-alpha@freebsd.org, wpaul@freebsd.org Subject: Re: Control messages. In-reply-to: Your message of "Tue, 27 Mar 2001 17:41:19 BST." <200103271641.f2RGfJL00975@hak.lan.Awfulhak.org> X-Request-Do: Date: Wed, 28 Mar 2001 08:34:53 +0100 From: David Malone Message-ID: <200103280835.aa82064@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I can't see where in the kernel we're *not* using CMSG_DATA(). This > was fixed a while ago and tested ok on beast (for 3 descriptors > AFAIR). Are we looking at the same code (I'm looking in /sys/kern) ? Have a look in uipc_usrreq.c:unp_internalize(), it uses (cm+1) to find where the data is to be written out in the CREDS case and uses (cm+1) to find where the descriptors start in the RIGHTS case. The reallocation code seems to be broken (it attaches a cluster to a mbuf it is still using, currupting the data in the mbuf). If I enable it on the 386, where it is unnecessaey usually, and pass about 50 discriptors I get a panic. I've had a look at what other people have done about this issue. The NetBSD people seem to have taken the fix I'm proposing. Solaris and BSD/OS don't provide the required alignment and just define CMSG_DATA(cm) to be (cm+1). David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message