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


Keyword substitution: kv
Default branch: MAIN


Revision 1.279: download - view: text, markup, annotated - select for diffs
Mon Mar 17 19:02:49 2025 UTC (6 weeks ago) by riastradh
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +6 -4 lines
kern_proc.c: Fix mistakes in SET_ERROR sprinkling.

To avoid triggering a SET_ERROR probe, I moved an initial

	rval = EPERM;

to a separate label `eperm', and then adjusted all the `goto done'
lines that didn't initialize rval themselves to do `goto eperm'
instead.

However, I was sloppy and missed some cases, so some spuriously
failed when they should have succeeded.

Annoyingly, we don't seem to have any automatic tests for this bug!
So the releng test bed hasn't discovered the problem.

Revision 1.278: download - view: text, markup, annotated - select for diffs
Sun Mar 16 15:52:03 2025 UTC (6 weeks, 1 day ago) by riastradh
Branches: MAIN
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +50 -48 lines
kern_proc.c: Sprinkle SET_ERROR.

Revision 1.277: download - view: text, markup, annotated - select for diffs
Sun Mar 16 15:51:34 2025 UTC (6 weeks, 1 day ago) by riastradh
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +27 -25 lines
kern_proc.c: Sort includes.

No functional change intended.

Revision 1.233.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 7 10:11:44 2024 UTC (8 months, 3 weeks ago) by martin
Branches: netbsd-9
Diff to: previous 1.233.2.1: preferred, colored; branchpoint 1.233: preferred, colored; next MAIN 1.234: preferred, colored
Changes since revision 1.233.2.1: +5 -2 lines
Pull up following revision(s) (requested by kre in ticket #1859):

	sys/kern/kern_proc.c: revision 1.276 (via patch)
	sys/kern/kern_ktrace.c: revision 1.185 (via patch)
	sys/kern/sys_sig.c: revision 1.58 (via patch)
	sys/kern/kern_descrip.c: revision 1.263 (via patch)
	lib/libc/compat-43/killpg.c: revision 1.10
	sys/kern/tty.c: revision 1.313 (via patch)
	tests/lib/libc/sys/t_kill.c: revision 1.2

PR kern/58425 --  Disallow INT_MIN as a (negative) pid arg.
Since -INT_MIN is undefined, and to point of negative pid args is
to negate them, and use the result as a pgrp id instead, we need
to avoid accidentally negating INT_MIN.

Since pid_t is just an integral type, of unspecified width, when
testing pid_t value test for <= INT_MIN (or > INT_MIN sometimes)
rather than == INT_MIN.   When testing int values, just == INT_MIN
is all that is needed, < INT_MIN cannot occur.

tests/lib/libc/sys/t_kill: Test kill(INT_MIN, ...) fails with ESRCH.
PR kern/58425

Revision 1.269.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 7 10:04:47 2024 UTC (8 months, 3 weeks ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-1-RELEASE
Diff to: previous 1.269: preferred, colored; next MAIN 1.270: preferred, colored
Changes since revision 1.269: +3 -3 lines
Pull up following revision(s) (requested by kre in ticket #773):

	sys/kern/kern_proc.c: revision 1.276
	sys/kern/kern_ktrace.c: revision 1.185
	sys/kern/sys_sig.c: revision 1.58
	sys/kern/kern_descrip.c: revision 1.263
	lib/libc/compat-43/killpg.c: revision 1.10
	sys/kern/tty.c: revision 1.313
	tests/lib/libc/sys/t_kill.c: revision 1.2

PR kern/58425 --  Disallow INT_MIN as a (negative) pid arg.

Since -INT_MIN is undefined, and to point of negative pid args is
to negate them, and use the result as a pgrp id instead, we need
to avoid accidentally negating INT_MIN.

Since pid_t is just an integral type, of unspecified width, when
testing pid_t value test for <= INT_MIN (or > INT_MIN sometimes)
rather than == INT_MIN.   When testing int values, just == INT_MIN
is all that is needed, < INT_MIN cannot occur.

tests/lib/libc/sys/t_kill: Test kill(INT_MIN, ...) fails with ESRCH.
PR kern/58425

Revision 1.276: download - view: text, markup, annotated - select for diffs
Sun Jul 14 05:10:40 2024 UTC (9 months, 2 weeks ago) by kre
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +3 -3 lines
PR kern/58425 --  Disallow INT_MIN as a (negative) pid arg.

Since -INT_MIN is undefined, and to point of negative pid args is
to negate them, and use the result as a pgrp id instead, we need
to avoid accidentally negating INT_MIN.

Since pid_t is just an integral type, of unspecified width, when
testing pid_t value test for <= INT_MIN (or > INT_MIN sometimes)
rather than == INT_MIN.   When testing int values, just == INT_MIN
is all that is needed, < INT_MIN cannot occur.

XXX pullup -9, -10

Revision 1.275: download - view: text, markup, annotated - select for diffs
Sun Jun 2 12:11:35 2024 UTC (10 months, 3 weeks ago) by andvar
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +3 -3 lines
Fix various typos, mainly triple letters.

Revision 1.274: download - view: text, markup, annotated - select for diffs
Thu Oct 5 19:41:07 2023 UTC (18 months, 3 weeks ago) by ad
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +9 -6 lines
Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).

Revision 1.273: download - view: text, markup, annotated - select for diffs
Wed Oct 4 22:17:09 2023 UTC (18 months, 3 weeks ago) by ad
Branches: MAIN
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +3 -4 lines
kauth_cred_hold(): return cred verbatim so that donating a reference to
another data structure can be done more elegantly.

Revision 1.272: download - view: text, markup, annotated - select for diffs
Wed Oct 4 20:28:06 2023 UTC (18 months, 3 weeks ago) by ad
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +8 -11 lines
Eliminate l->l_ncsw and l->l_nivcsw.  From memory think they were added
before we had per-LWP struct rusage; the same is now tracked there.

Revision 1.271: download - view: text, markup, annotated - select for diffs
Mon Sep 4 09:13:23 2023 UTC (19 months, 3 weeks ago) by simonb
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +3 -3 lines
Whitespace nit.

Revision 1.270: download - view: text, markup, annotated - select for diffs
Sun Apr 9 09:18:09 2023 UTC (2 years ago) by riastradh
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +4 -3 lines
kern: KASSERT(A && B) -> KASSERT(A); KASSERT(B)

Revision 1.269: download - view: text, markup, annotated - select for diffs
Wed Oct 26 23:20:36 2022 UTC (2 years, 6 months ago) by riastradh
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Branch point for: netbsd-10
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +2 -4 lines
kern/exec_elf.c: Get emul_netbsd from sys/proc.h.

Revision 1.268: download - view: text, markup, annotated - select for diffs
Fri Jul 1 01:06:40 2022 UTC (2 years, 9 months ago) by riastradh
Branches: MAIN
CVS tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +3 -4 lines
kern: Omit stale locking comment in proc_crmod_leave.

Revision 1.267: download - view: text, markup, annotated - select for diffs
Sat May 7 19:44:40 2022 UTC (2 years, 11 months ago) by mrg
Branches: MAIN
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Apr 7 19:33:38 2022 UTC (3 years ago) by andvar
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +5 -4 lines
fix various typos in comments.

Revision 1.265: download - view: text, markup, annotated - select for diffs
Sun Mar 13 17:21:29 2022 UTC (3 years, 1 month ago) by riastradh
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +36 -13 lines
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 - view: text, markup, annotated - select for diffs
Thu Mar 10 12:21:35 2022 UTC (3 years, 1 month ago) by riastradh
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +5 -5 lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 12 15:51:29 2022 UTC (3 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +13 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun Jan 3 16:35:04 2021 UTC (4 years, 3 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.261: preferred, colored; next MAIN 1.262: preferred, colored
Changes since revision 1.261: +5 -2 lines
Sync w/ HEAD.

Revision 1.262: download - view: text, markup, annotated - select for diffs
Thu Dec 24 12:14:50 2020 UTC (4 years, 4 months ago) by nia
Branches: 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
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +5 -2 lines
Avoid negating the minimum size of pid_t (this overflows).

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

Revision 1.261: download - view: text, markup, annotated - select for diffs
Thu Sep 17 11:37:35 2020 UTC (4 years, 7 months ago) by martin
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Sep 5 16:30:12 2020 UTC (4 years, 7 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +2 -3 lines
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 - view: text, markup, annotated - select for diffs
Fri Aug 28 22:27:51 2020 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +6 -6 lines
Fix pasto in previous -- pass the right size to memset...

Revision 1.258: download - view: text, markup, annotated - select for diffs
Fri Aug 28 21:39:56 2020 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +5 -5 lines
Nix trailing whitespace.

Revision 1.257: download - view: text, markup, annotated - select for diffs
Fri Aug 28 21:39:28 2020 UTC (4 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +6 -6 lines
Zero out more lock snapshots in sysctl exposure.

Revision 1.256: download - view: text, markup, annotated - select for diffs
Wed Aug 26 22:56:55 2020 UTC (4 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +48 -46 lines
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 - view: text, markup, annotated - select for diffs
Thu Jun 11 19:20:46 2020 UTC (4 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Tue May 26 00:50:53 2020 UTC (4 years, 11 months ago) by kamil
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat May 23 23:42:43 2020 UTC (4 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +56 -57 lines
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 - view: text, markup, annotated - select for diffs
Sat May 23 20:45:10 2020 UTC (4 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +151 -116 lines
- 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 - view: text, markup, annotated - select for diffs
Wed Apr 29 01:52:26 2020 UTC (5 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +55 -46 lines
- 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 - view: text, markup, annotated - select for diffs
Sun Apr 26 18:53:33 2020 UTC (5 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +9 -2 lines
Add a NetBSD native futex implementation, mostly written by riastradh@.
Map the COMPAT_LINUX futex calls to the native ones.

Revision 1.249: download - view: text, markup, annotated - select for diffs
Sun Apr 26 15:49:10 2020 UTC (5 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +3 -3 lines
In expand_pid_table(), calculate the current pid table size before
releasing the lock.

Revision 1.243.2.2: download - view: text, markup, annotated - select for diffs
Sat Apr 25 11:24:06 2020 UTC (5 years ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.243.2.1: preferred, colored; branchpoint 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243.2.1: +441 -120 lines
Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.248: download - view: text, markup, annotated - select for diffs
Fri Apr 24 05:21:18 2020 UTC (5 years ago) by thorpej
Branches: MAIN
CVS tags: bouyer-xenpvh-base2
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +5 -5 lines
Make sure PT_F_* bits are uintptr_t.

Revision 1.247: download - view: text, markup, annotated - select for diffs
Fri Apr 24 03:22:06 2020 UTC (5 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +425 -109 lines
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 - view: text, markup, annotated - select for diffs
Tue Apr 21 21:42:47 2020 UTC (5 years ago) by ad
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +7 -9 lines
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 - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:42 2020 UTC (5 years ago) by martin
Branches: phil-wifi
Diff to: previous 1.212.2.2: preferred, colored; branchpoint 1.212: preferred, colored; next MAIN 1.213: preferred, colored
Changes since revision 1.212.2.2: +11 -6 lines
Sync with HEAD

Revision 1.245: download - view: text, markup, annotated - select for diffs
Mon Apr 20 16:32:03 2020 UTC (5 years ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20200421
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +13 -6 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 20 11:29:10 2020 UTC (5 years ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +2 -4 lines
Sync with HEAD

Revision 1.244: download - view: text, markup, annotated - select for diffs
Sun Apr 19 20:31:59 2020 UTC (5 years ago) by thorpej
Branches: MAIN
CVS tags: bouyer-xenpvh-base1
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +2 -4 lines
- 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 - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:03 2020 UTC (5 years ago) by martin
Branches: phil-wifi
Diff to: previous 1.212.2.1: preferred, colored; branchpoint 1.212: preferred, colored
Changes since revision 1.212.2.1: +23 -17 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.243: download - view: text, markup, annotated - select for diffs
Mon Apr 6 08:20:05 2020 UTC (5 years ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +3 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:02 2020 UTC (5 years, 1 month ago) by ad
Branches: ad-namecache
Diff to: previous 1.239.2.1: preferred, colored; branchpoint 1.239: preferred, colored; next MAIN 1.240: preferred, colored
Changes since revision 1.239.2.1: +10 -4 lines
Sync with head.

Revision 1.242: download - view: text, markup, annotated - select for diffs
Sun Feb 23 22:14:03 2020 UTC (5 years, 2 months ago) by ad
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +10 -8 lines
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 - view: text, markup, annotated - select for diffs
Fri Feb 21 00:26:22 2020 UTC (5 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Wed Jan 29 15:47:52 2020 UTC (5 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +9 -3 lines
- 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 - view: text, markup, annotated - select for diffs
Sat Jan 25 15:54:03 2020 UTC (5 years, 3 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +10 -8 lines
Make cwdinfo use mostly lockless, and largely hide the details in vfs_cwd.c.

Revision 1.239: download - view: text, markup, annotated - select for diffs
Tue Dec 31 13:07:13 2019 UTC (5 years, 3 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +3 -3 lines
Rename uvm_free() -> uvm_availmem().

Revision 1.238: download - view: text, markup, annotated - select for diffs
Sat Dec 21 13:00:24 2019 UTC (5 years, 4 months ago) by ad
Branches: MAIN
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +3 -3 lines
uvmexp.free -> uvm_free()

Revision 1.237: download - view: text, markup, annotated - select for diffs
Fri Dec 6 17:41:43 2019 UTC (5 years, 4 months ago) by kamil
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +3 -3 lines
Correct signals in siglist+sigmask passed in kinfo_lwp

Make the union of LWP and PROC pending signals correctly.

Revision 1.236: download - view: text, markup, annotated - select for diffs
Sat Oct 12 10:55:23 2019 UTC (5 years, 6 months ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +2 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Sep 30 21:13:33 2019 UTC (5 years, 6 months ago) by kamil
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +3 -8 lines
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 - view: text, markup, annotated - select for diffs
Tue Aug 6 16:16:55 2019 UTC (5 years, 8 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Fri Aug 2 22:46:44 2019 UTC (5 years, 8 months ago) by kamil
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Tue Jun 11 23:18:55 2019 UTC (5 years, 10 months ago) by kamil
Branches: MAIN
CVS tags: netbsd-9-base
Branch point for: netbsd-9
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +3 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:03 2019 UTC (5 years, 10 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +272 -64 lines
Sync with HEAD

Revision 1.232: download - view: text, markup, annotated - select for diffs
Sat Jun 1 19:48:29 2019 UTC (5 years, 10 months ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-20190609
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +2 -7 lines
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 - view: text, markup, annotated - select for diffs
Sat Jun 1 00:19:43 2019 UTC (5 years, 10 months ago) by kamil
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +3 -4 lines
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 - view: text, markup, annotated - select for diffs
Fri May 31 23:19:38 2019 UTC (5 years, 10 months ago) by kamil
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +4 -3 lines
Use proper copylen for copyout in fill_cwd()

Revision 1.229: download - view: text, markup, annotated - select for diffs
Fri May 31 23:01:39 2019 UTC (5 years, 10 months ago) by kamil
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +61 -2 lines
Implement KERN_PROC_CWD in sysctl(3)

Retrieve specified process current working directory.

Fixes PR kern/50620 by Thomas Klausner.

Revision 1.228: download - view: text, markup, annotated - select for diffs
Fri Mar 1 11:06:57 2019 UTC (6 years, 1 month ago) by pgoyette
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Fri Mar 1 03:20:50 2019 UTC (6 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +2 -3 lines
no more p_nsems.

Revision 1.226: download - view: text, markup, annotated - select for diffs
Tue Jan 29 09:28:50 2019 UTC (6 years, 3 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Sun Jan 27 02:08:43 2019 UTC (6 years, 3 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +16 -27 lines
Merge the [pgoyette-compat] branch

Revision 1.209.2.15: download - view: text, markup, annotated - select for diffs
Tue Jan 22 07:42:41 2019 UTC (6 years, 3 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.209.2.14: preferred, colored; branchpoint 1.209: preferred, colored; next MAIN 1.210: preferred, colored
Changes since revision 1.209.2.14: +11 -21 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 21 06:49:28 2019 UTC (6 years, 3 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.13: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.13: +3 -3 lines
No need to declare the hook_call() function for void hooks.  So
remove and simplify.

Revision 1.209.2.13: download - view: text, markup, annotated - select for diffs
Fri Jan 18 00:01:01 2019 UTC (6 years, 3 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.12: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.12: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 14 13:34:28 2019 UTC (6 years, 3 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.11: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.11: +8 -8 lines
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 - view: text, markup, annotated - select for diffs
Sun Jan 13 10:49:50 2019 UTC (6 years, 3 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.10: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.10: +8 -8 lines
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 - view: text, markup, annotated - select for diffs
Wed Dec 26 14:02:03 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.9: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.9: +81 -16 lines
Sync with HEAD, resolve a few conflicts

Revision 1.224: download - view: text, markup, annotated - select for diffs
Mon Dec 10 14:46:24 2018 UTC (6 years, 4 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +2 -3 lines
Remove unused mbuf.h includes.

Revision 1.223: download - view: text, markup, annotated - select for diffs
Thu Dec 6 13:51:43 2018 UTC (6 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +3 -3 lines
Typo fix (Geoff Wing)

Revision 1.222: download - view: text, markup, annotated - select for diffs
Wed Dec 5 18:16:51 2018 UTC (6 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +75 -15 lines
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 - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:50 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.8: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.8: +110 -9 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.221: download - view: text, markup, annotated - select for diffs
Sat Nov 24 19:22:17 2018 UTC (6 years, 5 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-compat-1126
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +11 -10 lines
- 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 - view: text, markup, annotated - select for diffs
Sat Nov 24 16:18:36 2018 UTC (6 years, 5 months ago) by maxv
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +102 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Nov 12 08:56:15 2018 UTC (6 years, 5 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.206.6.4: preferred, colored; branchpoint 1.206: preferred, colored; next MAIN 1.207: preferred, colored
Changes since revision 1.206.6.4: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Nov 12 06:55:03 2018 UTC (6 years, 5 months ago) by maxv
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +4 -3 lines
Fix buffer overflow, which can lead to severe information leak. Detected
by kASan.

Revision 1.209.2.8: download - view: text, markup, annotated - select for diffs
Sat Oct 20 06:58:45 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.7: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.7: +20 -36 lines
Sync with head

Revision 1.218: download - view: text, markup, annotated - select for diffs
Fri Oct 5 22:12:38 2018 UTC (6 years, 6 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-compat-1020
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +20 -36 lines
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 - view: text, markup, annotated - select for diffs
Sat Sep 29 21:36:14 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.6: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.6: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Sun Sep 23 11:50:03 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.5: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.5: +5 -5 lines
Use the proper test: _RUMPKERNEL vs _RUMP_KERNEL

Revision 1.209.2.5: download - view: text, markup, annotated - select for diffs
Sun Sep 23 11:35:39 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.4: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.4: +8 -2 lines
This hook doesn't exist for _RUMPSERVER

Revision 1.209.2.4: download - view: text, markup, annotated - select for diffs
Sun Sep 23 11:23:47 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.3: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.3: +22 -35 lines
More work on kern_proc_32

Revision 1.209.2.3: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:56:42 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.2: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.2: +49 -27 lines
Sync with HEAD

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

Revision 1.217: download - view: text, markup, annotated - select for diffs
Tue Sep 4 16:03:56 2018 UTC (6 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0930, pgoyette-compat-0906
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +39 -18 lines
Clear the kernel pointers from kern.proc and kern.proc2 when the user is
not privileged.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Tue Sep 4 15:48:44 2018 UTC (6 years, 7 months ago) by maxv
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +5 -5 lines
Use p->p_session instead of ep->e_sess, no real functional change.

Revision 1.215: download - view: text, markup, annotated - select for diffs
Tue Sep 4 14:31:18 2018 UTC (6 years, 7 months ago) by maxv
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +3 -2 lines
Introduce KAUTH_REQ_PROCESS_CANSEE_KPTR, and use it in the already-existing
modstat code. No real functional change.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:29:35 2018 UTC (6 years, 7 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +6 -6 lines
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 - view: text, markup, annotated - select for diffs
Sat Aug 25 09:54:37 2018 UTC (6 years, 8 months ago) by maxv
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 16 13:31:33 2018 UTC (7 years ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.206.6.3: preferred, colored; branchpoint 1.206: preferred, colored
Changes since revision 1.206.6.3: +2 -6 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 16 02:00:07 2018 UTC (7 years ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209.2.1: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.1: +2 -6 lines
Sync with HEAD, resolve some conflicts

Revision 1.212: download - view: text, markup, annotated - select for diffs
Sat Apr 14 14:26:20 2018 UTC (7 years ago) by kamil
Branches: 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
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +2 -6 lines
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 - view: text, markup, annotated - select for diffs
Thu Apr 12 13:42:48 2018 UTC (7 years ago) by martin
Branches: netbsd-8
Diff to: previous 1.206.6.2: preferred, colored; branchpoint 1.206: preferred, colored
Changes since revision 1.206.6.2: +2 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun Apr 1 08:45:43 2018 UTC (7 years ago) by martin
Branches: netbsd-8
Diff to: previous 1.206.6.1: preferred, colored; branchpoint 1.206: preferred, colored
Changes since revision 1.206.6.1: +29 -19 lines
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 - view: text, markup, annotated - select for diffs
Thu Mar 15 09:12:06 2018 UTC (7 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +30 -20 lines
Synch with HEAD

Revision 1.211: download - view: text, markup, annotated - select for diffs
Tue Mar 13 02:24:26 2018 UTC (7 years, 1 month ago) by kamil
Branches: MAIN
CVS tags: pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +29 -19 lines
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 - view: text, markup, annotated - select for diffs
Sun Mar 11 15:13:05 2018 UTC (7 years, 1 month ago) by kre
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 1 18:58:32 2018 UTC (7 years, 3 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +7 -4 lines
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 - view: text, markup, annotated - select for diffs
Sun Dec 3 11:38:44 2017 UTC (7 years, 4 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.186.2.2: preferred, colored; branchpoint 1.186: preferred, colored; next MAIN 1.187: preferred, colored
Changes since revision 1.186.2.2: +127 -23 lines
update from HEAD

Revision 1.209: download - view: text, markup, annotated - select for diffs
Thu Nov 30 18:44:16 2017 UTC (7 years, 4 months ago) by maxv
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, pgoyette-compat-base
Branch point for: pgoyette-compat
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +7 -4 lines
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 - view: text, markup, annotated - select for diffs
Tue Nov 7 19:44:04 2017 UTC (7 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +5 -18 lines
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 - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:07 2017 UTC (7 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.193.4.6: preferred, colored; branchpoint 1.193: preferred, colored; next MAIN 1.194: preferred, colored
Changes since revision 1.193.4.6: +33 -2 lines
Sync with HEAD

Revision 1.207: download - view: text, markup, annotated - select for diffs
Mon Aug 28 00:46:07 2017 UTC (7 years, 8 months ago) by kamil
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +2 -3 lines
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 - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:26 2017 UTC (8 years ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.196.2.3: preferred, colored; branchpoint 1.196: preferred, colored; next MAIN 1.197: preferred, colored
Changes since revision 1.196.2.3: +33 -2 lines
Sync with HEAD

Revision 1.199.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:02 2017 UTC (8 years ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.199: preferred, colored; next MAIN 1.200: preferred, colored
Changes since revision 1.199: +38 -2 lines
Sync with HEAD

Revision 1.206: download - view: text, markup, annotated - select for diffs
Thu Mar 30 20:17:11 2017 UTC (8 years, 1 month ago) by christos
Branches: 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
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +33 -2 lines
factor out getauxv code.

Revision 1.196.2.3: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:47 2017 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.196.2.2: preferred, colored; branchpoint 1.196: preferred, colored
Changes since revision 1.196.2.2: +7 -2 lines
Sync with HEAD

Revision 1.193.4.6: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:56 2017 UTC (8 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.193.4.5: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.4.5: +7 -2 lines
Sync with HEAD

Revision 1.205: download - view: text, markup, annotated - select for diffs
Sat Jan 28 16:43:59 2017 UTC (8 years, 3 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-20170320, nick-nhusb-base-20170204
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +7 -7 lines
We need to define COMPAT_NETBSD32 before we include other files;
otherwise things like ucontext32_t will be missing.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Fri Jan 27 03:53:01 2017 UTC (8 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +4 -3 lines
rump does not have ucontext32_t

Revision 1.203: download - view: text, markup, annotated - select for diffs
Thu Jan 26 15:54:31 2017 UTC (8 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +4 -3 lines
use __HAVE_COMPAT_NETBSD32

Revision 1.202: download - view: text, markup, annotated - select for diffs
Thu Jan 26 08:09:27 2017 UTC (8 years, 3 months ago) by martin
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Jan 26 07:54:05 2017 UTC (8 years, 3 months ago) by martin
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +3 -3 lines
No COMPAT_NETBSD32 for rump

Revision 1.200: download - view: text, markup, annotated - select for diffs
Thu Jan 26 03:54:54 2017 UTC (8 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +5 -2 lines
always compile in the COMPAT32 code; it is tiny and if we don't it breaks
the modules.

Revision 1.196.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:49 2017 UTC (8 years, 3 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.196.2.1: preferred, colored; branchpoint 1.196: preferred, colored
Changes since revision 1.196.2.1: +4 -8 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.193.4.5: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:26 2016 UTC (8 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.193.4.4: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.4.4: +4 -8 lines
Sync with HEAD

Revision 1.199: download - view: text, markup, annotated - select for diffs
Mon Nov 14 08:55:51 2016 UTC (8 years, 5 months ago) by kre
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, nick-nhusb-base-20161204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +4 -8 lines

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 - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:17 2016 UTC (8 years, 5 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +4 -9 lines
Sync with HEAD

Revision 1.193.4.4: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:56:02 2016 UTC (8 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.193.4.3: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.4.3: +7 -12 lines
Sync with HEAD

Revision 1.198: download - view: text, markup, annotated - select for diffs
Thu Sep 29 20:40:53 2016 UTC (8 years, 7 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-20161104, nick-nhusb-base-20161004
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +3 -8 lines
Introduce and use PROC_PTRSZ() to handle differing pointer size 64->32
emulation.

Revision 1.197: download - view: text, markup, annotated - select for diffs
Sat Sep 17 12:00:34 2016 UTC (8 years, 7 months ago) by maxv
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun May 29 08:44:37 2016 UTC (8 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.193.4.2: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.4.2: +3 -3 lines
Sync with HEAD

Revision 1.196: download - view: text, markup, annotated - select for diffs
Wed May 25 17:43:58 2016 UTC (8 years, 11 months ago) by christos
Branches: 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
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Fri Apr 22 15:44:16 2016 UTC (9 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.193.4.1: preferred, colored; branchpoint 1.193: preferred, colored
Changes since revision 1.193.4.1: +3 -3 lines
Sync with HEAD

Revision 1.195: download - view: text, markup, annotated - select for diffs
Mon Apr 4 20:47:57 2016 UTC (9 years ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20160422
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:05 2015 UTC (9 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +97 -9 lines
Sync with HEAD (as of 26th Dec)

Revision 1.194: download - view: text, markup, annotated - select for diffs
Thu Sep 24 14:33:01 2015 UTC (9 years, 7 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +97 -9 lines
implementation of KERN_PROC_PATHNAME, some refactoring for KERN_PROC.

Revision 1.186.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:29 2014 UTC (10 years, 8 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.186.2.1: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.1: +12 -10 lines
Rebase to HEAD as of a few days ago.

Revision 1.192.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:55:58 2014 UTC (10 years, 8 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.192: preferred, colored; next MAIN 1.193: preferred, colored
Changes since revision 1.192: +3 -4 lines
Rebase.

Revision 1.193: download - view: text, markup, annotated - select for diffs
Sat Jul 12 09:57:25 2014 UTC (10 years, 9 months ago) by njoly
Branches: 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
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +3 -4 lines
Allow fill_kproc2() to be used by more than sysctl.

Revision 1.180.4.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:03 2014 UTC (10 years, 11 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.180.4.2: preferred, colored; branchpoint 1.180: preferred, colored; next MAIN 1.181: preferred, colored
Changes since revision 1.180.4.2: +14 -12 lines
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 - view: text, markup, annotated - select for diffs
Sun May 18 17:46:07 2014 UTC (10 years, 11 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.187: preferred, colored; next MAIN 1.188: preferred, colored
Changes since revision 1.187: +13 -10 lines
sync with head

Revision 1.192: download - view: text, markup, annotated - select for diffs
Tue Feb 25 18:30:11 2014 UTC (11 years, 2 months ago) by pooka
Branches: 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
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +2 -8 lines
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 - view: text, markup, annotated - select for diffs
Sat Jan 25 19:44:11 2014 UTC (11 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +3 -3 lines
__USING_TOPDOWN_VM is no more, __USE_TOPDOWN_VM...

Revision 1.190: download - view: text, markup, annotated - select for diffs
Thu Nov 14 12:07:11 2013 UTC (11 years, 5 months ago) by martin
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +9 -3 lines
As discussed on tech-kern: make TOPDOWN-VM runtime selectable per process
(offer MD code or emulations to override it).

Revision 1.189: download - view: text, markup, annotated - select for diffs
Fri Oct 25 15:52:57 2013 UTC (11 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +3 -3 lines
Mark a diagnostic-only variable

Revision 1.188: download - view: text, markup, annotated - select for diffs
Tue Sep 10 21:30:21 2013 UTC (11 years, 7 months ago) by matt
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +5 -2 lines
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 - view: text, markup, annotated - select for diffs
Sun Jun 23 06:18:58 2013 UTC (11 years, 10 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +3 -4 lines
resync from head

Revision 1.187: download - view: text, markup, annotated - select for diffs
Mon Jun 10 14:53:52 2013 UTC (11 years, 10 months ago) by pooka
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +3 -4 lines
g/c unused static variable

Revision 1.180.4.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:30 2012 UTC (12 years, 6 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.180.4.1: preferred, colored; branchpoint 1.180: preferred, colored
Changes since revision 1.180.4.1: +7 -5 lines
sync with head

Revision 1.181.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 12 17:18:22 2012 UTC (12 years, 10 months ago) by riz
Branches: 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
Diff to: previous 1.181: preferred, colored; next MAIN 1.182: preferred, colored
Changes since revision 1.181: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Jun 9 02:31:14 2012 UTC (12 years, 10 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +5 -2 lines
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 - view: text, markup, annotated - select for diffs
Wed Jun 6 11:20:21 2012 UTC (12 years, 10 months ago) by martin
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +3 -4 lines
Henning Petersen in PR kern/46552: include cosmetics

Revision 1.184: download - view: text, markup, annotated - select for diffs
Tue Jun 5 08:23:05 2012 UTC (12 years, 10 months ago) by martin
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun Apr 29 23:05:04 2012 UTC (13 years ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.180.8.2: preferred, colored; branchpoint 1.180: preferred, colored; next MAIN 1.181: preferred, colored
Changes since revision 1.180.8.2: +7 -2 lines
sync to latest -current.

Revision 1.180.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:25 2012 UTC (13 years ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +8 -6 lines
sync with head

Revision 1.183: download - view: text, markup, annotated - select for diffs
Fri Apr 13 15:32:15 2012 UTC (13 years ago) by yamt
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +7 -2 lines
comment

Revision 1.180.8.2: download - view: text, markup, annotated - select for diffs
Fri Feb 24 09:11:46 2012 UTC (13 years, 2 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.180.8.1: preferred, colored; branchpoint 1.180: preferred, colored
Changes since revision 1.180.8.1: +2 -5 lines
sync to -current.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Sun Feb 19 21:06:52 2012 UTC (13 years, 2 months ago) by rmind
Branches: MAIN
CVS tags: jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +2 -5 lines
Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

Revision 1.180.8.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:30 2012 UTC (13 years, 2 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +3 -3 lines
merge to -current.

Revision 1.181: download - view: text, markup, annotated - select for diffs
Sat Feb 11 23:16:17 2012 UTC (13 years, 2 months ago) by martin
Branches: MAIN
CVS tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:30 2011 UTC (13 years, 10 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.168: preferred, colored; next MAIN 1.169: preferred, colored
Changes since revision 1.168: +974 -49 lines
Sync with HEAD.

Revision 1.163.2.4: download - view: text, markup, annotated - select for diffs
Tue May 31 03:05:01 2011 UTC (13 years, 11 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.163.2.3: preferred, colored; branchpoint 1.163: preferred, colored; next MAIN 1.164: preferred, colored
Changes since revision 1.163.2.3: +48 -45 lines
sync with head

Revision 1.180: download - view: text, markup, annotated - select for diffs
Fri May 13 22:22:03 2011 UTC (13 years, 11 months ago) by rmind
Branches: 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
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +27 -18 lines
Sprinkle __cacheline_aligned and __read_mostly, also const-ify.

Revision 1.179: download - view: text, markup, annotated - select for diffs
Sun May 1 01:15:18 2011 UTC (14 years ago) by rmind
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +5 -2 lines
- Remove FORK_SHARELIMIT and PL_SHAREMOD, simplify lim_privatise().
- Use kmem(9) for struct plimit::pl_corename.

Revision 1.178: download - view: text, markup, annotated - select for diffs
Sun May 1 00:22:36 2011 UTC (14 years ago) by rmind
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +3 -12 lines
Merge duplicate code fragments into a new lim_setcorename() routine.

Revision 1.177: download - view: text, markup, annotated - select for diffs
Sun May 1 00:11:52 2011 UTC (14 years ago) by rmind
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +21 -19 lines
Rename limfree() to lim_free(), misc clean up.  No functional change.

Revision 1.176: download - view: text, markup, annotated - select for diffs
Wed Apr 27 00:36:47 2011 UTC (14 years ago) by rmind
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +2 -4 lines
G/C M_EMULDATA

Revision 1.163.2.3: download - view: text, markup, annotated - select for diffs
Thu Apr 21 01:42:08 2011 UTC (14 years ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.163.2.2: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.2: +4 -2 lines
sync with head

Revision 1.175: download - view: text, markup, annotated - select for diffs
Mon Apr 18 00:26:11 2011 UTC (14 years ago) by rmind
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +2 -3 lines
Replace malloc with kmem, and remove M_SUBPROC.

Revision 1.174: download - view: text, markup, annotated - select for diffs
Tue Apr 5 09:02:23 2011 UTC (14 years ago) by rmind
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +6 -3 lines
sysctl_kern_proc_args: fix the deadlock (hi joerg!).

Revision 1.163.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:15 2011 UTC (14 years, 1 month ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.163.2.1: preferred, colored; branchpoint 1.163: preferred, colored
Changes since revision 1.163.2.1: +972 -28 lines
sync with head

Revision 1.169.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 15:10:39 2011 UTC (14 years, 1 month ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.169.2.1: preferred, colored; next MAIN 1.170: preferred, colored
Changes since revision 1.169.2.1: +124 -81 lines
Sync with HEAD

Revision 1.173: download - view: text, markup, annotated - select for diffs
Sat Mar 5 01:52:18 2011 UTC (14 years, 1 month ago) by matt
Branches: MAIN
CVS tags: bouyer-quota2-nbase
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +6 -12 lines
Simplify copyin_psstrings a bit.

Revision 1.172: download - view: text, markup, annotated - select for diffs
Fri Mar 4 22:25:31 2011 UTC (14 years, 1 month ago) by joerg
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +130 -81 lines
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 - view: text, markup, annotated - select for diffs
Tue Feb 8 16:19:59 2011 UTC (14 years, 2 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +879 -2 lines
Sync with HEAD

Revision 1.171: download - view: text, markup, annotated - select for diffs
Fri Jan 28 20:31:10 2011 UTC (14 years, 3 months ago) by pooka
Branches: MAIN
CVS tags: bouyer-quota2-base
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +7 -2 lines
migrate compat32 handling with previous

pointed out by Lars Heidieker

Revision 1.170: download - view: text, markup, annotated - select for diffs
Fri Jan 28 18:44:44 2011 UTC (14 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +874 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 17 07:13:31 2011 UTC (14 years, 3 months ago) by uebayasi
Branches: MAIN
Branch point for: bouyer-quota2
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +3 -3 lines
Include internal definitions (uvm/uvm.h) only where necessary.

Revision 1.159.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:47:28 2010 UTC (14 years, 8 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.159.2.1: preferred, colored; branchpoint 1.159: preferred, colored; next MAIN 1.160: preferred, colored
Changes since revision 1.159.2.1: +101 -108 lines
Sync with HEAD.

Revision 1.139.2.5: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:39 2010 UTC (14 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.139.2.4: preferred, colored; branchpoint 1.139: preferred, colored; next MAIN 1.140: preferred, colored
Changes since revision 1.139.2.4: +103 -110 lines
sync with head.

Revision 1.168: download - view: text, markup, annotated - select for diffs
Wed Jul 7 01:30:37 2010 UTC (14 years, 9 months ago) by chs
Branches: 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
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +52 -28 lines
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 - view: text, markup, annotated - select for diffs
Sat Jul 3 01:19:53 2010 UTC (14 years, 10 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +57 -88 lines
sync with head

Revision 1.167: download - view: text, markup, annotated - select for diffs
Thu Jul 1 02:38:30 2010 UTC (14 years, 10 months ago) by rmind
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +52 -46 lines
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 - view: text, markup, annotated - select for diffs
Thu Jun 10 20:54:53 2010 UTC (14 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +3 -38 lines
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 - view: text, markup, annotated - select for diffs
Thu Jun 10 19:06:26 2010 UTC (14 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +4 -2 lines
smoke the smoke, hack the hack, *beep* the *beep*, _KERNEL_OPT the _KERNEL_POT

Revision 1.164: download - view: text, markup, annotated - select for diffs
Fri Jun 4 23:02:18 2010 UTC (14 years, 10 months ago) by rmind
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +4 -8 lines
proc_alloc: move kdtrace_proc_ctor() out of the proc_lock.

Revision 1.159.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:44:10 2010 UTC (15 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +10 -3 lines
Sync with HEAD.

Revision 1.139.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:17 2010 UTC (15 years, 1 month ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.139.2.3: preferred, colored; branchpoint 1.139: preferred, colored
Changes since revision 1.139.2.3: +122 -18 lines
sync with head

Revision 1.163: download - view: text, markup, annotated - select for diffs
Fri Feb 26 18:47:13 2010 UTC (15 years, 2 months ago) by jym
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Tue Feb 23 22:19:27 2010 UTC (15 years, 2 months ago) by darran
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +2 -11 lines
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 - view: text, markup, annotated - select for diffs
Sun Feb 21 07:01:57 2010 UTC (15 years, 2 months ago) by darran
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +3 -2 lines
Added a defflag option for KDTRACE_HOOKS and included opt_dtrace.h in the
relevant files. (Per Quentin Garnier - thanks!).

Revision 1.160: download - view: text, markup, annotated - select for diffs
Sun Feb 21 02:11:40 2010 UTC (15 years, 2 months ago) by darran
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +17 -2 lines
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 - view: text, markup, annotated - select for diffs
Thu Dec 17 01:25:10 2009 UTC (15 years, 4 months ago) by rmind
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +3 -4 lines
Replace few USER_TO_UAREA/UAREA_TO_USER uses, reduce sys/user.h inclusions.

Revision 1.158: download - view: text, markup, annotated - select for diffs
Thu Nov 26 00:19:11 2009 UTC (15 years, 5 months ago) by matt
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +3 -6 lines
Kill proc0paddr.  Use lwp0.l_addr instead.

Revision 1.157: download - view: text, markup, annotated - select for diffs
Wed Nov 4 15:35:09 2009 UTC (15 years, 5 months ago) by pooka
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +2 -4 lines
nuke unused local variable

Revision 1.156: download - view: text, markup, annotated - select for diffs
Sun Nov 1 20:59:24 2009 UTC (15 years, 5 months ago) by rmind
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +2 -5 lines
orphanpg: remove no longer user variable.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Wed Oct 21 21:12:06 2009 UTC (15 years, 6 months ago) by rmind
Branches: MAIN
CVS tags: jym-xensuspend-nbase
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +3 -7 lines
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 - view: text, markup, annotated - select for diffs
Sun Oct 4 03:15:08 2009 UTC (15 years, 6 months ago) by elad
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +35 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat Oct 3 03:38:31 2009 UTC (15 years, 6 months ago) by elad
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +79 -2 lines
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 - view: text, markup, annotated - select for diffs
Thu Jul 23 23:32:34 2009 UTC (15 years, 9 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.147.2.1: preferred, colored; branchpoint 1.147: preferred, colored; next MAIN 1.148: preferred, colored
Changes since revision 1.147.2.1: +3 -2 lines
Sync with HEAD.

Revision 1.139.2.3: download - view: text, markup, annotated - select for diffs
Sat Jun 20 07:20:31 2009 UTC (15 years, 10 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.139.2.2: preferred, colored; branchpoint 1.139: preferred, colored
Changes since revision 1.139.2.2: +3 -2 lines
sync with head

Revision 1.152: download - view: text, markup, annotated - select for diffs
Sat May 23 18:28:06 2009 UTC (15 years, 11 months ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -2 lines
Make descriptor access and file allocation cheaper in many cases,
mostly by avoiding a bunch of atomic operations.

Revision 1.147.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:21:56 2009 UTC (15 years, 11 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +111 -94 lines
Sync with HEAD.

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

Revision 1.139.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:47 2009 UTC (15 years, 11 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.139.2.1: preferred, colored; branchpoint 1.139: preferred, colored
Changes since revision 1.139.2.1: +124 -107 lines
sync with head.

Revision 1.144.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:36:59 2009 UTC (16 years ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.144.2.2: preferred, colored; branchpoint 1.144: preferred, colored; next MAIN 1.145: preferred, colored
Changes since revision 1.144.2.2: +111 -94 lines
Sync with HEAD.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Sat Apr 25 15:06:31 2009 UTC (16 years ago) by rmind
Branches: MAIN
CVS tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +89 -72 lines
- 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 - view: text, markup, annotated - select for diffs
Thu Apr 16 14:56:41 2009 UTC (16 years ago) by rmind
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +14 -13 lines
- Manage pid_table with kmem(9).
- Remove M_PROC and unused M_SESSION.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Thu Apr 16 00:17:19 2009 UTC (16 years ago) by rmind
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +4 -5 lines
Avoid few #ifdef KSTACK_CHECK_MAGIC.

Revision 1.148: download - view: text, markup, annotated - select for diffs
Sat Mar 28 21:41:05 2009 UTC (16 years, 1 month ago) by rmind
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +10 -10 lines
Make inferior() function static, rename to p_inferior(), return bool.

Revision 1.144.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 3 18:32:56 2009 UTC (16 years, 1 month ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.144.2.1: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.1: +4 -2 lines
Sync with HEAD.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Sat Jan 24 22:42:32 2009 UTC (16 years, 3 months ago) by rmind
Branches: MAIN
CVS tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +4 -2 lines
Set l_psid to PS_NONE for lwp0 (consistency change).

Revision 1.144.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:19:38 2009 UTC (16 years, 3 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +5 -5 lines
Sync with HEAD.

Revision 1.129.6.4: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:19 2009 UTC (16 years, 3 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.129.6.3: preferred, colored; branchpoint 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129.6.3: +5 -3 lines
Sync with HEAD.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Wed Dec 17 20:51:36 2008 UTC (16 years, 4 months ago) by cegger
Branches: MAIN
CVS tags: mjf-devfs2-base
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +4 -4 lines
kill MALLOC and FREE macros.

Revision 1.143.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:15:08 2008 UTC (16 years, 4 months ago) by haad
Branches: haad-dm
Diff to: previous 1.143.2.1: preferred, colored; branchpoint 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143.2.1: +3 -3 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Wed Nov 19 18:36:06 2008 UTC (16 years, 5 months ago) by ad
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:27 2008 UTC (16 years, 6 months ago) by haad
Branches: haad-dm
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +4 -2 lines
Sync with HEAD.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Wed Oct 15 06:51:20 2008 UTC (16 years, 6 months ago) by wrstuden
Branches: 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
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +4 -2 lines
Merge wrstuden-revivesa into HEAD.

Revision 1.141.2.3: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:31:42 2008 UTC (16 years, 7 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.141.2.2: preferred, colored; branchpoint 1.141: preferred, colored; next MAIN 1.142: preferred, colored
Changes since revision 1.141.2.2: +10 -12 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.129.6.3: download - view: text, markup, annotated - select for diffs
Sun Jun 29 09:33:14 2008 UTC (16 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.129.6.2: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.6.2: +8 -10 lines
Sync with HEAD.

Revision 1.142.2.1: download - view: text, markup, annotated - select for diffs
Fri Jun 27 15:11:39 2008 UTC (16 years, 10 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.142: preferred, colored; next MAIN 1.143: preferred, colored
Changes since revision 1.142: +10 -12 lines
Sync with head.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Tue Jun 24 10:31:05 2008 UTC (16 years, 10 months ago) by gmcgarry
Branches: 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
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +10 -12 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 23 04:31:51 2008 UTC (16 years, 10 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.141.2.1: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.1: +2 -4 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.135.2.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:39 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.135.2.1: preferred, colored; branchpoint 1.135: preferred, colored; next MAIN 1.136: preferred, colored
Changes since revision 1.135.2.1: +2 -4 lines
sync with head

Revision 1.129.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:09 2008 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.129.6.1: preferred, colored; branchpoint 1.129: preferred, colored
Changes since revision 1.129.6.1: +56 -147 lines
Sync with HEAD.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Mon May 19 17:06:02 2008 UTC (16 years, 11 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: simonb-wapbl
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +2 -4 lines
Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.135.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:08 2008 UTC (16 years, 11 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +55 -142 lines
sync with head.

Revision 1.139.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:25 2008 UTC (16 years, 11 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +4 -11 lines
sync with head.

Revision 1.141.2.1: download - view: text, markup, annotated - select for diffs
Sat May 10 23:49:04 2008 UTC (16 years, 11 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat May 3 05:36:02 2008 UTC (17 years ago) by yamt
Branches: MAIN
CVS tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +4 -4 lines
enterpgrp: 0 -> NULL for pointers.  no functional changes.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:24:03 2008 UTC (17 years ago) by martin
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.139: download - view: text, markup, annotated - select for diffs
Sun Apr 27 10:56:28 2008 UTC (17 years ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +6 -7 lines
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 - view: text, markup, annotated - select for diffs
Sun Apr 27 01:12:27 2008 UTC (17 years ago) by christos
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +5 -5 lines
orphanpg wants the tty lock held.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Thu Apr 24 18:39:24 2008 UTC (17 years ago) by ad
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +7 -8 lines
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 - view: text, markup, annotated - select for diffs
Thu Apr 24 15:35:29 2008 UTC (17 years ago) by ad
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +49 -127 lines
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 - view: text, markup, annotated - select for diffs
Thu Apr 17 14:16:22 2008 UTC (17 years ago) by yamt
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +4 -5 lines
pidtbl_dump: use queue.h macros.  no functional change.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Thu Apr 17 14:14:20 2008 UTC (17 years ago) by yamt
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +3 -4 lines
enterpgrp: update a comment.

Revision 1.129.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:43:02 2008 UTC (17 years ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +18 -22 lines
Sync with HEAD.

Revision 1.80.12.10: download - view: text, markup, annotated - select for diffs
Mon Mar 24 09:39:01 2008 UTC (17 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80.12.9: preferred, colored; branchpoint 1.80: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80.12.9: +10 -6 lines
sync with head.

Revision 1.129.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:16:13 2008 UTC (17 years, 1 month ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129: +10 -18 lines
sync with head.

Revision 1.114.2.6: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:59 2008 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
Diff to: previous 1.114.2.5: preferred, colored; next MAIN 1.115: preferred, colored
Changes since revision 1.114.2.5: +10 -18 lines
sync with HEAD

Revision 1.133: download - view: text, markup, annotated - select for diffs
Sat Mar 22 17:53:34 2008 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +7 -3 lines
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 - view: text, markup, annotated - select for diffs
Fri Mar 21 21:55:00 2008 UTC (17 years, 1 month ago) by ad
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +5 -5 lines
Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.

Revision 1.80.12.9: download - view: text, markup, annotated - select for diffs
Mon Mar 17 09:15:33 2008 UTC (17 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80.12.8: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.12.8: +10 -18 lines
sync with head.

Revision 1.131: download - view: text, markup, annotated - select for diffs
Mon Mar 17 00:52:56 2008 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +10 -15 lines
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 - view: text, markup, annotated - select for diffs
Mon Mar 17 00:18:24 2008 UTC (17 years, 1 month ago) by rmind
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +2 -5 lines
- 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 - view: text, markup, annotated - select for diffs
Mon Feb 18 21:06:46 2008 UTC (17 years, 2 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.120.2.2: preferred, colored; next MAIN 1.121: preferred, colored
Changes since revision 1.120.2.2: +37 -54 lines
Sync with HEAD.

Revision 1.80.12.8: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:46:09 2008 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80.12.7: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.12.7: +37 -54 lines
sync with head

Revision 1.114.2.5: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:56:06 2008 UTC (17 years, 3 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.114.2.4: preferred, colored
Changes since revision 1.114.2.4: +45 -63 lines
sync with HEAD

Revision 1.127.4.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:55:56 2008 UTC (17 years, 3 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.127: preferred, colored; next MAIN 1.128: preferred, colored
Changes since revision 1.127: +37 -54 lines
Sync with HEAD

Revision 1.129: download - view: text, markup, annotated - select for diffs
Wed Jan 2 11:48:51 2008 UTC (17 years, 4 months ago) by ad
Branches: 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
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +3 -3 lines
Merge vmlocking2 to head.

Revision 1.125.2.4: download - view: text, markup, annotated - select for diffs
Wed Dec 26 23:05:53 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.125.2.3: preferred, colored; branchpoint 1.125: preferred, colored; next MAIN 1.126: preferred, colored
Changes since revision 1.125.2.3: +3 -3 lines
- 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 - view: text, markup, annotated - select for diffs
Wed Dec 26 16:01:36 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
CVS tags: vmlocking2-base3
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +36 -53 lines
Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.125.2.3: download - view: text, markup, annotated - select for diffs
Fri Dec 21 15:27:03 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.125.2.2: preferred, colored; branchpoint 1.125: preferred, colored
Changes since revision 1.125.2.2: +11 -35 lines
Protect process groups and sessions with tty_lock.

Revision 1.125.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 15 03:16:57 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.125.2.1: preferred, colored; branchpoint 1.125: preferred, colored
Changes since revision 1.125.2.1: +27 -20 lines
- 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 - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:18 2007 UTC (17 years, 4 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.113.6.7: preferred, colored; branchpoint 1.113: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113.6.7: +10 -9 lines
Sync with HEAD.

Revision 1.120.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:20:30 2007 UTC (17 years, 4 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.120.2.1: preferred, colored
Changes since revision 1.120.2.1: +10 -9 lines
Sync with HEAD.

Revision 1.125.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 17:57:41 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +9 -8 lines
Sync with head.

Revision 1.80.12.7: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:32:46 2007 UTC (17 years, 4 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80.12.6: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.12.6: +10 -9 lines
sync with head

Revision 1.127: download - view: text, markup, annotated - select for diffs
Wed Dec 5 07:06:53 2007 UTC (17 years, 4 months ago) by ad
Branches: 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
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +7 -7 lines
Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Tue Dec 4 16:56:17 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +4 -3 lines
Use atomics to maintain nprocs.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Mon Dec 3 20:26:25 2007 UTC (17 years, 4 months ago) by ad
Branches: MAIN
CVS tags: vmlocking2-base1
Branch point for: vmlocking2
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +3 -3 lines
Soft interrupts can now take proclist_lock, so there is no need to
double-lock alllwp or allproc.

Revision 1.120.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 19 00:48:41 2007 UTC (17 years, 5 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +72 -125 lines
Sync with HEAD.

Revision 1.80.12.6: download - view: text, markup, annotated - select for diffs
Thu Nov 15 11:44:44 2007 UTC (17 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80.12.5: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.12.5: +72 -125 lines
sync with head.

Revision 1.113.6.7: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:04:42 2007 UTC (17 years, 5 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.113.6.6: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.6.6: +2 -4 lines
Sync with HEAD.

Revision 1.118.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 13 16:02:09 2007 UTC (17 years, 5 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.118: preferred, colored; next MAIN 1.119: preferred, colored
Changes since revision 1.118: +73 -131 lines
Sync with HEAD

Revision 1.124: download - view: text, markup, annotated - select for diffs
Sun Nov 11 23:22:24 2007 UTC (17 years, 5 months ago) by matt
Branches: MAIN
CVS tags: vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +2 -4 lines
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 - view: text, markup, annotated - select for diffs
Sun Nov 11 16:48:04 2007 UTC (17 years, 5 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.113.6.5: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.6.5: +71 -122 lines
Sync with HEAD.

Revision 1.114.2.4: download - view: text, markup, annotated - select for diffs
Thu Nov 8 11:00:03 2007 UTC (17 years, 5 months ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.114.2.3: preferred, colored
Changes since revision 1.114.2.3: +6 -63 lines
sync with -HEAD

Revision 1.123: download - view: text, markup, annotated - select for diffs
Wed Nov 7 16:51:28 2007 UTC (17 years, 5 months ago) by matt
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +70 -62 lines
Use C99 structures initializers when possible.
[from matt-armv6]

Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Nov 7 00:23:22 2007 UTC (17 years, 5 months ago) by ad
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +3 -62 lines
Merge from vmlocking:

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

Revision 1.114.2.3: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:31:49 2007 UTC (17 years, 5 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.114.2.2: preferred, colored
Changes since revision 1.114.2.2: +25 -36 lines
sync with HEAD

Revision 1.113.6.5: download - view: text, markup, annotated - select for diffs
Tue Nov 6 19:25:30 2007 UTC (17 years, 5 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.113.6.4: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.6.4: +6 -6 lines
Sync with HEAD.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Tue Nov 6 00:42:42 2007 UTC (17 years, 5 months ago) by ad
Branches: MAIN
CVS tags: jmcneill-base
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +6 -6 lines
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 - view: text, markup, annotated - select for diffs
Thu Nov 1 21:58:19 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.17: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107.2.17: +4 -3 lines
- 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 - view: text, markup, annotated - select for diffs
Sun Oct 28 20:11:12 2007 UTC (17 years, 6 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.113.6.3: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.6.3: +3 -8 lines
Sync with HEAD.

Revision 1.80.12.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:35:26 2007 UTC (17 years, 6 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80.12.4: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.12.4: +25 -35 lines
sync with head.

Revision 1.107.2.17: download - view: text, markup, annotated - select for diffs
Sat Oct 27 09:18:54 2007 UTC (17 years, 6 months ago) by yamt
Branches: vmlocking
Diff to: previous 1.107.2.16: preferred, colored
Changes since revision 1.107.2.16: +3 -4 lines
fix priorities for some kernel threads.  advised and ok'ed by Andrew Doran.

Revision 1.113.6.3: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:48:33 2007 UTC (17 years, 6 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.113.6.2: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.6.2: +7 -10 lines
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 - view: text, markup, annotated - select for diffs
Thu Oct 25 19:43:10 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.15: preferred, colored
Changes since revision 1.107.2.15: +3 -62 lines
- 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 - view: text, markup, annotated - select for diffs
Wed Oct 24 14:50:41 2007 UTC (17 years, 6 months ago) by ad
Branches: MAIN
Branch point for: mjf-devfs
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +3 -8 lines
Make ras_lookup() lockless.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Tue Oct 23 14:15:48 2007 UTC (17 years, 6 months ago) by yamt
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Sun Oct 14 11:48:41 2007 UTC (17 years, 6 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.116.2.1: preferred, colored; branchpoint 1.116: preferred, colored; next MAIN 1.117: preferred, colored
Changes since revision 1.116.2.1: +5 -8 lines
sync with head.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Fri Oct 12 14:29:38 2007 UTC (17 years, 6 months ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +5 -8 lines
Merge from vmlocking: fix a deadlock with (threaded) soft interrupts and
process exit.

Revision 1.107.2.15: download - view: text, markup, annotated - select for diffs
Tue Oct 9 15:22:19 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.14: preferred, colored
Changes since revision 1.107.2.14: +3 -3 lines
Sync with head.

Revision 1.107.2.14: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:44:27 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.13: preferred, colored
Changes since revision 1.107.2.13: +19 -21 lines
Sync with head.

Revision 1.116.2.1: download - view: text, markup, annotated - select for diffs
Sat Oct 6 15:28:43 2007 UTC (17 years, 6 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +15 -18 lines
sync with head.

Revision 1.113.6.2: download - view: text, markup, annotated - select for diffs
Tue Oct 2 18:29:01 2007 UTC (17 years, 7 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.113.6.1: preferred, colored; branchpoint 1.113: preferred, colored
Changes since revision 1.113.6.1: +19 -21 lines
Sync with HEAD.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Sat Sep 29 12:22:31 2007 UTC (17 years, 7 months ago) by dsl
Branches: MAIN
CVS tags: yamt-x86pmap-base2
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +15 -18 lines
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 - view: text, markup, annotated - select for diffs
Fri Sep 21 19:19:20 2007 UTC (17 years, 7 months ago) by dsl
Branches: MAIN
CVS tags: yamt-x86pmap-base
Branch point for: yamt-x86pmap
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +8 -8 lines
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 - view: text, markup, annotated - select for diffs
Mon Sep 10 10:55:59 2007 UTC (17 years, 7 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.113.2.1: preferred, colored; branchpoint 1.113: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113.2.1: +4 -3 lines
Sync with HEAD.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Thu Sep 6 23:58:57 2007 UTC (17 years, 7 months ago) by ad
Branches: MAIN
CVS tags: nick-csl-alignment-base5
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +4 -3 lines
- 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 - view: text, markup, annotated - select for diffs
Mon Sep 3 14:40:52 2007 UTC (17 years, 7 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80.12.3: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.12.3: +110 -94 lines
sync with head.

Revision 1.114.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 30 00:28:50 2007 UTC (17 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.114.2.1: preferred, colored
Changes since revision 1.114.2.1: +3 -3 lines
Fix inverted test #ifndef -> #ifdef

Revision 1.114.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 28 18:43:44 2007 UTC (17 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +69 -62 lines
Pre-init the static structures (lwp0,proc0,session0,etc.) whenever possible.
Use curlwp_set()

Revision 1.107.2.13: download - view: text, markup, annotated - select for diffs
Mon Aug 20 21:27:31 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.12: preferred, colored
Changes since revision 1.107.2.12: +4 -4 lines
Sync with HEAD.

Revision 1.107.2.12: download - view: text, markup, annotated - select for diffs
Sun Aug 19 22:10:14 2007 UTC (17 years, 8 months ago) by yamt
Branches: vmlocking
Diff to: previous 1.107.2.11: preferred, colored
Changes since revision 1.107.2.11: +5 -8 lines
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 - view: text, markup, annotated - select for diffs
Thu Aug 16 11:03:31 2007 UTC (17 years, 8 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +4 -4 lines
Sync with HEAD.

Revision 1.113.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:49:09 2007 UTC (17 years, 8 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +4 -4 lines
Sync with HEAD.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Fri Aug 10 21:50:48 2007 UTC (17 years, 8 months ago) by dyoung
Branches: MAIN
Branch point for: matt-armv6
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +4 -4 lines
Fix kernel compilation with 'options KSTACK_CHECK_MAGIC':  change
'void *' to 'char *' so pointer arithmetic will work.

Revision 1.107.2.11: download - view: text, markup, annotated - select for diffs
Sun Jul 15 15:52:55 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.10: preferred, colored
Changes since revision 1.107.2.10: +3 -3 lines
Sync with head.

Revision 1.107.2.10: download - view: text, markup, annotated - select for diffs
Sun Jul 15 13:27:38 2007 UTC (17 years, 9 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.9: preferred, colored
Changes since revision 1.107.2.9: +5 -3 lines
Sync with head.

Revision 1.108.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:09:53 2007 UTC (17 years, 9 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.108: preferred, colored; next MAIN 1.109: preferred, colored
Changes since revision 1.108: +17 -15 lines
Sync with head.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:10:53 2007 UTC (17 years, 9 months ago) by ad
Branches: 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
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +11 -10 lines
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 - view: text, markup, annotated - select for diffs
Sun Jul 1 21:50:39 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.8: preferred, colored
Changes since revision 1.107.2.8: +3 -3 lines
Adapt to callout API change.

Revision 1.107.2.8: download - view: text, markup, annotated - select for diffs
Sun Jun 17 21:31:23 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.7: preferred, colored
Changes since revision 1.107.2.7: +3 -3 lines
- 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 - view: text, markup, annotated - select for diffs
Fri Jun 15 20:17:08 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +3 -3 lines
splstatclock, spllock -> splhigh

Revision 1.111: download - view: text, markup, annotated - select for diffs
Thu Jun 14 14:29:50 2007 UTC (17 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +5 -3 lines
proc_drainrefs: fix the case of exec failure.

Revision 1.107.2.7: download - view: text, markup, annotated - select for diffs
Fri Jun 8 14:17:20 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.6: preferred, colored
Changes since revision 1.107.2.6: +5 -7 lines
Sync with head.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Thu May 17 14:51:40 2007 UTC (17 years, 11 months ago) by yamt
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +5 -4 lines
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 - view: text, markup, annotated - select for diffs
Mon May 7 10:55:46 2007 UTC (17 years, 11 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.100.2.6: preferred, colored; branchpoint 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100.2.6: +2 -4 lines
sync with head.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Mon Apr 30 20:11:41 2007 UTC (18 years ago) by dsl
Branches: MAIN
CVS tags: yamt-idlelwp-base8
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +2 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Apr 28 22:40:03 2007 UTC (18 years ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.5: preferred, colored
Changes since revision 1.107.2.5: +3 -3 lines
select/poll:

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

Revision 1.100.2.6: download - view: text, markup, annotated - select for diffs
Sat Apr 21 15:50:15 2007 UTC (18 years ago) by ad
Branches: yamt-idlelwp
Diff to: previous 1.100.2.5: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.5: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Tue Apr 10 00:22:11 2007 UTC (18 years ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.4: preferred, colored
Changes since revision 1.107.2.4: +3 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 9 22:10:03 2007 UTC (18 years ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.3: preferred, colored
Changes since revision 1.107.2.3: +3 -3 lines
- 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 - view: text, markup, annotated - select for diffs
Thu Apr 5 21:38:36 2007 UTC (18 years ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.2: preferred, colored
Changes since revision 1.107.2.2: +5 -4 lines
- 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 - view: text, markup, annotated - select for diffs
Sun Apr 1 16:16:20 2007 UTC (18 years, 1 month ago) by bouyer
Branches: 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
Diff to: previous 1.99: preferred, colored; next MAIN 1.100: preferred, colored
Changes since revision 1.99: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Mar 24 14:56:02 2007 UTC (18 years, 1 month ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.100.2.4: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.4: +8 -8 lines
sync with head.

Revision 1.100.2.4: download - view: text, markup, annotated - select for diffs
Sat Mar 24 00:43:07 2007 UTC (18 years, 1 month ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.100.2.3: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.3: +2 -3 lines
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 - view: text, markup, annotated - select for diffs
Wed Mar 21 20:16:31 2007 UTC (18 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.107.2.1: preferred, colored
Changes since revision 1.107.2.1: +6 -6 lines
- 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 - view: text, markup, annotated - select for diffs
Tue Mar 13 16:51:54 2007 UTC (18 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +8 -8 lines
Sync with head.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Mon Mar 12 18:18:33 2007 UTC (18 years, 1 month ago) by ad
Branches: MAIN
CVS tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +8 -8 lines
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.100.2.3: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:58:36 2007 UTC (18 years, 1 month ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.100.2.2: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.2: +88 -76 lines
Sync with HEAD.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Fri Mar 9 14:11:25 2007 UTC (18 years, 1 month ago) by ad
Branches: MAIN
Branch point for: vmlocking
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +84 -72 lines
- 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 - view: text, markup, annotated - select for diffs
Sun Mar 4 06:03:05 2007 UTC (18 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +6 -6 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.100.2.2: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:54:23 2007 UTC (18 years, 2 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.100.2.1: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.1: +23 -13 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:20:53 2007 UTC (18 years, 2 months ago) by yamt
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +4 -2 lines
implement priority inheritance.

Revision 1.80.12.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:11:08 2007 UTC (18 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80.12.2: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.12.2: +362 -219 lines
sync with head.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Wed Feb 21 23:48:14 2007 UTC (18 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun Feb 18 16:58:16 2007 UTC (18 years, 2 months ago) by dsl
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +5 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 17 22:31:43 2007 UTC (18 years, 2 months ago) by pavel
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +8 -8 lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 17 21:46:13 2007 UTC (18 years, 2 months ago) by dsl
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +11 -6 lines
Acquire proclist_lock in pgid_in_session() so we don't reference potentially
stale proc & pgrp pointers.

Revision 1.100.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 17 10:30:57 2007 UTC (18 years, 2 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -2 lines
- separate context switching and thread scheduling.
- introduce idle lwp.
- change some related MD/MI interfaces and implement i386 version.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:55:31 2007 UTC (18 years, 2 months ago) by ad
Branches: MAIN
CVS tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +348 -213 lines
Merge newlock2 to head.

Revision 1.94.4.15: download - view: text, markup, annotated - select for diffs
Thu Feb 8 07:33:00 2007 UTC (18 years, 2 months ago) by skrll
Branches: newlock2
Diff to: previous 1.94.4.14: preferred, colored; branchpoint 1.94: preferred, colored; next MAIN 1.95: preferred, colored
Changes since revision 1.94.4.14: +3 -3 lines
Another typo in a comment.

Revision 1.94.4.14: download - view: text, markup, annotated - select for diffs
Mon Feb 5 13:16:49 2007 UTC (18 years, 2 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.13: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.13: +56 -41 lines
- 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 - view: text, markup, annotated - select for diffs
Thu Feb 1 06:21:07 2007 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.12: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.12: +3 -3 lines
Get sh3 compiling.

Revision 1.94.4.12: download - view: text, markup, annotated - select for diffs
Wed Jan 31 19:56:38 2007 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.11: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.11: +4 -2 lines
- Have callers to mi_switch() drop the kernel lock.
- Fix a deadlock and some typos.
- Unbreak ptrace().

Revision 1.94.4.11: download - view: text, markup, annotated - select for diffs
Tue Jan 30 13:51:40 2007 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.10: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.10: +2 -4 lines
Remove support for SA. Ok core@.

Revision 1.94.4.10: download - view: text, markup, annotated - select for diffs
Sun Jan 28 07:20:39 2007 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.9: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.9: +3 -3 lines
- Fix sequence error between saving/raising the SPL.
- Changes for JavaStation.
- Fix bugs with mips & sparc support routines.

Revision 1.94.4.9: download - view: text, markup, annotated - select for diffs
Sat Jan 27 01:14:54 2007 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.8: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.8: +4 -4 lines
Drop proclist_mutex and proc::p_smutex back to IPL_VM.

Revision 1.94.4.8: download - view: text, markup, annotated - select for diffs
Thu Jan 25 20:18:37 2007 UTC (18 years, 3 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.7: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.7: +6 -3 lines
Eliminate some uses of mtsleep().

Revision 1.80.12.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:50:05 2006 UTC (18 years, 4 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80.12.1: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.12.1: +126 -22 lines
sync with head.

Revision 1.94.4.7: download - view: text, markup, annotated - select for diffs
Fri Dec 29 20:27:44 2006 UTC (18 years, 4 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.6: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.6: +26 -34 lines
Checkpoint work in progress.

Revision 1.94.4.6: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:22 2006 UTC (18 years, 5 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.5: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.5: +82 -9 lines
Sync with head.

Revision 1.94.4.5: download - view: text, markup, annotated - select for diffs
Fri Nov 17 16:34:36 2006 UTC (18 years, 5 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.4: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.4: +135 -39 lines
Checkpoint work in progress.

Revision 1.94.4.4: download - view: text, markup, annotated - select for diffs
Tue Oct 24 21:10:21 2006 UTC (18 years, 6 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.3: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.3: +6 -2 lines
- 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 - view: text, markup, annotated - select for diffs
Sun Oct 22 06:07:10 2006 UTC (18 years, 6 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.94: preferred, colored; next MAIN 1.95: preferred, colored
Changes since revision 1.94: +83 -11 lines
sync with head

Revision 1.99: download - view: text, markup, annotated - select for diffs
Sat Oct 21 17:01:56 2006 UTC (18 years, 6 months ago) by pooka
Branches: 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
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Oct 21 15:20:46 2006 UTC (18 years, 6 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.2: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.2: +51 -22 lines
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 - view: text, markup, annotated - select for diffs
Wed Oct 11 04:51:06 2006 UTC (18 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +19 -6 lines
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 - view: text, markup, annotated - select for diffs
Mon Oct 9 00:39:06 2006 UTC (18 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +3 -3 lines
Remove unused variables.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Sun Oct 8 22:57:11 2006 UTC (18 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +14 -5 lines
add {proc,lwp}_initspecific and use them to init proc0 and lwp0.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Oct 8 04:28:44 2006 UTC (18 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +60 -10 lines
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 - view: text, markup, annotated - select for diffs
Mon Sep 11 18:43:43 2006 UTC (18 years, 7 months ago) by ad
Branches: newlock2
Diff to: previous 1.94.4.1: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.4.1: +15 -6 lines
Grab proclist_mutex in a few more places.

Revision 1.94.4.1: download - view: text, markup, annotated - select for diffs
Mon Sep 11 18:19:09 2006 UTC (18 years, 7 months ago) by ad
Branches: newlock2
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +132 -146 lines
- 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 - view: text, markup, annotated - select for diffs
Sat Sep 9 02:57:16 2006 UTC (18 years, 7 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.85: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85: +71 -20 lines
sync with head

Revision 1.86.2.5: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:45:46 2006 UTC (18 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.86.2.4: preferred, colored; branchpoint 1.86: preferred, colored; next MAIN 1.87: preferred, colored
Changes since revision 1.86.2.4: +45 -5 lines
sync with head

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Jul 30 21:58:11 2006 UTC (18 years, 9 months ago) by ad
Branches: 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
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +43 -4 lines
Single-thread updates to the process credential.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Thu Jul 27 00:04:08 2006 UTC (18 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -3 lines
PR/34094: Jorge Acereda: Kernel option KSTACK_CHECK_MAGIC doesn't build

Revision 1.92: download - view: text, markup, annotated - select for diffs
Wed Jul 19 21:11:37 2006 UTC (18 years, 9 months ago) by ad
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -2 lines
- 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 - view: text, markup, annotated - select for diffs
Thu Jul 13 17:49:50 2006 UTC (18 years, 9 months ago) by gdamore
Branches: gdamore-uart
Diff to: previous 1.90: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90: +2 -10 lines
Merge from HEAD.

Revision 1.86.2.4: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:52:56 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.86.2.3: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.2.3: +4 -10 lines
sync with head.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Sun Jun 25 08:12:54 2006 UTC (18 years, 10 months ago) by yamt
Branches: MAIN
CVS tags: yamt-pdpolicy-base6
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +2 -10 lines
move SA related pools to where they are used.  make them static.

Revision 1.80.12.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:09:37 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +183 -54 lines
sync with head.

Revision 1.89.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 04:07:15 2006 UTC (18 years, 10 months ago) by chap
Branches: chap-midi
Diff to: previous 1.89: preferred, colored; next MAIN 1.90: preferred, colored
Changes since revision 1.89: +4 -2 lines
Sync with head.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Sun Jun 11 07:32:18 2006 UTC (18 years, 10 months ago) by rjs
Branches: MAIN
CVS tags: gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +4 -2 lines
Add includes of opt_multiprocessor.h and opt_lockdebug.h where missing.

Revision 1.85.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:38:07 2006 UTC (18 years, 11 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.85.6.1: preferred, colored; branchpoint 1.85: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85.6.1: +6 -9 lines
Sync with head.

Revision 1.87.2.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:41 2006 UTC (18 years, 11 months ago) by tron
Branches: peter-altq
Diff to: previous 1.87: preferred, colored; next MAIN 1.88: preferred, colored
Changes since revision 1.87: +5 -7 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.86.2.3: download - view: text, markup, annotated - select for diffs
Wed May 24 10:58:41 2006 UTC (18 years, 11 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.86.2.2: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.2.2: +6 -9 lines
sync with head.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Sun May 14 21:15:11 2006 UTC (18 years, 11 months ago) by elad
Branches: MAIN
CVS tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +6 -9 lines
integrate kauth.

Revision 1.85.6.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:39:59 2006 UTC (19 years ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +22 -2 lines
Sync with head.

Revision 1.86.4.5: download - view: text, markup, annotated - select for diffs
Wed Apr 19 05:13:59 2006 UTC (19 years ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.86.4.4: preferred, colored; branchpoint 1.86: preferred, colored; next MAIN 1.87: preferred, colored
Changes since revision 1.86.4.4: +6 -3 lines
sync with head.

Revision 1.86.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 11 11:55:47 2006 UTC (19 years ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.86.2.1: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.2.1: +3 -2 lines
sync with head

Revision 1.88: download - view: text, markup, annotated - select for diffs
Mon Apr 10 11:16:22 2006 UTC (19 years ago) by onoe
Branches: MAIN
CVS tags: yamt-pdpolicy-base4, elad-kernelauth-base
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -2 lines
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 - view: text, markup, annotated - select for diffs
Thu Mar 30 22:30:27 2006 UTC (19 years, 1 month ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.86.4.3: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.4.3: +2 -4 lines
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 - view: text, markup, annotated - select for diffs
Mon Mar 13 09:07:32 2006 UTC (19 years, 1 month ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +5 -3 lines
sync with head.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Mar 12 10:32:47 2006 UTC (19 years, 1 month ago) by yamt
Branches: MAIN
CVS tags: yamt-pdpolicy-base3, yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +5 -3 lines
proc_vmspace_getref: treat curproc specially to fix coredump problem pointed
by Christos Zoulas.

Revision 1.86.4.3: download - view: text, markup, annotated - select for diffs
Fri Mar 10 21:04:13 2006 UTC (19 years, 1 month ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.86.4.2: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.4.2: +2 -3 lines
No need to call kauth_cred_setngroups() here.

Revision 1.86.4.2: download - view: text, markup, annotated - select for diffs
Thu Mar 9 17:07:10 2006 UTC (19 years, 1 month ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.86.4.1: preferred, colored; branchpoint 1.86: preferred, colored
Changes since revision 1.86.4.1: +2 -14 lines
Namespace cleanup, as requested by yamt@.

Revision 1.86.4.1: download - view: text, markup, annotated - select for diffs
Wed Mar 8 00:53:40 2006 UTC (19 years, 1 month ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +19 -7 lines
Adapt to kernel authorization KPI.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Wed Mar 1 12:38:21 2006 UTC (19 years, 2 months ago) by yamt
Branches: MAIN
CVS tags: yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, elad-kernelauth
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +19 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat Dec 31 11:14:01 2005 UTC (19 years, 4 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.85: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85: +19 -2 lines
uio_segflg/uio_lwp -> uio_vmspace.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Mon Dec 26 18:45:27 2005 UTC (19 years, 4 months ago) by perry
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +11 -11 lines
u_intN_t -> uintN_t

Revision 1.84: download - view: text, markup, annotated - select for diffs
Sat Dec 24 19:12:23 2005 UTC (19 years, 4 months ago) by perry
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +3 -3 lines
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.64.2.6: download - view: text, markup, annotated - select for diffs
Sun Dec 11 10:29:11 2005 UTC (19 years, 4 months ago) by christos
Branches: ktrace-lwp
Diff to: previous 1.64.2.5: preferred, colored; next MAIN 1.65: preferred, colored
Changes since revision 1.64.2.5: +2 -4 lines
Sync with head.

Revision 1.82.6.1: download - view: text, markup, annotated - select for diffs
Tue Nov 29 21:23:29 2005 UTC (19 years, 5 months ago) by yamt
Branches: yamt-readahead
Diff to: previous 1.82: preferred, colored; next MAIN 1.83: preferred, colored
Changes since revision 1.82: +2 -4 lines
sync with head.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sat Nov 26 05:26:33 2005 UTC (19 years, 5 months ago) by simonb
Branches: MAIN
CVS tags: yamt-readahead-base3, ktrace-lwp-base
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +2 -4 lines
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 - view: text, markup, annotated - select for diffs
Thu Nov 10 14:09:44 2005 UTC (19 years, 5 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.64.2.4: preferred, colored
Changes since revision 1.64.2.4: +152 -40 lines
Sync with HEAD. Here we go again...

Revision 1.82: download - view: text, markup, annotated - select for diffs
Fri Aug 5 11:05:44 2005 UTC (19 years, 8 months ago) by junyoung
Branches: 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
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +5 -5 lines
Cosmetic changes.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Fri Aug 5 11:03:18 2005 UTC (19 years, 8 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +149 -37 lines
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 - view: text, markup, annotated - select for diffs
Tue Oct 19 15:58:04 2004 UTC (20 years, 6 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.64.2.3: preferred, colored
Changes since revision 1.64.2.3: +40 -2 lines
Sync with HEAD

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sun Oct 3 22:26:35 2004 UTC (20 years, 6 months ago) by yamt
Branches: 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
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +7 -2 lines
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 - view: text, markup, annotated - select for diffs
Fri Oct 1 16:30:53 2004 UTC (20 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +35 -2 lines
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 - view: text, markup, annotated - select for diffs
Tue Sep 21 13:35:06 2004 UTC (20 years, 7 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.64.2.2: preferred, colored
Changes since revision 1.64.2.2: +2 -2 lines
Fix the sync with head I botched.

Revision 1.64.2.2: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:53:03 2004 UTC (20 years, 7 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.64.2.1: preferred, colored
Changes since revision 1.64.2.1: +0 -0 lines
Sync with HEAD.

Revision 1.64.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:52:49 2004 UTC (20 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +131 -184 lines
Sync with HEAD

Revision 1.78: download - view: text, markup, annotated - select for diffs
Thu May 6 22:20:30 2004 UTC (20 years, 11 months ago) by pk
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +17 -11 lines
Provide a mutex for the process limits data structure.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sun Apr 25 16:42:41 2004 UTC (21 years ago) by simonb
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +35 -50 lines
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 - view: text, markup, annotated - select for diffs
Sat Apr 17 15:15:29 2004 UTC (21 years ago) by christos
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +2 -52 lines
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 - view: text, markup, annotated - select for diffs
Sun Mar 14 01:08:47 2004 UTC (21 years, 1 month ago) by cl
Branches: 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
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +5 -2 lines
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 - view: text, markup, annotated - select for diffs
Fri Feb 27 02:43:25 2004 UTC (21 years, 2 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +5 -5 lines
More typos in comments.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu Feb 26 11:29:41 2004 UTC (21 years, 2 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -5 lines
pgrpdump() is gone.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Thu Feb 26 11:20:08 2004 UTC (21 years, 2 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +20 -21 lines
- Fix typos.
- De-__P().
- Remove trailing spaces.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Fri Feb 6 06:59:33 2004 UTC (21 years, 2 months ago) by pk
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +20 -13 lines
pg_delete: re-arrange SESSRELE() calls to allow for better code generation.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun Jan 4 11:33:31 2004 UTC (21 years, 3 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +2 -17 lines
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 - view: text, markup, annotated - select for diffs
Mon Nov 17 22:52:09 2003 UTC (21 years, 5 months ago) by cl
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +5 -3 lines
- 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 - view: text, markup, annotated - select for diffs
Wed Nov 12 21:07:38 2003 UTC (21 years, 5 months ago) by dsl
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +43 -29 lines
- 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 - view: text, markup, annotated - select for diffs
Tue Nov 4 10:33:15 2003 UTC (21 years, 5 months ago) by dsl
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Tue Sep 16 12:05:49 2003 UTC (21 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +5 -2 lines
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 - view: text, markup, annotated - select for diffs
Thu Aug 7 16:31:47 2003 UTC (21 years, 8 months ago) by agc
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +3 -7 lines
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 - view: text, markup, annotated - select for diffs
Wed Mar 19 20:35:04 2003 UTC (22 years, 1 month ago) by dsl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +6 -6 lines
Indentation fixes

Revision 1.63: download - view: text, markup, annotated - select for diffs
Wed Mar 19 16:47:36 2003 UTC (22 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +12 -11 lines
- 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 - view: text, markup, annotated - select for diffs
Wed Mar 19 16:02:31 2003 UTC (22 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -3 lines
make this compile again (-DDIAGNOSTIC)

Revision 1.61: download - view: text, markup, annotated - select for diffs
Wed Mar 19 11:36:34 2003 UTC (22 years, 1 month ago) by dsl
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +533 -99 lines
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 - view: text, markup, annotated - select for diffs
Wed Mar 12 22:54:44 2003 UTC (22 years, 1 month ago) by dsl
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +28 -2 lines
Add pgid_in_session() for validating TIOCSPGRP requests
(approved by christos)

Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Mar 12 16:39:01 2003 UTC (22 years, 1 month ago) by dsl
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +18 -35 lines
KNF function prototypes

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Feb 15 18:10:16 2003 UTC (22 years, 2 months ago) by dsl
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 1 06:23:43 2003 UTC (22 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +7 -2 lines
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 - view: text, markup, annotated - select for diffs
Wed Jan 22 12:52:16 2003 UTC (22 years, 3 months ago) by yamt
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +22 -20 lines
make KSTACK_CHECK_* compile after sa merge.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Jan 18 10:06:28 2003 UTC (22 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +29 -3 lines
Merge the nathanw_sa branch.

Revision 1.54.2.1: download - view: text, markup, annotated - select for diffs
Wed Dec 18 01:06:10 2002 UTC (22 years, 4 months ago) by gmcgarry
Branches: gmcgarry_ucred
Diff to: previous 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54: +3 -5 lines
Merge pcred and ucred, and poolify.  TBD: check backward compatibility
and factor-out some higher-level functionality.

Revision 1.44.2.11: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:44:53 2002 UTC (22 years, 6 months ago) by nathanw
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.44.2.10: preferred, colored; branchpoint 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44.2.10: +1 -2 lines
Catch up to -current.

Revision 1.44.4.5: download - view: text, markup, annotated - select for diffs
Thu Oct 10 18:43:08 2002 UTC (22 years, 6 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.44.4.4: preferred, colored; branchpoint 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44.4.4: +16 -18 lines
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 - view: text, markup, annotated - select for diffs
Fri Sep 27 15:37:45 2002 UTC (22 years, 7 months ago) by provos
Branches: 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
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
remove trailing \n in panic().  approved perry.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed Sep 25 22:21:43 2002 UTC (22 years, 7 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -3 lines
Don't include <sys/map.h>.

Revision 1.44.2.10: download - view: text, markup, annotated - select for diffs
Tue Sep 17 21:22:07 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44.2.9: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.9: +17 -14 lines
Catch up to -current.

Revision 1.44.4.4: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:47:53 2002 UTC (22 years, 7 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.44.4.3: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.4.3: +97 -8 lines
sync kqueue branch with HEAD

Revision 1.52: download - view: text, markup, annotated - select for diffs
Wed Sep 4 01:32:33 2002 UTC (22 years, 7 months ago) by matt
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +15 -16 lines
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 - view: text, markup, annotated - select for diffs
Thu Aug 29 05:23:07 2002 UTC (22 years, 8 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.47.2.1: preferred, colored; branchpoint 1.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47.2.1: +23 -11 lines
catch up with -current.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Aug 28 07:16:38 2002 UTC (22 years, 8 months ago) by gmcgarry
Branches: MAIN
CVS tags: gehenna-devsw-base
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +6 -2 lines
MI kernel support for user-level Restartable Atomic Sequences (RAS).

Revision 1.44.2.9: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:46:20 2002 UTC (22 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44.2.8: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.8: +93 -8 lines
Catch up to -current.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Fri Jul 26 06:04:57 2002 UTC (22 years, 9 months ago) by enami
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +10 -7 lines
Cosmetic changes.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Jul 26 06:04:12 2002 UTC (22 years, 9 months ago) by enami
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +11 -6 lines
Add some necessary but missing resource deallocation.

Revision 1.47.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 15 10:36:32 2002 UTC (22 years, 9 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +79 -2 lines
catch up with -current.

Revision 1.44.2.8: download - view: text, markup, annotated - select for diffs
Fri Jul 12 01:40:17 2002 UTC (22 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44.2.7: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.7: +2 -3 lines
No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Jul 2 20:27:46 2002 UTC (22 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +79 -2 lines
add KSTACK_CHECK_MAGIC. discussed on tech-kern.

Revision 1.44.2.7: download - view: text, markup, annotated - select for diffs
Mon Jun 24 22:10:48 2002 UTC (22 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44.2.6: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.6: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Sun Jun 23 17:49:30 2002 UTC (22 years, 10 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.44.4.2: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.4.2: +4 -9 lines
catch up with -current on kqueue branch

Revision 1.41.4.2: download - view: text, markup, annotated - select for diffs
Fri Apr 26 17:56:40 2002 UTC (23 years ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH003
Diff to: previous 1.41.4.1: preferred, colored; branchpoint 1.41: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41.4.1: +3 -8 lines
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 - view: text, markup, annotated - select for diffs
Wed Apr 17 00:06:18 2002 UTC (23 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44.2.5: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.5: +2 -7 lines
Catch up to -current.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Apr 12 17:02:33 2002 UTC (23 years ago) by christos
Branches: 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
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +4 -9 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 1 07:47:53 2002 UTC (23 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44.2.4: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.4: +13 -14 lines
Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.44.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 16 16:01:48 2002 UTC (23 years, 1 month ago) by jdolecek
Branches: kqueue
Diff to: previous 1.44.4.1: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.4.1: +7 -7 lines
Catch up with -current.

Revision 1.46.2.1: download - view: text, markup, annotated - select for diffs
Sun Mar 10 07:59:52 2002 UTC (23 years, 1 month ago) by thorpej
Branches: newlock
Diff to: previous 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46: +10 -4 lines
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 - view: text, markup, annotated - select for diffs
Fri Mar 8 20:48:40 2002 UTC (23 years, 1 month ago) by thorpej
Branches: MAIN
CVS tags: newlock-base, eeh-devprop-base, eeh-devprop
Branch point for: newlock
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +7 -7 lines
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 - view: text, markup, annotated - select for diffs
Thu Jan 10 19:59:52 2002 UTC (23 years, 3 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +4 -1 lines
Sync kqueue branch with -current.

Revision 1.44.2.4: download - view: text, markup, annotated - select for diffs
Sat Nov 17 01:10:17 2001 UTC (23 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44.2.3: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.3: +6 -3 lines
Implement POSIX realtime timers, and reimplement getitimer() and setitimer()
in terms of them.

Revision 1.44.2.3: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:16:37 2001 UTC (23 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44.2.2: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.2: +4 -1 lines
Catch up to -current.

Revision 1.44.8.1: download - view: text, markup, annotated - select for diffs
Mon Nov 12 21:18:49 2001 UTC (23 years, 5 months ago) by thorpej
Branches: thorpej-mips-cache
Diff to: previous 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44: +4 -1 lines
Sync the thorpej-mips-cache branch with -current.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Nov 12 15:25:13 2001 UTC (23 years, 5 months ago) by lukem
Branches: MAIN
CVS tags: thorpej-mips-cache-base, ifpoll-base
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +4 -1 lines
add RCSIDs

Revision 1.41.4.1: download - view: text, markup, annotated - select for diffs
Sun Jul 29 19:37:27 2001 UTC (23 years, 9 months ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH002
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +7 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jul 9 22:37:30 2001 UTC (23 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44.2.1: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.1: +5 -1 lines
Move upcall processing to the point of userret() rather than invocation time.

Revision 1.44.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 5 22:49:41 2001 UTC (24 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +23 -2 lines
Initial commit of scheduler activations and lightweight process support.

Revision 1.35.2.3: download - view: text, markup, annotated - select for diffs
Sun Feb 11 19:16:47 2001 UTC (24 years, 2 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.35.2.2: preferred, colored; branchpoint 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35.2.2: +7 -2 lines
Sync with HEAD.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sun Feb 4 22:32:24 2001 UTC (24 years, 2 months ago) by pk
Branches: 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
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +7 -2 lines
When freeing a session, remove the reference to it from the associated tty.

Revision 1.35.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:05:20 2000 UTC (24 years, 5 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.35.2.1: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.2.1: +7 -4 lines
Sync with HEAD.

Revision 1.35.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 18:09:02 2000 UTC (24 years, 5 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +36 -39 lines
Update thorpej_scsipi to -current as of a month ago

Revision 1.43: download - view: text, markup, annotated - select for diffs
Wed Nov 8 14:28:13 2000 UTC (24 years, 5 months ago) by ad
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +7 -4 lines
Update for hashinit() change.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Aug 17 14:37:54 2000 UTC (24 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -8 lines
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 - view: text, markup, annotated - select for diffs
Sat May 27 00:40:45 2000 UTC (24 years, 11 months ago) by sommerfeld
Branches: 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
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +5 -4 lines
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 - view: text, markup, annotated - select for diffs
Mon May 8 20:07:37 2000 UTC (24 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +7 -7 lines
__predict_false() the DIAGNOSTIC error checks.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Mar 30 09:27:12 2000 UTC (25 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +20 -20 lines
Get rid of register declarations.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Jan 22 16:53:50 2000 UTC (25 years, 3 months ago) by thorpej
Branches: MAIN
CVS tags: chs-ubc2-newbase
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +5 -5 lines
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 - view: text, markup, annotated - select for diffs
Sat Jan 22 16:32:02 2000 UTC (25 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +6 -5 lines
Back out rev 1.36... what was I thinking?  Also, update the comment that
led me astray to reflect reality.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Jan 13 21:55:36 2000 UTC (25 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Tue Sep 28 14:47:03 1999 UTC (25 years, 7 months ago) by bouyer
Branches: 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
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +24 -1 lines
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 - view: text, markup, annotated - select for diffs
Mon Aug 2 22:19:13 1999 UTC (25 years, 9 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31: +135 -7 lines
Update from trunk.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Jul 25 06:30:34 1999 UTC (25 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: chs-ubc2-base
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +13 -33 lines
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 - view: text, markup, annotated - select for diffs
Thu Jul 22 21:08:31 1999 UTC (25 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +141 -4 lines
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 - view: text, markup, annotated - select for diffs
Thu Jul 22 18:13:37 1999 UTC (25 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +15 -4 lines
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 - view: text, markup, annotated - select for diffs
Tue Sep 8 23:47:49 1998 UTC (26 years, 7 months ago) by thorpej
Branches: 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
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +22 -4 lines
- 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 - view: text, markup, annotated - select for diffs
Tue Sep 1 01:02:33 1998 UTC (26 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -1 lines
Use the pool allocator and the "nointr" pool page allocator for rusage
structures.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Tue Sep 1 00:08:44 1998 UTC (26 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +6 -4 lines
Use the pool allocator and the "nointr" pool page allocator for pgrp
structures.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Aug 31 23:20:16 1998 UTC (26 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +8 -1 lines
Use the pool allocator and "nointr" pool page allocator for pcred and
plimit structures.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Fri Aug 28 21:20:05 1998 UTC (26 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -2 lines
Use the "nointr" pool page allocator.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Aug 18 06:12:34 1998 UTC (26 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +7 -4 lines
Add some braces to make egcs happy (ambiguous else warning).

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Aug 4 04:03:13 1998 UTC (26 years, 9 months ago) by perry
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
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 - view: text, markup, annotated - select for diffs
Sun Aug 2 04:41:32 1998 UTC (26 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +5 -1 lines
Use a pool for proc structures.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:22:29 1998 UTC (27 years, 2 months ago) by fvdl
Branches: MAIN
CVS tags: eeh-paddr_t-base, eeh-paddr_t
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -2 lines
Merge with Lite2 + local changes

Revision 1.1.1.3 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:13:06 1998 UTC (27 years, 2 months ago) by fvdl
Branches: WFJ-920714, CSRG
CVS tags: lite-2
Diff to: previous 1.1.1.2: preferred, colored
Changes since revision 1.1.1.2: +66 -93 lines
Import 4.4BSD-Lite2

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:09:41 1998 UTC (27 years, 2 months ago) by fvdl
Branches: WFJ-920714, CSRG
CVS tags: lite-1, date-03-may-96
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +123 -42 lines
Import 4.4BSD-Lite for reference

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Feb 14 19:34:12 1998 UTC (27 years, 2 months ago) by kleink
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -2 lines
Fix variable declarations:  register -> register int.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Feb 14 00:37:32 1998 UTC (27 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -1 lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 7 02:44:46 1998 UTC (27 years, 2 months ago) by chs
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -4 lines
add flags arg to hashinit(), to pass to malloc().

Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed May 21 19:56:50 1997 UTC (27 years, 11 months ago) by gwr
Branches: 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
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +1 -94 lines
Moved db_kill_proc() and db_show_all_procs() to ddb/db_xxx.c

Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu May 8 17:22:05 1997 UTC (27 years, 11 months ago) by kleink
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -1 lines
Pull in the declarations of db_expression() and db_error(), used by
db_kill_proc().

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed May 7 18:48:15 1997 UTC (27 years, 11 months ago) by gwr
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +91 -1 lines
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 - view: text, markup, annotated - select for diffs
Sun Oct 13 02:32:33 1996 UTC (28 years, 6 months ago) by christos
Branches: MAIN
CVS tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -4 lines
backout previous kprintf change

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Oct 10 22:46:17 1996 UTC (28 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -4 lines
printf -> kprintf, sprintf -> ksprintf

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Feb 9 18:59:41 1996 UTC (29 years, 2 months ago) by christos
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +6 -2 lines
More proto fixes

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Feb 4 02:15:55 1996 UTC (29 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -3 lines
First pass at prototyping

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Mar 19 23:44:49 1995 UTC (30 years, 1 month ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
Use %p.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Dec 24 15:07:27 1994 UTC (30 years, 4 months ago) by cgd
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +7 -2 lines
various cleanups for -Wall.  some inspired by James Jegers.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Aug 30 03:05:38 1994 UTC (30 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +60 -92 lines
Convert process, file, and namei lists and hash tables to use queue.h.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Jun 29 06:32:36 1994 UTC (30 years, 10 months ago) by cgd
Branches: 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
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -2 lines
New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Jun 8 11:28:40 1994 UTC (30 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
Update to 4.4-Lite fs code.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu May 19 05:57:50 1994 UTC (30 years, 11 months ago) by cgd
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +104 -31 lines
update to lite

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed May 4 03:41:56 1994 UTC (31 years ago) by cgd
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -3 lines
Rename a lot of process flags.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Dec 18 04:20:57 1993 UTC (31 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +16 -15 lines
Canonicalize all #includes.

Revision 1.4.4.1: download - view: text, markup, annotated - select for diffs
Sun Nov 14 20:32:01 1993 UTC (31 years, 5 months ago) by mycroft
Branches: magnum
Diff to: previous 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4: +16 -15 lines
Canonicalize all #includes.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Jun 27 06:01:40 1993 UTC (31 years, 10 months ago) by andrew
Branches: 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
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +13 -5 lines
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 - view: text, markup, annotated - select for diffs
Sat May 22 11:41:40 1993 UTC (31 years, 11 months ago) by cgd
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -2 lines
add include of select.h if necessary for protos, or delete if extraneous

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue May 18 18:19:17 1993 UTC (31 years, 11 months ago) by cgd
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -1 lines
make kernel select interface be one-stop shopping & clean it all up.

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (32 years, 1 month ago) by cgd
Branches: WFJ-920714, CSRG
CVS tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
initial import of 386bsd-0.1 sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (32 years, 1 month ago) by cgd
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>