Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 2002 22:14:25 -0700 (PDT)
From:      Don Lewis <dl-freebsd@catspoiler.org>
To:        jhb@FreeBSD.org
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_sysctl.c
Message-ID:  <200207290514.g6T5EPwr065150@gw.catspoiler.org>
In-Reply-To: <XFMail.20020728234222.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28 Jul, John Baldwin wrote:

> Actually, we need to rework the generic sysctl alogrithm in general to do
> copyin first of any new data values, lock, make changes and copy output to
> temporary variables, unlock, then do copyout.  I talked about this in the
> SMPng document I posted several months ago but I guess few people read it.

That's pretty much the conclusion that I came to.

One question is whether we want to support calls where the old and new
pointers point to the same address.  In the current implementation this
will result in the in-kernel value being unchanged, since the copyin
would fetch the data output by the copyout.  The in-kernel value will
get changed to something else of if the order of the copyin and copyout
is reversed. I haven't had a chance to scan the source tree to see if
there are any sysctl() calls that do this.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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