DragonFly BSD
DragonFly kernel List (threaded) for 2004-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Heads Up: CAM ABI changes

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 18 Sep 2004 14:03:00 -0700 (PDT)

:You're not about to go preach on an UNCOL as well are you? ;)
:>    That is, we need a generalized big-ticket solution and shouldn't worry
:>    about non-core ABI breakages a this stage.
:Does this involve versioned structures and such as well?
:Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono

    I am thinking of having the kernel return a capability array that
    identifies various system structures:

	int count = getsysstructure("proc", cap_version, buf, sizeof(buf));

		Returns the number of capability elements for the structure
		or -1 if the buffer was not big enough (ENOSPC) or if the
		system structure could not be found (ENOENT).

		If buf is passed as NULL the number of capability elements
		required is returned or -1 if the structure could not be 

    This could be used by userland programs to identify the structure and
    copy the data to the userland structure equivalent.  And we could also 
    use this for our emulation layer to do the same thing (making it
    completely transparent).

    This allows us to be backwards compatible with 'old style' code which
    doesn't check.

    This also allows us to supply libc routines to translate structures
    given two capability arrays and two data buffers, which means we would
    also be able to supply libc routines that do all the necessary work for

    The capability structure would look something like:

	struct sys_capability {
		int32_t	cap_type;	/* type of entry */
		int32_t	cap_size;	/* size of target element or value */
		int32_t cap_offset;	/* offset of target element or -1 */
		int32_t cap_reserved;

    Capability types:




					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]