From owner-cvs-all Thu Sep 7 14:16:25 2000 Delivered-To: cvs-all@freebsd.org Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (Postfix) with ESMTP id 7A86937B43F; Thu, 7 Sep 2000 14:16:18 -0700 (PDT) Received: from imap.gv.tsc.tdk.com (imap.gv.tsc.tdk.com [192.168.241.198]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id OAA25760; Thu, 7 Sep 2000 14:16:17 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by imap.gv.tsc.tdk.com (8.9.3/8.9.3) with ESMTP id OAA38373; Thu, 7 Sep 2000 14:16:16 -0700 (PDT) (envelope-from Don.Lewis@tsc.tdk.com) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id OAA03992; Thu, 7 Sep 2000 14:16:16 -0700 (PDT) From: Don Lewis Message-Id: <200009072116.OAA03992@salsa.gv.tsc.tdk.com> Date: Thu, 7 Sep 2000 14:16:16 -0700 In-Reply-To: References: X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: Robert Watson , Don Lewis Subject: Re: cvs commit: src/sys/kern init_main.c kern_exec.c kern_exit.c kern_fork.c kern_proc.c kern_prot.c kern_resource.c uipc_socket.c uipc_socket2.c uipc_usrreq.c vfs_aio.c src/sys/sys proc.h resourcevar.h ucred.h Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sep 7, 5:04pm, Robert Watson wrote: } Subject: Re: cvs commit: src/sys/kern init_main.c kern_exec.c kern_exit.c } } > Because the pcred and ucred structures changed size, libkvm and friends } > will need to be rebuilt. } } I keep wondering to myself if we shouldn't start exporting something other } than our native in-kernel structures via sysctl--i.e., introduce a } version-controlled "exportproc" structure, and other related structs. } This would let things such as in-kernel flag changes, scheduler } modifications, etc, occur freely without breaking userland all the time. } The code in the appropriate sysctl would copy over documented, well-known } fields to exportproc. A lot of the things that change in struct proc are } of no interest to ps anyway :-). } } This becomes especially relevant when the fields of traditional single } monolithic structures (proc, cred, ...) start being broken out into more } modular structures; there's no reason for the userland sysctl api to } change as a result. We already do something like this. Take a look at struct kinfo_proc in sys/user.h. There is a sysctl hook in kern_proc.c to access this structure. The problem is that the contents are just a concatenation of proc, pcred, ucred, and a bunch of other stuff. We would need to redefine this structure to contain the stuff we want to export, and manually copy the data element by element. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message