From owner-freebsd-alpha Wed Jun 20 0: 3:40 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by hub.freebsd.org (Postfix) with ESMTP id 11B6637B403 for ; Wed, 20 Jun 2001 00:03:37 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.247.138.115.Dial1.SanJose1.Level3.net [209.247.138.115]) by hawk.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id AAA12064; Wed, 20 Jun 2001 00:03:27 -0700 (PDT) Message-ID: <3B304ADF.C5131399@mindspring.com> Date: Wed, 20 Jun 2001 00:03:59 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Bosko Milekic Cc: Terry Lambert , freebsd-alpha@FreeBSD.ORG Subject: Re: vx, lge, nge, dc, rl, sf, sis, sk, vr, wb users please TEST References: <20010619191602.A28591@technokratis.com> <200106200224.TAA24251@usr05.primenet.com> <20010619232624.A29829@technokratis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Bosko Milekic wrote: > > On Wed, Jun 20, 2001 at 02:24:02AM +0000, Terry Lambert wrote: > > > http://people.freebsd.org/~bmilekic/code/mdevget.patch > > > > Please run this past Bill Paul. > > I already did this. :-) If he approves, I approve. Like that really matters, if he approves... Bill is the Driver God. 8-) > I know. The problem is that the way the alignment > issue is presently handeled is wrong. See, to trick m_devget() > into writing the start of the data offset two bytes into the > target mbuf chain's first mbuf's data region (to make the > alignment OK), what was done was to pass for the `source buffer > address' argument to m_devget(), the actual address of the > source buffer MINUS ETHER_ALIGN (2 bytes). This had the effect > of copying the end of the previous cluster or the end of the > mbuf header (depending on where the source buffer is stored) > to the first two bytes of the target mbuf. Admittedly, this is > a cute trick, but it's wrong. What can happen (and will likely > happen w/ mb_alloc b/c mb_alloc keeps separate maps for clusters > and mbufs, to make address space limitations easier to maintain) > is that the "previous cluster" sits on another page which just > so happens to not be allocated yet, which will generate a page > fault during the bcopy() in m_devget(). Ah. I never see this, the way I allocate and back mbufs. The change makes much more sense now. I wondered why you cared about the potential for "leaking" two bytes of information, when the "leak" only occurred to other things already in kernel space, which could just look at anything they wanted to, anyway. > > Are these changes really necessary for the Alpha to work? > > Absolutely. I wouldn't exactly say "absolutely", unless you are actually measuring significant faulting as a result; I would say that they are harmless. I was just a bit nervous, since I had a long conversation with Bill on this and other nasty topics (e.g. I want to add a new function to the list of externally accessible functions exported by all ethernet drivers; more on that later, after the code is happy). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message