From owner-freebsd-hackers Wed Aug 4 11: 4:44 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 1C8FB151C3; Wed, 4 Aug 1999 11:04:41 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id LAA31039; Wed, 4 Aug 1999 11:04:06 -0700 (PDT) (envelope-from dillon) Date: Wed, 4 Aug 1999 11:04:06 -0700 (PDT) From: Matthew Dillon Message-Id: <199908041804.LAA31039@apollo.backplane.com> To: Doug Rabson Cc: "Brian F. Feldman" , Mike Smith , Ollivier Robert , hackers@freebsd.org Subject: Re: Jail syscalls References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :The argument for versioning is not simply because the size of ip_number :might change (it should be a sockaddr) but because other fields might be :added or removed. To avoid allocating a new syscall whenever this happens, :the structure should be versioned. : :Putting sizeof(whatever) at the beginning of the structure works :surprisingly well as a versioning system. : :-- :Doug Rabson Mail: dfr@nlsystems.com :Nonlinear Systems Ltd. Phone: +44 181 442 9037 I think we basically have two choices: * Pass the sizeof(struct) as part of the system call. Please, not as part of the structure! That would make this syscall the odd-man-out compared to all the other syscalls that take size arguments. * Make the first field of the structure a real version id, one that is taken from the same include file that the structure was defined in, and require that the field be filled in. e.g. #include struct jail fubar = { JAIL_VERSION }; I kinda like the second choice the best but the first choice is what most other system calls use. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message