Commit Graph

1073 Commits

Author SHA1 Message Date
cgd 8a3333b2a9 Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed.  Rename remrq() to
remrunqueue().
1996-11-06 20:19:19 +00:00
gwr f5927ca260 Minor nit in my change regarding const and non-ansi code... 1996-10-27 21:50:33 +00:00
gwr 2ada6af51b Oops, part of that last commit was not meant to go in.
The definitions of va_alist, va_dcl belong elsewhere.
1996-10-27 20:50:00 +00:00
gwr a0d9bd5bb2 The hack-ish tricks to make the ANSI-style va_start macro work in
non-ANSI mode were not quite complete.  This makes non-ANSI work.
Perhaps it would be better to eliminate this hack altogether...
1996-10-27 20:30:52 +00:00
cgd ce53653783 make the namei struct members ni_dirp and ni_next, and the componentname
struct member cn_nameptr 'const', since they should never be used to
modify the path name.  (Only the pathname buffer, cn_pnbuf, should be
modified.)  Propagate the const poisoning to code that uses the namei
and componentname structs.
1996-10-25 23:13:58 +00:00
cgd 9fa0b6391e don't thow away char_type's 'const'ness via a cast when passing it to scanc().
(1) that causes -Wcast-qual to be unhappy, and (2) the cast is unnecessary!
1996-10-25 22:11:39 +00:00
cgd ca829ca73c don't assign non-const pointers from const pointers; make the appropriate
pointers 'const'.  (-Wcast-qual)
1996-10-25 22:01:44 +00:00
cgd ef6504281a remove duplicate prototypes from tty_subr.c (ndqb, putc, b_to_q), and
make the first arg of b_to_q (the u_char * that points to data to be
stuffed into the queue) const, since it's not modified.
1996-10-25 21:20:29 +00:00
cgd 574f71ab26 replace a construction in sys_setitimer() that was too tricky for its
(and my!) own good with a more straightforward one that is equally (and
more apparently) correct.
1996-10-24 04:35:33 +00:00
cgd 8595fc3073 make coredump() use more sensible error returns (even though they're
not used by anything, for now), and implement MNT_NOCOREDUMP by checking
whether or not MNT_NOCOREDUMP is set on the file system where the dump
would land (i.e. the file system of the process's current working
directory), and disallowing the core dump if it's set.
1996-10-23 23:13:19 +00:00
cgd 6d3337bdf6 permit MNT_NOCOREDUMP as a generic mount flag. 1996-10-23 23:07:08 +00:00
matthias a587cc60a0 * In dosetrlimit ensure that rlim_cur and rlim_max are >0. Otherwise
the kernel might crash due to invalid values passed to setrlimit.
1996-10-23 07:19:38 +00:00
jtc 4039b6bcba Return ESPIPE when filedes is associated with a FIFO. 1996-10-21 17:42:48 +00:00
mrg 8fd70c1fe1 in coredump(), check the SUGID bit rather than testing various parts
of the cred structures.  this prevents a previously set[gu]id process
from generating a core file.
1996-10-18 08:39:34 +00:00
perry 8a0600b163 removed #ifdef tahoe 1996-10-17 16:31:54 +00:00
thorpej 52c0d38a1a Several changes:
- Rename EX_NOBLOB to EX_NOCOALESCE; it's much more descriptive of
  what's going on.
- In extent_free_region_descriptor(), if we're a fixed extent,
  freeing a dynamically allocated region descriptor, and someone
  is waiting on the freelist, let the waiter have it, rather than
  free'ing it back to the system.
- Use ALIGN(), rather than our homegrown EXTENT_ALIGN(), when dealing
  with map overhead.  Privatize the EXTENT_ALIGN() macro; there's no need
  to export it.
- Implement EX_BOUNDZERO flag.  This changes the boundary line policy in
  extent_alloc() and extent_alloc_subregion(); boundary lines are
  computed relative to 0, rather then the start of the extent.
- Fix a nasty race between multiple participants doing region and
  descriptor allocation.
- Add a new flag to specify that it's ok to wait for space in the
  extent: EX_WAITSPACE.
- Blow away an unnecessary splhigh()/splx().
- Put a bunch of sanity code inside #ifdef DIAGNOSTIC/#endif.
1996-10-17 08:27:35 +00:00
ws 31bdb14ed5 Rename recently checked in KGDB to IPKDB to resolve conflicts with older KGDB 1996-10-16 19:32:08 +00:00
cgd c8e4c454f2 curproc was being used directly for ru_{in,ou}block counting. Instead
of using it directly, use a local, and set that local to be curproc
if curproc is not NULL else a pointer to process 0's proc struct.
If syncing disks while handling a panic that occurred while 'curproc'
was NULL, the old code would dereference NULL and die.
1996-10-15 23:06:27 +00:00
cgd 279c087328 reorganize tsleep() so the (cold || panicstr) test is done before the
ktrace context switch checking.  If syncing disks while handling a panic
that occurred while 'curproc' was NULL, the old code would dereference
NULL and die.  The (slight) reorganization was done so that space (one extra
splhigh()), rather than time (one extra comparison), would be wasted.
1996-10-15 23:00:10 +00:00
cgd 709ebdf6ab panic must print a newline 1996-10-15 21:35:56 +00:00
cgd 0e4ddf059b deal more sanely with ELF binaries with only a single program header
section.  Patch come up with by Bob Baron <rvb+@cs.cmu.edu> and myself.
This entire bit of code (the code which sets daddr/dsize and taddr/tsize)
is very bogus, but it's not clear what the 'right' way to fix it is
and this patch fixes a problem preventing some ELF executables from
being run.
1996-10-13 22:54:52 +00:00
christos f443b89c92 backout previous kprintf change 1996-10-13 02:32:29 +00:00
christos ee3d88fbdf fix uiomove's first argument and remove unnecessary casts 1996-10-13 02:27:52 +00:00
cgd 4431ea58a9 replace ELF_ALIGN with ELF_TRUNC (round to lower alignment boundary) and
ELF_ROUND (round to higher alignment boundary), and use them properly.
Also, change a bit of code in elf_load_psection to use the next ELF_ROUND
macro.  This fixes a bug found by Robert Baron <rvb+@cs.cmu.edu> where
elf_load_psection, if given a properly aligned address at which to load
the section, would round actually load it at the next highest alignment
boundary.
1996-10-11 19:44:02 +00:00
christos 60d201973e printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:46:11 +00:00
christos 153ead2dff - Use debugging printf - macros instead if #ifdef #endif everywhere
- printf -> kprintf, sprintf -> ksprintf
1996-10-10 22:43:21 +00:00
thorpej 4a23efc7bc Fix botch in netbsd-1-2 merge (multiple inclusion of <sys/tty.h>),
pointed out by Jonathan Stone <jonathan@DSG.Standford.EDU>.
1996-10-10 00:27:41 +00:00
thorpej f2e79979ad Merge the netbsd-1-2 branch back into the mainline. 1996-10-09 00:59:15 +00:00
mycroft 02ee12e4ba Use PHOLD() and PRELE() rather than frobbing p_holdcnt directly. 1996-10-09 00:04:39 +00:00
cgd 1878cacd45 KNF, de-static the functions that were static (so they'll show up
in ddb, etc.)
1996-10-08 03:40:40 +00:00
cgd 6ab18a1959 don't include <machine/exec.h> explicitly. No other changes needed, since
<sys/exec.h> was already being included.
1996-10-07 21:43:02 +00:00
cgd cd3ab82ec2 clean up a comment added in the last commit 1996-10-07 18:29:24 +00:00
cgd 5d4cf83257 when loading interpreter: check its vnode type, check its mount point
for NOEXEC and NOSUID, and make sure the interpreter file is executable.
The mount point checks are done because, even though the interpreter
is not the program being 'executed', code from the interpreter is being
executed, and so the mount point's flags should be respected.
1996-10-07 18:24:48 +00:00
scottr d2be4a69c2 Expand tab in copyright message; it loses on some consoles. 1996-10-05 06:32:43 +00:00
ws 2da166f660 Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.
1996-10-02 18:04:56 +00:00
cgd cc06b3f10f Remove the implicit inclusion of EXEC_ELF32 when COMPAT_LINUX and/or
COMPAT_SVR4 is included.
1996-10-02 05:30:29 +00:00
cgd ccd26363f6 allow a.out executable support to be optional (conditioned on EXEC_AOUT),
and shell script support to be optional (conditioned on EXEC_SCRIPT).
Remove the implicit inclusion of EXEC_ECOFF when COMPAT_OSF1 and/or
COMPAT_ULTRIX is included, and of EXEC_ELF32 when COMPAT_LINUX and/or
COMPAT_SVR4 is included.
1996-10-02 05:29:29 +00:00
cgd 60b9a20b61 initialize vnode_free_list and mountlist at compile time with the new
queue.h list/queue head initializer macros.  mountlist was converted so
that panics (or other reboots) early on in kernel startup don't cause
sys_sync() to croak.  vnode_free_list was converted because it was nearby.
1996-10-01 22:49:11 +00:00
cgd 3b34cba879 exec vnode locking protocol changes: in a nutshell, don't keep vnodes
locked for any longer than we have to.
1996-09-30 23:18:43 +00:00
cgd 6f5b5cefc7 make the check_header and load_file functions static 1996-09-30 23:02:14 +00:00
ws 0d59d2eb20 Enter new KGDB on panic just like other kernel debuggers 1996-09-30 17:32:01 +00:00
cgd fea9aa2096 clean up a comment (in code derived from the a.out code, where i cleaned
up the comment earlier).
1996-09-27 03:38:27 +00:00
cgd 2f42e5b8ed fix some typos and clean up some comments. 1996-09-26 23:34:46 +00:00
cgd 0e097578a2 add and use a machine-dependent header, which currently defines some
macros to use to remove #ifdefs from the machine ID case check.
Eventually, these headers will contain other information, e.g.
machine-dependent relocation information, etc.
1996-09-26 21:50:55 +00:00
cgd 79bd41b179 add support and reorganize for 64-bit ELF, included by EXEC_ELF64
option.  (Also, make EXEC_ELF32 option a way to explicitly include
32-bit ELF support.)
1996-09-26 20:51:03 +00:00
christos 3f15a06497 Recognize %.2x as %02x 1996-09-25 21:03:06 +00:00
cgd 80c82b8766 rename exec_elf.c to exec_elf32.c, since it execs 32-bit ELF. exec_elf32.c
was copied from exec_elf.c on the CVS server to keep the logs intact.
1996-09-20 22:33:23 +00:00
jtc 16fe807b60 renamed sys_getlogin to sys___getlogin. required by libc namespace conventions 1996-09-19 04:52:12 +00:00
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