From owner-freebsd-arch Fri Jun 7 11:19: 9 2002 Delivered-To: freebsd-arch@freebsd.org Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.120.12]) by hub.freebsd.org (Postfix) with ESMTP id BB3F037B404; Fri, 7 Jun 2002 11:19:06 -0700 (PDT) Received: from pool0425.cvx22-bradley.dialup.earthlink.net ([209.179.199.170] helo=mindspring.com) by harrier.mail.pas.earthlink.net with esmtp (Exim 3.33 #2) id 17GOKH-0001LL-00; Fri, 07 Jun 2002 11:19:05 -0700 Message-ID: <3D00F8F6.D020EB53@mindspring.com> Date: Fri, 07 Jun 2002 11:18:30 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: John Baldwin Cc: arch@FreeBSD.org Subject: Re: KTRACE genio trace question References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG John Baldwin wrote: > green changed this in revision 1.37 of kern_ktrace.c to instead > use a copy of the original uio and split the write operation into > two VOP_WRITE's. However, this can result in a corrupt tracefile if > the first VOP_WRITE succeeds but the second one fails. Under what circumstances is this possible, such that the original code would *not* have also failed on the second loop through the uiomove code? > Also, since we defer the copyin() until the VOP_WRITE, the actual > VOP_WRITE needs to be done by the original thread requiring ugly > synchronization between the ktrace worker thread and the thread > submitting a trace request. I don't understand this requirement; all threads in a thread group have identical references to the same address spaces. Therefore, as long as you have the correct process, you shouldn't care, right? -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message