From owner-cvs-all Mon Jul 29 5:14:44 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 1406937B406 for ; Mon, 29 Jul 2002 05:14:27 -0700 (PDT) Received: from mail.speakeasy.net (mail17.speakeasy.net [216.254.0.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id 493DA43E65 for ; Mon, 29 Jul 2002 05:14:26 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 5868 invoked from network); 29 Jul 2002 12:14:25 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail17.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 29 Jul 2002 12:14:25 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g6TCEPuR050117; Mon, 29 Jul 2002 08:14:25 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200207290514.g6T5EPwr065150@gw.catspoiler.org> Date: Mon, 29 Jul 2002 08:14:32 -0400 (EDT) From: John Baldwin To: Don Lewis Subject: Re: cvs commit: src/sys/kern kern_sysctl.c Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org 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 29-Jul-2002 Don Lewis wrote: > 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. I think that's a bug not a feature. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message