Commit Graph

1025 Commits

Author SHA1 Message Date
thorpej 0d3a57ea3f Add COMPAT_M68K4K to the exec switch. 1996-09-10 22:05:03 +00:00
mycroft 7cbc74f45c Use INFTIM, not -1. 1996-09-07 21:47:23 +00:00
mycroft 1449e67e30 Modify poll(2) prototype. 1996-09-07 14:20:09 +00:00
mycroft 07d2eae876 Regen. 1996-09-07 14:18:04 +00:00
mycroft cdd2b02b50 Modify poll(2) prototype. 1996-09-07 14:16:42 +00:00
mycroft 264dd4757c Regen. 1996-09-07 12:56:49 +00:00
mycroft 2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
mycroft 59f71c45fc Clean up sys_select() slightly. 1996-09-05 15:32:52 +00:00
mycroft af113f915d Use SET(), CLR(), ISSET(). 1996-09-05 15:31:40 +00:00
mycroft b3eac79b64 tty stop functions really should return void, not int, and certainly not both. 1996-09-02 06:43:16 +00:00
christos da17295d91 Calling shmdt(2) before calling shmat(2) would crash the system because
p->p_vmspace->vm_shm would be NULL. Protected the rest of the cases where
that might happen too. This was the reason why sunxdoom would panic the
system in SVR4 emulation.
1996-09-01 22:53:06 +00:00
mycroft de1c962824 Don't core dump if ruid != euid or rgid != egid. 1996-09-01 01:56:10 +00:00
cgd f8ed933394 implement realloc(), just like the user-land version, except it takes
"type" and "flags" arguments a la kernel malloc().
1996-08-27 20:01:42 +00:00
cgd d7083cda8d update so that SYSCALL_DEBUG works again. s/nosys/sys_nosys/g.
(It must not have been used for a long time!)
1996-08-20 22:00:36 +00:00
explorer a9ef8aef84 This fixes a nasty little bug where traceroute (and other raw-ip sending
programs which attach their own header) can crash the machine.  The problem
in this case was:
	a variable "space" was set to the total data to copy,
	len was used to remember how much to copy in this chunk (mbuf),
	in one case, len = min(MCLBYTES - max_hdr, resid) but
		size -= MCLBYTES;
	 instead of
		size -= len;

Note that userland programs can still crash the machine by providing
bogus data in the ip->ip_len field I suspect.  I haven't verified this,
but will soon be doing so and applying a fix of some sort.  Probably
clamping the ip->ip_len value to the true packet size will be ok.
1996-08-14 05:53:18 +00:00
explorer 1177a1fc69 formatting fix only 1996-08-14 05:43:35 +00:00
explorer 13659c5c84 spelling error only 1996-08-14 05:43:19 +00:00
thorpej d719cb7901 Inside some DIAGNOSTIC code, cast some pointer arithmetic results
to long to quiet the compiler.
1996-08-13 23:25:10 +00:00
mrg cd658e4447 oops, need to copyinstr() here. how come it worked anyway? 1996-08-11 04:05:33 +00:00
mrg 72bad48e62 implement RB_STRING, derived from SunOS, via compat_sunos. 1996-08-10 00:23:14 +00:00
mrg 5abbf990f3 Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models.  It is currently silently ignored on all other
hardware now, however.  The MD function "boot()" has been changed to
also take a char *.
1996-08-09 10:30:23 +00:00
thorpej 3946240709 Fix unititialized variable warning. Pointed out by Aaron Brown. 1996-07-25 20:41:48 +00:00
abrown 062b2cdd6b Fix unused variable warning for an "int i" left over from the old disk
statistics code.
1996-07-24 16:13:04 +00:00
thorpej aba7675464 In extent_alloc_subregion(), don't adjust the initial boundary check
value if we're not concerned with boundary checking.  Avoids a stupid
infinite loop.
1996-07-23 23:09:10 +00:00
explorer 67b1de765f Add compile-time and run-time control over automatic niceing 1996-07-17 21:54:04 +00:00
thorpej 0462d3063c Remove old-style disk instrumentation code. 1996-07-12 22:00:42 +00:00
jtc f9a9b2e372 Used signed instead of unsigned longs for sec and usec variables to
handle cases which would otherwise yeild wildly wrong results.
1996-07-11 00:09:29 +00:00
cgd 1c5ea3c014 print difference between pointers with %ld, so that -Wformat works
on the Alpha and for consistency.  Also, other minor formatting cleanups.
1996-07-10 18:15:22 +00:00
chuck 9c9676883e add native mode atm protocol layer 1996-07-04 03:16:56 +00:00
pk 947ec65105 sunos_compat: return EIO when TIOCGPGRPing a half-open pty. This is
expected by SunOS pty-allocating programs (telnetd,rlogind,..).
1996-07-02 21:19:02 +00:00
mycroft 8ea2fc5788 Regen. 1996-06-23 11:08:01 +00:00
mycroft 351bdbd445 Implement setre[ug]id() compatibly with 4.3BSD, SunOS, and Linux. 1996-06-23 11:04:11 +00:00
thorpej 6041e29f1f My extent map manager. Sort of like resource maps, but more flexible.
Understands allocation aligment and boundary restrictions, "specific region"
allocations, and suballocations.  Capable of statically or dynamically
allocating map overhead.

Many thanks to Matthias Drochner for running the code for me, and sending
me bug fixes, optimizations, and suggestions.  Also, many thanks to
Chris Demetriou for his extremely helpful suggestions.

XXX No manual page yet.  One is forthcoming, as soon as I can scare up
the time to write one.  This has been sitting on my plate for quite a
while, and several projects are waiting for it.  Time to move on.
1996-06-23 00:10:08 +00:00
mycroft 506cefab8c In the sync case of bwrite(), move the accounting earlier so that so that the
delayed write is logically converted to a sync write, mirroring the async case.
In bdwrite(), move the tape case earlier to avoid needless reassignbuf()s.
1996-06-18 20:50:23 +00:00
pk b298c40fbe Call reassignbuf() at splbio in bdwrite(). 1996-06-17 22:21:31 +00:00
cgd d73abf41aa avoid unnecessary checks of m_get/MGET/etc.'s return values. When
they're called with M_WAIT, they are defined to never return NULL.
1996-06-14 22:21:12 +00:00
christos e2e0f65050 Merge pagedvn changes from OpenBSD and added mips defines. Also added
ELF_MAP_PAGE_ZERO define. The entry point computation is different than
the one OpenBSD uses.
1996-06-14 18:15:55 +00:00
jtc 2074cccbb8 Cast `sec' to a u_quad_t in `sec * 1000000 + usec' so the expression
is computed with quad integer arithmetic (so it won't overflow after
4294 seconds).
1996-06-13 23:22:22 +00:00
pk 7b9f9e5426 Check user access rights only if `uio_segflg' says it's a user space buffer. 1996-06-13 22:30:18 +00:00
christos 306987eb37 - Pass the Elf exec header in the emulation dependent probe functions.
- remove static from elf_read_from().
1996-06-13 18:35:25 +00:00
cgd 1abc77f86d if kmem_malloc() fails while trying to allocate an mbuf cluster, try
and free some space by calling m_reclaim().  Also, log the "mb_map full"
error message (at most) every 60-seconds.  The old code would log it
once over the lifetime of the system, but that's not a useful diagnostic.
(More useful is the new behaviour, which roughly indicates how often
periods of heavy load occur, without spamming the console and system
logs with messages.)
1996-06-13 17:02:23 +00:00
cgd 06c209646e handle the case where kmem_malloc() returns NULL in the 'can wait' case.
Right now, this code just panic()s (same as kmem_malloc() used to do
before, but different message), but in the future it should be modified
to try to reclaim wasted memory.
1996-06-13 16:53:34 +00:00
cgd f41d0a3d9b in select(), if it's a small number of file descriptors use a
automatic array rather than an array allocated with alloca().
(This was the only use of alloca() in the kernel, and it wasn't
necessary or consistent with the way other functions in this file
work.)
1996-06-13 05:08:47 +00:00
cgd 1e2b610d5a #ifdef __alpha__, call a machine-dependent function with new device
structure and 'aux', right before ca_attach is called for the
newly-attached device.  This allows the alpha port to do root device
autodetection without modifying every bus and device driver which could
be in the 'boot path.'  In the long run, it may make sense to make
this machine-independent.
1996-06-13 04:50:29 +00:00
pk 50e7d72655 Protect vnode when updating for started IO on buffers. 1996-06-11 11:15:36 +00:00
briggs 0a55dbede5 Do not declare tickfixcnt ifdef NTP. 1996-06-09 04:51:03 +00:00
cgd 57b8bdb5c3 Fix a bug where free()ing an already-free block, or even a block that looked
like it might have already been freed, would cause a crash because of a bad
pointer dereference.  Pointed out by Brian Noble <bnoble@cs.cmu.edu>.
1996-06-06 19:13:32 +00:00
mrg 8def9fa734 don't tty_detach() in ttyfree(). make the user of ttyfree() do
the tty_detach() as not all ttymalloc()'ed ttys are tty_attach()ed.
1996-06-06 15:31:24 +00:00
mrg b9c4c21d8e add a comment on how to use tty_attach(). 1996-06-04 13:59:10 +00:00
mycroft abfbe7c6c4 Deal with FD_SETSIZE larger than the default. 1996-06-02 14:48:23 +00:00