Commit Graph

185 Commits

Author SHA1 Message Date
david 090b8be8f9 Bounds check syscall arguments where appropriate 2004-10-27 19:29:56 +00:00
mycroft 45a21b76f0 Fixing age old cruft:
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
  d_type fields(!), add a new internal flag, IMNT_DTYPE.

Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
  in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
  FS-specific checks littered throughout the code.  This may be used later to
  make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
  to implementation issues.

Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86

Clean up some crappy pointer frobnication.
2004-08-15 07:19:54 +00:00
manu 86cd319fea Add a wrapper for connect that check an alternate path in emulation tree
for AF_LOCAL sockets.
2004-07-24 15:44:09 +00:00
christos 85699649e2 grr, forgot to take out the & 2004-05-22 20:53:26 +00:00
christos 9a0b176050 allocate memory for statvfs instead of using the stack. 2004-05-22 20:46:53 +00:00
matt 22120ad628 Constify the speedtab arrays 2004-04-25 06:23:40 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +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
christos 5a02ed0f97 - don't use MALLOC for non constant counts
- check malloc() size.
2003-11-19 16:43:38 +00:00
christos 4ca4498262 Don't include malloc.h if you are not going to use it. 2003-11-19 15:48:21 +00:00
fvdl 4b84b8d930 Don't put the netbsd32_compat*.c files in the 'compat library'. Unconditionally
compiling these causes a ripple effect making it hard to conditionalize
anything on COMPAT_* in the kernel.
2003-10-15 13:32:14 +00:00
christos e2c278d8c0 SA_SIGINFO changes 2003-09-06 22:09:20 +00:00
christos 3b9c3c5aab - GC all the setup_stack functions
- add one for linux/i386
2003-08-08 18:57:01 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +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
christos c82b786eb3 simplify bsd_sys_bind() 2003-06-05 19:42:55 +00:00
manu c5defe555a Ooops, I deleted a debug printf just before committing and one bit was
remaining. While I'm there, fix a typo in a comment.
2003-06-05 18:51:40 +00:00
manu 2c3b365958 Search alternate /emul/* path for AF_LOCAL sockets at bind() time. 2003-06-05 12:26:27 +00:00
manu b5c252e8af Build again with SA 2003-06-04 19:34:32 +00:00
thorpej f4a068d5c2 Use PAGE_SIZE rather than NBPG. 2003-04-01 01:43:29 +00:00
christos e163414ca5 include more opt_ files for nfs. 2003-02-10 17:33:13 +00:00
christos 1bc826ce5e getfh is needed for NFS server. 2003-02-10 17:30:08 +00:00
christos 2bb5209b1b lwp'ify 2003-01-22 17:48:02 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
thorpej 6762b37e5a Merge the nathanw_sa branch. 2003-01-18 07:28:34 +00:00
thorpej e8cc3884de Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is. 2002-12-10 17:14:02 +00:00
manu 3b0f6d78ed Introduce BSD system calls with alternate patch checking (in /emul) in
compat/common, so that they can be shared by several emulations, and use
them for Darwin.

This removes the ugly dependance on FreeBSD freebsd_file.c for COMPAT_DARWIN
2002-12-08 00:50:23 +00:00
jdolecek 302af6f02e add emul_find_interp() function: the function looks for interpreter
in alternative emul tree first, and updates interpreter pathname
if found there; if not found in alternative emul tree, pathname
without the emul prefix is checked, and error returned if the file
doesn't exist
2002-11-29 17:08:06 +00:00
jdolecek b99fe89374 de-__P() 2002-11-29 16:32:50 +00:00
christos 116bcb05d0 rename: s/sa_/<compat>sa/g 2002-11-26 18:43:20 +00:00
thorpej d32a923263 Avoid strict-alias warnings. 2002-11-25 02:31:14 +00:00
perry 9fcaba1f66 Add lint infrastructure 2002-11-02 07:49:57 +00:00
perry 889bb793ca set LLIBS= so we don't try to check the lint lib against llib-lc.ln 2002-11-02 07:49:29 +00:00
chs 993948e989 count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).
2002-10-05 22:34:02 +00:00
scw b34d6729f8 Add !defined(_LP64) in the appropriate places to correspond with
sys/syscallargs.h.
2002-09-28 10:20:01 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
simonb aae67f532c Remove a meaningless type qualifier on a cast. 2002-09-23 05:57:44 +00:00
thorpej 011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
wrstuden 10d47b4dd3 Updated version of cscope/mkid support. Check libkern and compat lib
for source files. Also include header files in mkid run.
2002-06-18 23:46:52 +00:00
mrg 0ce90a9fef build the netbsd32_compat* objects into libcompat.a, so they are available
to emulations not just netbsd itself.  rename the compat_10 functions to
match everything else.  fixes a problem reported by julian coleman.
2002-04-29 09:53:39 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
christos 4b803b1108 panic if more space than stackgaplen is requested. Maybe I should remove the
size option completely.
2002-03-17 00:16:07 +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
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
tv 4dec0efa0b Preload <bsd.own.mk> before .undef DESTDIR. 2001-11-14 22:00:42 +00:00
tv 4446c00002 Undefine DESTDIR; we don't want the special DESTDIR <bsd.lib.mk>
handling for kernel libraries.

XXX this build method should be replaced by something more sane
2001-11-14 21:59:31 +00:00
lukem dab6ef8b56 add RCSIDs (including regeneration of files as appropriate) 2001-11-13 02:07:52 +00:00
thorpej e8ee04475d - Add a new vnode flag VEXECMAP, which indicates that a vnode has
executable mappings.  Stop overloading VTEXT for this purpose (VTEXT
  also has another meaning).
- Rename vn_marktext() to vn_markexec(), and use it when executable
  mappings of a vnode are established.
- In places where we want to set VTEXT, set it in v_flag directly, rather
  than making a function call to do this (it no longer makes sense to
  use a function call, since we no longer overload VTEXT with VEXECMAP's
  meaning).

VEXECMAP suggested by Chuq Silvers.
2001-10-30 15:32:01 +00:00