Commit Graph

42 Commits

Author SHA1 Message Date
eeh
a72ee87980 Add support for 64-bit SVR4 (Solaris 8) binaries. 2001-02-21 23:53:00 +00:00
jdolecek
01040d97a2 add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables

change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need
to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed
change explicit emul_find() calls in probe functions to get the emulation
path from the checked exec switch entry's emulation

remove no longer needed header files

add e_flags and e_syscall to struct emul; these are unsed and empty for now
2000-12-01 12:28:30 +00:00
sommerfeld
6b88a0fc51 Emulation stackgap sanity checks, based partly on fixes from
FreeBSD-SA00:42.

Change stackgap_alloc to bounds-check the allocation vs. the stack
gap, returning NULL if there isn't room for the allocation.

Change emul_find() to check for a NULL return from stackgap_alloc()
and convert that into ENAMETOOLONG.

Reorder various emulation syscalls so that all *_CHECK_ALT_{EXIST,CREAT}
calls (which turn into emul_find() under the covers come *after* small,
fixed-size stackgap_alloc() calls.

Clean up ibcs2 {get,set}groups.
2000-08-29 14:33:25 +00:00
thorpej
9d069ade37 Sprinkle some const. 2000-07-14 18:26:46 +00:00
mrg
13f211c52e remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-28 15:39:24 +00:00
chs
f1196b666f change "ifdef sparc" to "ifdef __sparc__".
this fixes solaris shared libraries.
2000-04-07 07:02:11 +00:00
augustss
a82aeb5508 Kill register declarations. 2000-03-30 11:24:16 +00:00
simonb
2f1fef39b3 Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
2000-03-28 23:57:24 +00:00
christos
d205cc9cd4 oops, forgot to include new files. 1999-09-07 18:20:18 +00:00
kleink
6558e04aea Translate _PC_FILESIZEBITS. 1999-03-23 14:57:00 +00:00
christos
8087b4fda3 const poisoning and CHECK_ALT_CREAT fixes. 1999-02-09 20:46:41 +00:00
kleink
5eb233ddd5 Return the machine's ISA for SI_ARCHITECTURE. 1999-01-20 22:09:17 +00:00
christos
879032f748 fix systeminfo. We return ipc86 for the i386, SUNW,SPARCstation-10 for
sparc, and unknown for the rest. Also make sure that the string is terminated
properly and the length is returned as the specification calls. Maybe sometime
we can read the prom on the sparc and return the actual model.
1998-12-10 17:06:13 +00:00
christos
e1f16dd0c9 Assign copyrights to TNF; tv has copyrights on the remaining files...
It would be nice if he changed them (hint, hint)
1998-09-04 19:54:37 +00:00
perry
e1601dc2ca bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:36:58 +00:00
kleink
af261318d9 Now that we have it, add a conversion for _PC_SYNC_IO. 1998-08-03 14:23:30 +00:00
christos
6a9178e444 From Todd Vierling:
- Fix memcntl()
- Fixed stat and mknod syscalls to properly disassemble and reassemble
  dev_t values to/from emulation dev_t's
- Added pty (ptmx) subsystem at svr4net minor number 10 -- /dev/ptmx
- Implemented fork1() as fork() (should change if and when threads get
  added to the system)
- fixed spellings in disclaimer in svr4_net.c; it looks like someone went
  and did a s/nd/st/g on the whole file... yuck
- changed ptmx device to also halt on ENXIO (for pty files that exist with
  no kernel pty to back them)
- fixed SVR4 setpgrp() to be a near equivalent to BSD setsid() (old
  emulation didn't create a new session)
1997-11-16 22:50:55 +00:00
pk
78ccc57a52 Fix test for NULL arg in svr4_utime() (PR#4418). 1997-11-03 21:33:07 +00:00
thorpej
14cd99880c Fix the shared library versioning snafu caused by the recent changes
to the stat(2) family and msync(2).  This uses a primitive function
versioning scheme.

This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.

From Frank van der Linden <fvdl@NetBSD.ORG>.
1997-10-20 22:05:06 +00:00
christos
ee8b56d3e6 Add:
64 bit filesystem system calls
	socket system calls
	ntp system calls
1997-07-21 23:02:34 +00:00
fvdl
bb31faf853 Make this compile again, including Politically Correct const handling. 1996-12-22 23:00:02 +00:00
christos
02f94c17fb Add SI_SYSTEMINFO from Solaris-2.5 1996-04-22 01:16:04 +00:00
christos
8294057bdb Svr4 does not have unix domain sockets; it emulates them with mode 0 named
pipes. Emulate that behavior, by telling svr4 we've found mode 0 named pipe
when we find a unix domain socket. Also record the name and device,inode
pair of sockets found.
1996-04-11 12:46:41 +00:00
christos
eb13d0121e - fixed wrong argument order in xmknod
- added proper support for {f,}pathconf
1996-02-10 17:12:31 +00:00
christos
1b17f25866 fix prototype warnings 1996-02-09 23:12:14 +00:00
jtc
e19bfae4f9 Rename struct timespec fields to conform to POSIX.1b 1996-02-01 00:18:04 +00:00
christos
ac82785d44 fix compile error from fvdl; thanks. 1995-12-19 18:27:02 +00:00
christos
20a2ff3d16 Added utime and utimes 1995-12-19 07:12:53 +00:00
christos
a4e2f7532a - Added msgsys, shmsys and semsys... MITSHM needs shmsys, so X applications
that used that would fail.
- Propagated all the fixes from the fully prototyped kernel.
1995-10-14 20:24:14 +00:00
mycroft
245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej
eecd40e854 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 22:10:11 +00:00
christos
68328ddcdd Fixes for Solaris-2.4/sparc dynamically linked binaries.
We can now run them, but:

1. setcontext() causes a panic so binaries that receive signals
   crash the machine [something is wrong with the register setup].
   sleep 10 ==
    Watchdog reset
    Data Access Exception
    Type  help  for more information
    ok

2. csh says "unknown software trap a7".
3. ls gives us a bus error.
4. ldd works :-)

But I solved the problem that had been bothering me for weeks :-)
1995-06-27 22:12:47 +00:00
christos
d0169ce44a Use compat_util.[ch] 1995-06-24 20:29:17 +00:00
mycroft
b1868d1bdf Set st_rdev in SVR4 struct stat. 1995-06-10 22:44:18 +00:00
christos
ee05f066e8 1. siginfo stuff torn out from wait.h to be used by the MI portion of the code.
2. many termio, ioctl, sigaction fixes
3. better socket type emulation; still ticotsord [the loopback interface I
   guess] does not work properly on svr4 4.1.
4. new gettimeofday, fixed utssys..
5. rmdir and mkdir were swapped in syscalls.master
1995-03-31 03:06:17 +00:00
christos
22572ffee9 More debugging for waitsys()
Fixed uname which was broken since 1.0.
Added timod/getinfo stream ioctl.
Fixed TIOC{G,S}PGRP
Fixed typo in the flags translation
1995-01-10 00:04:03 +00:00
christos
2859b1c634 Rework streams emulation so that it does not rely on non portable hacks.
We keep streams state in so->so_ptcb; this field is unused in all the kernel.
Fix poll(2) timeout computation; add hrtsys and waitsys syscalls.
1994-11-18 02:53:37 +00:00
christos
25ef6e1436 More functionality and bug fixes 1994-11-14 06:10:37 +00:00
christos
f46f498d53 Changed code to KNF, removed global variable per cgd's request. 1994-10-29 00:43:14 +00:00
christos
afffe1aaf8 Fixed Charles suggestions:
1. always do the stackgap_init()/CHECKALT first in syscalls that need it.
2. svr4_emul_find() uses malloc for the buf, does not use copyoutstr, but
   copyout().

Removed makesyscalls.sh; it was really old and we don't need a separate copy.
1994-10-26 11:58:24 +00:00
cgd
69d2deb545 new RCS ID format. 1994-10-26 05:27:43 +00:00
deraadt
b415eb1d1d new from christos 1994-10-24 17:37:34 +00:00