Commit Graph

243 Commits

Author SHA1 Message Date
tsutsui 251bb51bf0 Fix shadowed declaration warning. 2007-03-20 11:39:34 +00:00
tsutsui 3f372aff43 Fix compile errors in the previous:
- include <sys/filedesc.h> for do_sys_stat()
- include <sys/namei.h> for FOLLOW and NOFOLLOW
- add missing semicolons
- fix typos
2007-03-17 17:02:44 +00:00
dsl 893faeae9e Update all the compat stuff to not use the 'stackgap' for processing
sys_stat() and friends, instead use do_sys_stat() and do_sys_fstat()
that write the answer into a kernel buffer (on stack) that can be
converted to the correct form and written the userspace.
I've test compiled a few kernels, and tested i386 netbsd1.6 ls.
Given I think I've fixed some bugs, it might be 50-50 with new ones.
2007-03-10 21:40:23 +00:00
ad c147748d84 - Make the proclist_lock a mutex. The write:read ratio is unfavourable,
and mutexes are cheaper use than RW locks.
- LOCK_ASSERT -> KASSERT in some places.
- Hold proclist_lock/kernel_lock longer in a couple of places.
2007-03-09 14:11:22 +00:00
tsutsui 4fc7add5a3 Use (char *) to appease -Wpointer-arith. 2007-03-06 12:41:52 +00:00
dogcow f18ef70a25 semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.
2007-03-05 21:05:00 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
rumble 121cbf17f1 Remove an unused variable so that this compiles again. 2007-02-19 03:55:26 +00:00
ad 57aa4fbf3b proc_free() was returning a NULL rusage pointer to wait() when a traced
process was reparented. Change proc_free() to copy the rusage to a buffer
on the stack if required, so it can be passed both to the debugger and
to the real parent process.

Fixes kern/35582 (kernel panics with gdb).
2007-02-16 00:39:16 +00:00
ad 087fdb9080 Count the number of CPUs at boot and stash in 'ncpu'. Eventually should
have each CPU register at attach, so we can figure out the topology for
the scheduler.
2007-02-15 20:32:47 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
he a128c1c544 Adapt to the addition of vfs_suspendctl in struct vfsops. 2007-01-23 10:35:05 +00:00
elad 1113a3afe4 Consistent usage of KAUTH_GENERIC_ISSUSER. 2007-01-05 15:40:51 +00:00
wiz 0ec178eea9 Spell "relevant" correctly. From Zafer Aydogan. 2006-12-25 18:31:18 +00:00
yamt 9d3e3eab23 merge yamt-pdpolicy branch.
- separate page replacement policy from the rest of kernel
	- implement an alternative replacement policy
2006-09-15 15:51:12 +00:00
sekiya b103a9ae62 Store return value of iur_proc_queue() in local variable iwpr (unreferenced
anywhere else in function), to appease gcc4.
2006-09-01 04:54:45 +00:00
sekiya 40be9d473d Include <sys/vnode.h>. Caught by gcc4. 2006-09-01 04:49:48 +00:00
bjh21 19d3be8004 Fix a typo that was stopping this compiling. 2006-07-31 20:52:13 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
yamt 175d40d2ca crfree -> kauth_cred_free. 2006-05-15 22:15:32 +00:00
yamt cc6a9a01ab include kauth.h for kauth_cred_getuid, etc. 2006-05-15 22:10:09 +00:00
elad 874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
drochner 86225028d1 kill the last use of vm_fault_t, from Havard Eidnes 2006-03-20 13:14:37 +00:00
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
martin 3faf969174 Adapt to struct vfsops changes during the NFS export rototill. 2005-09-27 13:26:03 +00:00
yamt a0bdf5ef81 irix_sys_swapctl: follow uvm_swap_stats changes. 2005-09-17 14:52:55 +00:00
he 54e6da6105 Change from using sys___{,f,l}stat13() to sys___{,f,l}stat30() and
associated data structures, following the change to 64-bit inodes.
2005-08-22 10:57:04 +00:00
martin 12771d0723 Consistently constify 2005-06-03 18:53:50 +00:00
martin 75cc390f62 Avoid shadow warnings. 2005-06-03 18:52:52 +00:00
martin a2a1dc8e7c Add extern declaration for "bufpages". 2005-06-02 20:14:55 +00:00
christos a5fb891bb9 PR/29696: Joel Carnat: NetBSD freezes when accessing smbfs mounted FS with
firefox/linux due to compat getdents() call assumption that all filesystems
support cookies.
2005-04-19 19:00:25 +00:00
fvdl c487efe4a7 Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.
* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
  for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2

Tested on amd64, compile-tested on sparc64.
2005-03-26 05:12:34 +00:00
perry 77f2a006d0 regen 2005-02-26 23:58:19 +00:00
perry fa91538c32 make this rebuild generated files by default 2005-02-26 23:35:00 +00:00
perry a7f74206ba regen 2005-02-26 23:20:00 +00:00
perry 477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
simonb c1530b6999 Remove an erroneous semicolon. 2005-02-26 12:03:15 +00:00
thorpej 1c95472d01 Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.
2005-01-02 16:08:28 +00:00
christos 5fd3b99d04 check that signum is valid correctly. 2004-12-22 18:16:47 +00:00
christos 4de5735102 off-by-one 2004-11-15 23:28:50 +00:00
david d7d15131bb Bounds check syscall arguments where appropriate 2004-10-27 19:29:57 +00:00
david a710461910 Log Msg was corrected, Nov 6th, 2004. Whitespace cleanup 2004-10-27 19:29:56 +00:00
david 090b8be8f9 Bounds check syscall arguments where appropriate 2004-10-27 19:29:56 +00:00
yamt 0994e6acb8 introduce a function, proclist_foreach_call, to iterate all procs on
a proclist and call the specified function for each of them.
primarily to fix a procfs locking problem, but i think that it's useful for
others as well.

while i'm here, introduce PROCLIST_FOREACH macro, which is similar to
LIST_FOREACH but skips marker entries which are used by proclist_foreach_call.
2004-10-01 16:30:52 +00:00
skrll f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
jdolecek 74436be135 pass the fork flags down to the emulation fork hook, so that emulation
code can use the information for setup
2004-08-08 08:42:03 +00:00
hannken 8c21bc6224 Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.
- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2004-05-25 14:54:55 +00:00
atatat 190adb15c3 Sysctl descriptions under emul subtree. 2004-05-25 04:29:08 +00:00
atatat 10a7ba9ef6 Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
2004-05-20 06:34:24 +00:00