Date: Wed, 4 Aug 1999 09:52:25 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: "Brian F. Feldman" <green@freebsd.org> Cc: Mike Smith <mike@smith.net.au>, Matthew Dillon <dillon@apollo.backplane.com>, Ollivier Robert <roberto@keltia.freenix.fr>, hackers@freebsd.org Subject: Re: Jail syscalls Message-ID: <Pine.BSF.4.10.9908040949300.385-100000@salmon.nlsystems.com> In-Reply-To: <Pine.BSF.4.10.9908040319040.47190-100000@janus.syracuse.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 4 Aug 1999, Brian F. Feldman wrote: > On Tue, 3 Aug 1999, Mike Smith wrote: > > > > Speaking of the jail() syscall -- it really needs to be revamped a > > > little before people really start using it wholeheartedly. The size > > > of the jail structure needs to be passed in the syscall to allow backwards > > > compatibility when things change such as, for example, the size of the > > > IP address. > > > > Actually, with interfaces like this you should generally pass a pointer > > to the structure in userspace, and stick a version number constant in > > the beginning of the structure. The size is often not enough of a > > determining factor... > > Actually, the structure shouldn't change size because it should be > using a sockaddr. 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9908040949300.385-100000>