The NetBSD Project

CVS log for src/sys/kern/kern_proc.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.269 / (download) - annotate - [select for diffs], Wed Oct 26 23:20:36 2022 UTC (3 months ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.268: +2 -4 lines
Diff to previous 1.268 (colored)

kern/exec_elf.c: Get emul_netbsd from sys/proc.h.

Revision 1.268 / (download) - annotate - [select for diffs], Fri Jul 1 01:06:40 2022 UTC (7 months ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.267: +3 -4 lines
Diff to previous 1.267 (colored)

kern: Omit stale locking comment in proc_crmod_leave.

Revision 1.267 / (download) - annotate - [select for diffs], Sat May 7 19:44:40 2022 UTC (8 months, 3 weeks ago) by mrg
Branch: MAIN
Changes since 1.266: +3 -3 lines
Diff to previous 1.266 (colored)

bump maxthreads default.

bump the default MAXLWP to 4096 from 2048, and adjust the default
limits seen to be 2048 cur / 4096 max.  remove the linkage to
maxuprc entirely.

remove cpu_maxlwp() that isn't implemented anywhere.  instead,
grow the maxlwp for larger memory systems, picking 1 lwp per 1MiB
of ram, limited to 65535 like the system limit.

remove some magic numbers.


i've been having weird firefox issues for a few months now and
it turns out i was having pthread_create() failures and since
bumping the defaults i've had none of the recent issues.

Revision 1.266 / (download) - annotate - [select for diffs], Thu Apr 7 19:33:38 2022 UTC (9 months, 3 weeks ago) by andvar
Branch: MAIN
Changes since 1.265: +5 -4 lines
Diff to previous 1.265 (colored)

fix various typos in comments.

Revision 1.265 / (download) - annotate - [select for diffs], Sun Mar 13 17:21:29 2022 UTC (10 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.264: +36 -13 lines
Diff to previous 1.264 (colored)

kern: Fix ordering of loads for pid_table and pid_tbl_mask.

This introduces a load-acquire where there was none before.  This is
a simple correctness change.  We could avoid the load-acquire, and
use only load-consume, if we used a pointer indirection for _both_
pid_table and pid_tbl_mask.  Takes a little more work, and probably
costs an additional cache line of memory traffic, but might be worth
it to avoid the load-acquire for pid lookup.

Reported-by: syzbot+c49e405d0b977aeed663@syzkaller.appspotmail.com
Reported-by: syzbot+1c88ee7086f93607cea1@syzkaller.appspotmail.com
Reported-by: syzbot+da4e9ed1319b75fe2ef3@syzkaller.appspotmail.com

Revision 1.264 / (download) - annotate - [select for diffs], Thu Mar 10 12:21:35 2022 UTC (10 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.263: +5 -5 lines
Diff to previous 1.263 (colored)

kern: Use atomic_store_release/atomic_load_consume for pid_table.

This is read without the lock, so ordering is required.

Revision 1.263 / (download) - annotate - [select for diffs], Sat Feb 12 15:51:29 2022 UTC (11 months, 2 weeks ago) by thorpej
Branch: MAIN
Changes since 1.262: +13 -3 lines
Diff to previous 1.262 (colored)

Add inline functions to manipulate the klists that link up knotes
via kn_selnext:

- klist_init()
- klist_fini()
- klist_insert()
- klist_remove()

These provide some API insulation from the implementation details of these
lists (but not completely; see vn_knote_attach() and vn_knote_detach()).
Currently just a wrapper around SLIST(9).

This will make it significantly easier to switch kn_selnext linkage
to a different kind of list.

Revision 1.261.2.1 / (download) - annotate - [select for diffs], Sun Jan 3 16:35:04 2021 UTC (2 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.261: +5 -2 lines
Diff to previous 1.261 (colored) next main 1.262 (colored)

Sync w/ HEAD.

Revision 1.262 / (download) - annotate - [select for diffs], Thu Dec 24 12:14:50 2020 UTC (2 years, 1 month ago) by nia
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.261: +5 -2 lines
Diff to previous 1.261 (colored)

Avoid negating the minimum size of pid_t (this overflows).

Reported-by: syzbot+e2eb02f9dfaf4f2e6626@syzkaller.appspotmail.com

Revision 1.261 / (download) - annotate - [select for diffs], Thu Sep 17 11:37:35 2020 UTC (2 years, 4 months ago) by martin
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.260: +3 -3 lines
Diff to previous 1.260 (colored)

PR kern/55665: temporarily comment out an assertion that is known to
trigger in some conditions (where ignoring the wrap around does no harm
for now)

Revision 1.260 / (download) - annotate - [select for diffs], Sat Sep 5 16:30:12 2020 UTC (2 years, 4 months ago) by riastradh
Branch: MAIN
Changes since 1.259: +2 -3 lines
Diff to previous 1.259 (colored)

Round of uvm.h cleanup.

The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
  to query whether curlwp is the pagedaemon, which should maybe be
  exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
  by it.  We should split up uvm_extern.h but this will serve for now
  to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
  UVMHIST(ubchist), since ubchist is declared in uvm.h but the
  reference evaporates if UVMHIST is not defined, so we reduce header
  file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
  here.

ok chs@

Revision 1.259 / (download) - annotate - [select for diffs], Fri Aug 28 22:27:51 2020 UTC (2 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.258: +6 -6 lines
Diff to previous 1.258 (colored)

Fix pasto in previous -- pass the right size to memset...

Revision 1.258 / (download) - annotate - [select for diffs], Fri Aug 28 21:39:56 2020 UTC (2 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.257: +5 -5 lines
Diff to previous 1.257 (colored)

Nix trailing whitespace.

Revision 1.257 / (download) - annotate - [select for diffs], Fri Aug 28 21:39:28 2020 UTC (2 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.256: +6 -6 lines
Diff to previous 1.256 (colored)

Zero out more lock snapshots in sysctl exposure.

Revision 1.256 / (download) - annotate - [select for diffs], Wed Aug 26 22:56:55 2020 UTC (2 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.255: +48 -46 lines
Diff to previous 1.255 (colored)

Instead of returning 0 when sysctl kern.expose_address=0, return a random
hashed value of the data. This allows sockstat to work without exposing
kernel addresses or being setgid kmem.

Revision 1.255 / (download) - annotate - [select for diffs], Thu Jun 11 19:20:46 2020 UTC (2 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.254: +3 -3 lines
Diff to previous 1.254 (colored)

uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched.  It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.

Revision 1.254 / (download) - annotate - [select for diffs], Tue May 26 00:50:53 2020 UTC (2 years, 8 months ago) by kamil
Branch: MAIN
Changes since 1.253: +3 -3 lines
Diff to previous 1.253 (colored)

Catch up with the usage of struct vmspace::vm_refcnt

Use the dedicated reference counting routines.

Change the type of struct vmspace::vm_refcnt and struct vm_map::ref_count
to volatile.

Remove the unnecessary vm->vm_map.misc_lock locking in process_domem().

Reviewed by <ad>

Revision 1.253 / (download) - annotate - [select for diffs], Sat May 23 23:42:43 2020 UTC (2 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.252: +56 -57 lines
Diff to previous 1.252 (colored)

Move proc_lock into the data segment.  It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.

Revision 1.252 / (download) - annotate - [select for diffs], Sat May 23 20:45:10 2020 UTC (2 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.251: +151 -116 lines
Diff to previous 1.251 (colored)

- Replace pid_table_lock with a lockless lookup covered by pserialize, with
  the "writer" side being pid_table expansion.  The basic idea is that when
  doing an LWP lookup there is usually already a lock held (p->p_lock), or a
  spin mutex that needs to be taken (l->l_mutex), and either can be used to
  get the found LWP stable and confidently determine that all is correct.

- For user processes LSLARVAL implies the same thing as LSIDL ("not visible
  by ID"), and lookup by ID in proc0 doesn't really happen.  In-tree the new
  state should be understood by top(1), the tty subsystem and so on, and
  would attract the attention of 3rd party kernel grovellers in time, so
  remove it and just rely on LSIDL.

Revision 1.251 / (download) - annotate - [select for diffs], Wed Apr 29 01:52:26 2020 UTC (2 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.250: +55 -46 lines
Diff to previous 1.250 (colored)

- proc_find() retains traditional semantics of requiring the canonical
  PID to look up a proc.  Add a separate proc_find_lwpid() to look up a
  proc by the ID of any of its LWPs.
- Add proc_find_lwp_acquire_proc(), which enables looking up the LWP
  *and* a proc given the ID of any LWP.  Returns with the proc::p_lock
  held.
- Rewrite lwp_find2() in terms of proc_find_lwp_acquire_proc(), and add
  allow the proc to be wildcarded, rather than just curproc or specific
  proc.
- lwp_find2() now subsumes the original intent of lwp_getref_lwpid(), but
  in a much nicer way, so garbage-collect the remnants of that recently
  added mechanism.

Revision 1.250 / (download) - annotate - [select for diffs], Sun Apr 26 18:53:33 2020 UTC (2 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.249: +9 -2 lines
Diff to previous 1.249 (colored)

Add a NetBSD native futex implementation, mostly written by riastradh@.
Map the COMPAT_LINUX futex calls to the native ones.

Revision 1.249 / (download) - annotate - [select for diffs], Sun Apr 26 15:49:10 2020 UTC (2 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.248: +3 -3 lines
Diff to previous 1.248 (colored)

In expand_pid_table(), calculate the current pid table size before
releasing the lock.

Revision 1.243.2.2 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:06 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.243.2.1: +441 -120 lines
Diff to previous 1.243.2.1 (colored) to branchpoint 1.243 (colored) next main 1.244 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.248 / (download) - annotate - [select for diffs], Fri Apr 24 05:21:18 2020 UTC (2 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.247: +5 -5 lines
Diff to previous 1.247 (colored)

Make sure PT_F_* bits are uintptr_t.

Revision 1.247 / (download) - annotate - [select for diffs], Fri Apr 24 03:22:06 2020 UTC (2 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.246: +425 -109 lines
Diff to previous 1.246 (colored)

Overhaul the way LWP IDs are allocated.  Instead of each LWP having it's
own LWP ID space, LWP IDs came from the same number space as PIDs.  The
lead LWP of a process gets the PID as its LID.  If a multi-LWP process's
lead LWP exits, the PID persists for the process.

In addition to providing system-wide unique thread IDs, this also lets us
eliminate the per-process LWP radix tree, and some associated locks.

Remove the separate "global thread ID" map added previously; it is no longer
needed to provide this functionality.

Nudged in this direction by ad@ and chs@.

Revision 1.246 / (download) - annotate - [select for diffs], Tue Apr 21 21:42:47 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.245: +7 -9 lines
Diff to previous 1.245 (colored)

Revert the changes made in February to make cwdinfo use mostly lockless,
which relied on taking extra vnode refs.

Having benchmarked various experimental changes over the past few months it
seems that it's better to avoid vnode refs as much as possible.  cwdi_lock
as a RW lock already did that to some extent for getcwd() and will permit
the same for namei() too.

Revision 1.212.2.3 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:42 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.212.2.2: +11 -6 lines
Diff to previous 1.212.2.2 (colored) to branchpoint 1.212 (colored) next main 1.213 (colored)

Sync with HEAD

Revision 1.245 / (download) - annotate - [select for diffs], Mon Apr 20 16:32:03 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20200421
Changes since 1.244: +13 -6 lines
Diff to previous 1.244 (colored)

Add three KASSERTs, to detect refcount bugs.

This narrows down an unknown bug in some place near, that has manifested
itself in various forms (use-after-frees, uninit accesses, page faults,
segmentation faults), all pointed out by syzbot.

The first KASSERT in fixjobc() fires when the bug is encountered.

Revision 1.243.2.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:10 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.243: +2 -4 lines
Diff to previous 1.243 (colored)

Sync with HEAD

Revision 1.244 / (download) - annotate - [select for diffs], Sun Apr 19 20:31:59 2020 UTC (2 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-xenpvh-base1
Changes since 1.243: +2 -4 lines
Diff to previous 1.243 (colored)

- Only increment nprocs when we're creating a new process, not just
  when allocating a PID.
- Per above, proc_free_pid() no longer decrements nprocs.  It's now done
  in proc_free() right after proc_free_pid().
- Ensure nprocs is accessed using atomics everywhere.

Revision 1.212.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:03 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.212.2.1: +23 -17 lines
Diff to previous 1.212.2.1 (colored) to branchpoint 1.212 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.243 / (download) - annotate - [select for diffs], Mon Apr 6 08:20:05 2020 UTC (2 years, 9 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.242: +3 -2 lines
Diff to previous 1.242 (colored)

Reintroduce struct proc::p_oppid

Relying on p_opptr is not safe as there is a race between:
 - spawner giving a birth to a child process and being killed
 - spawnee accessng p_opptr and reporting TRAP_CHLD

PR kern/54786 by Andreas Gustafsson

Revision 1.239.2.2 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:02 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.239.2.1: +10 -4 lines
Diff to previous 1.239.2.1 (colored) to branchpoint 1.239 (colored) next main 1.240 (colored)

Sync with head.

Revision 1.242 / (download) - annotate - [select for diffs], Sun Feb 23 22:14:03 2020 UTC (2 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.241: +10 -8 lines
Diff to previous 1.241 (colored)

Merge from ad-namecache:

- Have a stab at clustering the members of vnode_t and vnode_impl_t in a
  more cache-conscious way.  With that done, go back to adjusting v_usecount
  with atomics and keep vi_lock directly in vnode_impl_t (saves KVA).

- Allow VOP_LOCK(LK_NONE) for the benefit of VFS_VGET() and VFS_ROOT().
  Make sure LK_UPGRADE always comes with LK_NOWAIT.

- Make cwdinfo use mostly lockless.

Revision 1.241 / (download) - annotate - [select for diffs], Fri Feb 21 00:26:22 2020 UTC (2 years, 11 months ago) by joerg
Branch: MAIN
Changes since 1.240: +3 -3 lines
Diff to previous 1.240 (colored)

Explicitly cast pointers to uintptr_t before casting to enums. They are
not necessarily the same size. Don't cast pointers to bool, check for
NULL instead.

Revision 1.240 / (download) - annotate - [select for diffs], Wed Jan 29 15:47:52 2020 UTC (3 years ago) by ad
Branch: MAIN
Changes since 1.239: +9 -3 lines
Diff to previous 1.239 (colored)

- Track LWPs in a per-process radixtree.  It uses no extra memory in the
  single threaded case.  Replace scans of p->p_lwps with lookups in the
  tree.  Find free LIDs for new LWPs in the tree.  Replace the hashed sleep
  queues for park/unpark with lookups in the tree under cover of a RW lock.

- lwp_wait(): if waiting on a specific LWP, find the LWP via tree lookup and
  return EINVAL if it's detached, not ESRCH.

- Group the locks in struct proc at the end of the struct in their own cache
  line.

- Add some comments.

Revision 1.239.2.1 / (download) - annotate - [select for diffs], Sat Jan 25 15:54:03 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.239: +10 -8 lines
Diff to previous 1.239 (colored)

Make cwdinfo use mostly lockless, and largely hide the details in vfs_cwd.c.

Revision 1.239 / (download) - annotate - [select for diffs], Tue Dec 31 13:07:13 2019 UTC (3 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.238: +3 -3 lines
Diff to previous 1.238 (colored)

Rename uvm_free() -> uvm_availmem().

Revision 1.238 / (download) - annotate - [select for diffs], Sat Dec 21 13:00:24 2019 UTC (3 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.237: +3 -3 lines
Diff to previous 1.237 (colored)

uvmexp.free -> uvm_free()

Revision 1.237 / (download) - annotate - [select for diffs], Fri Dec 6 17:41:43 2019 UTC (3 years, 1 month ago) by kamil
Branch: MAIN
Changes since 1.236: +3 -3 lines
Diff to previous 1.236 (colored)

Correct signals in siglist+sigmask passed in kinfo_lwp

Make the union of LWP and PROC pending signals correctly.

Revision 1.236 / (download) - annotate - [select for diffs], Sat Oct 12 10:55:23 2019 UTC (3 years, 3 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.235: +2 -3 lines
Diff to previous 1.235 (colored)

Remove p_oppid from struct proc

This field is not needed as it duplicated p_opptr that is alread safe to
use, unless proven otherwise.

eventswitch() already contained a check for != initproc (pid1).

Ride ABI bump for 9.99.16.

Revision 1.235 / (download) - annotate - [select for diffs], Mon Sep 30 21:13:33 2019 UTC (3 years, 4 months ago) by kamil
Branch: MAIN
Changes since 1.234: +3 -8 lines
Diff to previous 1.234 (colored)

Move TRAP_CHLD/TRAP_LWP ptrace information from struct proc to siginfo

Storing struct ptrace_state information inside struct proc was vulnerable
to synchronization bugs, as multiple events emitted in the same time were
overwritting other ones.

Cache the original parent process id in p_oppid. Reusing here p_opptr is
in theory prone to slight race codition.

Change the semantics of PT_GET_PROCESS_STATE, reutning EINVAL for calls
prompting for the value in cases when there wasn't registered an
appropriate event.

Add an alternative approach to check the ptrace_state information, directly
from the siginfo_t value returned from PT_GET_SIGINFO. The original
PT_GET_PROCESS_STATE approach is kept for compat with older NetBSD and
OpenBSD. New code is recommended to keep using PT_GET_PROCESS_STATE.

Add a couple of compile-time asserts for assumptions in the code.

No functional change intended in existing ptrace(2) software.

All ATF ptrace(2) and ATF GDB tests pass.

This change improves reliability of the threading ptrace(2) code.

Revision 1.233.2.1 / (download) - annotate - [select for diffs], Tue Aug 6 16:16:55 2019 UTC (3 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.233: +4 -2 lines
Diff to previous 1.233 (colored) next main 1.234 (colored)

Pull up following revision(s) (requested by kamil in ticket #20):

	sys/kern/kern_proc.c: revision 1.234

Update our vm resource use for sysctl(3) call reading kinfo_proc*

Without this change RSS properties are zeroed unless a process exits or
calls getrusage(2).

Revision 1.234 / (download) - annotate - [select for diffs], Fri Aug 2 22:46:44 2019 UTC (3 years, 5 months ago) by kamil
Branch: MAIN
Changes since 1.233: +4 -2 lines
Diff to previous 1.233 (colored)

Update our vm resource use for sysctl(3) call reading kinfo_proc*

Without this change RSS properties are zeroed unless a process exits or
calls getrusage(2).

Revision 1.233 / (download) - annotate - [select for diffs], Tue Jun 11 23:18:55 2019 UTC (3 years, 7 months ago) by kamil
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.232: +3 -2 lines
Diff to previous 1.232 (colored)

Add support for PTRACE_POSIX_SPAWN to report posix_spawn(3) events

posix_spawn(3) is a first class syscall in NetBSD, different to
(V)FORK+EXEC as these operations are executed in one go. This differs to
Linux and FreeBSD, where posix_spawn(3) is implemented with existing kernel
primitives (clone(2), vfork(2), exec(3)) inside libc.

Typically LLDB and GDB software is aware of FORK/VFORK events. As discussed
with the LLDB community, instead of slicing the posix_spawn(3) operation
into phases emulating (V)FORK+EXEC(+VFORK_DONE) and returning intermediate
state to the debugger, that might have abnormal state, introduce new event
type: PTRACE_POSIX_SPAWN.

A debugger implementor can easily map it into existing fork+exec semantics
or treat as a distinct event.

There is no functional change for existing debuggers as there was no
support for reporting posix_spawn(3) events on the kernel side.

Revision 1.212.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.212: +272 -64 lines
Diff to previous 1.212 (colored)

Sync with HEAD

Revision 1.232 / (download) - annotate - [select for diffs], Sat Jun 1 19:48:29 2019 UTC (3 years, 8 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.231: +2 -7 lines
Diff to previous 1.231 (colored)

Align the KERN_PROC_CWD interface to semantics closer to KERN_PROC_PATHNAME

Allow specifying oldlenp as 0 and return size with success for oldp != NULL

Revision 1.231 / (download) - annotate - [select for diffs], Sat Jun 1 00:19:43 2019 UTC (3 years, 8 months ago) by kamil
Branch: MAIN
Changes since 1.230: +3 -4 lines
Diff to previous 1.230 (colored)

fill_cwd() Drop GETCWD_CHECK_ACCESS

This additional check is not needed and actually prevents from checking
the path. This follows the protection rules of /proc/*/cwd.

Revision 1.230 / (download) - annotate - [select for diffs], Fri May 31 23:19:38 2019 UTC (3 years, 8 months ago) by kamil
Branch: MAIN
Changes since 1.229: +4 -3 lines
Diff to previous 1.229 (colored)

Use proper copylen for copyout in fill_cwd()

Revision 1.229 / (download) - annotate - [select for diffs], Fri May 31 23:01:39 2019 UTC (3 years, 8 months ago) by kamil
Branch: MAIN
Changes since 1.228: +61 -2 lines
Diff to previous 1.228 (colored)

Implement KERN_PROC_CWD in sysctl(3)

Retrieve specified process current working directory.

Fixes PR kern/50620 by Thomas Klausner.

Revision 1.228 / (download) - annotate - [select for diffs], Fri Mar 1 11:06:57 2019 UTC (3 years, 11 months ago) by pgoyette
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.227: +4 -4 lines
Diff to previous 1.227 (colored)

Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

NFCI intended.

Ride the earlier kernel bump - it;s getting crowded.

Revision 1.227 / (download) - annotate - [select for diffs], Fri Mar 1 03:20:50 2019 UTC (3 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.226: +2 -3 lines
Diff to previous 1.226 (colored)

no more p_nsems.

Revision 1.226 / (download) - annotate - [select for diffs], Tue Jan 29 09:28:50 2019 UTC (4 years ago) by pgoyette
Branch: MAIN
Changes since 1.225: +4 -4 lines
Diff to previous 1.225 (colored)

Normalize all the compat hooks' names to the form

	<subsystem>_<function>_<version>_hook

NFCI

XXX Note that although this introduces a change in the kernel-to-
XXX module interface, we are NOT bumping the kernel version number.
XXX We will bump the version number once the interface stabilizes.

Revision 1.225 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:43 2019 UTC (4 years ago) by pgoyette
Branch: MAIN
Changes since 1.224: +16 -27 lines
Diff to previous 1.224 (colored)

Merge the [pgoyette-compat] branch

Revision 1.209.2.15 / (download) - annotate - [select for diffs], Tue Jan 22 07:42:41 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.209.2.14: +11 -21 lines
Diff to previous 1.209.2.14 (colored) to branchpoint 1.209 (colored) next main 1.210 (colored)

Convert the MODULE_{,VOID_}HOOK_CALL macros to do everything in-line
rather than defining an intermediate hook##call function.  Almost
all of the hooks are called only once, and although we lose the
ability of doing things like

	if (MODULE_HOOK_CALL(...) == 0) ...

we simplify things quite a bit.  With this change, we no longer need
to have both declaration and definition macros, and the definition
no longer needs to have both prototype argument list and a "real"
argument list.

FWIW, the above if now needs to written as

	int ret;

	MODULE_HOOK_CALL(..., ret);
	if (ret == 0) ...

with appropriate use of braces {}.

Revision 1.209.2.14 / (download) - annotate - [select for diffs], Mon Jan 21 06:49:28 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.13: +3 -3 lines
Diff to previous 1.209.2.13 (colored) to branchpoint 1.209 (colored)

No need to declare the hook_call() function for void hooks.  So
remove and simplify.

Revision 1.209.2.13 / (download) - annotate - [select for diffs], Fri Jan 18 00:01:01 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.12: +4 -4 lines
Diff to previous 1.209.2.12 (colored) to branchpoint 1.209 (colored)

Don't restrict hooks to having only int or void types.  Pass the hook's
type to the various macros, as needed.

Allows us to reduce diffs to original in at least one or two places (we
no longer have to provide an additional parameter to the hook routine
for returning a non-int return value).

Revision 1.209.2.12 / (download) - annotate - [select for diffs], Mon Jan 14 13:34:28 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.11: +8 -8 lines
Diff to previous 1.209.2.11 (colored) to branchpoint 1.209 (colored)

Create a variant of the HOOK macros that handles hook routines of
type void, and use them where appropriate.

Revision 1.209.2.11 / (download) - annotate - [select for diffs], Sun Jan 13 10:49:50 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.10: +8 -8 lines
Diff to previous 1.209.2.10 (colored) to branchpoint 1.209 (colored)

Remove the HOOK2 versions of the MODULE_HOOK macros.  There were
only a few uses, and using them led to some lack of clarity in the
code.  Instead, we now use two separate hooks, with names that
make it clear(er) what we're doing.

This also positions us to start unraveling some of the rtsock_50
mess, which will need (at least) five hooks.

Revision 1.209.2.10 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:03 2018 UTC (4 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.9: +81 -16 lines
Diff to previous 1.209.2.9 (colored) to branchpoint 1.209 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.224 / (download) - annotate - [select for diffs], Mon Dec 10 14:46:24 2018 UTC (4 years, 1 month ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.223: +2 -3 lines
Diff to previous 1.223 (colored)

Remove unused mbuf.h includes.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Dec 6 13:51:43 2018 UTC (4 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.222: +3 -3 lines
Diff to previous 1.222 (colored)

Typo fix (Geoff Wing)

Revision 1.222 / (download) - annotate - [select for diffs], Wed Dec 5 18:16:51 2018 UTC (4 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.221: +75 -15 lines
Diff to previous 1.221 (colored)

As discussed in tech-kern:

- make sysctl kern.expose_address tri-state:
	0: no access
	1: access to processes with open /dev/kmem
	2: access to everyone
  defaults:
	0: KASLR kernels
	1: non-KASLR kernels

- improve efficiency by calling get_expose_address() per sysctl, not per
  process.

- don't expose addresses for linux procfs

- welcome to 8.99.27, changes to fill_*proc ABI

Revision 1.209.2.9 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:50 2018 UTC (4 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.8: +110 -9 lines
Diff to previous 1.209.2.8 (colored) to branchpoint 1.209 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.221 / (download) - annotate - [select for diffs], Sat Nov 24 19:22:17 2018 UTC (4 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.220: +11 -10 lines
Diff to previous 1.220 (colored)

- instead of zeroing struct proc on each allocation, provide a pool cache
  constructor.
- instead of sprinkling memsets, zalloc the whole buffer.

Revision 1.220 / (download) - annotate - [select for diffs], Sat Nov 24 16:18:36 2018 UTC (4 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.219: +102 -3 lines
Diff to previous 1.219 (colored)

Fix kernel info leak, we do a blunt copy of struct proc, but it has
padding. So zero out the structure on each allocation. And copy field by
field while here, because many fields should be hidden by COND_SET_VALUE.

Revision 1.206.6.5 / (download) - annotate - [select for diffs], Mon Nov 12 08:56:15 2018 UTC (4 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.206.6.4: +4 -3 lines
Diff to previous 1.206.6.4 (colored) to branchpoint 1.206 (colored) next main 1.207 (colored)

Pull up following revision(s) (requested by maxv in ticket #1088):

	sys/kern/kern_proc.c: revision 1.219 (via patch)

Fix buffer overflow, which can lead to severe information leak. Detected
by kASan.

Revision 1.219 / (download) - annotate - [select for diffs], Mon Nov 12 06:55:03 2018 UTC (4 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.218: +4 -3 lines
Diff to previous 1.218 (colored)

Fix buffer overflow, which can lead to severe information leak. Detected
by kASan.

Revision 1.209.2.8 / (download) - annotate - [select for diffs], Sat Oct 20 06:58:45 2018 UTC (4 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.7: +20 -36 lines
Diff to previous 1.209.2.7 (colored) to branchpoint 1.209 (colored)

Sync with head

Revision 1.218 / (download) - annotate - [select for diffs], Fri Oct 5 22:12:38 2018 UTC (4 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-1020
Changes since 1.217: +20 -36 lines
Diff to previous 1.217 (colored)

Provide a sysctl kern.expose_address to expose kernel addresses in
sysctl structure returns for non-root. Defaults to off. Turning it
on will restore sockstat/fstat and friends for regular users.

Revision 1.209.2.7 / (download) - annotate - [select for diffs], Sat Sep 29 21:36:14 2018 UTC (4 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.6: +4 -4 lines
Diff to previous 1.209.2.6 (colored) to branchpoint 1.209 (colored)

In MODULE_HOOK_CALL_DECL we don't need to provide the actual argument
list for calling the hook function, nor do we need to provide the
default value (for when the hook has not been set).

Revision 1.209.2.6 / (download) - annotate - [select for diffs], Sun Sep 23 11:50:03 2018 UTC (4 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.5: +5 -5 lines
Diff to previous 1.209.2.5 (colored) to branchpoint 1.209 (colored)

Use the proper test: _RUMPKERNEL vs _RUMP_KERNEL

Revision 1.209.2.5 / (download) - annotate - [select for diffs], Sun Sep 23 11:35:39 2018 UTC (4 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.4: +8 -2 lines
Diff to previous 1.209.2.4 (colored) to branchpoint 1.209 (colored)

This hook doesn't exist for _RUMPSERVER

Revision 1.209.2.4 / (download) - annotate - [select for diffs], Sun Sep 23 11:23:47 2018 UTC (4 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.3: +22 -35 lines
Diff to previous 1.209.2.3 (colored) to branchpoint 1.209 (colored)

More work on kern_proc_32

Revision 1.209.2.3 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:42 2018 UTC (4 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.2: +49 -27 lines
Diff to previous 1.209.2.2 (colored) to branchpoint 1.209 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.217 / (download) - annotate - [select for diffs], Tue Sep 4 16:03:56 2018 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.216: +39 -18 lines
Diff to previous 1.216 (colored)

Clear the kernel pointers from kern.proc and kern.proc2 when the user is
not privileged.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Sep 4 15:48:44 2018 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.215: +5 -5 lines
Diff to previous 1.215 (colored)

Use p->p_session instead of ep->e_sess, no real functional change.

Revision 1.215 / (download) - annotate - [select for diffs], Tue Sep 4 14:31:18 2018 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.214: +3 -2 lines
Diff to previous 1.214 (colored)

Introduce KAUTH_REQ_PROCESS_CANSEE_KPTR, and use it in the already-existing
modstat code. No real functional change.

Revision 1.214 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (4 years, 4 months ago) by riastradh
Branch: MAIN
Changes since 1.213: +6 -6 lines
Diff to previous 1.213 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.213 / (download) - annotate - [select for diffs], Sat Aug 25 09:54:37 2018 UTC (4 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.212: +4 -4 lines
Diff to previous 1.212 (colored)

Add KAUTH_REQ_PROCESS_CANSEE_EPROC, and use it for the kern.proc node.
Same permission as before, so no functional change.

Revision 1.206.6.4 / (download) - annotate - [select for diffs], Mon Apr 16 13:31:33 2018 UTC (4 years, 9 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.206.6.3: +2 -6 lines
Diff to previous 1.206.6.3 (colored) to branchpoint 1.206 (colored)

Pull up following revision(s) (requested by kamil in ticket #758):

	sys/kern/kern_proc.c: revision 1.212

Don't set errno ESRCH for empty result of KINFO_PROC[2]

Restore the previous behavior as it's prefered.
This new behavior was introduced in 1.210.
Code should check for length of the result.

Requested by <mlelstv>

Revision 1.209.2.2 / (download) - annotate - [select for diffs], Mon Apr 16 02:00:07 2018 UTC (4 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209.2.1: +2 -6 lines
Diff to previous 1.209.2.1 (colored) to branchpoint 1.209 (colored)

Sync with HEAD, resolve some conflicts

Revision 1.212 / (download) - annotate - [select for diffs], Sat Apr 14 14:26:20 2018 UTC (4 years, 9 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415
Branch point for: phil-wifi
Changes since 1.211: +2 -6 lines
Diff to previous 1.211 (colored)

Don't set errno ESRCH for empty result of KINFO_PROC[2]

Restore the previous behavior as it's prefered.

This new behavior was introduced in 1.210.

Code should check for length of the result.

Requested by <mlelstv>

Revision 1.206.6.3 / (download) - annotate - [select for diffs], Thu Apr 12 13:42:48 2018 UTC (4 years, 9 months ago) by martin
Branch: netbsd-8
Changes since 1.206.6.2: +2 -3 lines
Diff to previous 1.206.6.2 (colored) to branchpoint 1.206 (colored)

Pull up following revision(s) (requested by kamil in ticket #713):

	sys/modules/procfs/Makefile: revision 1.4
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.98
	bin/ps/ps.1: revision 1.108
	sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.32
	sys/miscfs/procfs/procfs_vnops.c: revision 1.198
	sys/kern/sys_ptrace_common.c: revision 1.23
	sys/kern/sys_ptrace_common.c: revision 1.24
	sbin/mount_procfs/mount_procfs.8: revision 1.36
	sys/kern/sys_ptrace_common.c: revision 1.25
	sys/kern/sys_ptrace.c: revision 1.5
	sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.30
	sys/sys/proc.h: revision 1.342
	sys/kern/sys_ptrace_common.c: revision 1.26
	sys/miscfs/procfs/procfs_ctl.c: file removal
	sys/kern/sys_ptrace_common.c: revision 1.27
	sys/miscfs/procfs/procfs_subr.c: revision 1.109
	sys/kern/sys_ptrace_common.c: revision 1.28
	sys/secmodel/extensions/secmodel_extensions.c: revision 1.8
	sys/kern/sys_ptrace_common.c: revision 1.29
	sys/sys/ptrace.h: revision 1.62
	sys/compat/netbsd32/netbsd32_signal.c: revision 1.45
	share/man/man9/kauth.9: revision 1.109
	sys/miscfs/procfs/files.procfs: revision 1.12
	sys/compat/netbsd32/netbsd32.h: revision 1.115
	sys/miscfs/procfs/procfs.h: revision 1.72
	sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.5
	sys/kern/kern_sig.c: revision 1.337
	sys/sys/kauth.h: revision 1.75
	sys/sys/sysctl.h: revision 1.224
	sys/kern/sys_ptrace_common.c: revision 1.30
	sys/kern/sys_ptrace_common.c: revision 1.31
	sys/kern/sys_ptrace_common.c: revision 1.32
	sys/kern/sys_ptrace_common.c: revision 1.33
	sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.20
	sys/kern/sys_ptrace_common.c: revision 1.34
	sys/kern/sys_ptrace_common.c: revision 1.36
	sys/kern/kern_proc.c: revision 1.207
	sys/kern/kern_exit.c: revision 1.269
	doc/TODO.ptrace: revision 1.29

Make {s,g}et{db,fp,}regs work again for PK_32 processes
XXX: pullup-8

add disgusting magic to handle compat_netbsd32 as a module.

use process_*reg32 instead of struct *reg32.

Remove the filesystem tracing feature

This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
 - /proc/#/ctl from mount_procfs(8)
 - P_FSTRACE note from the documentation of ps(1)
 - /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
 - KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
 - source code file miscfs/procfs/procfs_ctl.c
 - PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
 - KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
 - PSL_FSTRACE (0x00010000) from sys/sys/proc.h
 - P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed

PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).
Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>

untangle the mess:
- factor out common code
- break each ptrace subcall to its own sub-function
  .. more to come ...
- reduce ifdef ugliness by moving it up top.
- factor out PT_IO and make PT_{READ,WRITE}_{I,D} use it
- factor out PT_DUMPCORE
- factor out sendsig code
  .. more to come ...

handle siginfo requests for ptrace32

ptrace: Partially undo PT_{READ,WRITE}_{I,D} and unbreak these commands

The refactored code did not work and was generating EFAULT.

Sponsored by <The NetBSD Foundation>

Merge the code back; the problem was that since we are reading/writing
to a kernel address for PT_{READ,WRITE}_{I,D} we need the kernel vmspace.
provide separate read and write functions to accomodate register functions
that need a size argument.

don't ignore error from copyout_piod

Use the proper process (the tracee) to get information about lwps and
registers and the tracer for vmspace.

Add new sysctl(3) entry: security.models.extensions.user_set_dbregs

Model this new sysctl(3) entry after "user_set_cpu_affinity" in the same
level of sysctl(3) switches.

Allow to read unconditionally Debug Registers (no change here). This is
convenient as even if a user of a debugger does not use hardware assisted
watchpoints/breakpoints, a debugger can still prompt these values to store
in an internal cache with context of registers. Reading them should have
no security concerns.

Add a paranoid MI switch that prohibits by default setting these registers
by a regular user (non-superuser). Make this switch disabled by default.
There are enough reserved bits out there to allow using them
unconditionally on hardened hosts.

Features shipped with Debug Registers are optional features in debuggers.
There is no reduction in elementary functionality.

Reviewed by <christos>

Sponsored by <The NetBSD Foundation>

Revision 1.206.6.2 / (download) - annotate - [select for diffs], Sun Apr 1 08:45:43 2018 UTC (4 years, 10 months ago) by martin
Branch: netbsd-8
Changes since 1.206.6.1: +29 -19 lines
Diff to previous 1.206.6.1 (colored) to branchpoint 1.206 (colored)

Pull up following revision(s) (requested by kamil in ticket #679):

	sys/kern/kern_proc.c: revision 1.211

Make sysctl_doeproc() more predictable

Swap the order of looking into zombie and all process lists, start now
with the zombie one. This prevents a race observed previously that the
same process could be detected on both lists during a single polling call.

While there:
 - Short-circuit break for KERN_PROC_PID, once a pid has been detected.
 - Removal of redundant "if (kbuf)" and "if (marker)" checks.
 - Update of comments regarding potential optimization, explaining why we
   don't want to it as of now. Performance gain from lookup call vs
   iteration over a list is neglible on a regular system.
 - Return ESRCH when no results have been found. This allows more easily
   to implement a retry or abandon algorithm.

This corrects races observed in the existing ATF ptrace(2) tests, related
to await_zombie(). This function was expecting to check whether a process
has been transformed into a zombie, however it was causing occasional
crashes as it was overflowing the return buffer, returning the same pid
twice: once from allproc list and the second time from zombieproc one.

Fix suggested by <christos>
Short-circuit break suggested by <kre>

Discussed on tech-kern.

Sponsored by <The NetBSD Foundation>

Revision 1.209.2.1 / (download) - annotate - [select for diffs], Thu Mar 15 09:12:06 2018 UTC (4 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.209: +30 -20 lines
Diff to previous 1.209 (colored)

Synch with HEAD

Revision 1.211 / (download) - annotate - [select for diffs], Tue Mar 13 02:24:26 2018 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Changes since 1.210: +29 -19 lines
Diff to previous 1.210 (colored)

Make sysctl_doeproc() more predictable

Swap the order of looking into zombie and all process lists, start now
with the zombie one. This prevents a race observed previously that the
same process could be detected on both lists during a single polling call.

While there:
 - Short-circuit break for KERN_PROC_PID, once a pid has been detected.
 - Removal of redundant "if (kbuf)" and "if (marker)" checks.
 - Update of comments regarding potential optimization, explaining why we
   don't want to it as of now. Performance gain from lookup call vs
   iteration over a list is neglible on a regular system.
 - Return ESRCH when no results have been found. This allows more easily
   to implement a retry or abandon algorithm.

This corrects races observed in the existing ATF ptrace(2) tests, related
to await_zombie(). This function was expecting to check whether a process
has been transformed into a zombie, however it was causing occasional
crashes as it was overflowing the return buffer, returning the same pid
twice: once from allproc list and the second time from zombieproc one.

Fix suggested by <christos>
Short-circuit break suggested by <kre>

Discussed on tech-kern.

Sponsored by <The NetBSD Foundation>

Revision 1.210 / (download) - annotate - [select for diffs], Sun Mar 11 15:13:05 2018 UTC (4 years, 10 months ago) by kre
Branch: MAIN
Changes since 1.209: +3 -3 lines
Diff to previous 1.209 (colored)

Make a comment meaningful.   ie: s/Ditto/what it was copying/  (more or less)

That is, there was a comment "Ditto" - which once upon a time, was used
to indicate the the previous comment applied here as well.   Time passed,
and software mutated, and the previous comment was unfortunately sacrificed.

Poor little Ditto was left all alone.

Noticed while doing some software archaeology.

Revision 1.206.6.1 / (download) - annotate - [select for diffs], Mon Jan 1 18:58:32 2018 UTC (5 years, 1 month ago) by snj
Branch: netbsd-8
Changes since 1.206: +7 -4 lines
Diff to previous 1.206 (colored)

Pull up following revision(s) (requested by maxv in ticket #465):
	sys/kern/kern_proc.c: revision 1.209
If no auxv is present, don't kmem_alloc(0). Easy to panic the kernel by
typing 'cat /proc/aout_pid/auxv' on whatever a.out binary you're running.
Fortunately, amd64 does not enable EXEC_AOUT by default. Unfortunately,
i386 does enable it by default.

Revision 1.186.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (5 years, 1 month ago) by jdolecek
Branch: tls-maxphys
Changes since 1.186.2.2: +127 -23 lines
Diff to previous 1.186.2.2 (colored) to branchpoint 1.186 (colored) next main 1.187 (colored)

update from HEAD

Revision 1.209 / (download) - annotate - [select for diffs], Thu Nov 30 18:44:16 2017 UTC (5 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base
Branch point for: pgoyette-compat
Changes since 1.208: +7 -4 lines
Diff to previous 1.208 (colored)

If no auxv is present, don't kmem_alloc(0). Easy to panic the kernel by
typing 'cat /proc/aout_pid/auxv' on whatever a.out binary you're running.
Fortunately, amd64 does not enable EXEC_AOUT by default. Unfortunately,
i386 does enable it by default.

Revision 1.208 / (download) - annotate - [select for diffs], Tue Nov 7 19:44:04 2017 UTC (5 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.207: +5 -18 lines
Diff to previous 1.207 (colored)

Store full executable path in p->p_path as discussed in tech-kern.
This means that the full executable path is always available.

- exec_elf.c: use p->path to set AT_SUN_EXECNAME, and since this is
  always set, do so unconditionally.
- kern_exec.c: simplify pathexec, use kmem_strfree where appropriate
  and set p->p_path
- kern_exit.c: free p->p_path
- kern_fork.c: set p->p_path for the child.
- kern_proc.c: use p->p_path to return the executable pathname; the
  NULL check for p->p_path, should be a KASSERT?
- exec.h: gc ep_path, it is not used anymore
- param.h: bump version, 'struct proc' size change

TODO:
1. reference count the path string, to save copy at fork and free
   just before exec?
2. canonicalize the pathname by changing namei() to LOCKPARENT
   vnode and then using getcwd() on the parent directory?

Revision 1.193.4.7 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:07 2017 UTC (5 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.193.4.6: +33 -2 lines
Diff to previous 1.193.4.6 (colored) to branchpoint 1.193 (colored) next main 1.194 (colored)

Sync with HEAD

Revision 1.207 / (download) - annotate - [select for diffs], Mon Aug 28 00:46:07 2017 UTC (5 years, 5 months ago) by kamil
Branch: MAIN
Changes since 1.206: +2 -3 lines
Diff to previous 1.206 (colored)

Remove the filesystem tracing feature

This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
 - /proc/#/ctl from mount_procfs(8)
 - P_FSTRACE note from the documentation of ps(1)
 - /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
 - KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
 - source code file miscfs/procfs/procfs_ctl.c
 - PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
 - KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
 - PSL_FSTRACE (0x00010000) from sys/sys/proc.h
 - P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed
PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).

Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>

Revision 1.196.2.4 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:26 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.196.2.3: +33 -2 lines
Diff to previous 1.196.2.3 (colored) to branchpoint 1.196 (colored) next main 1.197 (colored)

Sync with HEAD

Revision 1.199.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:02 2017 UTC (5 years, 9 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.199: +38 -2 lines
Diff to previous 1.199 (colored) next main 1.200 (colored)

Sync with HEAD

Revision 1.206 / (download) - annotate - [select for diffs], Thu Mar 30 20:17:11 2017 UTC (5 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.205: +33 -2 lines
Diff to previous 1.205 (colored)

factor out getauxv code.

Revision 1.196.2.3 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:47 2017 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.196.2.2: +7 -2 lines
Diff to previous 1.196.2.2 (colored) to branchpoint 1.196 (colored)

Sync with HEAD

Revision 1.193.4.6 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:56 2017 UTC (5 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.193.4.5: +7 -2 lines
Diff to previous 1.193.4.5 (colored) to branchpoint 1.193 (colored)

Sync with HEAD

Revision 1.205 / (download) - annotate - [select for diffs], Sat Jan 28 16:43:59 2017 UTC (6 years ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, nick-nhusb-base-20170204
Changes since 1.204: +7 -7 lines
Diff to previous 1.204 (colored)

We need to define COMPAT_NETBSD32 before we include other files;
otherwise things like ucontext32_t will be missing.

Revision 1.204 / (download) - annotate - [select for diffs], Fri Jan 27 03:53:01 2017 UTC (6 years ago) by christos
Branch: MAIN
Changes since 1.203: +4 -3 lines
Diff to previous 1.203 (colored)

rump does not have ucontext32_t

Revision 1.203 / (download) - annotate - [select for diffs], Thu Jan 26 15:54:31 2017 UTC (6 years ago) by christos
Branch: MAIN
Changes since 1.202: +4 -3 lines
Diff to previous 1.202 (colored)

use __HAVE_COMPAT_NETBSD32

Revision 1.202 / (download) - annotate - [select for diffs], Thu Jan 26 08:09:27 2017 UTC (6 years ago) by martin
Branch: MAIN
Changes since 1.201: +3 -3 lines
Diff to previous 1.201 (colored)

Restrict the forcing of COMPAT_NETBSD32 to _LP64 kernels - this is probably
not the right thing to do, but unbreaks the build for now.

Revision 1.201 / (download) - annotate - [select for diffs], Thu Jan 26 07:54:05 2017 UTC (6 years ago) by martin
Branch: MAIN
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored)

No COMPAT_NETBSD32 for rump

Revision 1.200 / (download) - annotate - [select for diffs], Thu Jan 26 03:54:54 2017 UTC (6 years ago) by christos
Branch: MAIN
Changes since 1.199: +5 -2 lines
Diff to previous 1.199 (colored)

always compile in the COMPAT32 code; it is tiny and if we don't it breaks
the modules.

Revision 1.196.2.2 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:49 2017 UTC (6 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.196.2.1: +4 -8 lines
Diff to previous 1.196.2.1 (colored) to branchpoint 1.196 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.193.4.5 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:26 2016 UTC (6 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.193.4.4: +4 -8 lines
Diff to previous 1.193.4.4 (colored) to branchpoint 1.193 (colored)

Sync with HEAD

Revision 1.199 / (download) - annotate - [select for diffs], Mon Nov 14 08:55:51 2016 UTC (6 years, 2 months ago) by kre
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, nick-nhusb-base-20161204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.198: +4 -8 lines
Diff to previous 1.198 (colored)


Return the "true" parent's pid as the parent pid (ppid) via the
various sysctl/procfs interfaces that allow it to be interrogated.
(This is rather than the temporary parent's pid when a process is
being traced and has been reparented.)

XXX The ppid in elf32 core files has not been similarly adjusted,
XXX Should it be ?

Revision 1.196.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:17 2016 UTC (6 years, 2 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.196: +4 -9 lines
Diff to previous 1.196 (colored)

Sync with HEAD

Revision 1.193.4.4 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:02 2016 UTC (6 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.193.4.3: +7 -12 lines
Diff to previous 1.193.4.3 (colored) to branchpoint 1.193 (colored)

Sync with HEAD

Revision 1.198 / (download) - annotate - [select for diffs], Thu Sep 29 20:40:53 2016 UTC (6 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161004
Changes since 1.197: +3 -8 lines
Diff to previous 1.197 (colored)

Introduce and use PROC_PTRSZ() to handle differing pointer size 64->32
emulation.

Revision 1.197 / (download) - annotate - [select for diffs], Sat Sep 17 12:00:34 2016 UTC (6 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.196: +3 -3 lines
Diff to previous 1.196 (colored)

Use VM_MAXUSER_ADDRESS for proc0, not VM_MAX_ADDRESS. It normally does not
change anything, since kernel processes use the shared kernel map instead
of the one they are given here. For consistency though, it is better to
make sure UVM will not be tempted to access machine-dependent reserved
areas (e.g., the PTE space on x86).

Revision 1.193.4.3 / (download) - annotate - [select for diffs], Sun May 29 08:44:37 2016 UTC (6 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.193.4.2: +3 -3 lines
Diff to previous 1.193.4.2 (colored) to branchpoint 1.193 (colored)

Sync with HEAD

Revision 1.196 / (download) - annotate - [select for diffs], Wed May 25 17:43:58 2016 UTC (6 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.195: +3 -3 lines
Diff to previous 1.195 (colored)

Introduce security.pax.mprotect.ptrace sysctl which can be used to bypass
mprotect settings so that debuggers can write to the text segment of traced
processes so that they can insert breakpoints. Turned off by default.
Ok: chuq (for now)

Revision 1.193.4.2 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:16 2016 UTC (6 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.193.4.1: +3 -3 lines
Diff to previous 1.193.4.1 (colored) to branchpoint 1.193 (colored)

Sync with HEAD

Revision 1.195 / (download) - annotate - [select for diffs], Mon Apr 4 20:47:57 2016 UTC (6 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored)

Split p_xstat (composite wait(2) status code, or signal number depending
on context) into:
1. p_xexit:		exit code
2. p_xsig:		signal number
3. p_sflag & WCOREFLAG	bit to indicated that the process core-dumped.

Fix the documentation of the flag bits in <sys/proc.h>

Revision 1.193.4.1 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:05 2015 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.193: +97 -9 lines
Diff to previous 1.193 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.194 / (download) - annotate - [select for diffs], Thu Sep 24 14:33:01 2015 UTC (7 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.193: +97 -9 lines
Diff to previous 1.193 (colored)

implementation of KERN_PROC_PATHNAME, some refactoring for KERN_PROC.

Revision 1.186.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.186.2.1: +12 -10 lines
Diff to previous 1.186.2.1 (colored) to branchpoint 1.186 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.192.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.192: +3 -4 lines
Diff to previous 1.192 (colored) next main 1.193 (colored)

Rebase.

Revision 1.193 / (download) - annotate - [select for diffs], Sat Jul 12 09:57:25 2014 UTC (8 years, 6 months ago) by njoly
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: nick-nhusb
Changes since 1.192: +3 -4 lines
Diff to previous 1.192 (colored)

Allow fill_kproc2() to be used by more than sysctl.

Revision 1.180.4.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.180.4.2: +14 -12 lines
Diff to previous 1.180.4.2 (colored) to branchpoint 1.180 (colored) next main 1.181 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.187.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:07 2014 UTC (8 years, 8 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.187: +13 -10 lines
Diff to previous 1.187 (colored) next main 1.188 (colored)

sync with head

Revision 1.192 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:11 2014 UTC (8 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.191: +2 -8 lines
Diff to previous 1.191 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.191 / (download) - annotate - [select for diffs], Sat Jan 25 19:44:11 2014 UTC (9 years ago) by christos
Branch: MAIN
Changes since 1.190: +3 -3 lines
Diff to previous 1.190 (colored)

__USING_TOPDOWN_VM is no more, __USE_TOPDOWN_VM...

Revision 1.190 / (download) - annotate - [select for diffs], Thu Nov 14 12:07:11 2013 UTC (9 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.189: +9 -3 lines
Diff to previous 1.189 (colored)

As discussed on tech-kern: make TOPDOWN-VM runtime selectable per process
(offer MD code or emulations to override it).

Revision 1.189 / (download) - annotate - [select for diffs], Fri Oct 25 15:52:57 2013 UTC (9 years, 3 months ago) by martin
Branch: MAIN
Changes since 1.188: +3 -3 lines
Diff to previous 1.188 (colored)

Mark a diagnostic-only variable

Revision 1.188 / (download) - annotate - [select for diffs], Tue Sep 10 21:30:21 2013 UTC (9 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.187: +5 -2 lines
Diff to previous 1.187 (colored)

Support an optional MARCH ELF tag.
Store the MACHINE_ARCH of the executable in mdproc and override sysctl
so that value returned.

Revision 1.186.2.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:58 2013 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.186: +3 -4 lines
Diff to previous 1.186 (colored)

resync from head

Revision 1.187 / (download) - annotate - [select for diffs], Mon Jun 10 14:53:52 2013 UTC (9 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.186: +3 -4 lines
Diff to previous 1.186 (colored)

g/c unused static variable

Revision 1.180.4.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:30 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.180.4.1: +7 -5 lines
Diff to previous 1.180.4.1 (colored) to branchpoint 1.180 (colored)

sync with head

Revision 1.181.2.1 / (download) - annotate - [select for diffs], Tue Jun 12 17:18:22 2012 UTC (10 years, 7 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.181: +3 -3 lines
Diff to previous 1.181 (colored) next main 1.182 (colored)

Pull up following revision(s) (requested by martin in ticket #310):
	sys/kern/kern_proc.c: revision 1.184
	lib/libkvm/kvm_proc.c: revision 1.89
Measure kinfo_proc2::p_vm_vsize in pages, as it was always documented.
This value seems to never have been used anywhere.
This makes it consistent with it's cousin p_vm_msize (which is in pages as
well and has several uses).

Revision 1.186 / (download) - annotate - [select for diffs], Sat Jun 9 02:31:14 2012 UTC (10 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.185: +5 -2 lines
Diff to previous 1.185 (colored)

Add a new resource to limit the number of lwps per user, RLIMIT_NTHR. There
is a global sysctl kern.maxlwp to control this, which is by default 2048.
The first lwp of each process or kernel threads are not counted against the
limit. To show the current resource usage per user, I added a new sysctl
that dumps the uidinfo structure fields.

Revision 1.185 / (download) - annotate - [select for diffs], Wed Jun 6 11:20:21 2012 UTC (10 years, 7 months ago) by martin
Branch: MAIN
Changes since 1.184: +3 -4 lines
Diff to previous 1.184 (colored)

Henning Petersen in PR kern/46552: include cosmetics

Revision 1.184 / (download) - annotate - [select for diffs], Tue Jun 5 08:23:05 2012 UTC (10 years, 7 months ago) by martin
Branch: MAIN
Changes since 1.183: +3 -3 lines
Diff to previous 1.183 (colored)

Measure kinfo_proc2::p_vm_vsize in pages, as it was always documented.
This value seems to never have been used anywhere.
This makes it consistent with it's cousin p_vm_msize (which is in pages as
well and has several uses).

Revision 1.180.8.3 / (download) - annotate - [select for diffs], Sun Apr 29 23:05:04 2012 UTC (10 years, 9 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.180.8.2: +7 -2 lines
Diff to previous 1.180.8.2 (colored) to branchpoint 1.180 (colored) next main 1.181 (colored)

sync to latest -current.

Revision 1.180.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:25 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.180: +8 -6 lines
Diff to previous 1.180 (colored)

sync with head

Revision 1.183 / (download) - annotate - [select for diffs], Fri Apr 13 15:32:15 2012 UTC (10 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.182: +7 -2 lines
Diff to previous 1.182 (colored)

comment

Revision 1.180.8.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:46 2012 UTC (10 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.180.8.1: +2 -5 lines
Diff to previous 1.180.8.1 (colored) to branchpoint 1.180 (colored)

sync to -current.

Revision 1.182 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:52 2012 UTC (10 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.181: +2 -5 lines
Diff to previous 1.181 (colored)

Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

Revision 1.180.8.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:30 2012 UTC (10 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.180: +3 -3 lines
Diff to previous 1.180 (colored)

merge to -current.

Revision 1.181 / (download) - annotate - [select for diffs], Sat Feb 11 23:16:17 2012 UTC (10 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.180: +3 -3 lines
Diff to previous 1.180 (colored)

Add a posix_spawn syscall, as discussed on tech-kern.
Based on the summer of code project by Charles Zhang, heavily reworked
later by me - all bugs are likely mine.
Ok: core, releng.

Revision 1.168.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:30 2011 UTC (11 years, 7 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.168: +974 -49 lines
Diff to previous 1.168 (colored) next main 1.169 (colored)

Sync with HEAD.

Revision 1.163.2.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:01 2011 UTC (11 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.163.2.3: +48 -45 lines
Diff to previous 1.163.2.3 (colored) to branchpoint 1.163 (colored) next main 1.164 (colored)

sync with head

Revision 1.180 / (download) - annotate - [select for diffs], Fri May 13 22:22:03 2011 UTC (11 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.179: +27 -18 lines
Diff to previous 1.179 (colored)

Sprinkle __cacheline_aligned and __read_mostly, also const-ify.

Revision 1.179 / (download) - annotate - [select for diffs], Sun May 1 01:15:18 2011 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.178: +5 -2 lines
Diff to previous 1.178 (colored)

- Remove FORK_SHARELIMIT and PL_SHAREMOD, simplify lim_privatise().
- Use kmem(9) for struct plimit::pl_corename.

Revision 1.178 / (download) - annotate - [select for diffs], Sun May 1 00:22:36 2011 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.177: +3 -12 lines
Diff to previous 1.177 (colored)

Merge duplicate code fragments into a new lim_setcorename() routine.

Revision 1.177 / (download) - annotate - [select for diffs], Sun May 1 00:11:52 2011 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.176: +21 -19 lines
Diff to previous 1.176 (colored)

Rename limfree() to lim_free(), misc clean up.  No functional change.

Revision 1.176 / (download) - annotate - [select for diffs], Wed Apr 27 00:36:47 2011 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.175: +2 -4 lines
Diff to previous 1.175 (colored)

G/C M_EMULDATA

Revision 1.163.2.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:08 2011 UTC (11 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.163.2.2: +4 -2 lines
Diff to previous 1.163.2.2 (colored) to branchpoint 1.163 (colored)

sync with head

Revision 1.175 / (download) - annotate - [select for diffs], Mon Apr 18 00:26:11 2011 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.174: +2 -3 lines
Diff to previous 1.174 (colored)

Replace malloc with kmem, and remove M_SUBPROC.

Revision 1.174 / (download) - annotate - [select for diffs], Tue Apr 5 09:02:23 2011 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.173: +6 -3 lines
Diff to previous 1.173 (colored)

sysctl_kern_proc_args: fix the deadlock (hi joerg!).

Revision 1.163.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:15 2011 UTC (11 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.163.2.1: +972 -28 lines
Diff to previous 1.163.2.1 (colored) to branchpoint 1.163 (colored)

sync with head

Revision 1.169.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 15:10:39 2011 UTC (11 years, 11 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.169.2.1: +124 -81 lines
Diff to previous 1.169.2.1 (colored) next main 1.170 (colored)

Sync with HEAD

Revision 1.173 / (download) - annotate - [select for diffs], Sat Mar 5 01:52:18 2011 UTC (11 years, 11 months ago) by matt
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.172: +6 -12 lines
Diff to previous 1.172 (colored)

Simplify copyin_psstrings a bit.

Revision 1.172 / (download) - annotate - [select for diffs], Fri Mar 4 22:25:31 2011 UTC (11 years, 11 months ago) by joerg
Branch: MAIN
Changes since 1.171: +130 -81 lines
Diff to previous 1.171 (colored)

Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:19:59 2011 UTC (11 years, 11 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.169: +879 -2 lines
Diff to previous 1.169 (colored)

Sync with HEAD

Revision 1.171 / (download) - annotate - [select for diffs], Fri Jan 28 20:31:10 2011 UTC (12 years ago) by pooka
Branch: MAIN
CVS Tags: bouyer-quota2-base
Changes since 1.170: +7 -2 lines
Diff to previous 1.170 (colored)

migrate compat32 handling with previous

pointed out by Lars Heidieker

Revision 1.170 / (download) - annotate - [select for diffs], Fri Jan 28 18:44:44 2011 UTC (12 years ago) by pooka
Branch: MAIN
Changes since 1.169: +874 -2 lines
Diff to previous 1.169 (colored)

Move sysctl routines from init_sysctl.c to kern_descrip.c (for
descriptors) and kern_proc.c (for processes).  This makes them
usable in a rump kernel, in case somebody was wondering.

Revision 1.169 / (download) - annotate - [select for diffs], Mon Jan 17 07:13:31 2011 UTC (12 years ago) by uebayasi
Branch: MAIN
Branch point for: bouyer-quota2
Changes since 1.168: +3 -3 lines
Diff to previous 1.168 (colored)

Include internal definitions (uvm/uvm.h) only where necessary.

Revision 1.159.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:28 2010 UTC (12 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.159.2.1: +101 -108 lines
Diff to previous 1.159.2.1 (colored) to branchpoint 1.159 (colored) next main 1.160 (colored)

Sync with HEAD.

Revision 1.139.2.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:39 2010 UTC (12 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.4: +103 -110 lines
Diff to previous 1.139.2.4 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored)

sync with head.

Revision 1.168 / (download) - annotate - [select for diffs], Wed Jul 7 01:30:37 2010 UTC (12 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr
Changes since 1.167: +52 -28 lines
Diff to previous 1.167 (colored)

many changes for COMPAT_LINUX:
 - update the linux syscall table for each platform.
 - support new-style (NPTL) linux pthreads on all platforms.
   clone() with CLONE_THREAD uses 1 process with many LWPs
   instead of separate processes.
 - move the contents of sys__lwp_setprivate() into a new
   lwp_setprivate() and use that everywhere.
 - update linux_release[] and linux32_release[] to "2.6.18".
 - adjust placement of emul fork/exec/exit hooks as needed
   and adjust other emul code to match.
 - convert all struct emul definitions to use named initializers.
 - change the pid allocator to allow multiple pids to refer to the same proc.
 - remove a few fields from struct proc that are no longer needed.
 - disable the non-functional "vdso" code in linux32/amd64,
   glibc works fine without it.
 - fix a race in the futex code where we could miss a wakeup after
   a requeue operation.
 - redo futex locking to be a little more efficient.

Revision 1.163.2.1 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:53 2010 UTC (12 years, 7 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.163: +57 -88 lines
Diff to previous 1.163 (colored)

sync with head

Revision 1.167 / (download) - annotate - [select for diffs], Thu Jul 1 02:38:30 2010 UTC (12 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.166: +52 -46 lines
Diff to previous 1.166 (colored)

Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.

Revision 1.166 / (download) - annotate - [select for diffs], Thu Jun 10 20:54:53 2010 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.165: +3 -38 lines
Diff to previous 1.165 (colored)

lwp0 seems like an lwp instead of a process, so move bits related
to it from kern_proc.c to kern_lwp.c.  This makes kern_proc
"scheduling-clean" and more easily usable in environments with a
non-integrated scheduler (like, to take a random example, rump).

Revision 1.165 / (download) - annotate - [select for diffs], Thu Jun 10 19:06:26 2010 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.164: +4 -2 lines
Diff to previous 1.164 (colored)

smoke the smoke, hack the hack, *beep* the *beep*, _KERNEL_OPT the _KERNEL_POT

Revision 1.164 / (download) - annotate - [select for diffs], Fri Jun 4 23:02:18 2010 UTC (12 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.163: +4 -8 lines
Diff to previous 1.163 (colored)

proc_alloc: move kdtrace_proc_ctor() out of the proc_lock.

Revision 1.159.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:10 2010 UTC (12 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.159: +10 -3 lines
Diff to previous 1.159 (colored)

Sync with HEAD.

Revision 1.139.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:17 2010 UTC (12 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.3: +122 -18 lines
Diff to previous 1.139.2.3 (colored) to branchpoint 1.139 (colored)

sync with head

Revision 1.163 / (download) - annotate - [select for diffs], Fri Feb 26 18:47:13 2010 UTC (12 years, 11 months ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

Change RSS (resident set size) limit. Instead of setting it arbitrarily
to the total free memory available to the system, use the smallest value
between VM_MAXUSER_ADDRESS and total free memory (having a RSS limit
bigger than VM_MAXUSER_ADDRESS has no real meaning).

Fix a possible int overflow when ptoa(uvmexp.free) is bigger than 4GB
with a 32 bits vaddr_t.

This change is similar to the one made in rev 1.144 of uvm/uvm_glue.c.

Revision 1.162 / (download) - annotate - [select for diffs], Tue Feb 23 22:19:27 2010 UTC (12 years, 11 months ago) by darran
Branch: MAIN
Changes since 1.161: +2 -11 lines
Diff to previous 1.161 (colored)

DTrace: Get rid of the KDTRACE_HOOKS ifdefs in the kernel.  Replace the
functions with inline function that are empty when KDTRACE_HOOKS is not
defined.

Revision 1.161 / (download) - annotate - [select for diffs], Sun Feb 21 07:01:57 2010 UTC (12 years, 11 months ago) by darran
Branch: MAIN
Changes since 1.160: +3 -2 lines
Diff to previous 1.160 (colored)

Added a defflag option for KDTRACE_HOOKS and included opt_dtrace.h in the
relevant files. (Per Quentin Garnier - thanks!).

Revision 1.160 / (download) - annotate - [select for diffs], Sun Feb 21 02:11:40 2010 UTC (12 years, 11 months ago) by darran
Branch: MAIN
Changes since 1.159: +17 -2 lines
Diff to previous 1.159 (colored)

Add the DTrace hooks to the kernel (KDTRACE_HOOKS config option).
DTrace adds a pointer to the lwp and proc structures which it uses to
manage its state.  These are opaque from the kernel perspective to keep
the kernel free of CDDL code. The state arenas are kmem_alloced and freed
as proccesses and threads are created and destoyed.

Also add a check for trap06 (privileged/illegal instruction) so that
DTrace can check for D scripts that may have triggered the trap so it
can clean up after them and resume normal operation.

Ok with core@.

Revision 1.159 / (download) - annotate - [select for diffs], Thu Dec 17 01:25:10 2009 UTC (13 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.158: +3 -4 lines
Diff to previous 1.158 (colored)

Replace few USER_TO_UAREA/UAREA_TO_USER uses, reduce sys/user.h inclusions.

Revision 1.158 / (download) - annotate - [select for diffs], Thu Nov 26 00:19:11 2009 UTC (13 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.157: +3 -6 lines
Diff to previous 1.157 (colored)

Kill proc0paddr.  Use lwp0.l_addr instead.

Revision 1.157 / (download) - annotate - [select for diffs], Wed Nov 4 15:35:09 2009 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.156: +2 -4 lines
Diff to previous 1.156 (colored)

nuke unused local variable

Revision 1.156 / (download) - annotate - [select for diffs], Sun Nov 1 20:59:24 2009 UTC (13 years, 3 months ago) by rmind
Branch: MAIN
Changes since 1.155: +2 -5 lines
Diff to previous 1.155 (colored)

orphanpg: remove no longer user variable.

Revision 1.155 / (download) - annotate - [select for diffs], Wed Oct 21 21:12:06 2009 UTC (13 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.154: +3 -7 lines
Diff to previous 1.154 (colored)

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Oct 4 03:15:08 2009 UTC (13 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.153: +35 -2 lines
Diff to previous 1.153 (colored)

Install floppies (haha) don't get built with ktrace/ptrace, so they don't
include kern/sys_process.c. Move proc_uidmatch() to kern/kern_proc.c which
always gets built instead.

Pointed out by Kurt Schreiner on current-users@:

    http://mail-index.netbsd.org/current-users/2009/10/03/msg010745.html

Revision 1.153 / (download) - annotate - [select for diffs], Sat Oct 3 03:38:31 2009 UTC (13 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.152: +79 -2 lines
Diff to previous 1.152 (colored)

Move policies for KAUTH_PROCESS_{CANSEE,CORENAME,STOPFLAG,FORK} back to
the subsystem.

Note: Consider killing the signal listener and sticking
      KAUTH_PROCESS_SIGNAL here as well.

Revision 1.147.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:34 2009 UTC (13 years, 6 months ago) by jym
Branch: jym-xensuspend
Changes since 1.147.2.1: +3 -2 lines
Diff to previous 1.147.2.1 (colored) to branchpoint 1.147 (colored) next main 1.148 (colored)

Sync with HEAD.

Revision 1.139.2.3 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:31 2009 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.2: +3 -2 lines
Diff to previous 1.139.2.2 (colored) to branchpoint 1.139 (colored)

sync with head

Revision 1.152 / (download) - annotate - [select for diffs], Sat May 23 18:28:06 2009 UTC (13 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.151: +3 -2 lines
Diff to previous 1.151 (colored)

Make descriptor access and file allocation cheaper in many cases,
mostly by avoiding a bunch of atomic operations.

Revision 1.147.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.147: +111 -94 lines
Diff to previous 1.147 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.139.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:47 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.1: +124 -107 lines
Diff to previous 1.139.2.1 (colored) to branchpoint 1.139 (colored)

sync with head.

Revision 1.144.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (13 years, 9 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.144.2.2: +111 -94 lines
Diff to previous 1.144.2.2 (colored) to branchpoint 1.144 (colored) next main 1.145 (colored)

Sync with HEAD.

Revision 1.151 / (download) - annotate - [select for diffs], Sat Apr 25 15:06:31 2009 UTC (13 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.150: +89 -72 lines
Diff to previous 1.150 (colored)

- Rearrange pg_delete() and pg_remove() (renamed pg_free), thus
  proc_enterpgrp() with proc_leavepgrp() to free process group and/or
  session without proc_lock held.
- Rename SESSHOLD() and SESSRELE() to  to proc_sesshold() and
  proc_sessrele().  The later releases proc_lock now.

Quick OK by <ad>.

Revision 1.150 / (download) - annotate - [select for diffs], Thu Apr 16 14:56:41 2009 UTC (13 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.149: +14 -13 lines
Diff to previous 1.149 (colored)

- Manage pid_table with kmem(9).
- Remove M_PROC and unused M_SESSION.

Revision 1.149 / (download) - annotate - [select for diffs], Thu Apr 16 00:17:19 2009 UTC (13 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.148: +4 -5 lines
Diff to previous 1.148 (colored)

Avoid few #ifdef KSTACK_CHECK_MAGIC.

Revision 1.148 / (download) - annotate - [select for diffs], Sat Mar 28 21:41:05 2009 UTC (13 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.147: +10 -10 lines
Diff to previous 1.147 (colored)

Make inferior() function static, rename to p_inferior(), return bool.

Revision 1.144.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:56 2009 UTC (13 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.144.2.1: +4 -2 lines
Diff to previous 1.144.2.1 (colored) to branchpoint 1.144 (colored)

Sync with HEAD.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Jan 24 22:42:32 2009 UTC (14 years ago) by rmind
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.146: +4 -2 lines
Diff to previous 1.146 (colored)

Set l_psid to PS_NONE for lwp0 (consistency change).

Revision 1.144.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (14 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.144: +5 -5 lines
Diff to previous 1.144 (colored)

Sync with HEAD.

Revision 1.129.6.4 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:19 2009 UTC (14 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.129.6.3: +5 -3 lines
Diff to previous 1.129.6.3 (colored) to branchpoint 1.129 (colored) next main 1.130 (colored)

Sync with HEAD.

Revision 1.146 / (download) - annotate - [select for diffs], Wed Dec 17 20:51:36 2008 UTC (14 years, 1 month ago) by cegger
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.145: +4 -4 lines
Diff to previous 1.145 (colored)

kill MALLOC and FREE macros.

Revision 1.143.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:08 2008 UTC (14 years, 1 month ago) by haad
Branch: haad-dm
Changes since 1.143.2.1: +3 -3 lines
Diff to previous 1.143.2.1 (colored) to branchpoint 1.143 (colored) next main 1.144 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.145 / (download) - annotate - [select for diffs], Wed Nov 19 18:36:06 2008 UTC (14 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored)

Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime

Revision 1.143.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:27 2008 UTC (14 years, 3 months ago) by haad
Branch: haad-dm
Changes since 1.143: +4 -2 lines
Diff to previous 1.143 (colored)

Sync with HEAD.

Revision 1.144 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:20 2008 UTC (14 years, 3 months ago) by wrstuden
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap
Changes since 1.143: +4 -2 lines
Diff to previous 1.143 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.141.2.3 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:42 2008 UTC (14 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.141.2.2: +10 -12 lines
Diff to previous 1.141.2.2 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.129.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (14 years, 7 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.129.6.2: +8 -10 lines
Diff to previous 1.129.6.2 (colored) to branchpoint 1.129 (colored)

Sync with HEAD.

Revision 1.142.2.1 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:39 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.142: +10 -12 lines
Diff to previous 1.142 (colored) next main 1.143 (colored)

Sync with head.

Revision 1.143 / (download) - annotate - [select for diffs], Tue Jun 24 10:31:05 2008 UTC (14 years, 7 months ago) by gmcgarry
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.142: +10 -12 lines
Diff to previous 1.142 (colored)

The conversion to c99-style designated initialisers brought in the gcc
extension of specifying an array range.  Revert to runtime initialization
of limit0.

See here for details: http://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html

Revision 1.141.2.2 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:51 2008 UTC (14 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.141.2.1: +2 -4 lines
Diff to previous 1.141.2.1 (colored) to branchpoint 1.141 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.135.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.135.2.1: +2 -4 lines
Diff to previous 1.135.2.1 (colored) to branchpoint 1.135 (colored) next main 1.136 (colored)

sync with head

Revision 1.129.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:09 2008 UTC (14 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.129.6.1: +56 -147 lines
Diff to previous 1.129.6.1 (colored) to branchpoint 1.129 (colored)

Sync with HEAD.

Revision 1.142 / (download) - annotate - [select for diffs], Mon May 19 17:06:02 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: simonb-wapbl
Changes since 1.141: +2 -4 lines
Diff to previous 1.141 (colored)

Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.135.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:08 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.135: +55 -142 lines
Diff to previous 1.135 (colored)

sync with head.

Revision 1.139.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:25 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139: +4 -11 lines
Diff to previous 1.139 (colored)

sync with head.

Revision 1.141.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:04 2008 UTC (14 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.141: +4 -2 lines
Diff to previous 1.141 (colored)

Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.

Revision 1.141 / (download) - annotate - [select for diffs], Sat May 3 05:36:02 2008 UTC (14 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.140: +4 -4 lines
Diff to previous 1.140 (colored)

enterpgrp: 0 -> NULL for pointers.  no functional changes.

Revision 1.140 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:03 2008 UTC (14 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.139: +2 -9 lines
Diff to previous 1.139 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.139 / (download) - annotate - [select for diffs], Sun Apr 27 10:56:28 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.138: +6 -7 lines
Diff to previous 1.138 (colored)

Adjust previous: orphang() shouldn't have been playing about with tty_lock.
It was a bit of code that I accidenally left in.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Apr 27 01:12:27 2008 UTC (14 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.137: +5 -5 lines
Diff to previous 1.137 (colored)

orphanpg wants the tty lock held.

Revision 1.137 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:24 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.136: +7 -8 lines
Diff to previous 1.136 (colored)

Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.

Revision 1.136 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.135: +49 -127 lines
Diff to previous 1.135 (colored)

Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.

Revision 1.135 / (download) - annotate - [select for diffs], Thu Apr 17 14:16:22 2008 UTC (14 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.134: +4 -5 lines
Diff to previous 1.134 (colored)

pidtbl_dump: use queue.h macros.  no functional change.

Revision 1.134 / (download) - annotate - [select for diffs], Thu Apr 17 14:14:20 2008 UTC (14 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.133: +3 -4 lines
Diff to previous 1.133 (colored)

enterpgrp: update a comment.

Revision 1.129.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:02 2008 UTC (14 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.129: +18 -22 lines
Diff to previous 1.129 (colored)

Sync with HEAD.

Revision 1.80.12.10 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:01 2008 UTC (14 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80.12.9: +10 -6 lines
Diff to previous 1.80.12.9 (colored) to branchpoint 1.80 (colored) next main 1.81 (colored)

sync with head.

Revision 1.129.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:13 2008 UTC (14 years, 10 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.129: +10 -18 lines
Diff to previous 1.129 (colored) next main 1.130 (colored)

sync with head.

Revision 1.114.2.6 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:59 2008 UTC (14 years, 10 months ago) by matt
Branch: matt-armv6
Changes since 1.114.2.5: +10 -18 lines
Diff to previous 1.114.2.5 (colored) next main 1.115 (colored)

sync with HEAD

Revision 1.133 / (download) - annotate - [select for diffs], Sat Mar 22 17:53:34 2008 UTC (14 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Changes since 1.132: +7 -3 lines
Diff to previous 1.132 (colored)

LWP_CACHE_CREDS: instead of testing (l_cred != p_cred), use a per-LWP
flag bit to indicate a pending cred update. Avoids touching one item of
shared state in the syscall path.

Revision 1.132 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (14 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.131: +5 -5 lines
Diff to previous 1.131 (colored)

Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.

Revision 1.80.12.9 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:33 2008 UTC (14 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80.12.8: +10 -18 lines
Diff to previous 1.80.12.8 (colored) to branchpoint 1.80 (colored)

sync with head.

Revision 1.131 / (download) - annotate - [select for diffs], Mon Mar 17 00:52:56 2008 UTC (14 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base
Changes since 1.130: +10 -15 lines
Diff to previous 1.130 (colored)

Process group and session structures are allocated so infrequently that
there is no point having seperate caches for them. Just use kmem_alloc().

Revision 1.130 / (download) - annotate - [select for diffs], Mon Mar 17 00:18:24 2008 UTC (14 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.129: +2 -5 lines
Diff to previous 1.129 (colored)

- Initialize uihashtbl in resource_init();
- Make some variables static, remove the externs from header;
- Wrap few long lines, misc;

No functional changes are intended.

Revision 1.120.2.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:46 2008 UTC (14 years, 11 months ago) by mjf
Branch: mjf-devfs
Changes since 1.120.2.2: +37 -54 lines
Diff to previous 1.120.2.2 (colored) next main 1.121 (colored)

Sync with HEAD.

Revision 1.80.12.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:09 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80.12.7: +37 -54 lines
Diff to previous 1.80.12.7 (colored) to branchpoint 1.80 (colored)

sync with head

Revision 1.114.2.5 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:06 2008 UTC (15 years ago) by matt
Branch: matt-armv6
Changes since 1.114.2.4: +45 -63 lines
Diff to previous 1.114.2.4 (colored)

sync with HEAD

Revision 1.127.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:56 2008 UTC (15 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.127: +37 -54 lines
Diff to previous 1.127 (colored) next main 1.128 (colored)

Sync with HEAD

Revision 1.129 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:51 2008 UTC (15 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-base, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.128: +3 -3 lines
Diff to previous 1.128 (colored)

Merge vmlocking2 to head.

Revision 1.125.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 23:05:53 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.125.2.3: +3 -3 lines
Diff to previous 1.125.2.3 (colored) to branchpoint 1.125 (colored) next main 1.126 (colored)

- Push kernel_lock back into exit, wait and sysctl system calls, mainly
  for visibility.
- Serialize calls to brk() from within the same process.
- Mark more syscalls MPSAFE.

Revision 1.128 / (download) - annotate - [select for diffs], Wed Dec 26 16:01:36 2007 UTC (15 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.127: +36 -53 lines
Diff to previous 1.127 (colored)

Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.125.2.3 / (download) - annotate - [select for diffs], Fri Dec 21 15:27:03 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.125.2.2: +11 -35 lines
Diff to previous 1.125.2.2 (colored) to branchpoint 1.125 (colored)

Protect process groups and sessions with tty_lock.

Revision 1.125.2.2 / (download) - annotate - [select for diffs], Sat Dec 15 03:16:57 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.125.2.1: +27 -20 lines
Diff to previous 1.125.2.1 (colored) to branchpoint 1.125 (colored)

- Use pool_cache for a few more items and make those caches static.
- Mark another 10 syscalls MPSAFE including execve(). A small bit of
  work is required to fix a couple of issues (tty, kqueue).

Revision 1.113.6.8 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:18 2007 UTC (15 years, 1 month ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.113.6.7: +10 -9 lines
Diff to previous 1.113.6.7 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored)

Sync with HEAD.

Revision 1.120.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:30 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.120.2.1: +10 -9 lines
Diff to previous 1.120.2.1 (colored)

Sync with HEAD.

Revision 1.125.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:41 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.125: +9 -8 lines
Diff to previous 1.125 (colored)

Sync with head.

Revision 1.80.12.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:46 2007 UTC (15 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80.12.6: +10 -9 lines
Diff to previous 1.80.12.6 (colored) to branchpoint 1.80 (colored)

sync with head

Revision 1.127 / (download) - annotate - [select for diffs], Wed Dec 5 07:06:53 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.126: +7 -7 lines
Diff to previous 1.126 (colored)

Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.

Revision 1.126 / (download) - annotate - [select for diffs], Tue Dec 4 16:56:17 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.125: +4 -3 lines
Diff to previous 1.125 (colored)

Use atomics to maintain nprocs.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Dec 3 20:26:25 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base1
Branch point for: vmlocking2
Changes since 1.124: +3 -3 lines
Diff to previous 1.124 (colored)

Soft interrupts can now take proclist_lock, so there is no need to
double-lock alllwp or allproc.

Revision 1.120.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:41 2007 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.120: +72 -125 lines
Diff to previous 1.120 (colored)

Sync with HEAD.

Revision 1.80.12.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:44 2007 UTC (15 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80.12.5: +72 -125 lines
Diff to previous 1.80.12.5 (colored) to branchpoint 1.80 (colored)

sync with head.

Revision 1.113.6.7 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:42 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.113.6.6: +2 -4 lines
Diff to previous 1.113.6.6 (colored) to branchpoint 1.113 (colored)

Sync with HEAD.

Revision 1.118.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:09 2007 UTC (15 years, 2 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.118: +73 -131 lines
Diff to previous 1.118 (colored) next main 1.119 (colored)

Sync with HEAD

Revision 1.124 / (download) - annotate - [select for diffs], Sun Nov 11 23:22:24 2007 UTC (15 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.123: +2 -4 lines
Diff to previous 1.123 (colored)

Change some initialization of static queues to compile time.
(xxx_INIT to xxx_HEAD_INITIALIZER).  Drop code which inits
non-auto (global or static) variables to 0 since that's
already implied by being non-auto.  Init some static/global
cpu_simple_locks at compile time.

Revision 1.113.6.6 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:04 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.113.6.5: +71 -122 lines
Diff to previous 1.113.6.5 (colored) to branchpoint 1.113 (colored)

Sync with HEAD.

Revision 1.114.2.4 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:03 2007 UTC (15 years, 2 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.114.2.3: +6 -63 lines
Diff to previous 1.114.2.3 (colored)

sync with -HEAD

Revision 1.123 / (download) - annotate - [select for diffs], Wed Nov 7 16:51:28 2007 UTC (15 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.122: +70 -62 lines
Diff to previous 1.122 (colored)

Use C99 structures initializers when possible.
[from matt-armv6]

Revision 1.122 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:22 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.121: +3 -62 lines
Diff to previous 1.121 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.114.2.3 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:49 2007 UTC (15 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.114.2.2: +25 -36 lines
Diff to previous 1.114.2.2 (colored)

sync with HEAD

Revision 1.113.6.5 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:30 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.113.6.4: +6 -6 lines
Diff to previous 1.113.6.4 (colored) to branchpoint 1.113 (colored)

Sync with HEAD.

Revision 1.121 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:42 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Changes since 1.120: +6 -6 lines
Diff to previous 1.120 (colored)

Merge scheduler changes from the vmlocking branch. All discussed on
tech-kern:

- Invert priority space so that zero is the lowest priority. Rearrange
  number and type of priority levels into bands. Add new bands like
  'kernel real time'.
- Ignore the priority level passed to tsleep. Compute priority for
  sleep dynamically.
- For SCHED_4BSD, make priority adjustment per-LWP, not per-process.

Revision 1.107.2.18 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:19 2007 UTC (15 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.17: +4 -3 lines
Diff to previous 1.107.2.17 (colored) next main 1.108 (colored)

- Fix interactivity problems under high load. Beacuse soft interrupts
  are being stacked on top of regular LWPs, more often than not aston()
  was being called on a soft interrupt thread instead of a user thread,
  meaning that preemption was not happening on EOI.

- Don't use bool in a couple of data structures. Sub-word writes are not
  always atomic and may clobber other fields in the containing word.

- For SCHED_4BSD, make p_estcpu per thread (l_estcpu). Rework how the
  dynamic priority level is calculated - it's much better behaved now.

- Kill the l_usrpri/l_priority split now that priorities are no longer
  directly assigned by tsleep(). There are three fields describing LWP
  priority:

        l_priority: Dynamic priority calculated by the scheduler.
                This does not change for kernel/realtime threads,
                and always stays within the correct band. Eg for
                timeshared LWPs it never moves out of the user
                priority range. This is basically what l_usrpri
                was before.

        l_inheritedprio: Lent to the LWP due to priority inheritance
                (turnstiles).

        l_kpriority: A boolean value set true the first time an LWP
                sleeps within the kernel. This indicates that the LWP
                should get a priority boost as compensation for blocking.
                lwp_eprio() now does the equivalent of sched_kpri() if
                the flag is set. The flag is cleared in userret().

- Keep track of scheduling class (OTHER, FIFO, RR) in struct lwp, and use
  this to make decisions in a few places where we previously tested for a
  kernel thread.

- Partially fix itimers and usr/sys/intr time accounting in the presence
  of software interrupts.

- Use kthread_create() to create idle LWPs. Move priority definitions
  from the various modules into sys/param.h.

- newlwp -> lwp_create

Revision 1.113.6.4 / (download) - annotate - [select for diffs], Sun Oct 28 20:11:12 2007 UTC (15 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.113.6.3: +3 -8 lines
Diff to previous 1.113.6.3 (colored) to branchpoint 1.113 (colored)

Sync with HEAD.

Revision 1.80.12.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:26 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80.12.4: +25 -35 lines
Diff to previous 1.80.12.4 (colored) to branchpoint 1.80 (colored)

sync with head.

Revision 1.107.2.17 / (download) - annotate - [select for diffs], Sat Oct 27 09:18:54 2007 UTC (15 years, 3 months ago) by yamt
Branch: vmlocking
Changes since 1.107.2.16: +3 -4 lines
Diff to previous 1.107.2.16 (colored)

fix priorities for some kernel threads.  advised and ok'ed by Andrew Doran.

Revision 1.113.6.3 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:33 2007 UTC (15 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.113.6.2: +7 -10 lines
Diff to previous 1.113.6.2 (colored) to branchpoint 1.113 (colored)

Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.107.2.16 / (download) - annotate - [select for diffs], Thu Oct 25 19:43:10 2007 UTC (15 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.15: +3 -62 lines
Diff to previous 1.107.2.15 (colored)

- Simplify debugger/procfs reference counting of processes. Use a per-proc
  rwlock: rw_tryenter(RW_READER) to gain a reference, and rw_enter(RW_WRITER)
  by the process itself to drain out reference holders before major changes
  like exiting.
- Fix numerous bugs and locking issues in procfs.
- Mark procfs MPSAFE.

Revision 1.120 / (download) - annotate - [select for diffs], Wed Oct 24 14:50:41 2007 UTC (15 years, 3 months ago) by ad
Branch: MAIN
Branch point for: mjf-devfs
Changes since 1.119: +3 -8 lines
Diff to previous 1.119 (colored)

Make ras_lookup() lockless.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Oct 23 14:15:48 2007 UTC (15 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.118: +4 -4 lines
Diff to previous 1.118 (colored)

proc0_init: change lwp0's priority from PRIBIO to PUSER so that
init and its children has a user priority.  uvm_scheduler adjusts
its own priority later.

Revision 1.116.2.2 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:41 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.116.2.1: +5 -8 lines
Diff to previous 1.116.2.1 (colored) to branchpoint 1.116 (colored) next main 1.117 (colored)

sync with head.

Revision 1.118 / (download) - annotate - [select for diffs], Fri Oct 12 14:29:38 2007 UTC (15 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.117: +5 -8 lines
Diff to previous 1.117 (colored)

Merge from vmlocking: fix a deadlock with (threaded) soft interrupts and
process exit.

Revision 1.107.2.15 / (download) - annotate - [select for diffs], Tue Oct 9 15:22:19 2007 UTC (15 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.14: +3 -3 lines
Diff to previous 1.107.2.14 (colored)

Sync with head.

Revision 1.107.2.14 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:27 2007 UTC (15 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.13: +19 -21 lines
Diff to previous 1.107.2.13 (colored)

Sync with head.

Revision 1.116.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:28:43 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.116: +15 -18 lines
Diff to previous 1.116 (colored)

sync with head.

Revision 1.113.6.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:01 2007 UTC (15 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.113.6.1: +19 -21 lines
Diff to previous 1.113.6.1 (colored) to branchpoint 1.113 (colored)

Sync with HEAD.

Revision 1.117 / (download) - annotate - [select for diffs], Sat Sep 29 12:22:31 2007 UTC (15 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-x86pmap-base2
Changes since 1.116: +15 -18 lines
Diff to previous 1.116 (colored)

Change the way p->p_limit (and hence p->p_rlimit) is locked.
Should fix PR/36939 and make the rlimit code MP safe.
Posted for comment to tech-kern (non received!)

The p_limit field (for a process) is only be changed once (on the first
  write), and a reference to the old structure is kept (for code paths
  that have cached the pointer).
Only p->p_limit is now locked by p->p_mutex, and since the referenced memory
  will not go away, is only needed if the pointer is to be changed.
The contents of 'struct plimit' are all locked by pl_mutex, except that the
  code doesn't bother to acquire it for reads (which are basically atomic).
Add FORK_SHARELIMIT that causes fork1() to share the limits between parent
  and child, use it for the IRIX_PR_SULIMIT.
Fix borked test for both IRIX_PR_SUMASK and IRIX_PR_SDIR being set.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Sep 21 19:19:20 2007 UTC (15 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.115: +8 -8 lines
Diff to previous 1.115 (colored)

Rename members of 'struct plimit' so that the fields are 'pl_xxx' and
no longer have the same names as members of 'struct proc'.

Revision 1.113.2.2 / (download) - annotate - [select for diffs], Mon Sep 10 10:55:59 2007 UTC (15 years, 4 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.113.2.1: +4 -3 lines
Diff to previous 1.113.2.1 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored)

Sync with HEAD.

Revision 1.115 / (download) - annotate - [select for diffs], Thu Sep 6 23:58:57 2007 UTC (15 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Changes since 1.114: +4 -3 lines
Diff to previous 1.114 (colored)

- Fix sleepq_block() to return EINTR if the LWP is cancelled. Pointed out
  by yamt@.

- Introduce SOBJ_SLEEPQ_LIFO, and use for LWPs sleeping via _lwp_park.
  libpthread enqueues most waiters in LIFO order to try and wake LWPs that
  ran recently, since their working set is more likely to be in cache.
  Matching the order of insertion reduces the time spent searching queues
  in the kernel.

- Do not boost the priority of LWPs sleeping in _lwp_park, just let them
  sleep at their user priority level. LWPs waiting for some I/O event in
  the kernel still wait with kernel priority and get woken more quickly.
  This needs more evaluation and is to be revisited, but the effect on a
  variety of benchmarks is positive.

- When waking LWPs, do not send an IPI to remote CPUs or arrange for the
  current LWP to be preempted unless (a) the thread being awoken has kernel
  priority and has higher priority than the currently running thread or (b)
  the remote CPU is idle.

Revision 1.80.12.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:52 2007 UTC (15 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80.12.3: +110 -94 lines
Diff to previous 1.80.12.3 (colored) to branchpoint 1.80 (colored)

sync with head.

Revision 1.114.2.2 / (download) - annotate - [select for diffs], Thu Aug 30 00:28:50 2007 UTC (15 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.114.2.1: +3 -3 lines
Diff to previous 1.114.2.1 (colored)

Fix inverted test #ifndef -> #ifdef

Revision 1.114.2.1 / (download) - annotate - [select for diffs], Tue Aug 28 18:43:44 2007 UTC (15 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.114: +69 -62 lines
Diff to previous 1.114 (colored)

Pre-init the static structures (lwp0,proc0,session0,etc.) whenever possible.
Use curlwp_set()

Revision 1.107.2.13 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:31 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.12: +4 -4 lines
Diff to previous 1.107.2.12 (colored)

Sync with HEAD.

Revision 1.107.2.12 / (download) - annotate - [select for diffs], Sun Aug 19 22:10:14 2007 UTC (15 years, 5 months ago) by yamt
Branch: vmlocking
Changes since 1.107.2.11: +5 -8 lines
Diff to previous 1.107.2.11 (colored)

proc_free: release proclist_lock earlier as suggested by Andrew Doran.
calling lwp_free with the lock held leads a deadlock.

    1. CPU1: do_sys_wait -> lwp_free busy-waits for an LWP exiting on CPU2,
     holding proclist_lock.

    2. CPU2: the exiting LWP is interrupted by softclock.

    3. CPU2: softclock -> sched_pstats tries to acquire proclist_lock.
     it also busy-waits because the owning LWP is running.

Revision 1.113.6.1 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:31 2007 UTC (15 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.113: +4 -4 lines
Diff to previous 1.113 (colored)

Sync with HEAD.

Revision 1.113.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:09 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.113: +4 -4 lines
Diff to previous 1.113 (colored)

Sync with HEAD.

Revision 1.114 / (download) - annotate - [select for diffs], Fri Aug 10 21:50:48 2007 UTC (15 years, 5 months ago) by dyoung
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.113: +4 -4 lines
Diff to previous 1.113 (colored)

Fix kernel compilation with 'options KSTACK_CHECK_MAGIC':  change
'void *' to 'char *' so pointer arithmetic will work.

Revision 1.107.2.11 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:55 2007 UTC (15 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.10: +3 -3 lines
Diff to previous 1.107.2.10 (colored)

Sync with head.

Revision 1.107.2.10 / (download) - annotate - [select for diffs], Sun Jul 15 13:27:38 2007 UTC (15 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.9: +5 -3 lines
Diff to previous 1.107.2.9 (colored)

Sync with head.

Revision 1.108.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:53 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.108: +17 -15 lines
Diff to previous 1.108 (colored) next main 1.109 (colored)

Sync with head.

Revision 1.113 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:53 2007 UTC (15 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.112: +11 -10 lines
Diff to previous 1.112 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.107.2.9 / (download) - annotate - [select for diffs], Sun Jul 1 21:50:39 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.8: +3 -3 lines
Diff to previous 1.107.2.8 (colored)

Adapt to callout API change.

Revision 1.107.2.8 / (download) - annotate - [select for diffs], Sun Jun 17 21:31:23 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.7: +3 -3 lines
Diff to previous 1.107.2.7 (colored)

- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.112 / (download) - annotate - [select for diffs], Fri Jun 15 20:17:08 2007 UTC (15 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored)

splstatclock, spllock -> splhigh

Revision 1.111 / (download) - annotate - [select for diffs], Thu Jun 14 14:29:50 2007 UTC (15 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.110: +5 -3 lines
Diff to previous 1.110 (colored)

proc_drainrefs: fix the case of exec failure.

Revision 1.107.2.7 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:20 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.6: +5 -7 lines
Diff to previous 1.107.2.6 (colored)

Sync with head.

Revision 1.110 / (download) - annotate - [select for diffs], Thu May 17 14:51:40 2007 UTC (15 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.109: +5 -4 lines
Diff to previous 1.109 (colored)

merge yamt-idlelwp branch.  asked by core@.  some ports still needs work.

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.

Revision 1.100.2.7 / (download) - annotate - [select for diffs], Mon May 7 10:55:46 2007 UTC (15 years, 8 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.100.2.6: +2 -4 lines
Diff to previous 1.100.2.6 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored)

sync with head.

Revision 1.109 / (download) - annotate - [select for diffs], Mon Apr 30 20:11:41 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.108: +2 -4 lines
Diff to previous 1.108 (colored)

Remove proc->p_ru and the 'rusage' pool.
I think it existed to cache the numbers in kernel memory of a zombie when
proc->p_stats was part of the 'u' area - so got freed earlier and wouldn't
(easily) be accessible from a separate process.  However since both the
p_ru and p_stats fields are freed at the same time it is no longer needed.
Ride the recent 4.99.19 version change.

Revision 1.107.2.6 / (download) - annotate - [select for diffs], Sat Apr 28 22:40:03 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.5: +3 -3 lines
Diff to previous 1.107.2.5 (colored)

select/poll:

- Don't try to awaken LWPs more than once. Prevents unnecessary locking.
- Tidy slightly.

Revision 1.100.2.6 / (download) - annotate - [select for diffs], Sat Apr 21 15:50:15 2007 UTC (15 years, 9 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.100.2.5: +4 -3 lines
Diff to previous 1.100.2.5 (colored) to branchpoint 1.100 (colored)

Some changes mainly for top/ps:

- Add an optional name field to struct lwp.
- Count the total number of context switches + involuntary,
  not voluntary + involuntary.
- Mark the idle threads as LSIDL when not running, otherwise
  they show up funny in a top(1) that shows threads.
- Make pctcpu and cpticks per-LWP attributes.
- Add to kinfo_lwp: cpticks, pctcpu, pid, name.

Revision 1.107.2.5 / (download) - annotate - [select for diffs], Tue Apr 10 00:22:11 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.4: +3 -2 lines
Diff to previous 1.107.2.4 (colored)

Changes to select/poll:

- Make them MP safe and decouple from the proc locks.
- selwakeup: don't call p_find, or traverse per-proc LWP lists (ouch).
- selwakeup: don't lock the sleep queue unless we need to.

Revision 1.107.2.4 / (download) - annotate - [select for diffs], Mon Apr 9 22:10:03 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.3: +3 -3 lines
Diff to previous 1.107.2.3 (colored)

- Add two new arguments to kthread_create1: pri_t pri, bool mpsafe.
- Fork kthreads off proc0 as new LWPs, not new processes.

Revision 1.107.2.3 / (download) - annotate - [select for diffs], Thu Apr 5 21:38:36 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.2: +5 -4 lines
Diff to previous 1.107.2.2 (colored)

- Make context switch counters 64-bit, and count the total number of
  context switches + voluntary, instead of involuntary + voluntary.
- Add lwp::l_swaplock for uvm.
- PHOLD/PRELE are replaced.

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Sun Apr 1 16:16:20 2007 UTC (15 years, 10 months ago) by bouyer
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.99: +4 -4 lines
Diff to previous 1.99 (colored) next main 1.100 (colored)

Apply patch (requested by chs in ticket #554):
	sys/kern/kern_exit.c	patch
	sys/kern/kern_lwp.c	patch
	sys/kern/kern_proc.c	patch
	sys/sys/proc.h		patch
Add a new SDYING process state. In exit1() release structures before curlwp is
NULL. It should fix the problem described in PR 34892.

Revision 1.100.2.5 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:02 2007 UTC (15 years, 10 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.100.2.4: +8 -8 lines
Diff to previous 1.100.2.4 (colored) to branchpoint 1.100 (colored)

sync with head.

Revision 1.100.2.4 / (download) - annotate - [select for diffs], Sat Mar 24 00:43:07 2007 UTC (15 years, 10 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.100.2.3: +2 -3 lines
Diff to previous 1.100.2.3 (colored) to branchpoint 1.100 (colored)

Checkpoint:
- Abstract for per-CPU locking of runqueues.
  As a workaround for SCHED_4BSD global runqueue, covered by sched_mutex,
  spc_mutex is a pointer for now. After making SCHED_4BSD runqueues
  per-CPU, it will became a storage mutex.
- suspendsched: Locking is not necessary for cpu_need_resched().
- Remove mutex_spin_exit() prototype in patch.c and LOCK_ASSERT() check
  in runqueue_nextlwp() in sched_4bsd.c to make them compile again.

Revision 1.107.2.2 / (download) - annotate - [select for diffs], Wed Mar 21 20:16:31 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.107.2.1: +6 -6 lines
Diff to previous 1.107.2.1 (colored)

- Put a lock around the proc's CWD info (work in progress).
- Replace some more simplelocks.
- Make lbolt a condvar.

Revision 1.107.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:54 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.107: +8 -8 lines
Diff to previous 1.107 (colored)

Sync with head.

Revision 1.108 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:33 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.107: +8 -8 lines
Diff to previous 1.107 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.100.2.3 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:36 2007 UTC (15 years, 10 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.100.2.2: +88 -76 lines
Diff to previous 1.100.2.2 (colored) to branchpoint 1.100 (colored)

Sync with HEAD.

Revision 1.107 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:25 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Branch point for: vmlocking
Changes since 1.106: +84 -72 lines
Diff to previous 1.106 (colored)

- 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.

Revision 1.106 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:05 2007 UTC (15 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.105: +6 -6 lines
Diff to previous 1.105 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.100.2.2 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:23 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.100.2.1: +23 -13 lines
Diff to previous 1.100.2.1 (colored) to branchpoint 1.100 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.105 / (download) - annotate - [select for diffs], Mon Feb 26 09:20:53 2007 UTC (15 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.104: +4 -2 lines
Diff to previous 1.104 (colored)

implement priority inheritance.

Revision 1.80.12.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:08 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80.12.2: +362 -219 lines
Diff to previous 1.80.12.2 (colored) to branchpoint 1.80 (colored)

sync with head.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Feb 21 23:48:14 2007 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

Pick up some additional files that were missed before due to conflicts
with newlock2 merge:

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.103 / (download) - annotate - [select for diffs], Sun Feb 18 16:58:16 2007 UTC (15 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.102: +5 -2 lines
Diff to previous 1.102 (colored)

Add code to support per-system call statistics:
option SYSCALL_STATS	counts the number of times each system call is made
option SYSCALL_TIMES	counts the amount of time spent in each system call
Currently the counting hooks have only been added to the i386 system call
handler, and the time spent in interrupts is not subtracted.
It ought also be possible to add the times to the processes profiling
counters in order to get a more accurate user/system/interrupt split.
The counts themselves are readable via the sysctl interface.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:43 2007 UTC (15 years, 11 months ago) by pavel
Branch: MAIN
Changes since 1.101: +8 -8 lines
Diff to previous 1.101 (colored)

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.

Revision 1.101 / (download) - annotate - [select for diffs], Sat Feb 17 21:46:13 2007 UTC (15 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.100: +11 -6 lines
Diff to previous 1.100 (colored)

Acquire proclist_lock in pgid_in_session() so we don't reference potentially
stale proc & pgrp pointers.

Revision 1.100.2.1 / (download) - annotate - [select for diffs], Sat Feb 17 10:30:57 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.100: +3 -2 lines
Diff to previous 1.100 (colored)

- separate context switching and thread scheduling.
- introduce idle lwp.
- change some related MD/MI interfaces and implement i386 version.

Revision 1.100 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:31 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.99: +348 -213 lines
Diff to previous 1.99 (colored)

Merge newlock2 to head.

Revision 1.94.4.15 / (download) - annotate - [select for diffs], Thu Feb 8 07:33:00 2007 UTC (15 years, 11 months ago) by skrll
Branch: newlock2
Changes since 1.94.4.14: +3 -3 lines
Diff to previous 1.94.4.14 (colored) to branchpoint 1.94 (colored) next main 1.95 (colored)

Another typo in a comment.

Revision 1.94.4.14 / (download) - annotate - [select for diffs], Mon Feb 5 13:16:49 2007 UTC (15 years, 11 months ago) by ad
Branch: newlock2
Changes since 1.94.4.13: +56 -41 lines
Diff to previous 1.94.4.13 (colored) to branchpoint 1.94 (colored)

- When clearing signals dequeue siginfo first and free later, once
  outside the lock permiter.
- Push kernel_lock back in a a couple of places.
- Adjust limcopy() to be MP safe (this needs redoing).
- Fix a couple of bugs noticed along the way.
- Catch up with condvar changes.

Revision 1.94.4.13 / (download) - annotate - [select for diffs], Thu Feb 1 06:21:07 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.94.4.12: +3 -3 lines
Diff to previous 1.94.4.12 (colored) to branchpoint 1.94 (colored)

Get sh3 compiling.

Revision 1.94.4.12 / (download) - annotate - [select for diffs], Wed Jan 31 19:56:38 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.94.4.11: +4 -2 lines
Diff to previous 1.94.4.11 (colored) to branchpoint 1.94 (colored)

- Have callers to mi_switch() drop the kernel lock.
- Fix a deadlock and some typos.
- Unbreak ptrace().

Revision 1.94.4.11 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:40 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.94.4.10: +2 -4 lines
Diff to previous 1.94.4.10 (colored) to branchpoint 1.94 (colored)

Remove support for SA. Ok core@.

Revision 1.94.4.10 / (download) - annotate - [select for diffs], Sun Jan 28 07:20:39 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.94.4.9: +3 -3 lines
Diff to previous 1.94.4.9 (colored) to branchpoint 1.94 (colored)

- Fix sequence error between saving/raising the SPL.
- Changes for JavaStation.
- Fix bugs with mips & sparc support routines.

Revision 1.94.4.9 / (download) - annotate - [select for diffs], Sat Jan 27 01:14:54 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.94.4.8: +4 -4 lines
Diff to previous 1.94.4.8 (colored) to branchpoint 1.94 (colored)

Drop proclist_mutex and proc::p_smutex back to IPL_VM.

Revision 1.94.4.8 / (download) - annotate - [select for diffs], Thu Jan 25 20:18:37 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.94.4.7: +6 -3 lines
Diff to previous 1.94.4.7 (colored) to branchpoint 1.94 (colored)

Eliminate some uses of mtsleep().

Revision 1.80.12.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:05 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80.12.1: +126 -22 lines
Diff to previous 1.80.12.1 (colored) to branchpoint 1.80 (colored)

sync with head.

Revision 1.94.4.7 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:44 2006 UTC (16 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.94.4.6: +26 -34 lines
Diff to previous 1.94.4.6 (colored) to branchpoint 1.94 (colored)

Checkpoint work in progress.

Revision 1.94.4.6 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:22 2006 UTC (16 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.94.4.5: +82 -9 lines
Diff to previous 1.94.4.5 (colored) to branchpoint 1.94 (colored)

Sync with head.

Revision 1.94.4.5 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:36 2006 UTC (16 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.94.4.4: +135 -39 lines
Diff to previous 1.94.4.4 (colored) to branchpoint 1.94 (colored)

Checkpoint work in progress.

Revision 1.94.4.4 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (16 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.94.4.3: +6 -2 lines
Diff to previous 1.94.4.3 (colored) to branchpoint 1.94 (colored)

- Redo LWP locking slightly and fix some races.
- Fix some locking botches.
- Make signal mask / stack per-proc for SA processes.
- Add _lwp_kill().

Revision 1.94.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:10 2006 UTC (16 years, 3 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.94: +83 -11 lines
Diff to previous 1.94 (colored) next main 1.95 (colored)

sync with head

Revision 1.99 / (download) - annotate - [select for diffs], Sat Oct 21 17:01:56 2006 UTC (16 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, newlock2-nbase, newlock2-base, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored)

pool_get(): use PR_WAITOK, not M_WAITOK (which happens to be PR_NOWAIT ..)

XXX: not the first time this mistake has been made

Revision 1.94.4.3 / (download) - annotate - [select for diffs], Sat Oct 21 15:20:46 2006 UTC (16 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.94.4.2: +51 -22 lines
Diff to previous 1.94.4.2 (colored) to branchpoint 1.94 (colored)

Checkpoint work in progress on locking and per-LWP signals. Very much a
a work in progress and there is still a lot to do.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Oct 11 04:51:06 2006 UTC (16 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.97: +19 -6 lines
Diff to previous 1.97 (colored)

Don't free specificdata in lwp_exit2(); it's not safe to block there.
Instead, free an LWP's specificdata from lwp_exit() (if it is not the
last LWP) or exit1() (if it is the last LWP).  For consistency, free the
proc's specificdata from exit1() as well.  Add lwp_finispecific() and
proc_finispecific() functions to make this more convenient.

Revision 1.97 / (download) - annotate - [select for diffs], Mon Oct 9 00:39:06 2006 UTC (16 years, 3 months ago) by martin
Branch: MAIN
Changes since 1.96: +3 -3 lines
Diff to previous 1.96 (colored)

Remove unused variables.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Oct 8 22:57:11 2006 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.95: +14 -5 lines
Diff to previous 1.95 (colored)

add {proc,lwp}_initspecific and use them to init proc0 and lwp0.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Oct 8 04:28:44 2006 UTC (16 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.94: +60 -10 lines
Diff to previous 1.94 (colored)

Add specificdata support to procs and lwps, each providing their own
wrappers around the speicificdata subroutines.  Also:
- Call the new lwpinit() function from main() after calling procinit().
- Move some pool initialization out of kern_proc.c and into files that
  are directly related to the pools in question (kern_lwp.c and kern_ras.c).
- Convert uipc_sem.c to proc_{get,set}specific(), and eliminate the p_ksems
  member from struct proc.

Revision 1.94.4.2 / (download) - annotate - [select for diffs], Mon Sep 11 18:43:43 2006 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.94.4.1: +15 -6 lines
Diff to previous 1.94.4.1 (colored) to branchpoint 1.94 (colored)

Grab proclist_mutex in a few more places.

Revision 1.94.4.1 / (download) - annotate - [select for diffs], Mon Sep 11 18:19:09 2006 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.94: +132 -146 lines
Diff to previous 1.94 (colored)

- Allocate and free turnstiles where needed.
- Split proclist_mutex and alllwp_mutex out of the proclist_lock,
  and use in interrupt context.
- Fix an MP race in enterpgrp()/setsid().
- Acquire proclist_lock and p_crmutex in some obvious places.

Revision 1.85.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:16 2006 UTC (16 years, 4 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.85: +71 -20 lines
Diff to previous 1.85 (colored) next main 1.86 (colored)

sync with head

Revision 1.86.2.5 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:46 2006 UTC (16 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.86.2.4: +45 -5 lines
Diff to previous 1.86.2.4 (colored) to branchpoint 1.86 (colored) next main 1.87 (colored)

sync with head

Revision 1.94 / (download) - annotate - [select for diffs], Sun Jul 30 21:58:11 2006 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.93: +43 -4 lines
Diff to previous 1.93 (colored)

Single-thread updates to the process credential.

Revision 1.93 / (download) - annotate - [select for diffs], Thu Jul 27 00:04:08 2006 UTC (16 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored)

PR/34094: Jorge Acereda: Kernel option KSTACK_CHECK_MAGIC doesn't build

Revision 1.92 / (download) - annotate - [select for diffs], Wed Jul 19 21:11:37 2006 UTC (16 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.91: +3 -2 lines
Diff to previous 1.91 (colored)

- Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.

Revision 1.90.2.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:50 2006 UTC (16 years, 6 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.90: +2 -10 lines
Diff to previous 1.90 (colored) next main 1.91 (colored)

Merge from HEAD.

Revision 1.86.2.4 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:56 2006 UTC (16 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.86.2.3: +4 -10 lines
Diff to previous 1.86.2.3 (colored) to branchpoint 1.86 (colored)

sync with head.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Jun 25 08:12:54 2006 UTC (16 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6
Changes since 1.90: +2 -10 lines
Diff to previous 1.90 (colored)

move SA related pools to where they are used.  make them static.

Revision 1.80.12.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:37 2006 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.80: +183 -54 lines
Diff to previous 1.80 (colored)

sync with head.

Revision 1.89.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:07:15 2006 UTC (16 years, 7 months ago) by chap
Branch: chap-midi
Changes since 1.89: +4 -2 lines
Diff to previous 1.89 (colored) next main 1.90 (colored)

Sync with head.

Revision 1.90 / (download) - annotate - [select for diffs], Sun Jun 11 07:32:18 2006 UTC (16 years, 7 months ago) by rjs
Branch: MAIN
CVS Tags: gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.89: +4 -2 lines
Diff to previous 1.89 (colored)

Add includes of opt_multiprocessor.h and opt_lockdebug.h where missing.

Revision 1.85.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:07 2006 UTC (16 years, 8 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.85.6.1: +6 -9 lines
Diff to previous 1.85.6.1 (colored) to branchpoint 1.85 (colored) next main 1.86 (colored)

Sync with head.

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:41 2006 UTC (16 years, 8 months ago) by tron
Branch: peter-altq
Changes since 1.87: +5 -7 lines
Diff to previous 1.87 (colored) next main 1.88 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.86.2.3 / (download) - annotate - [select for diffs], Wed May 24 10:58:41 2006 UTC (16 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.86.2.2: +6 -9 lines
Diff to previous 1.86.2.2 (colored) to branchpoint 1.86 (colored)

sync with head.

Revision 1.89 / (download) - annotate - [select for diffs], Sun May 14 21:15:11 2006 UTC (16 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Changes since 1.88: +6 -9 lines
Diff to previous 1.88 (colored)

integrate kauth.

Revision 1.85.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:59 2006 UTC (16 years, 9 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.85: +22 -2 lines
Diff to previous 1.85 (colored)

Sync with head.

Revision 1.86.4.5 / (download) - annotate - [select for diffs], Wed Apr 19 05:13:59 2006 UTC (16 years, 9 months ago) by elad
Branch: elad-kernelauth
Changes since 1.86.4.4: +6 -3 lines
Diff to previous 1.86.4.4 (colored) to branchpoint 1.86 (colored) next main 1.87 (colored)

sync with head.

Revision 1.86.2.2 / (download) - annotate - [select for diffs], Tue Apr 11 11:55:47 2006 UTC (16 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.86.2.1: +3 -2 lines
Diff to previous 1.86.2.1 (colored) to branchpoint 1.86 (colored)

sync with head

Revision 1.88 / (download) - annotate - [select for diffs], Mon Apr 10 11:16:22 2006 UTC (16 years, 9 months ago) by onoe
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, elad-kernelauth-base
Changes since 1.87: +3 -2 lines
Diff to previous 1.87 (colored)

Move "opt_maxuprc.h" from init_main.c to kern_proc.c, as the definition
of maxuprc has been moved to kern_proc.c (rev. 1.80).

Revision 1.86.4.4 / (download) - annotate - [select for diffs], Thu Mar 30 22:30:27 2006 UTC (16 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.86.4.3: +2 -4 lines
Diff to previous 1.86.4.3 (colored) to branchpoint 1.86 (colored)

Get rid of some stuff we no longer need here:

  - suser()
  - groupmember()
  - pcred/ucred memory pools
  - crget(), crfree(), crcmp(), crcopy(), crdup(), crcvt()

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Mon Mar 13 09:07:32 2006 UTC (16 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.86: +5 -3 lines
Diff to previous 1.86 (colored)

sync with head.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Mar 12 10:32:47 2006 UTC (16 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base3, yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq
Changes since 1.86: +5 -3 lines
Diff to previous 1.86 (colored)

proc_vmspace_getref: treat curproc specially to fix coredump problem pointed
by Christos Zoulas.

Revision 1.86.4.3 / (download) - annotate - [select for diffs], Fri Mar 10 21:04:13 2006 UTC (16 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.86.4.2: +2 -3 lines
Diff to previous 1.86.4.2 (colored) to branchpoint 1.86 (colored)

No need to call kauth_cred_setngroups() here.

Revision 1.86.4.2 / (download) - annotate - [select for diffs], Thu Mar 9 17:07:10 2006 UTC (16 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.86.4.1: +2 -14 lines
Diff to previous 1.86.4.1 (colored) to branchpoint 1.86 (colored)

Namespace cleanup, as requested by yamt@.

Revision 1.86.4.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:40 2006 UTC (16 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.86: +19 -7 lines
Diff to previous 1.86 (colored)

Adapt to kernel authorization KPI.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:21 2006 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, elad-kernelauth
Changes since 1.85: +19 -2 lines
Diff to previous 1.85 (colored)

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.

Revision 1.85.2.1 / (download) - annotate - [select for diffs], Sat Dec 31 11:14:01 2005 UTC (17 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.85: +19 -2 lines
Diff to previous 1.85 (colored) next main 1.86 (colored)

uio_segflg/uio_lwp -> uio_vmspace.

Revision 1.85 / (download) - annotate - [select for diffs], Mon Dec 26 18:45:27 2005 UTC (17 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.84: +11 -11 lines
Diff to previous 1.84 (colored)

u_intN_t -> uintN_t

Revision 1.84 / (download) - annotate - [select for diffs], Sat Dec 24 19:12:23 2005 UTC (17 years, 1 month ago) by perry
Branch: MAIN
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.64.2.6 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:11 2005 UTC (17 years, 1 month ago) by christos
Branch: ktrace-lwp
Changes since 1.64.2.5: +2 -4 lines
Diff to previous 1.64.2.5 (colored) next main 1.65 (colored)

Sync with head.

Revision 1.82.6.1 / (download) - annotate - [select for diffs], Tue Nov 29 21:23:29 2005 UTC (17 years, 2 months ago) by yamt
Branch: yamt-readahead
Changes since 1.82: +2 -4 lines
Diff to previous 1.82 (colored) next main 1.83 (colored)

sync with head.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Nov 26 05:26:33 2005 UTC (17 years, 2 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-readahead-base3, ktrace-lwp-base
Changes since 1.82: +2 -4 lines
Diff to previous 1.82 (colored)

Convert malloc/free of struct ptimers to pools.
Move the ptimer pool to kern_time.c to keep like pools together,
and it wasn't used in kern_proc.c

Revision 1.64.2.5 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:44 2005 UTC (17 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.2.4: +152 -40 lines
Diff to previous 1.64.2.4 (colored)

Sync with HEAD. Here we go again...

Revision 1.82 / (download) - annotate - [select for diffs], Fri Aug 5 11:05:44 2005 UTC (17 years, 6 months ago) by junyoung
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base2, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead
Changes since 1.81: +5 -5 lines
Diff to previous 1.81 (colored)

Cosmetic changes.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Aug 5 11:03:18 2005 UTC (17 years, 6 months ago) by junyoung
Branch: MAIN
Changes since 1.80: +149 -37 lines
Diff to previous 1.80 (colored)

Move proc0 initialization from main() in init_main.c and proc0_insert() in
kern_proc.c into a new function proc0_init() in kern_proc.c, as suggested
on tech-kern@ days ago.

Revision 1.64.2.4 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:04 2004 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.2.3: +40 -2 lines
Diff to previous 1.64.2.3 (colored)

Sync with HEAD

Revision 1.80 / (download) - annotate - [select for diffs], Sun Oct 3 22:26:35 2004 UTC (18 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-lazymbuf
Changes since 1.79: +7 -2 lines
Diff to previous 1.79 (colored)

proclist_foreach_call: tweak an assertion to deal with the case that
spinlockmgr is no-op.  PR/27125 from Andreas Wrede.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Oct 1 16:30:53 2004 UTC (18 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.78: +35 -2 lines
Diff to previous 1.78 (colored)

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.

Revision 1.64.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:06 2004 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.2.2: +2 -2 lines
Diff to previous 1.64.2.2 (colored)

Fix the sync with head I botched.

Revision 1.64.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:03 2004 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.2.1: +0 -0 lines
Diff to previous 1.64.2.1 (colored)

Sync with HEAD.

Revision 1.64.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:49 2004 UTC (18 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64: +131 -184 lines
Diff to previous 1.64 (colored)

Sync with HEAD

Revision 1.78 / (download) - annotate - [select for diffs], Thu May 6 22:20:30 2004 UTC (18 years, 8 months ago) by pk
Branch: MAIN
Changes since 1.77: +17 -11 lines
Diff to previous 1.77 (colored)

Provide a mutex for the process limits data structure.

Revision 1.77 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:41 2004 UTC (18 years, 9 months ago) by simonb
Branch: MAIN
Changes since 1.76: +35 -50 lines
Diff to previous 1.76 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.76 / (download) - annotate - [select for diffs], Sat Apr 17 15:15:29 2004 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.75: +2 -52 lines
Diff to previous 1.75 (colored)

PR/9347: Eric E. Fair: socket buffer pool exhaustion leads to system deadlock
and unkillable processes.
1. Introduce new SBSIZE resource limit from FreeBSD to limit socket buffer
   size resource.
2. make sokvareserve interruptible, so processes ltsleeping on it can be
   killed.

Revision 1.75 / (download) - annotate - [select for diffs], Sun Mar 14 01:08:47 2004 UTC (18 years, 10 months ago) by cl
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.74: +5 -2 lines
Diff to previous 1.74 (colored)

add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
  * VP id
  * lock on VP data
  * LWP on VP
  * recently blocked LWP on VP
  * queue of LWPs woken which ran on this VP before sleep
  * faultaddr
  * LWP cache for upcalls
  * upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP

Revision 1.74 / (download) - annotate - [select for diffs], Fri Feb 27 02:43:25 2004 UTC (18 years, 11 months ago) by junyoung
Branch: MAIN
Changes since 1.73: +5 -5 lines
Diff to previous 1.73 (colored)

More typos in comments.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Feb 26 11:29:41 2004 UTC (18 years, 11 months ago) by junyoung
Branch: MAIN
Changes since 1.72: +2 -5 lines
Diff to previous 1.72 (colored)

pgrpdump() is gone.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Feb 26 11:20:08 2004 UTC (18 years, 11 months ago) by junyoung
Branch: MAIN
Changes since 1.71: +20 -21 lines
Diff to previous 1.71 (colored)

- Fix typos.
- De-__P().
- Remove trailing spaces.

Revision 1.71 / (download) - annotate - [select for diffs], Fri Feb 6 06:59:33 2004 UTC (18 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.70: +20 -13 lines
Diff to previous 1.70 (colored)

pg_delete: re-arrange SESSRELE() calls to allow for better code generation.

Revision 1.70 / (download) - annotate - [select for diffs], Sun Jan 4 11:33:31 2004 UTC (19 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.69: +2 -17 lines
Diff to previous 1.69 (colored)

Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread

Revision 1.69 / (download) - annotate - [select for diffs], Mon Nov 17 22:52:09 2003 UTC (19 years, 2 months ago) by cl
Branch: MAIN
Changes since 1.68: +5 -3 lines
Diff to previous 1.68 (colored)

- use list to keep track of free stacks.
- use splay tree for the pagefault check if the thread was running on
  an upcall stack.

=> removes the limitation that all upcall stacks need to be
   adjoining and that all upcall stacks have to be loaded with the
   1st sys_sa_stacks call.
=> enables keeping information associated with a stack in the kernel
   which makes it simpler to find out which LWP is using a stack.
=> allows increasing the SA_MAXNUMSTACKS without having to
   allocate an array of that size.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Nov 12 21:07:38 2003 UTC (19 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.67: +43 -29 lines
Diff to previous 1.67 (colored)

- Count number of zombies and stopped children and requeue them at the top
  of the sibling list so that find_stopped_child can be optimised to avoid
  traversing the entire sibling list - helps when a process has a lot of
  children.
- Modify locking in pfind() and pgfind() to that the caller can rely on the
  result being valid, allow caller to request that zombies be findable.
- Rename pfind() to p_find() to ensure we break binary compatibility.
- Remove svr4_pfind since p_find willnow do the job.
- Modify some of the SMP locking of the proc lists - signals are still stuffed.

Welcome to 1.6ZF

Revision 1.67 / (download) - annotate - [select for diffs], Tue Nov 4 10:33:15 2003 UTC (19 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)

Revision 1.66 / (download) - annotate - [select for diffs], Tue Sep 16 12:05:49 2003 UTC (19 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.65: +5 -2 lines
Diff to previous 1.65 (colored)

add initialization of siginfo lock and queue.
Also initialize the lock for lwps, although it is not used for proc0 for
code consistency.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:47 2003 UTC (19 years, 5 months ago) by agc
Branch: MAIN
Changes since 1.64: +3 -7 lines
Diff to previous 1.64 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Mar 19 20:35:04 2003 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.63: +6 -6 lines
Diff to previous 1.63 (colored)

Indentation fixes

Revision 1.63 / (download) - annotate - [select for diffs], Wed Mar 19 16:47:36 2003 UTC (19 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.62: +12 -11 lines
Diff to previous 1.62 (colored)

- use __predict_false for DIAGNOSTIC code.
- #ifdef out a DIAGNOSTIC printf() that was too annoying (rule of thumb,
  don't make DIAGNOSTIC printfs() that print *very* frequently...)
- fix DIAGNOSTIC test that would always get triggered on a new session.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Mar 19 16:02:31 2003 UTC (19 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.61: +3 -3 lines
Diff to previous 1.61 (colored)

make this compile again (-DDIAGNOSTIC)

Revision 1.61 / (download) - annotate - [select for diffs], Wed Mar 19 11:36:34 2003 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.60: +533 -99 lines
Diff to previous 1.60 (colored)

Alternative pid/proc allocater, removes all searches associated with pid
lookup and allocation, and any dependency on NPROC or MAXUSERS.
NO_PID changed to -1 (and renamed NO_PGID) to remove artificial limit
on PID_MAX.
As discussed on tech-kern.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Mar 12 22:54:44 2003 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.59: +28 -2 lines
Diff to previous 1.59 (colored)

Add pgid_in_session() for validating TIOCSPGRP requests
(approved by christos)

Revision 1.59 / (download) - annotate - [select for diffs], Wed Mar 12 16:39:01 2003 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.58: +18 -35 lines
Diff to previous 1.58 (colored)

KNF function prototypes

Revision 1.58 / (download) - annotate - [select for diffs], Sat Feb 15 18:10:16 2003 UTC (19 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.57: +3 -2 lines
Diff to previous 1.57 (colored)

Fix support of 15 and 16 character lognames.
Warn if the logname is changed within a session - usually a missing setsid.
(approved by christos)

Revision 1.57 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:43 2003 UTC (20 years ago) by thorpej
Branch: MAIN
Changes since 1.56: +7 -2 lines
Diff to previous 1.56 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jan 22 12:52:16 2003 UTC (20 years ago) by yamt
Branch: MAIN
Changes since 1.55: +22 -20 lines
Diff to previous 1.55 (colored)

make KSTACK_CHECK_* compile after sa merge.

Revision 1.55 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:28 2003 UTC (20 years ago) by thorpej
Branch: MAIN
Changes since 1.54: +29 -3 lines
Diff to previous 1.54 (colored)

Merge the nathanw_sa branch.

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Wed Dec 18 01:06:10 2002 UTC (20 years, 1 month ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.54: +3 -5 lines
Diff to previous 1.54 (colored) next main 1.55 (colored)

Merge pcred and ucred, and poolify.  TBD: check backward compatibility
and factor-out some higher-level functionality.

Revision 1.44.2.11 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:53 2002 UTC (20 years, 3 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.44.2.10: +1 -2 lines
Diff to previous 1.44.2.10 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored)

Catch up to -current.

Revision 1.44.4.5 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:08 2002 UTC (20 years, 3 months ago) by jdolecek
Branch: kqueue
Changes since 1.44.4.4: +16 -18 lines
Diff to previous 1.44.4.4 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.54 / (download) - annotate - [select for diffs], Fri Sep 27 15:37:45 2002 UTC (20 years, 4 months ago) by provos
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: gmcgarry_ucred
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

remove trailing \n in panic().  approved perry.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Sep 25 22:21:43 2002 UTC (20 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.52: +2 -3 lines
Diff to previous 1.52 (colored)

Don't include <sys/map.h>.

Revision 1.44.2.10 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:07 2002 UTC (20 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.9: +17 -14 lines
Diff to previous 1.44.2.9 (colored) to branchpoint 1.44 (colored)

Catch up to -current.

Revision 1.44.4.4 / (download) - annotate - [select for diffs], Fri Sep 6 08:47:53 2002 UTC (20 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.44.4.3: +97 -8 lines
Diff to previous 1.44.4.3 (colored) to branchpoint 1.44 (colored)

sync kqueue branch with HEAD

Revision 1.52 / (download) - annotate - [select for diffs], Wed Sep 4 01:32:33 2002 UTC (20 years, 5 months ago) by matt
Branch: MAIN
Changes since 1.51: +15 -16 lines
Diff to previous 1.51 (colored)

Use the queue macros from <sys/queue.h> instead of referring to the queue
members directly.  Use *_FOREACH whenever possible.

Revision 1.47.2.2 / (download) - annotate - [select for diffs], Thu Aug 29 05:23:07 2002 UTC (20 years, 5 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.47.2.1: +23 -11 lines
Diff to previous 1.47.2.1 (colored) to branchpoint 1.47 (colored) next main 1.48 (colored)

catch up with -current.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Aug 28 07:16:38 2002 UTC (20 years, 5 months ago) by gmcgarry
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.50: +6 -2 lines
Diff to previous 1.50 (colored)

MI kernel support for user-level Restartable Atomic Sequences (RAS).

Revision 1.44.2.9 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:20 2002 UTC (20 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.8: +93 -8 lines
Diff to previous 1.44.2.8 (colored) to branchpoint 1.44 (colored)

Catch up to -current.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jul 26 06:04:57 2002 UTC (20 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.49: +10 -7 lines
Diff to previous 1.49 (colored)

Cosmetic changes.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Jul 26 06:04:12 2002 UTC (20 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.48: +11 -6 lines
Diff to previous 1.48 (colored)

Add some necessary but missing resource deallocation.

Revision 1.47.2.1 / (download) - annotate - [select for diffs], Mon Jul 15 10:36:32 2002 UTC (20 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.47: +79 -2 lines
Diff to previous 1.47 (colored)

catch up with -current.

Revision 1.44.2.8 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:17 2002 UTC (20 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.7: +2 -3 lines
Diff to previous 1.44.2.7 (colored) to branchpoint 1.44 (colored)

No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Jul 2 20:27:46 2002 UTC (20 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.47: +79 -2 lines
Diff to previous 1.47 (colored)

add KSTACK_CHECK_MAGIC. discussed on tech-kern.

Revision 1.44.2.7 / (download) - annotate - [select for diffs], Mon Jun 24 22:10:48 2002 UTC (20 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.6: +4 -4 lines
Diff to previous 1.44.2.6 (colored) to branchpoint 1.44 (colored)

Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.44.4.3 / (download) - annotate - [select for diffs], Sun Jun 23 17:49:30 2002 UTC (20 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.44.4.2: +4 -9 lines
Diff to previous 1.44.4.2 (colored) to branchpoint 1.44 (colored)

catch up with -current on kqueue branch

Revision 1.41.4.2 / (download) - annotate - [select for diffs], Fri Apr 26 17:56:40 2002 UTC (20 years, 9 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.41.4.1: +3 -8 lines
Diff to previous 1.41.4.1 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

Pull up revision 1.47 (requested by christos):
  Use SESSHOLD and SESSRELE consistently, and add them to t_session,
  so that we do not have dangling references.

Revision 1.44.2.6 / (download) - annotate - [select for diffs], Wed Apr 17 00:06:18 2002 UTC (20 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.5: +2 -7 lines
Diff to previous 1.44.2.5 (colored) to branchpoint 1.44 (colored)

Catch up to -current.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Apr 12 17:02:33 2002 UTC (20 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Changes since 1.46: +4 -9 lines
Diff to previous 1.46 (colored)

Use SESSHOLD and SESSRELE consistently.
Add SESSHOLD and SESSRELE to the t_session, so that we don't have dangling
references [inspired by OpenBSD].

Revision 1.44.2.5 / (download) - annotate - [select for diffs], Mon Apr 1 07:47:53 2002 UTC (20 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.4: +13 -14 lines
Diff to previous 1.44.2.4 (colored) to branchpoint 1.44 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.44.4.2 / (download) - annotate - [select for diffs], Sat Mar 16 16:01:48 2002 UTC (20 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.44.4.1: +7 -7 lines
Diff to previous 1.44.4.1 (colored) to branchpoint 1.44 (colored)

Catch up with -current.

Revision 1.46.2.1 / (download) - annotate - [select for diffs], Sun Mar 10 07:59:52 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.46: +10 -4 lines
Diff to previous 1.46 (colored) next main 1.47 (colored)

Make sure proc structures are aligned to 16 byte boundaries.  This
ensures that the lower 4 bits of a proc's address are zero.  Forthcoming
new locking primitives rely on this.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:40 2002 UTC (20 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, eeh-devprop-base, eeh-devprop
Branch point for: newlock
Changes since 1.45: +7 -7 lines
Diff to previous 1.45 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.44.4.1 / (download) - annotate - [select for diffs], Thu Jan 10 19:59:52 2002 UTC (21 years ago) by thorpej
Branch: kqueue
Changes since 1.44: +4 -1 lines
Diff to previous 1.44 (colored)

Sync kqueue branch with -current.

Revision 1.44.2.4 / (download) - annotate - [select for diffs], Sat Nov 17 01:10:17 2001 UTC (21 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.3: +6 -3 lines
Diff to previous 1.44.2.3 (colored) to branchpoint 1.44 (colored)

Implement POSIX realtime timers, and reimplement getitimer() and setitimer()
in terms of them.

Revision 1.44.2.3 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:37 2001 UTC (21 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.2: +4 -1 lines
Diff to previous 1.44.2.2 (colored) to branchpoint 1.44 (colored)

Catch up to -current.

Revision 1.44.8.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:49 2001 UTC (21 years, 2 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.44: +4 -1 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:13 2001 UTC (21 years, 2 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, ifpoll-base
Changes since 1.44: +4 -1 lines
Diff to previous 1.44 (colored)

add RCSIDs

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Sun Jul 29 19:37:27 2001 UTC (21 years, 6 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH002
Changes since 1.41: +7 -2 lines
Diff to previous 1.41 (colored)

Pull up revision 1.44 (requested by pk):
  When freeing a session, remove the reference to it from the
  associated tty.

Revision 1.44.2.2 / (download) - annotate - [select for diffs], Mon Jul 9 22:37:30 2001 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.1: +5 -1 lines
Diff to previous 1.44.2.1 (colored) to branchpoint 1.44 (colored)

Move upcall processing to the point of userret() rather than invocation time.

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:41 2001 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44: +23 -2 lines
Diff to previous 1.44 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.35.2.3 / (download) - annotate - [select for diffs], Sun Feb 11 19:16:47 2001 UTC (21 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35.2.2: +7 -2 lines
Diff to previous 1.35.2.2 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

Sync with HEAD.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Feb 4 22:32:24 2001 UTC (22 years ago) by pk
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache, nathanw_sa, kqueue
Changes since 1.43: +7 -2 lines
Diff to previous 1.43 (colored)

When freeing a session, remove the reference to it from the associated tty.

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:05:20 2000 UTC (22 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35.2.1: +7 -4 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored)

Sync with HEAD.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:02 2000 UTC (22 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35: +36 -39 lines
Diff to previous 1.35 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.43 / (download) - annotate - [select for diffs], Wed Nov 8 14:28:13 2000 UTC (22 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.42: +7 -4 lines
Diff to previous 1.42 (colored)

Update for hashinit() change.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Aug 17 14:37:54 2000 UTC (22 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.41: +3 -8 lines
Diff to previous 1.41 (colored)

If maniuplating a read lock on the proc list, we no longer need
to go to splclock() -- spinlockmgr() handles the interrupt blocking
while holding the interlock for us, now.

Revision 1.41 / (download) - annotate - [select for diffs], Sat May 27 00:40:45 2000 UTC (22 years, 8 months ago) by sommerfeld
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.40: +5 -4 lines
Diff to previous 1.40 (colored)

Reduce use of curproc in several places:

 - Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()

Revision 1.40 / (download) - annotate - [select for diffs], Mon May 8 20:07:37 2000 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.39: +7 -7 lines
Diff to previous 1.39 (colored)

__predict_false() the DIAGNOSTIC error checks.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:12 2000 UTC (22 years, 10 months ago) by augustss
Branch: MAIN
Changes since 1.38: +20 -20 lines
Diff to previous 1.38 (colored)

Get rid of register declarations.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jan 22 16:53:50 2000 UTC (23 years ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.37: +5 -5 lines
Diff to previous 1.37 (colored)

After some discussion with Mycroft, change splstatclock() to splclock().
The rule is that you don't get to call scheduler-related functions (e.g.
wakeup()) above the clock interrupt.  Going to statclock unnecessarily
hoses e.g. serial interrupts on the SPARC.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Jan 22 16:32:02 2000 UTC (23 years ago) by thorpej
Branch: MAIN
Changes since 1.36: +6 -5 lines
Diff to previous 1.36 (colored)

Back out rev 1.36... what was I thinking?  Also, update the comment that
led me astray to reflect reality.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Jan 13 21:55:36 2000 UTC (23 years ago) by thorpej
Branch: MAIN
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

Per my comment earlier in the file, we only need to go do splsoftclock()
when write-locking the proclist; splstatclock() is a wee bit overkill.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Sep 28 14:47:03 1999 UTC (23 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi
Changes since 1.34: +24 -1 lines
Diff to previous 1.34 (colored)

Remplace kern.shortcorename sysctl with a more flexible sheme,
core filename format, which allow to change the name of the core dump,
and to relocate it in a directory. Credits to Bill Sommerfeld for giving me
the idea :)
The default core filename format can be changed by options DEFCORENAME and/or
kern.defcorename
Create a new sysctl tree, proc, which holds per-process values (for now
the corename format, and resources limits). Process is designed by its pid
at the second level name. These values are inherited on fork, and the corename
fomat is reset to defcorename on suid/sgid exec.
Create a p_sugid() function, to take appropriate actions on suid/sgid
exec (for now set the P_SUGID flag and reset the per-proc corename).
Adjust dosetrlimit() to allow changing limits of one proc by another, with
credential controls.

Revision 1.31.8.1 / (download) - annotate - [select for diffs], Mon Aug 2 22:19:13 1999 UTC (23 years, 6 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.31: +135 -7 lines
Diff to previous 1.31 (colored) next main 1.32 (colored)

Update from trunk.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jul 25 06:30:34 1999 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.33: +13 -33 lines
Diff to previous 1.33 (colored)

Turn the proclist lock into a read/write spinlock.  Update proclist locking
calls to reflect this.  Also, block statclock rather than softclock during
in the proclist locking functions, to address a problem reported on
current-users by Sean Doran.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 22 21:08:31 1999 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +141 -4 lines
Diff to previous 1.32 (colored)

Add a read/write lock to the proclists and PID hash table.  Use the
write lock when doing PID allocation, and during the process exit path.
Use a read lock every where else, including within schedcpu() (interrupt
context).  Note that holding the write lock implies blocking schedcpu()
from running (blocks softclock).

PID allocation is now MP-safe.

Note this actually fixes a bug on single processor systems that was probably
extremely difficult to tickle; it was possible that schedcpu() would run
off a bad pointer if the right clock interrupt happened to come in the
middle of a LIST_INSERT_HEAD() or LIST_REMOVE() to/from allproc.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jul 22 18:13:37 1999 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +15 -4 lines
Diff to previous 1.31 (colored)

Rework the process exit path, in preparation for making process exit
and PID allocation MP-safe.  A new process state is added: SDEAD.  This
state indicates that a process is dead, but not yet a zombie (has not
yet been processed by the process reaper).

SDEAD processes exist on both the zombproc list (via p_list) and deadproc
(via p_hash; the proc has been removed from the pidhash earlier in the exit
path).  When the reaper deals with a process, it changes the state to
SZOMB, so that wait4 can process it.

Add a P_ZOMBIE() macro, which treats a proc in SZOMB or SDEAD as a zombie,
and update various parts of the kernel to reflect the new state.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Sep 8 23:47:49 1998 UTC (24 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kenh-if-detach-base, kenh-if-detach, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, chs-ubc-base, chs-ubc
Branch point for: chs-ubc2
Changes since 1.30: +22 -4 lines
Diff to previous 1.30 (colored)

- Add a new proclist, deadproc, which holds dead-but-not-yet-zombie
  processes.
- Create a new data structure, the proclist_desc, which contains a
  pointer to a proclist, and eventually, a pointer to the lock for that
  proclist.  Declare a static array of proclist_descs, proclists[],
  consisting of allproc, deadproc, and zombproc.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Sep 1 01:02:33 1998 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +4 -1 lines
Diff to previous 1.29 (colored)

Use the pool allocator and the "nointr" pool page allocator for rusage
structures.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Sep 1 00:08:44 1998 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.28: +6 -4 lines
Diff to previous 1.28 (colored)

Use the pool allocator and the "nointr" pool page allocator for pgrp
structures.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Aug 31 23:20:16 1998 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.27: +8 -1 lines
Diff to previous 1.27 (colored)

Use the pool allocator and "nointr" pool page allocator for pcred and
plimit structures.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Aug 28 21:20:05 1998 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

Use the "nointr" pool page allocator.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Aug 18 06:12:34 1998 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.25: +7 -4 lines
Diff to previous 1.25 (colored)

Add some braces to make egcs happy (ambiguous else warning).

Revision 1.25 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:13 1998 UTC (24 years, 6 months ago) by perry
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
  bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)

Revision 1.24 / (download) - annotate - [select for diffs], Sun Aug 2 04:41:32 1998 UTC (24 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.23: +5 -1 lines
Diff to previous 1.23 (colored)

Use a pool for proc structures.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:29 1998 UTC (24 years, 11 months ago) by fvdl
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:06 1998 UTC (24 years, 11 months ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +66 -93 lines
Diff to previous 1.1.1.2 (colored)

Import 4.4BSD-Lite2

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:09:41 1998 UTC (24 years, 11 months ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +123 -42 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.22 / (download) - annotate - [select for diffs], Sat Feb 14 19:34:12 1998 UTC (24 years, 11 months ago) by kleink
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Fix variable declarations:  register -> register int.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Feb 14 00:37:32 1998 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

Prevent the session ID from disappearing if the session leader exits
(thus causing s_leader to become NULL) by storing the session ID separately
in the session structure.  Export the session ID to userspace in the
eproc structure.

Submitted by Tom Proett <proett@nas.nasa.gov>.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Feb 7 02:44:46 1998 UTC (24 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.19: +4 -4 lines
Diff to previous 1.19 (colored)

add flags arg to hashinit(), to pass to malloc().

Revision 1.19 / (download) - annotate - [select for diffs], Wed May 21 19:56:50 1997 UTC (25 years, 8 months ago) by gwr
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Changes since 1.18: +1 -94 lines
Diff to previous 1.18 (colored)

Moved db_kill_proc() and db_show_all_procs() to ddb/db_xxx.c

Revision 1.18 / (download) - annotate - [select for diffs], Thu May 8 17:22:05 1997 UTC (25 years, 8 months ago) by kleink
Branch: MAIN
Changes since 1.17: +4 -1 lines
Diff to previous 1.17 (colored)

Pull in the declarations of db_expression() and db_error(), used by
db_kill_proc().

Revision 1.17 / (download) - annotate - [select for diffs], Wed May 7 18:48:15 1997 UTC (25 years, 9 months ago) by gwr
Branch: MAIN
Changes since 1.16: +91 -1 lines
Diff to previous 1.16 (colored)

Add db_kill_proc() for DDB (and move db_show_all_procs here so
all the "proc" debugging stuff is here in one place).

Revision 1.16 / (download) - annotate - [select for diffs], Sun Oct 13 02:32:33 1996 UTC (26 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

backout previous kprintf change

Revision 1.15 / (download) - annotate - [select for diffs], Thu Oct 10 22:46:17 1996 UTC (26 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.14 / (download) - annotate - [select for diffs], Fri Feb 9 18:59:41 1996 UTC (26 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.13: +6 -2 lines
Diff to previous 1.13 (colored)

More proto fixes

Revision 1.13 / (download) - annotate - [select for diffs], Sun Feb 4 02:15:55 1996 UTC (27 years ago) by christos
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

First pass at prototyping

Revision 1.12 / (download) - annotate - [select for diffs], Sun Mar 19 23:44:49 1995 UTC (27 years, 10 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Use %p.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Dec 24 15:07:27 1994 UTC (28 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.10: +7 -2 lines
Diff to previous 1.10 (colored)

various cleanups for -Wall.  some inspired by James Jegers.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Aug 30 03:05:38 1994 UTC (28 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.9: +60 -92 lines
Diff to previous 1.9 (colored)

Convert process, file, and namei lists and hash tables to use queue.h.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jun 29 06:32:36 1994 UTC (28 years, 7 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jun 8 11:28:40 1994 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Update to 4.4-Lite fs code.

Revision 1.7 / (download) - annotate - [select for diffs], Thu May 19 05:57:50 1994 UTC (28 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.6: +104 -31 lines
Diff to previous 1.6 (colored)

update to lite

Revision 1.6 / (download) - annotate - [select for diffs], Wed May 4 03:41:56 1994 UTC (28 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Rename a lot of process flags.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Dec 18 04:20:57 1993 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.4: +16 -15 lines
Diff to previous 1.4 (colored)

Canonicalize all #includes.

Revision 1.4.4.1 / (download) - annotate - [select for diffs], Sun Nov 14 20:32:01 1993 UTC (29 years, 2 months ago) by mycroft
Branch: magnum
Changes since 1.4: +16 -15 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

Canonicalize all #includes.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:40 1993 UTC (29 years, 7 months ago) by andrew
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, magnum-base
Branch point for: magnum
Changes since 1.3: +13 -5 lines
Diff to previous 1.3 (colored)

ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.

Revision 1.3 / (download) - annotate - [select for diffs], Sat May 22 11:41:40 1993 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -2 lines
Diff to previous 1.2 (colored)

add include of select.h if necessary for protos, or delete if extraneous

Revision 1.2 / (download) - annotate - [select for diffs], Tue May 18 18:19:17 1993 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored)

make kernel select interface be one-stop shopping & clean it all up.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (29 years, 10 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (29 years, 10 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>