misc/91293: *Experimental* Update to the SVR4 emulation (from
NetBSD)
Pedro f. Giffuni
giffunip at asme.org
Tue Jan 3 20:20:05 PST 2006
>Number: 91293
>Category: misc
>Synopsis: *Experimental* Update to the SVR4 emulation (from NetBSD)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 04 04:20:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Pedro f. Giffuni
>Release: 6.0-Release
>Organization:
>Environment:
FreeBSD etoile.cable.net.co 6.0-RELEASE FreeBSD 6.0-RELEASE #4: Sun Jan 1 14:47:14 COT 2006 root at etoile.cable.net.co:/usr/src/sys/amd64/compile/DIMENSION amd64
>Description:
The SVR4 emulator from NetBSD was ported by Mark Newton around 1998 and it should prove very useful for i386, amd64 and SPARC64 now that Solaris is available freely. Mark's Newton TODO list is probably still valid, but I took a quick look at the updates on NetBSD's CVS and tried apply most updates to FreeBSD. The following patch is untested, although I built it on amd64.
It would be great if someone that knows more about emulation (and kernels) reviews it. and continues where Mark left off. BTW, checking this patch makes me REALLY appreciate the hard work Mark made to port this.
>How-To-Repeat:
Here is a changelog (mostly stealed from NetBSD's CVS) of the changes I could rip off:
svr4_filio.c
-Bounds check syscall arguments where appropriate
svr4_ioctl.c
- Kill register declarations.
svr4_misc.c
- Add new sysconfig bits.
- Replace the statfs() family of system calls with statvfs() *DO CHECK*
- fix obvious bug in svr4_sys_resolvepath():
- fix NetBSD security/14444
- use strlcpy
- PR/29696 not all filesystems support cookies.
TODO:
Handle MAP_ANON (see also svr4_mman.h)
make signal array handling uniform
svr4_resource.c
- Kill register declarations.
svr4_siginfo.h
- Match the Solaris siginfo layout for _LP64.
svr4_signal.c
- Remove returns after returns(!)
svr4_stat.c:
- Add support for 64-bit SVR4 (Solaris 8) binaries.
- Remove breaks after returns, unreachable returns and returns after returns(!).
- use strlcpy
- Fix the sysinfo(SI_HW_SERIAL, emulation so that we actually get the hostid of the machine rather than always getting "0".
- Fix systeminfo.
1. return length is the string length even if the string would not fit.
2. add SI_ISALIST
3. on 32 bit emulation, don't return sparc64 as the arch!
svr4_stat.h:
- Translate _PC_FILESIZEBITS
- Add support for 64-bit SVR4 (Solaris 8) binaries.
svr4_sysconfig.h
- Add new sysconfig bits, Fix the bogus numbering of the old bits.
svr4_systeminfo.h
- Add some IRIX constants
svr4_timod.h
- Add a few more constants.
>Fix:
patch follows:
diff -ru svr4.orig/svr4_filio.c svr4/svr4_filio.c
--- svr4.orig/svr4_filio.c Tue Jan 3 16:41:01 2006
+++ svr4/svr4_filio.c Tue Jan 3 20:15:13 2006
@@ -209,6 +209,8 @@
*retval = 0;
+ if ((fp = fd_getfile(fdp, fd)) == NULL)
+ return EBADF;
switch (cmd) {
case SVR4_FIOCLEX:
FILEDESC_LOCK_FAST(fdp);
diff -ru svr4.orig/svr4_misc.c svr4/svr4_misc.c
--- svr4.orig/svr4_misc.c Tue Jan 3 16:41:01 2006
+++ svr4/svr4_misc.c Tue Jan 3 21:33:41 2006
@@ -109,9 +109,9 @@
struct svr4_hrtcntl_args;
static int svr4_hrtcntl (struct thread *, struct svr4_hrtcntl_args *,
register_t *);
-static void bsd_statfs_to_svr4_statvfs(const struct statfs *,
+static void bsd_statvfs_to_svr4_statvfs(const struct statvfs *,
struct svr4_statvfs *);
-static void bsd_statfs_to_svr4_statvfs64(const struct statfs *,
+static void bsd_statvfs_to_svr4_statvfs64(const struct statvfs *,
struct svr4_statvfs64 *);
static struct proc *svr4_pfind(pid_t pid);
@@ -369,7 +369,7 @@
svr4_dirent.d_off = (svr4_off_t)(off + reclen);
svr4_dirent.d_reclen = (u_short) svr4reclen;
}
- strcpy(svr4_dirent.d_name, bdp->d_name);
+ strlcpy(svr4_dirent.d_name, bdp->d_name, sizeof(svr4_dirent.d_name));
if ((error = copyout((caddr_t)&svr4_dirent, outp, svr4reclen)))
goto out;
inp += reclen;
@@ -483,7 +483,10 @@
reclen = bdp->d_reclen;
if (reclen & 3)
panic("svr4_sys_getdents64: bad reclen");
- off = *cookie++; /* each entry points to the next */
+ if (cookie)
+ off = *cookie++; /* each entry points to the next */
+ else
+ off += reclen;
if ((off >> 32) != 0) {
uprintf("svr4_sys_getdents64: dir offset too large for emulated program");
error = EINVAL;
@@ -507,7 +510,7 @@
idb.d_ino = (svr4_ino_t)bdp->d_fileno;
idb.d_off = (svr4_off_t)off;
idb.d_reclen = (u_short)svr4_reclen;
- strcpy(idb.d_name, bdp->d_name);
+ strlcpy(idb.d_name, bdp->d_name,sizeof(idb.d_name));
if ((error = copyout((caddr_t)&idb, outp, svr4_reclen)))
goto out;
/* advance past this real entry */
@@ -781,7 +784,45 @@
#endif
break;
#endif /* NOTYET */
-
+ case SVR4_CONFIG_COHERENCY:
+ *retval = 0; /* XXX */
+ break;
+ case SVR4_CONFIG_SPLIT_CACHE:
+ *retval = 0; /* XXX */
+ break;
+ case SVR4_CONFIG_ICACHESZ:
+ *retval = 256; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHESZ:
+ *retval = 256; /* XXX */
+ break;
+ case SVR4_CONFIG_ICACHELINESZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHELINESZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_ICACHEBLKSZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHEBLKSZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHETBLKSZ:
+ *retval = 64; /* XXX */
+ break;
+ case SVR4_CONFIG_ICACHE_ASSOC:
+ *retval = 1; /* XXX */
+ break;
+ case SVR4_CONFIG_DCACHE_ASSOC:
+ *retval = 1; /* XXX */
+ break;
+ case SVR4_CONFIG_MAXPID:
+ *retval = PID_MAX;
+ break;
+ case SVR4_CONFIG_STACK_PROT:
+ *retval = PROT_READ|PROT_WRITE|PROT_EXEC;
+ break;
default:
return EINVAL;
}
@@ -1254,16 +1295,16 @@
sx_xlock(&proctree_lock);
PROC_LOCK(q);
if (q->p_flag & P_TRACED) {
- if (q->p_oppid != q->p_pptr->p_pid) {
+ if (q->p_opptr != q->p_pptr) {
PROC_UNLOCK(q);
- t = pfind(q->p_oppid);
+ t = q->p_opptr;
if (t == NULL) {
t = initproc;
PROC_LOCK(initproc);
}
PROC_LOCK(q);
proc_reparent(q, t);
- q->p_oppid = 0;
+ q->p_opptr = NULL;
q->p_flag &= ~(P_TRACED | P_WAITED);
PROC_UNLOCK(q);
psignal(t, SIGCHLD);
@@ -1374,24 +1415,24 @@
static void
-bsd_statfs_to_svr4_statvfs(bfs, sfs)
- const struct statfs *bfs;
+bsd_statvfs_to_svr4_statvfs(bfs, sfs)
+ const struct statvfs *bfs;
struct svr4_statvfs *sfs;
{
- sfs->f_bsize = bfs->f_iosize; /* XXX */
- sfs->f_frsize = bfs->f_bsize;
+ sfs->f_bsize = bfs->f_bsize; /* XXX */
+ sfs->f_frsize = bfs->f_frsize;
sfs->f_blocks = bfs->f_blocks;
sfs->f_bfree = bfs->f_bfree;
sfs->f_bavail = bfs->f_bavail;
sfs->f_files = bfs->f_files;
sfs->f_ffree = bfs->f_ffree;
- sfs->f_favail = bfs->f_ffree;
- sfs->f_fsid = bfs->f_fsid.val[0];
+ sfs->f_favail = bfs->f_favail;
+ sfs->f_fsid = bfs->f_fsidx.__fsid_val[0];
memcpy(sfs->f_basetype, bfs->f_fstypename, sizeof(sfs->f_basetype));
sfs->f_flag = 0;
- if (bfs->f_flags & MNT_RDONLY)
+ if (bfs->f_flag & MNT_RDONLY)
sfs->f_flag |= SVR4_ST_RDONLY;
- if (bfs->f_flags & MNT_NOSUID)
+ if (bfs->f_flag & MNT_NOSUID)
sfs->f_flag |= SVR4_ST_NOSUID;
sfs->f_namemax = MAXNAMLEN;
memcpy(sfs->f_fstr, bfs->f_fstypename, sizeof(sfs->f_fstr)); /* XXX */
@@ -1400,11 +1441,11 @@
static void
-bsd_statfs_to_svr4_statvfs64(bfs, sfs)
- const struct statfs *bfs;
+bsd_statvfs_to_svr4_statvfs64(bfs, sfs)
+ const struct statvfs *bfs;
struct svr4_statvfs64 *sfs;
{
- sfs->f_bsize = bfs->f_iosize; /* XXX */
+ sfs->f_bsize = bfs->f_bsize; /* XXX */
sfs->f_frsize = bfs->f_bsize;
sfs->f_blocks = bfs->f_blocks;
sfs->f_bfree = bfs->f_bfree;
@@ -1412,12 +1453,12 @@
sfs->f_files = bfs->f_files;
sfs->f_ffree = bfs->f_ffree;
sfs->f_favail = bfs->f_ffree;
- sfs->f_fsid = bfs->f_fsid.val[0];
+ sfs->f_fsid = bfs->f_fsidx.__fsid_val[0];
memcpy(sfs->f_basetype, bfs->f_fstypename, sizeof(sfs->f_basetype));
sfs->f_flag = 0;
- if (bfs->f_flags & MNT_RDONLY)
+ if (bfs->f_flag & MNT_RDONLY)
sfs->f_flag |= SVR4_ST_RDONLY;
- if (bfs->f_flags & MNT_NOSUID)
+ if (bfs->f_flag & MNT_NOSUID)
sfs->f_flag |= SVR4_ST_NOSUID;
sfs->f_namemax = MAXNAMLEN;
memcpy(sfs->f_fstr, bfs->f_fstypename, sizeof(sfs->f_fstr)); /* XXX */
@@ -1431,17 +1472,17 @@
struct svr4_sys_statvfs_args *uap;
{
struct svr4_statvfs sfs;
- struct statfs bfs;
+ struct statvfs bfs;
char *path;
int error;
CHECKALTEXIST(td, uap->path, &path);
- error = kern_statfs(td, path, UIO_SYSSPACE, &bfs);
+ error = kern_statvfs(td, path, UIO_SYSSPACE, &bfs);
free(path, M_TEMP);
if (error)
return (error);
- bsd_statfs_to_svr4_statvfs(&bfs, &sfs);
+ bsd_statvfs_to_svr4_statvfs(&bfs, &sfs);
return copyout(&sfs, uap->fs, sizeof(sfs));
}
@@ -1452,13 +1493,13 @@
struct svr4_sys_fstatvfs_args *uap;
{
struct svr4_statvfs sfs;
- struct statfs bfs;
+ struct statvfs bfs;
int error;
- error = kern_fstatfs(td, uap->fd, &bfs);
+ error = kern_fstatvfs(td, uap->fd, &bfs);
if (error)
return (error);
- bsd_statfs_to_svr4_statvfs(&bfs, &sfs);
+ bsd_statvfs_to_svr4_statvfs(&bfs, &sfs);
return copyout(&sfs, uap->fs, sizeof(sfs));
}
@@ -1469,17 +1510,17 @@
struct svr4_sys_statvfs64_args *uap;
{
struct svr4_statvfs64 sfs;
- struct statfs bfs;
+ struct statvfs bfs;
char *path;
int error;
CHECKALTEXIST(td, uap->path, &path);
- error = kern_statfs(td, path, UIO_SYSSPACE, &bfs);
+ error = kern_statvfs(td, path, UIO_SYSSPACE, &bfs);
free(path, M_TEMP);
if (error)
return (error);
- bsd_statfs_to_svr4_statvfs64(&bfs, &sfs);
+ bsd_statvfs_to_svr4_statvfs64(&bfs, &sfs);
return copyout(&sfs, uap->fs, sizeof(sfs));
}
@@ -1490,13 +1531,13 @@
struct svr4_sys_fstatvfs64_args *uap;
{
struct svr4_statvfs64 sfs;
- struct statfs bfs;
+ struct statvfs bfs;
int error;
- error = kern_fstatfs(td, uap->fd, &bfs);
+ error = kern_fstatvfs(td, uap->fd, &bfs);
if (error)
return (error);
- bsd_statfs_to_svr4_statvfs64(&bfs, &sfs);
+ bsd_statvfs_to_svr4_statvfs64(&bfs, &sfs);
return copyout(&sfs, uap->fs, sizeof(sfs));
}
@@ -1664,6 +1705,6 @@
*retval = ncopy;
bad:
NDFREE(&nd, NDF_ONLY_PNBUF);
- vput(nd.ni_vp);
+ vrele(nd.ni_vp);
return error;
}
diff -ru svr4.orig/svr4_resource.c svr4/svr4_resource.c
--- svr4.orig/svr4_resource.c Tue Jan 3 16:41:01 2006
+++ svr4/svr4_resource.c Tue Jan 3 18:27:46 2006
@@ -127,7 +127,7 @@
int
svr4_sys_getrlimit(td, uap)
- register struct thread *td;
+ struct thread *td;
struct svr4_sys_getrlimit_args *uap;
{
int rl = svr4_to_native_rl(uap->which);
@@ -174,7 +174,7 @@
int
svr4_sys_setrlimit(td, uap)
- register struct thread *td;
+ struct thread *td;
struct svr4_sys_setrlimit_args *uap;
{
int rl = svr4_to_native_rl(uap->which);
@@ -225,7 +225,7 @@
int
svr4_sys_getrlimit64(td, uap)
- register struct thread *td;
+ struct thread *td;
struct svr4_sys_getrlimit64_args *uap;
{
int rl = svr4_to_native_rl(uap->which);
@@ -272,7 +272,7 @@
int
svr4_sys_setrlimit64(td, uap)
- register struct thread *td;
+ struct thread *td;
struct svr4_sys_setrlimit64_args *uap;
{
int rl = svr4_to_native_rl(uap->which);
diff -ru svr4.orig/svr4_siginfo.h svr4/svr4_siginfo.h
--- svr4.orig/svr4_siginfo.h Tue Jan 3 16:41:01 2006
+++ svr4/svr4_siginfo.h Tue Jan 3 18:30:36 2006
@@ -80,6 +80,10 @@
int _signo;
int _code;
int _errno;
+#ifdef _LP64
+ /* In _LP64 the union starts on an 8-byte boundary. */
+ int pad;
+#endif
union {
struct {
svr4_pid_t _pid;
diff -ru svr4.orig/svr4_signal.c svr4/svr4_signal.c
--- svr4.orig/svr4_signal.c Tue Jan 3 16:41:01 2006
+++ svr4/svr4_signal.c Tue Jan 3 21:59:52 2006
@@ -560,7 +560,6 @@
uap->uc));
return ENOSYS;
}
- return 0;
}
int
diff -ru svr4.orig/svr4_socket.c svr4/svr4_socket.c
--- svr4.orig/svr4_socket.c Tue Jan 3 16:41:01 2006
+++ svr4/svr4_socket.c Tue Jan 3 18:44:04 2006
@@ -114,7 +114,8 @@
struct stat *st;
{
struct svr4_sockcache_entry *e;
- int len, error;
+ size_t len;
+ int error;
mtx_lock(&Giant);
diff -ru svr4.orig/svr4_socket.h svr4/svr4_socket.h
--- svr4.orig/svr4_socket.h Tue Jan 3 16:41:01 2006
+++ svr4/svr4_socket.h Tue Jan 3 18:47:05 2006
@@ -49,7 +49,7 @@
};
struct sockaddr_un *svr4_find_socket(struct thread *, struct file *,
- dev_t, ino_t);
+ dev_t, svr4_ino_t);
void svr4_delete_socket(struct proc *, struct file *);
int svr4_add_socket(struct thread *, const char *, struct stat *);
diff -ru svr4.orig/svr4_stat.c svr4/svr4_stat.c
--- svr4.orig/svr4_stat.c Tue Jan 3 16:41:01 2006
+++ svr4/svr4_stat.c Tue Jan 3 19:33:39 2006
@@ -126,12 +126,15 @@
st4->st_gid = st->st_gid;
st4->st_rdev = bsd_to_svr4_dev_t(st->st_rdev);
st4->st_size = st->st_size;
- st4->st_atim = st->st_atimespec;
- st4->st_mtim = st->st_mtimespec;
- st4->st_ctim = st->st_ctimespec;
+ st4->st_atim = st->st_atimespec.tv_sec;
+ st4->st_mtim = st->st_mtimespec.tv_nsec;
+ st4->st_ctim = st->st_ctimespec.tv_sec;
+ st4->st_mtim.tv_nsec = st->st_mtimespec.tv_nsec;
+ st4->st_ctim.tv_sec = st->st_ctimespec.tv_sec;
+ st4->st_ctim.tv_nsec = st->st_ctimespec.tv_nsec;
st4->st_blksize = st->st_blksize;
st4->st_blocks = st->st_blocks;
- strcpy(st4->st_fstype, "unknown");
+ strlcpy(st4->st_fstype, "unknown", sizeof(st4->st_fstype));
}
@@ -149,12 +152,15 @@
st4->st_gid = st->st_gid;
st4->st_rdev = bsd_to_svr4_dev_t(st->st_rdev);
st4->st_size = st->st_size;
- st4->st_atim = st->st_atimespec;
- st4->st_mtim = st->st_mtimespec;
- st4->st_ctim = st->st_ctimespec;
+ st4->st_atim = st->st_atimespec.tv_sec;
+ st4->st_mtim = st->st_mtimespec.tv_nsec;
+ st4->st_ctim = st->st_ctimespec.tv_sec;
+ st4->st_mtim.tv_nsec = st->st_mtimespec.tv_nsec;
+ st4->st_ctim.tv_sec = st->st_ctimespec.tv_sec;
+ st4->st_ctim.tv_nsec = st->st_ctimespec.tv_nsec;
st4->st_blksize = st->st_blksize;
st4->st_blocks = st->st_blocks;
- strcpy(st4->st_fstype, "unknown");
+ strlcpy(st4->st_fstype, "unknown", sizeof(st4->st_fstype));
}
int
@@ -444,9 +450,21 @@
case SVR4_SI_ARCHITECTURE:
str = machine;
break;
+ case SVR4_SI_ISALIST:
+#if defined(__sparc__)
+ str = "sparcv9 sparcv9-fsmuld sparcv8 sparcv8-fsmuld sparcv7 sparc";
+#elif defined(__i386__)
+ str = "i386";
+#elif defined(__amd64__)
+ str = "amd64";
+#else
+ str = "unknown";
+ #endif
+ break;
case SVR4_SI_HW_SERIAL:
- str = "0";
+ snprintf(buf, sizeof(buf), "%lu", hostid);
+ str = buf;
break;
case SVR4_SI_HW_PROVIDER:
@@ -543,7 +561,6 @@
default:
return ENOSYS;
}
- return ENOSYS;
}
diff -ru svr4.orig/svr4_stat.h svr4/svr4_stat.h
--- svr4.orig/svr4_stat.h Tue Jan 3 16:41:01 2006
+++ svr4/svr4_stat.h Tue Jan 3 19:53:48 2006
@@ -42,36 +42,47 @@
svr4_o_uid_t st_uid;
svr4_o_gid_t st_gid;
svr4_o_dev_t st_rdev;
- svr4_off_t st_size;
- svr4_time_t st_atim;
- svr4_time_t st_mtim;
- svr4_time_t st_ctim;
+ svr4_off32_t st_size;
+ svr4_time32_t st_atim;
+ svr4_time32_t st_mtim;
+ svr4_time32_t st_ctim;
};
struct svr4_xstat {
svr4_dev_t st_dev;
+#ifndef _LP64
long st_pad1[3];
+#endif
svr4_ino_t st_ino;
svr4_mode_t st_mode;
svr4_nlink_t st_nlink;
svr4_uid_t st_uid;
svr4_gid_t st_gid;
svr4_dev_t st_rdev;
+#ifndef _LP64
long st_pad2[2];
+#endif
svr4_off_t st_size;
+#ifndef _LP64
long st_pad3;
+#endif
svr4_timestruc_t st_atim;
svr4_timestruc_t st_mtim;
svr4_timestruc_t st_ctim;
- long st_blksize;
+
+ int st_blksize;
svr4_blkcnt_t st_blocks;
char st_fstype[16];
+#ifndef _LP64
long st_pad4[8];
+#endif
};
struct svr4_stat64 {
svr4_dev_t st_dev;
+#ifndef _LP64
long st_pad1[3];
+#endif
svr4_ino64_t st_ino;
svr4_mode_t st_mode;
svr4_nlink_t st_nlink;
@@ -101,5 +112,6 @@
#define SVR4_PC_ASYNC_IO 10
#define SVR4_PC_PRIO_IO 11
#define SVR4_PC_SYNC_IO 12
+#define SVR4_PC_FILESIZEBITS 67
#endif /* !_SVR4_STAT_H_ */
diff -ru svr4.orig/svr4_sysconfig.h svr4/svr4_sysconfig.h
--- svr4.orig/svr4_sysconfig.h Tue Jan 3 16:41:01 2006
+++ svr4/svr4_sysconfig.h Tue Jan 3 22:25:50 2006
@@ -43,20 +43,36 @@
#define SVR4_CONFIG_PROF_TCK 0x0a
#define SVR4_CONFIG_NPROC_CONF 0x0b
#define SVR4_CONFIG_NPROC_ONLN 0x0c
-#define SVR4_CONFIG_AIO_LISTIO_MAX 0x0e
-#define SVR4_CONFIG_AIO_MAX 0x0f
-#define SVR4_CONFIG_AIO_PRIO_DELTA_MAX 0x10
-#define SVR4_CONFIG_DELAYTIMER_MAX 0x11
-#define SVR4_CONFIG_MQ_OPEN_MAX 0x12
-#define SVR4_CONFIG_MQ_PRIO_MAX 0x13
-#define SVR4_CONFIG_RTSIG_MAX 0x14
-#define SVR4_CONFIG_SEM_NSEMS_MAX 0x15
-#define SVR4_CONFIG_SEM_VALUE_MAX 0x16
-#define SVR4_CONFIG_SIGQUEUE_MAX 0x17
-#define SVR4_CONFIG_SIGRT_MIN 0x18
-#define SVR4_CONFIG_SIGRT_MAX 0x19
-#define SVR4_CONFIG_TIMER_MAX 0x20
-#define SVR4_CONFIG_PHYS_PAGES 0x21
-#define SVR4_CONFIG_AVPHYS_PAGES 0x22
+#define SVR4_CONFIG_AIO_LISTIO_MAX 0x0d
+#define SVR4_CONFIG_AIO_MAX 0x0e
+#define SVR4_CONFIG_AIO_PRIO_DELTA_MAX 0x0f
+#define SVR4_CONFIG_DELAYTIMER_MAX 0x10
+#define SVR4_CONFIG_MQ_OPEN_MAX 0x11
+#define SVR4_CONFIG_MQ_PRIO_MAX 0x12
+#define SVR4_CONFIG_RTSIG_MAX 0x13
+#define SVR4_CONFIG_SEM_NSEMS_MAX 0x14
+#define SVR4_CONFIG_SEM_VALUE_MAX 0x15
+#define SVR4_CONFIG_SIGQUEUE_MAX 0x16
+#define SVR4_CONFIG_SIGRT_MIN 0x17
+#define SVR4_CONFIG_SIGRT_MAX 0x18
+#define SVR4_CONFIG_TIMER_MAX 0x19
+#define SVR4_CONFIG_PHYS_PAGES 0x1a
+#define SVR4_CONFIG_AVPHYS_PAGES 0x1b
+#define SVR4_CONFIG_COHERENCY 0x1c
+#define SVR4_CONFIG_SPLIT_CACHE 0x1d
+#define SVR4_CONFIG_ICACHESZ 0x1e
+#define SVR4_CONFIG_DCACHESZ 0x1f
+#define SVR4_CONFIG_ICACHELINESZ 0x20
+#define SVR4_CONFIG_DCACHELINESZ 0x21
+#define SVR4_CONFIG_ICACHEBLKSZ 0x22
+#define SVR4_CONFIG_DCACHEBLKSZ 0x23
+#define SVR4_CONFIG_DCACHETBLKSZ 0x24
+#define SVR4_CONFIG_ICACHE_ASSOC 0x25
+#define SVR4_CONFIG_DCACHE_ASSOC 0x26
+#define SVR4_CONFIG_UNUSED_2 0x27
+#define SVR4_CONFIG_UNUSED_3 0x28
+#define SVR4_CONFIG_UNUSED_4 0x29
+#define SVR4_CONFIG_MAXPID 0x2a
+#define SVR4_CONFIG_STACK_PROT 0x2b
#endif /* !_SVR4_SYSCONFIG_H_ */
diff -ru svr4.orig/svr4_systeminfo.h svr4/svr4_systeminfo.h
--- svr4.orig/svr4_systeminfo.h Tue Jan 3 16:41:01 2006
+++ svr4/svr4_systeminfo.h Tue Jan 3 22:30:47 2006
@@ -31,20 +31,35 @@
#ifndef _SVR4_SYSTEMINFO_H_
#define _SVR4_SYSTEMINFO_H_
-#define SVR4_SI_SYSNAME 1
-#define SVR4_SI_HOSTNAME 2
-#define SVR4_SI_RELEASE 3
-#define SVR4_SI_VERSION 4
-#define SVR4_SI_MACHINE 5
-#define SVR4_SI_ARCHITECTURE 6
-#define SVR4_SI_HW_SERIAL 7
-#define SVR4_SI_HW_PROVIDER 8
-#define SVR4_SI_SRPC_DOMAIN 9
-#define SVR4_SI_SET_HOSTNAME 258
-#define SVR4_SI_SET_SRPC_DOMAIN 265
-#define SVR4_SI_SET_KERB_REALM 266
-#define SVR4_SI_KERB_REALM 267
-#define SVR4_SI_PLATFORM 513
-#define SVR4_SI_ISALIST 514
+#define SVR4_SI_SYSNAME 1
+#define SVR4_SI_HOSTNAME 2
+#define SVR4_SI_RELEASE 3
+#define SVR4_SI_VERSION 4
+#define SVR4_SI_MACHINE 5
+#define SVR4_SI_ARCHITECTURE 6
+#define SVR4_SI_HW_SERIAL 7
+#define SVR4_SI_HW_PROVIDER 8
+#define SVR4_SI_SRPC_DOMAIN 9
+#define SVR4_SI_INITTAB_NAME 10
+
+#define SVR4_MIPS_SI_VENDOR 100
+#define SVR4_MIPS_SI_OS_PROVIDER 101
+#define SVR4_MIPS_SI_OS_NAME 102
+#define SVR4_MIPS_SI_HW_NAME 103
+#define SVR4_MIPS_SI_NUM_PROCESSORS 104
+#define SVR4_MIPS_SI_HOSTID 105
+#define SVR4_MIPS_SI_OSREL_MAJ 106
+#define SVR4_MIPS_SI_OSREL_MIN 107
+#define SVR4_MIPS_SI_OSREL_PATCH 108
+#define SVR4_MIPS_SI_PROCESSORS 109
+#define SVR4_MIPS_SI_AVAIL_PROCESSORS 110
+#define SVR4_MIPS_SI_SERIAL 111
+
+#define SVR4_SI_SET_HOSTNAME 258
+#define SVR4_SI_SET_SRPC_DOMAIN 265
+#define SVR4_SI_SET_KERB_REALM 266
+#define SVR4_SI_KERB_REALM 267
+#define SVR4_SI_PLATFORM 513
+#define SVR4_SI_ISALIST 514
#endif /* !_SVR4_SYSTEMINFO_H_ */
diff -ru svr4.orig/svr4_timod.h svr4/svr4_timod.h
--- svr4.orig/svr4_timod.h Tue Jan 3 16:41:01 2006
+++ svr4/svr4_timod.h Tue Jan 3 22:36:00 2006
@@ -75,8 +75,8 @@
#define SVR4_TI_BIND_REQUEST 0x20
#define SVR4_TI_OPTMGMT_REQUEST 0x21
-#define SVR4_TI__ACCEPT_WAIT 0x10000001
-#define SVR4_TI__ACCEPT_OK 0x10000002
+#define SVR4_TI__ACCEPT_WAIT 0x10000001
+#define SVR4_TI__ACCEPT_OK 0x10000002
struct svr4_netbuf {
u_int maxlen;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list