Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Aug 1999 11:04:06 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        "Brian F. Feldman" <green@freebsd.org>, Mike Smith <mike@smith.net.au>, Ollivier Robert <roberto@keltia.freenix.fr>, hackers@freebsd.org
Subject:   Re: Jail syscalls 
Message-ID:  <199908041804.LAA31039@apollo.backplane.com>
References:   <Pine.BSF.4.10.9908040949300.385-100000@salmon.nlsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
: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 <sys/jail.h>

      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 
					<dillon@backplane.com>


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?199908041804.LAA31039>