From owner-cvs-all Sun Jul 28 22:14:43 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F9B337B400; Sun, 28 Jul 2002 22:14:40 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F3E843E42; Sun, 28 Jul 2002 22:14:39 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.5/8.12.5) with ESMTP id g6T5EPwr065150; Sun, 28 Jul 2002 22:14:29 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Message-Id: <200207290514.g6T5EPwr065150@gw.catspoiler.org> Date: Sun, 28 Jul 2002 22:14:25 -0700 (PDT) From: Don Lewis Subject: Re: cvs commit: src/sys/kern kern_sysctl.c To: jhb@FreeBSD.org Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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