Commit Graph

55 Commits

Author SHA1 Message Date
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos 758a209d23 64 bit inode changes. 2005-08-19 02:03:49 +00:00
christos c0ee8a4184 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!
2005-07-28 03:50:52 +00:00
perry 477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
dmcmahill 888e67edcc Fix the sysinfo(SI_HW_SERIAL, emulation so that we actually get the
hostid of the machine rather than always getting "0".  Tested with
hostid(1) from solaris-2.8 and with lmhostid (part of FlexLM) for solaris.
Approved by atatat@.
2004-04-19 02:55:40 +00:00
atatat 13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
itojun 51110d0c20 use strlcpy
[compat/svr4_32 should have bound check for SVR4_32_AUX_ARGSIZ]
2003-05-16 14:36:30 +00:00
thorpej 9b46ebe0bd Merge the nathanw_sa branch. 2003-01-18 08:44:26 +00:00
simonb 4e3613273b Remove breaks after returns, unreachable returns and returns after
returns(!).
2002-09-23 05:51:10 +00:00
christos 381e6a7764 make the stackgap_{init,alloc} functions MP friendly (i.e. pass struct proc *
in, instead of using curproc). While there add an optional size argument to
stackgap_init.
2002-03-16 20:43:48 +00:00
lukem dab6ef8b56 add RCSIDs (including regeneration of files as appropriate) 2001-11-13 02:07:52 +00:00
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