Coda File System

caddr_t considered messy in coda_readlink_out

From: Greg Troxel <>
Date: Wed, 05 Apr 2006 08:33:39 -0400
In the venus/kernel interface, readlink passes a string to the kernel.

struct coda_readlink_out {
    struct coda_out_hdr oh;
    int	count;
    caddr_t	data;		/* Place holder for data. */

count has the number of bytes, and data is an offset relative to the
beginning of the structure.

This is pretty gross, and a misuse of caddr_t, since data doesn't
contain an actual address.

Does coda or a venus/kernel test program actually run on any 64-bit
systems yet?  Perhaps data should be relabeled "int data_offset",
which should preserve the ILP32 ABI.

(I just added code to NetBSD to validate data before using it, so that
the kernel would only read from the allocated area.)

It would be good to put the semantics of these variables in coda.h,

We should keep a list of things to change for the next kernel/venus
version bump - and readlink should be on it.

        Greg Troxel <>
Received on 2006-04-05 08:36:28