Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Jun 2002 11:18:30 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        arch@FreeBSD.org
Subject:   Re: KTRACE genio trace question
Message-ID:  <3D00F8F6.D020EB53@mindspring.com>
References:  <XFMail.20020607123531.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D00F8F6.D020EB53>