The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.230 / (download) - annotate - [select for diffs], Sat Feb 25 08:22:00 2023 UTC (12 months ago) by skrll
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.229: +3 -3 lines
Diff to previous 1.229 (colored)

Trailing whitespace

Revision 1.229 / (download) - annotate - [select for diffs], Fri Jul 1 09:54:36 2022 UTC (20 months ago) by prlw1
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.228: +3 -4 lines
Diff to previous 1.228 (colored)

Uglify code to fix build.

Revision 1.228 / (download) - annotate - [select for diffs], Fri Jul 1 01:05:21 2022 UTC (20 months ago) by riastradh
Branch: MAIN
Changes since 1.227: +9 -2 lines
Diff to previous 1.227 (colored)

fork(2): Plug leaks in proc_alloc error branch.

Revision 1.227 / (download) - annotate - [select for diffs], Sun Oct 10 18:07:51 2021 UTC (2 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.226: +3 -3 lines
Diff to previous 1.226 (colored)

Changes to make EVFILT_PROC MP-safe:

Because the locking protocol around processes is somewhat complex
compared to other events that can be posted on kqueues, introduce
new functions for posting NOTE_EXEC, NOTE_EXIT, and NOTE_FORK,
rather than just using the generic knote() function.  These functions
KASSERT() their locking expectations, and deal with other complexities
for each situation.

knote_proc_fork(), in particiular, needs to handle NOTE_TRACK, which
requires allocation of a new knote to attach to the child process.  We
don't want to be allocating memory while holding the parent's p_lock.
Furthermore, we also have to attach the tracking note to the child
process, which means we have to acquire the child's p_lock.

So, to handle all this, we introduce some additional synchronization
infrastructure around the 'knote' structure:

- Add the ability to mark a knote as being in a state of flux.  Knotes
  in this state are guaranteed not to be detached/deleted, thus allowing
  a code path drop other locks after putting a knote in this state.

- Code paths that wish to detach/delete a knote must first check if the
  knote is in-flux.  If so, they must wait for it to quiesce.  Because
  multiple threads of execution may attempt this concurrently, a mechanism
  exists for a single LWP to claim the detach responsibility; all other
  threads simply wait for the knote to disappear before they can make
  further progress.

- When kqueue_scan() encounters an in-flux knote, it simply treats the
  situation just like encountering another thread's queue marker -- wait
  for the flux to settle and continue on.

(The "in-flux knote" idea was inspired by FreeBSD, but this works differently
from their implementation, as the two kqueue implementations have diverged
quite a bit.)

knote_proc_fork() uses this infrastructure to implement NOTE_TRACK like so:

- Attempt to put the original tracking knote into a state of flux; if this
  fails (because the note has a detach pending), we skip all processing
  (the original process has lost interest, and we simply won the race).

- Once the note is in-flux, drop the kq and forking process's locks, and
  allocate 2 knotes: one to post the NOTE_CHILD event, and one to attach
  a new NOTE_TRACK to the child process.  Notably, we do NOT go through
  kqueue_register() to do this, but rather do all of the work directly
  and KASSERT() our assumptions; this allows us to directly control our
  interaction with locks.  All memory allocations here are performed with
  KM_NOSLEEP, in order to prevent holding the original knote in-flux
  indefinitely.

- Because the NOTE_TRACK use case adds knotes to kqueues through a
  sort of back-door mechanism, we must serialize with the closing of
  the destination kqueue's file descriptor, so steal another bit from
  the kq_count field to notify other threads that a kqueue is on its
  way out to prevent new knotes from being enqueued while the close
  path detaches them.

In addition to fixing EVFILT_PROC's reliance on KERNEL_LOCK, this also
fixes a long-standing bug whereby a NOTE_CHILD event could be dropped
if the child process exited before the interested process received the
NOTE_CHILD event (the same knote would be used to deliver the NOTE_EXIT
event, and would clobber the NOTE_CHILD's 'data' field).

Add a bunch of comments to explain what's going on in various critical
sections, and sprinkle additional KASSERT()s to validate assumptions
in several more locations.

Revision 1.226 / (download) - annotate - [select for diffs], Sat May 23 23:42:43 2020 UTC (3 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.225: +8 -8 lines
Diff to previous 1.225 (colored)

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

Revision 1.225 / (download) - annotate - [select for diffs], Tue May 12 11:21:09 2020 UTC (3 years, 9 months ago) by kamil
Branch: MAIN
Changes since 1.224: +4 -4 lines
Diff to previous 1.224 (colored)

Remove the stub support of CLONE_PID in clone(2)

CLONE_PID causes the child clonee to share the same process id as cloner.

It was implemented for debugging purposes in the Linux kernel 2.0,
restricted to root only in 2.3.21 and removed from Linux 2.5.16.

The CLONE_PID bit was recycled for CLONE_PIDFD in Linux 5.2.

Revision 1.224 / (download) - annotate - [select for diffs], Thu May 7 20:02:34 2020 UTC (3 years, 9 months ago) by kamil
Branch: MAIN
Changes since 1.223: +7 -4 lines
Diff to previous 1.223 (colored)

On debugger attach to a prestarted process don't report SIGTRAP

Introduce PSL_TRACEDCHILD that indicates tracking of birth of a process.
A freshly forked process checks whether it is traced and if so, reports
SIGTRAP + TRAP_CHLD event to a debugger as a result of tracking forks-like
events. There is a time window when a debugger can attach to a newly
created process and receive SIGTRAP + TRAP_CHLD instead of SIGSTOP.

Fixes races in t_ptrace_wait* tests when a test hangs or misbehaves,
especially the ones reported in tracer_sysctl_lookup_without_duplicates.

Revision 1.221.2.2 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:05 2020 UTC (3 years, 10 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.221.2.1: +9 -7 lines
Diff to previous 1.221.2.1 (colored) to branchpoint 1.221 (colored) next main 1.222 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.223 / (download) - annotate - [select for diffs], Fri Apr 24 03:22:06 2020 UTC (3 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.222: +9 -7 lines
Diff to previous 1.222 (colored)

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

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

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

Nudged in this direction by ad@ and chs@.

Revision 1.205.2.3 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:42 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.205.2.2: +3 -3 lines
Diff to previous 1.205.2.2 (colored) to branchpoint 1.205 (colored) next main 1.206 (colored)

Sync with HEAD

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

Sync with HEAD

Revision 1.222 / (download) - annotate - [select for diffs], Tue Apr 14 22:42:18 2020 UTC (3 years, 10 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base1
Changes since 1.221: +5 -5 lines
Diff to previous 1.221 (colored)

Set p_oppid always, not just when a parent is traced

PR kern/55151 by Martin Husemann

Revision 1.205.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:03 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.205.2.1: +30 -43 lines
Diff to previous 1.205.2.1 (colored) to branchpoint 1.205 (colored)

Mostly merge changes from HEAD upto 20200411

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

Reintroduce struct proc::p_oppid

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

PR kern/54786 by Andreas Gustafsson

Revision 1.220 / (download) - annotate - [select for diffs], Sun Apr 5 20:53:17 2020 UTC (3 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.219: +4 -10 lines
Diff to previous 1.219 (colored)

- Untangle spawn_return by splitting it up to sub-functions.
- Merge the eventswitch parent notification code which was copied in two
  places (eventswitchchild)
- Fix bugs in the eventswitch parent notification code:
  1. p_slflags should be accessed holding both proc_lock and p->p_lock
  2. p->p_opptr can be NULL if the parent was PSL_CHTRACED and exited.

Fixes random crashes the posix_spawn_kill_spawner unit test which tried
to dereference a NULL pptr.

Revision 1.219 / (download) - annotate - [select for diffs], Sun Mar 1 21:37:26 2020 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp
Changes since 1.218: +9 -12 lines
Diff to previous 1.218 (colored)

child_return():

- This was assuming arg == curlwp, but NULL is passed to lwp_create(), as
  evidenced by a random panic during testing.  How did this ever work?

- Replace a goto.

Revision 1.217.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:02 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.217: +4 -2 lines
Diff to previous 1.217 (colored) next main 1.218 (colored)

Sync with head.

Revision 1.218 / (download) - annotate - [select for diffs], Wed Jan 29 15:47:52 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base3
Changes since 1.217: +4 -2 lines
Diff to previous 1.217 (colored)

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

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

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

- Add some comments.

Revision 1.217 / (download) - annotate - [select for diffs], Mon Dec 16 22:47:54 2019 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.216: +7 -7 lines
Diff to previous 1.216 (colored)

- Extend the per-CPU counters matt@ did to include all of the hot counters
  in UVM, excluding uvmexp.free, which needs special treatment and will be
  done with a separate commit.  Cuts system time for a build by 20-25% on
  a 48 CPU machine w/DIAGNOSTIC.

- Avoid 64-bit integer divide on every fault (for rnd_add_uint32).

Revision 1.216 / (download) - annotate - [select for diffs], Sat Nov 23 19:42:52 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.215: +8 -8 lines
Diff to previous 1.215 (colored)

Minor scheduler cleanup:

- Adapt to cpu_need_resched() changes. Avoid lost & duplicate IPIs and ASTs.
  sched_resched_cpu() and sched_resched_lwp() contain the logic for this.
- Changes for LSIDL to make the locking scheme match the intended design.
- Reduce lock contention and false sharing further.
- Numerous small bugfixes, including some corrections for SCHED_FIFO/RT.
- Use setrunnable() in more places, and merge cut & pasted code.

Revision 1.213.2.1 / (download) - annotate - [select for diffs], Tue Oct 15 18:32:13 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.213: +10 -18 lines
Diff to previous 1.213 (colored) next main 1.214 (colored)

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

	sys/sys/siginfo.h: revision 1.34
	sys/kern/sys_ptrace_common.c: revision 1.59
	sys/kern/sys_lwp.c: revision 1.70
	sys/compat/sys/siginfo.h: revision 1.8
	sys/kern/kern_sig.c: revision 1.365
	sys/kern/kern_lwp.c: revision 1.203
	sys/sys/signalvar.h: revision 1.96
	sys/kern/kern_exec.c: revision 1.482
	sys/kern/kern_fork.c: revision 1.214

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.215 / (download) - annotate - [select for diffs], Sat Oct 12 10:55:23 2019 UTC (4 years, 4 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.214: +4 -6 lines
Diff to previous 1.214 (colored)

Remove p_oppid from struct proc

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

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

Ride ABI bump for 9.99.16.

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

Move TRAP_CHLD/TRAP_LWP ptrace information from struct proc to siginfo

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

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

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

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

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

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

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

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

Revision 1.213 / (download) - annotate - [select for diffs], Thu Jun 13 20:20:18 2019 UTC (4 years, 8 months ago) by kamil
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.212: +7 -6 lines
Diff to previous 1.212 (colored)

Correct use-after-free issue in vfork(2)

In the previous behavior vforking parent was keeping pointer to a child
and checking whether it clears a PL_PPWAIT in its bitfield p_lflag. However
a child can go invalid between exec/exit event from child and waking up
vforked parent and this can cause invalid pointer read and in the worst
scenario kernel crash.

In the new behavior vforked child keeps a reference to vforked parent LWP
and sets a value l_vforkwaiting to false. This means that vforked child
can finish its work, exec/exit and be terminated and once parent will be
woken up it will read its own field whether its child is still blocking.

Add new field in struct lwp: l_vforkwaiting protected by proc_lock.
In future it should be refactored and all PL_PPWAIT users transformed to
l_vforkwaiting and next l_vforkwaiting probably transformed into a bit
field.

This is another attempt of fixing this bug after <rmind> from 2012 in
commit:

Author: rmind <rmind@NetBSD.org>
Date:   Sun Jul 22 22:40:18 2012 +0000

    fork1: fix use-after-free problems.  Addresses PR/46128 from Andrew Doran.
    Note: PL_PPWAIT should be fully replaced and modificaiton of l_pflag by
    other LWP is undesirable, but this is enough for netbsd-6.

The new version no longer performs unsafe access in l_lflag changing the
LP_VFORKWAIT bit.

Verified with ATF t_vfork and t_ptrace* tests and they are no longer
causing any issues in my local setup.

Fixes PR/46128 by Andrew Doran

Revision 1.205.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.205: +80 -41 lines
Diff to previous 1.205 (colored)

Sync with HEAD

Revision 1.212 / (download) - annotate - [select for diffs], Fri May 3 22:34:21 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.211: +17 -12 lines
Diff to previous 1.211 (colored)

Register KTR events for debugger related signals

Register signals for:

 - crashes (FPE, SEGV, FPE, ILL, BUS)
 - LWP events
 - CHLD (FORK/VFORK/VFORK_DONE) events -- temporarily disabled
 - EXEC events

While there refactor related functions in order to simplify the code.

Add missing comment documentation for recently added kernel functions.

Revision 1.211 / (download) - annotate - [select for diffs], Wed May 1 18:01:54 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
Changes since 1.210: +34 -14 lines
Diff to previous 1.210 (colored)

Correct handling of corner cases in fork1(9) code under a debugger

Correct detaching and SIGKILLing forker and vforker in the middle of its
operation.

Revision 1.210 / (download) - annotate - [select for diffs], Wed May 1 17:21:55 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
Changes since 1.209: +5 -17 lines
Diff to previous 1.209 (colored)

Add eventswitch() in signal code

Route all crash and debugger related signal through eventswitch(), that
calls sigswitch() with preprocessed arguments.

This code avoids code duplication and allows to introduce changes that
will affect all callers of sigswitch() in debugger-related events.

No functional change intended.

Revision 1.209 / (download) - annotate - [select for diffs], Sun Apr 7 14:50:41 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.208: +11 -3 lines
Diff to previous 1.208 (colored)

Add a paranoid racy lock check in child_return()

In theory a child could be detached for some reason or another during
the time window between checking for PSL_TRACED and acquiring proc_lock.

Acquire the proc_lock mutex and recheck for PSL_TRACED before emitting
SIGTRAP. sigswitch() must acquite it internally anyway so this does not
have a negative impact and adds an extra sanity check.

For !PSL_TRACED case there is no impact.

Revision 1.208 / (download) - annotate - [select for diffs], Sat Apr 6 11:54:21 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
Changes since 1.207: +30 -2 lines
Diff to previous 1.207 (colored)

Centralized shared part of child_return() into MI part

Add a new function md_child_return() for MD specific bits only.

New child_return() is now part of MI and central code that handles
uniformly tracing code (KTR and ptrace(2)).

Synchronize value passed to ktrsysret() among ports to SYS_fork. This is
a traditional value and accessing p_lflag to check for PL_PPWAIT shall
use locking against proc_lock. Returning SYS_fork vs SYS_vfork still isn't
correct enough as there are more entry points to forking code. Instead of
making it too good, just settle with plain SYS_fork for all ports.

Revision 1.207 / (download) - annotate - [select for diffs], Fri Apr 5 21:41:18 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
Changes since 1.206: +5 -5 lines
Diff to previous 1.206 (colored)

Correct distinguishing fork/vfork tracing event in fork1(9)

flags can contain a different value than FORK_PPWAIT and bit comparing
with '&&' was a typo.

Detected with __clone(2) usage scenarios.

Revision 1.206 / (download) - annotate - [select for diffs], Wed Apr 3 08:08:00 2019 UTC (4 years, 11 months ago) by kamil
Branch: MAIN
Changes since 1.205: +13 -23 lines
Diff to previous 1.205 (colored)

Rework the fork(2)/vfork(2) event signalling under ptrace(2)

Remove the constraint of SIGTRAP event being maskable by a tracee.

Now all SIGTRAP TRAP_CHLD events are delivered to debugger.

This code touches MD specific logic and the child_return routine.
It's an intermediate step with a room for refactoring in future and
right now the least invasive approach. This allows to assert expected
behavior in already existing ATF tests and make the code prettier
in future keeping the same semantics. Probably there is a need for a MI
wrapper of child_return for shared functionality between ports.

Revision 1.203.2.2 / (download) - annotate - [select for diffs], Wed May 2 07:20:22 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.203.2.1: +30 -14 lines
Diff to previous 1.203.2.1 (colored) to branchpoint 1.203 (colored) next main 1.204 (colored)

Synch with HEAD

Revision 1.205 / (download) - annotate - [select for diffs], Tue May 1 16:37:23 2018 UTC (5 years, 10 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502
Branch point for: phil-wifi
Changes since 1.204: +30 -14 lines
Diff to previous 1.204 (colored)

Implement PTRACE_VFORK

Add support for tracing vfork(2) events in the context of ptrace(2).

This API covers other frontends to fork1(9) like posix_spawn(2) or clone(2),
if they cause parent to wait for exec(2) or exit(2) of the child.

Changes:
 - Add new argument to sigswitch() determining whether we need to acquire
   the proc_lock or whether it's already held.
 - Refactor fork1(9) for fork(2) and vfork(2)-like events.
   Call sigswitch() from fork(1) for forking or vforking parent, instead of
   emitting kpsignal(9). We need to emit the signal and suspend the parent,
   returning to user and relock proc_lock.
 - Add missing prototype for proc_stop_done() in kern_sig.c.
 - Make sigswitch a public function accessible from other kernel code
   including <sys/signalvar.h>.
 - Remove an entry about unimplemented PTRACE_VFORK in the ptrace(2) man page.
 - Permin PTRACE_VFORK in the ptrace(2) frontend for userland.
 - Remove expected failure for unimplemented PTRACE_VFORK tests in the ATF
   ptrace(2) test-suite.
 - Relax signal routing constraints under a debugger for a vfork(2)ed child.
   This intended to protect from signaling a parent of a vfork(2)ed child that
   called PT_TRACE_ME, but wrongly misrouted other signals in vfork(2)
   use-cases.

Add XXX comments about still existing problems and future enhancements:
 - correct vfork(2) + PT_TRACE_ME handling.
 - fork1(2) handling of scenarios when a process is collected in valid but
   rare cases.

All ATF ptrace(2) fork[1-8] and vfork[1-8] tests pass.

Fix PR kern/51630 by Kamil Rytarowski (myself).

Sponsored by <The NetBSD Foundation>

Revision 1.203.2.1 / (download) - annotate - [select for diffs], Sun Apr 22 07:20:27 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.203: +7 -14 lines
Diff to previous 1.203 (colored)

Sync with HEAD

Revision 1.204 / (download) - annotate - [select for diffs], Mon Apr 16 14:51:59 2018 UTC (5 years, 10 months ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-compat-0422
Changes since 1.203: +7 -14 lines
Diff to previous 1.203 (colored)

Remove the rnewprocp argument from fork1(9)

It's now unused and it can cause use-after-free scenarios as noted by
<Mateusz Guzik>.

Reference: http://mail-index.netbsd.org/tech-kern/2017/09/08/msg022267.html

Sponsored by <The NetBSD Foundation>

Revision 1.191.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.191.2.2: +36 -36 lines
Diff to previous 1.191.2.2 (colored) to branchpoint 1.191 (colored) next main 1.192 (colored)

update from HEAD

Revision 1.203 / (download) - annotate - [select for diffs], Tue Nov 7 19:44:04 2017 UTC (6 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.202: +6 -2 lines
Diff to previous 1.202 (colored)

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

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

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

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

Sync with HEAD

Revision 1.195.2.3 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:26 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.195.2.2: +14 -3 lines
Diff to previous 1.195.2.2 (colored) to branchpoint 1.195 (colored) next main 1.196 (colored)

Sync with HEAD

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

Sync with HEAD

Revision 1.202 / (download) - annotate - [select for diffs], Fri Apr 21 15:10:34 2017 UTC (6 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Changes since 1.201: +3 -3 lines
Diff to previous 1.201 (colored)

- Propagate the signal mask from the ucontext_t to the newly created thread
  as specified by _lwp_create(2)
- Reset the signal stack for threads created with _lwp_create(2)

Revision 1.201 / (download) - annotate - [select for diffs], Fri Mar 31 08:50:54 2017 UTC (6 years, 11 months ago) by skrll
Branch: MAIN
CVS Tags: jdolecek-ncq-base, jdolecek-ncq
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored)

spaces to tab

Revision 1.200 / (download) - annotate - [select for diffs], Fri Mar 31 08:47:04 2017 UTC (6 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.199: +13 -2 lines
Diff to previous 1.199 (colored)

PR kern/52117: move stop code for debuged children after fork into MI code.
XXX we might want to revisit this when handling the same event for vfork
better.

Revision 1.195.2.2 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:47 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.195.2.1: +14 -12 lines
Diff to previous 1.195.2.1 (colored) to branchpoint 1.195 (colored)

Sync with HEAD

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

Sync with HEAD

Revision 1.199 / (download) - annotate - [select for diffs], Fri Jan 13 23:00:35 2017 UTC (7 years, 1 month ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.198: +13 -6 lines
Diff to previous 1.198 (colored)

Add support for PTRACE_VFORK_DONE and stub for PTRACE_VFORK in ptrace(2)

PTRACE_VFORK is supposed to be used to track vfork(2)-like events, when
parent gives birth to new process child and stops till it exits or calls
exec().
Currently PTRACE_VFORK is a stub.

PTRACE_VFORK_DONE is notification to notify a debugger that a parent has
resumed after vfork(2)-like action.
PTRACE_VFORK_DONE throws SIGTRAP with TRAP_CHLD.

Sponsored by <The NetBSD Foundation>

Revision 1.198 / (download) - annotate - [select for diffs], Tue Jan 10 00:48:37 2017 UTC (7 years, 1 month ago) by kamil
Branch: MAIN
Changes since 1.197: +3 -2 lines
Diff to previous 1.197 (colored)

Introduce new si_code for SIGTRAP: TRAP_CHLD - process child trap

The SIGTRAP signal is thrown from the kernel if EVENT_MASK (ptrace_event)
enables PTRACE_FORK. This new si_code helps debuggers to distinguish the
exact source of signal delivered for a debugger.

Another purpose of TRAP_CHLD is to retain the same behavior inside the
NetBSD kernel for process child traps and have an interface to monitor it.

Retrieving exact event and extended properties of process child trap is
available with PT_GET_PROCESS_STATE.

There is no behavior change for existing software.

This si_code value is NetBSD extension.

Sponsored by <The NetBSD Foundation>

Revision 1.197 / (download) - annotate - [select for diffs], Mon Jan 9 00:31:30 2017 UTC (7 years, 1 month ago) by kamil
Branch: MAIN
Changes since 1.196: +2 -8 lines
Diff to previous 1.196 (colored)

Cleanup dead code after revert of racy vfork(2) commit

This removes dead code introduced with the following commit:

date: 2012-07-27 22:52:49 +0200;  author: christos;  state: Exp;  lines: +8 -2;
revert racy vfork() parent-blocking-before-child-execs-or-exits code.
ok rmind

Revision 1.195.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:49 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.195: +3 -22 lines
Diff to previous 1.195 (colored)

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

Revision 1.193.6.3 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:26 2016 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.193.6.2: +3 -22 lines
Diff to previous 1.193.6.2 (colored) to branchpoint 1.193 (colored)

Sync with HEAD

Revision 1.196 / (download) - annotate - [select for diffs], Fri Nov 4 18:14:04 2016 UTC (7 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, nick-nhusb-base-20161204
Changes since 1.195: +3 -22 lines
Diff to previous 1.195 (colored)

deduplicate the complex lock reparent dance.

Revision 1.193.6.2 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:31 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.193.6.1: +3 -2 lines
Diff to previous 1.193.6.1 (colored) to branchpoint 1.193 (colored)

Sync with HEAD

Revision 1.195 / (download) - annotate - [select for diffs], Sat Jan 9 07:52:38 2016 UTC (8 years, 1 month ago) by dholland
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.194: +3 -2 lines
Diff to previous 1.194 (colored)

When doing an unlock/relock dance to avoid lock inversion, it's important
to relock the lock you unlocked. Otherwise the lock you unlocked won't
walk the walk, not by a long chalk, and you'll end up getting mocked.

From Mateusz Guzik of FreeBSD via freenode.

XXX: pullup-6 and -7

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

Sync with HEAD (as of 26th Dec)

Revision 1.194 / (download) - annotate - [select for diffs], Fri Oct 2 16:54:15 2015 UTC (8 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.193: +9 -8 lines
Diff to previous 1.193 (colored)

Change SDT (Statically Defined Tracing) probes to use link sets so that it
is easier to add probes. (From FreeBSD)

Revision 1.191.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.191.2.1: +1 -1 lines
Diff to previous 1.191.2.1 (colored) to branchpoint 1.191 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.186.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.186.2.2: +4 -4 lines
Diff to previous 1.186.2.2 (colored) to branchpoint 1.186 (colored) next main 1.187 (colored)

sync with head.

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

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

Revision 1.192.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:07 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored) next main 1.193 (colored)

sync with head

Revision 1.193 / (download) - annotate - [select for diffs], Fri Nov 22 21:04:11 2013 UTC (10 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: nick-nhusb
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

convert vmem, signals, powerhooks from CIRCLEQ -> TAILQ.

Revision 1.191.2.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:57 2013 UTC (10 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.191: +3 -3 lines
Diff to previous 1.191 (colored)

resync from head

Revision 1.192 / (download) - annotate - [select for diffs], Sun Jun 9 01:13:47 2013 UTC (10 years, 8 months ago) by riz
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.191: +3 -3 lines
Diff to previous 1.191 (colored)

Add another field to the SDT_PROBE_DEFINE macro, so our DTrace probes
can named the same as those on other platforms.

For example, proc:::exec-success, not proc:::exec_success.

Implementation follows the same basic principle as FreeBSD's; add
another field to the SDT_PROBE_DEFINE macro which is the name
as exposed to userland.

Revision 1.186.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:29 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.186.2.1: +26 -15 lines
Diff to previous 1.186.2.1 (colored) to branchpoint 1.186 (colored)

sync with head

Revision 1.191 / (download) - annotate - [select for diffs], Fri Jul 27 20:52:49 2012 UTC (11 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.190: +7 -2 lines
Diff to previous 1.190 (colored)

revert racy vfork() parent-blocking-before-child-execs-or-exits code.
ok rmind

Revision 1.190 / (download) - annotate - [select for diffs], Sun Jul 22 22:40:19 2012 UTC (11 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.189: +23 -17 lines
Diff to previous 1.189 (colored)

fork1: fix use-after-free problems.  Addresses PR/46128 from Andrew Doran.
Note: PL_PPWAIT should be fully replaced and modificaiton of l_pflag by
other LWP is undesirable, but this is enough for netbsd-6.

Revision 1.186.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:24 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.186: +48 -41 lines
Diff to previous 1.186 (colored)

sync with head

Revision 1.186.6.5 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:38 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.186.6.4: +12 -9 lines
Diff to previous 1.186.6.4 (colored) to branchpoint 1.186 (colored) next main 1.187 (colored)

sync to latest -current.

Revision 1.189 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:52 2012 UTC (11 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Changes since 1.188: +12 -9 lines
Diff to previous 1.188 (colored)

Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.

Revision 1.186.6.4 / (download) - annotate - [select for diffs], Tue Mar 6 18:26:48 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.186.6.3: +34 -34 lines
Diff to previous 1.186.6.3 (colored) to branchpoint 1.186 (colored)

sync to -current

Revision 1.186.6.3 / (download) - annotate - [select for diffs], Tue Mar 6 09:56:27 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.186.6.2: +34 -34 lines
Diff to previous 1.186.6.2 (colored) to branchpoint 1.186 (colored)

sync to -current

Revision 1.186.6.2 / (download) - annotate - [select for diffs], Sun Mar 4 00:46:30 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.186.6.1: +34 -34 lines
Diff to previous 1.186.6.1 (colored) to branchpoint 1.186 (colored)

sync to latest -current.

Revision 1.188 / (download) - annotate - [select for diffs], Fri Mar 2 21:23:05 2012 UTC (12 years ago) by rmind
Branch: MAIN
CVS Tags: jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base4
Changes since 1.187: +34 -34 lines
Diff to previous 1.187 (colored)

- Add __cacheline_aligned for nprocs, make fork_tfmrate static.
- Fix indentation, remove whitespaces and redundant brackets.

Revision 1.186.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:29 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.186: +7 -3 lines
Diff to previous 1.186 (colored)

merge to -current.

Revision 1.171.12.2 / (download) - annotate - [select for diffs], Sun Feb 5 12:28:20 2012 UTC (12 years ago) by bouyer
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE
Changes since 1.171.12.1: +5 -4 lines
Diff to previous 1.171.12.1 (colored) to branchpoint 1.171 (colored) next main 1.172 (colored)

Pull up following revision(s) (requested by rmind in ticket #1628):
	sys/kern/kern_fork.c: revision 1.184 via patch
fork1: fix stop-on-fork case, lend a correct lock to LWP for LSSTOP state.
Fixes PR/44935.

Revision 1.171.8.2 / (download) - annotate - [select for diffs], Sun Feb 5 12:28:14 2012 UTC (12 years ago) by bouyer
Branch: netbsd-5-0
Changes since 1.171.8.1: +5 -4 lines
Diff to previous 1.171.8.1 (colored) to branchpoint 1.171 (colored) next main 1.172 (colored)

Pull up following revision(s) (requested by rmind in ticket #1628):
	sys/kern/kern_fork.c: revision 1.184 via patch
fork1: fix stop-on-fork case, lend a correct lock to LWP for LSSTOP state.
Fixes PR/44935.

Revision 1.171.4.2 / (download) - annotate - [select for diffs], Sun Feb 5 12:28:08 2012 UTC (12 years ago) by bouyer
Branch: netbsd-5
CVS Tags: 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
Changes since 1.171.4.1: +5 -4 lines
Diff to previous 1.171.4.1 (colored) to branchpoint 1.171 (colored) next main 1.172 (colored)

Pull up following revision(s) (requested by rmind in ticket #1628):
	sys/kern/kern_fork.c: revision 1.184 via patch
fork1: fix stop-on-fork case, lend a correct lock to LWP for LSSTOP state.
Fixes PR/44935.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Feb 2 02:44:06 2012 UTC (12 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: netbsd-6-base, 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, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base5, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Changes since 1.186: +7 -3 lines
Diff to previous 1.186 (colored)

Disable PTRACE_FORK for vforked() children, because the parent is waiting
and will not receive the SIGTRAP in time.

Revision 1.186 / (download) - annotate - [select for diffs], Fri Sep 2 20:06:29 2011 UTC (12 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.185: +44 -2 lines
Diff to previous 1.185 (colored)

Add support for PTRACE_FORK. NB: This does not (yet) work for vfork(), because:
1. When we vfork() PL_PPWAIT is set, and that makes us do regular disposition
   of the TRAP signal, and not indirect through the debugger.
2. The parent needs to keep running, so that the debugger can release it.
   Unfortunately, with vfork() we cannot release the parent because it will
   eventually core-dump since the parent and the child cannot run on the
   same address space.

Revision 1.185 / (download) - annotate - [select for diffs], Tue Aug 23 13:01:25 2011 UTC (12 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.184: +10 -3 lines
Diff to previous 1.184 (colored)

don't use lwp_setprivate in fork, but copy the private lwp member directly
because userland might have messed with the TLS register without letting
the kernel know. This fixes fork() on amd64. Thanks chuq!

Revision 1.171.8.1 / (download) - annotate - [select for diffs], Sat Jun 18 16:36:09 2011 UTC (12 years, 8 months ago) by bouyer
Branch: netbsd-5-0
Changes since 1.171: +5 -2 lines
Diff to previous 1.171 (colored)

Pull up following revision(s) (requested by rmind in ticket #1629):
	sys/kern/kern_fork.c: revision 1.181
Inherit proc_t::p_mqueue_cnt on fork().

Revision 1.171.12.1 / (download) - annotate - [select for diffs], Sat Jun 18 16:35:56 2011 UTC (12 years, 8 months ago) by bouyer
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE
Changes since 1.171: +5 -2 lines
Diff to previous 1.171 (colored)

Pull up following revision(s) (requested by rmind in ticket #1629):
	sys/kern/kern_fork.c: revision 1.181
Inherit proc_t::p_mqueue_cnt on fork().

Revision 1.171.4.1 / (download) - annotate - [select for diffs], Sat Jun 18 16:35:51 2011 UTC (12 years, 8 months ago) by bouyer
Branch: netbsd-5
Changes since 1.171: +5 -2 lines
Diff to previous 1.171 (colored)

Pull up following revision(s) (requested by rmind in ticket #1629):
	sys/kern/kern_fork.c: revision 1.181
Inherit proc_t::p_mqueue_cnt on fork().

Revision 1.178.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:28 2011 UTC (12 years, 8 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.178: +18 -16 lines
Diff to previous 1.178 (colored) next main 1.179 (colored)

Sync with HEAD.

Revision 1.176.2.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:01 2011 UTC (12 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.176.2.3: +11 -12 lines
Diff to previous 1.176.2.3 (colored) to branchpoint 1.176 (colored) next main 1.177 (colored)

sync with head

Revision 1.184 / (download) - annotate - [select for diffs], Sat May 14 18:50:07 2011 UTC (12 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.183: +5 -4 lines
Diff to previous 1.183 (colored)

fork1: fix stop-on-fork case, lend a correct lock to LWP for LSSTOP state.

Fixes PR/44935.

Revision 1.183 / (download) - annotate - [select for diffs], Sun May 1 01:15:18 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.182: +7 -12 lines
Diff to previous 1.182 (colored)

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

Revision 1.171.10.1 / (download) - annotate - [select for diffs], Fri Apr 29 08:20:15 2011 UTC (12 years, 10 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.171: +7 -4 lines
Diff to previous 1.171 (colored) next main 1.172 (colored)

Pull in lwp_setprivate/cpu_lwp_setprivate from -current.
Also pull in lwp_getpcb

Revision 1.182 / (download) - annotate - [select for diffs], Tue Apr 26 16:36:42 2011 UTC (12 years, 10 months ago) by joerg
Branch: MAIN
Changes since 1.181: +5 -5 lines
Diff to previous 1.181 (colored)

Remove IRIX emulation

Revision 1.181 / (download) - annotate - [select for diffs], Sun Apr 24 20:17:53 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.180: +5 -2 lines
Diff to previous 1.180 (colored)

- Move some checks into mqueue_get() and avoid some duplication.
- Simplify message queue descriptor unlinking and closure operations.
- Update proc_t::p_mqueue_cnt atomically.  Inherit it on fork().
- Use separate allocation for the name of message queue.

Revision 1.176.2.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:07 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.176.2.2: +1 -0 lines
Diff to previous 1.176.2.2 (colored) to branchpoint 1.176 (colored)

sync with head

Revision 1.180 / (download) - annotate - [select for diffs], Wed Mar 23 13:57:40 2011 UTC (12 years, 11 months ago) by joerg
Branch: MAIN
Changes since 1.179: +3 -2 lines
Diff to previous 1.179 (colored)

Preserve l_private across forks.

Revision 1.176.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:14 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.176.2.1: +21 -20 lines
Diff to previous 1.176.2.1 (colored) to branchpoint 1.176 (colored)

sync with head

Revision 1.179 / (download) - annotate - [select for diffs], Tue Jan 18 23:56:49 2011 UTC (13 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.178: +6 -4 lines
Diff to previous 1.178 (colored)

Copy PK_32 to p2->p_flag instead of doing it in the cpu_proc_fork hook.

Revision 1.175.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:27 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.175.2.1: +16 -16 lines
Diff to previous 1.175.2.1 (colored) to branchpoint 1.175 (colored) next main 1.176 (colored)

Sync with HEAD.

Revision 1.162.2.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:39 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.162.2.3: +18 -18 lines
Diff to previous 1.162.2.3 (colored) to branchpoint 1.162 (colored) next main 1.163 (colored)

sync with head.

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

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

Revision 1.176.2.1 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:53 2010 UTC (13 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.176: +3 -2 lines
Diff to previous 1.176 (colored)

sync with head

Revision 1.177 / (download) - annotate - [select for diffs], Sun Jun 13 04:13:31 2010 UTC (13 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.176: +3 -2 lines
Diff to previous 1.176 (colored)

increment p_nrlwps in lwp_create rather than letting callers do so
as it's always decremented by lwp_exit.  this fixes error recovery of
eg. aio_procinit.

Revision 1.175.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:09 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.175: +14 -2 lines
Diff to previous 1.175 (colored)

Sync with HEAD.

Revision 1.162.2.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:16 2010 UTC (13 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.162.2.2: +18 -20 lines
Diff to previous 1.162.2.2 (colored) to branchpoint 1.162 (colored)

sync with head

Revision 1.176 / (download) - annotate - [select for diffs], Mon Mar 1 21:10:16 2010 UTC (14 years ago) by darran
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.175: +14 -2 lines
Diff to previous 1.175 (colored)

DTrace: Add an SDT (Statically Defined Tracing) provider framework, and
implement most of the proc provider.  Adds proc:::create, exec,
exec_success, exec_faillure, signal_send, signal_discard, signal_handle,
lwp_create, lwp_start, lwp_exit.

Revision 1.175 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:10 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.174: +3 -3 lines
Diff to previous 1.174 (colored)

The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase).  Plenty of mix'n match upper/lowercase has creeped
into the tree since then.  Nuke the macros and convert all callsites
to lowercase.

no functional change

Revision 1.174 / (download) - annotate - [select for diffs], Wed Oct 21 21:12:06 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.173: +5 -19 lines
Diff to previous 1.173 (colored)

Remove uarea swap-out functionality:

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

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

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

Revision 1.172.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.172: +4 -4 lines
Diff to previous 1.172 (colored) next main 1.173 (colored)

Sync with HEAD.

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

Revision 1.162.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:46 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.162.2.1: +27 -30 lines
Diff to previous 1.162.2.1 (colored) to branchpoint 1.162 (colored)

sync with head.

Revision 1.171.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.171.2.1: +4 -4 lines
Diff to previous 1.171.2.1 (colored) to branchpoint 1.171 (colored) next main 1.172 (colored)

Sync with HEAD.

Revision 1.173 / (download) - annotate - [select for diffs], Tue Mar 24 21:00:06 2009 UTC (14 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.172: +4 -4 lines
Diff to previous 1.172 (colored)

use kauth instead of uid != 0

Revision 1.171.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.171: +2 -3 lines
Diff to previous 1.171 (colored)

Sync with HEAD.

Revision 1.157.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:18 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.157.6.4: +1 -1 lines
Diff to previous 1.157.6.4 (colored) to branchpoint 1.157 (colored) next main 1.158 (colored)

Sync with HEAD.

Revision 1.172 / (download) - annotate - [select for diffs], Sat Jan 17 07:02:35 2009 UTC (15 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.171: +2 -3 lines
Diff to previous 1.171 (colored)

malloc -> kmem_alloc.

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

Sync with HEAD.

Revision 1.171 / (download) - annotate - [select for diffs], Sat Oct 11 13:40:57 2008 UTC (15 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, 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, 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-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5-1, netbsd-5-0, netbsd-5, matt-nb5-mips64
Changes since 1.170: +3 -2 lines
Diff to previous 1.170 (colored)

Move uidinfo to its own module in kern_uidinfo.c and include in rump.
No functional change to uidinfo.

Revision 1.157.6.4 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.157.6.3: +5 -6 lines
Diff to previous 1.157.6.3 (colored) to branchpoint 1.157 (colored)

Sync with HEAD.

Revision 1.163.2.3 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:50 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.163.2.2: +24 -27 lines
Diff to previous 1.163.2.2 (colored) to branchpoint 1.163 (colored) next main 1.164 (colored)

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

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:35 2008 UTC (15 years, 8 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.169: +7 -8 lines
Diff to previous 1.169 (colored) next main 1.170 (colored)

Sync with head.

Revision 1.160.2.3 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:03 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.160.2.2: +7 -8 lines
Diff to previous 1.160.2.2 (colored) to branchpoint 1.160 (colored) next main 1.161 (colored)

sync with head.

Revision 1.170 / (download) - annotate - [select for diffs], Mon Jun 16 09:51:14 2008 UTC (15 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.169: +7 -8 lines
Diff to previous 1.169 (colored)

- PPWAIT is need only be locked by proc_lock, so move it to proc::p_lflag.
- Remove a few needless lock acquires from exec/fork/exit.
- Sprinkle branch hints.

No functional change.

Revision 1.157.6.3 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:36 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.157.6.2: +3 -2 lines
Diff to previous 1.157.6.2 (colored) to branchpoint 1.157 (colored)

Sync with HEAD.

Also fix build.

Revision 1.160.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.160.2.1: +20 -22 lines
Diff to previous 1.160.2.1 (colored) to branchpoint 1.160 (colored)

sync with head

Revision 1.169 / (download) - annotate - [select for diffs], Mon Jun 2 16:18:09 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Changes since 1.168: +3 -2 lines
Diff to previous 1.168 (colored)

Most contention on proc_lock is from getppid(), so cache the parent's PID.

Revision 1.168 / (download) - annotate - [select for diffs], Mon Jun 2 13:58:07 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.167: +4 -4 lines
Diff to previous 1.167 (colored)

If vfork(), we want the LWP to run fast and on the same CPU
as its parent, so that it can reuse the VM context and cache
footprint on the local CPU.

Revision 1.157.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:08 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.157.6.1: +44 -49 lines
Diff to previous 1.157.6.1 (colored) to branchpoint 1.157 (colored)

Sync with HEAD.

Revision 1.167 / (download) - annotate - [select for diffs], Sat May 31 13:04:14 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.166: +5 -5 lines
Diff to previous 1.166 (colored)

Hold proc_lock when sleeping on p_waitcv, not proc::p_lock.

Revision 1.166 / (download) - annotate - [select for diffs], Tue May 27 17:49:07 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.165: +4 -4 lines
Diff to previous 1.165 (colored)

tsleep -> kpause

Revision 1.165 / (download) - annotate - [select for diffs], Tue May 27 14:18:51 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.164: +12 -14 lines
Diff to previous 1.164 (colored)

Start profiling clock on new process before setting it running, in case
there is a preemption.

Revision 1.164 / (download) - annotate - [select for diffs], Mon May 19 17:06:02 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup-nbase
Changes since 1.163: +2 -3 lines
Diff to previous 1.163 (colored)

Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.160.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:08 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.160: +35 -37 lines
Diff to previous 1.160 (colored)

sync with head.

Revision 1.162.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:25 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.162: +2 -9 lines
Diff to previous 1.162 (colored)

sync with head.

Revision 1.163.2.2 / (download) - annotate - [select for diffs], Wed May 14 01:35:12 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.163.2.1: +2 -3 lines
Diff to previous 1.163.2.1 (colored) to branchpoint 1.163 (colored)

Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.

Revision 1.163.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:03 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.163: +3 -2 lines
Diff to previous 1.163 (colored)

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

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

Revision 1.163 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:03 2008 UTC (15 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.162: +2 -9 lines
Diff to previous 1.162 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.162 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:24 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.161: +18 -13 lines
Diff to previous 1.161 (colored)

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

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

Revision 1.161 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.160: +19 -19 lines
Diff to previous 1.160 (colored)

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

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

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

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

Revision 1.157.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:01 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.157: +11 -9 lines
Diff to previous 1.157 (colored)

Sync with HEAD.

Revision 1.122.2.11 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:01 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.10: +10 -9 lines
Diff to previous 1.122.2.10 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

sync with head.

Revision 1.157.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:13 2008 UTC (15 years, 11 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.157: +3 -2 lines
Diff to previous 1.157 (colored) next main 1.158 (colored)

sync with head.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Mar 23 17:40:25 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Branch point for: yamt-pf42
Changes since 1.159: +4 -3 lines
Diff to previous 1.159 (colored)

Undo 1.150 (Don't make root an exception when enforcing rlimits). No other
Unix behaves this way and it breaks too many things, e.g. web servers.

Revision 1.142.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:58 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.142.2.3: +4 -3 lines
Diff to previous 1.142.2.3 (colored) to branchpoint 1.142 (colored) next main 1.143 (colored)

sync with HEAD

Revision 1.159 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.158: +8 -8 lines
Diff to previous 1.158 (colored)

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

Revision 1.122.2.10 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:55 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.9: +3 -2 lines
Diff to previous 1.122.2.9 (colored) to branchpoint 1.122 (colored)

sync with head.

Revision 1.158 / (download) - annotate - [select for diffs], Sun Feb 24 18:30:07 2008 UTC (16 years ago) by dsl
Branch: MAIN
CVS Tags: matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base
Changes since 1.157: +3 -2 lines
Diff to previous 1.157 (colored)

Set p->p_trace_enabled in fork and whenever the controlling falgs change
instead of doing it in syscall_intern().
Note that syscall_intern() must still be called when the flags change
since many ports use a different copy of the syscall entry code when
tracing is enabled.

Revision 1.145.2.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:45 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.145.2.3: +16 -20 lines
Diff to previous 1.145.2.3 (colored) next main 1.146 (colored)

Sync with HEAD.

Revision 1.122.2.9 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:11 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.8: +3 -3 lines
Diff to previous 1.122.2.8 (colored) to branchpoint 1.122 (colored)

sync with head.

Revision 1.157 / (download) - annotate - [select for diffs], Mon Jan 28 20:09:06 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.156: +3 -3 lines
Diff to previous 1.156 (colored)

Authorize using the LWP cached credentials, not process credentials.

Revision 1.122.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:04 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.7: +22 -26 lines
Diff to previous 1.122.2.7 (colored) to branchpoint 1.122 (colored)

sync with head

Revision 1.142.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:02 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.142.2.2: +37 -45 lines
Diff to previous 1.142.2.2 (colored) to branchpoint 1.142 (colored)

sync with HEAD

Revision 1.152.4.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:32 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.152.4.1: +13 -9 lines
Diff to previous 1.152.4.1 (colored) to branchpoint 1.152 (colored) next main 1.153 (colored)

Sync with HEAD

Revision 1.156 / (download) - annotate - [select for diffs], Mon Jan 7 23:51:06 2008 UTC (16 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.155: +15 -11 lines
Diff to previous 1.155 (colored)

Make fork use kauth.

Been running in my tree for over a month at least.

Reviewed and okay yamt@, and special thanks to him as well as rittera@
for making this possible through fixing NDIS to not call fork1() with
l1 != curlwp.

Revision 1.152.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:50 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.152: +9 -17 lines
Diff to previous 1.152 (colored)

Sync with HEAD

Revision 1.155 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:49 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.154: +3 -3 lines
Diff to previous 1.154 (colored)

Merge vmlocking2 to head.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Dec 31 15:32:11 2007 UTC (16 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.153: +2 -10 lines
Diff to previous 1.153 (colored)

Remove systrace. Ok core@.

Revision 1.145.2.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:45:59 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.145.2.2: +8 -8 lines
Diff to previous 1.145.2.2 (colored)

Sync with HEAD.

Revision 1.149.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 23:07:24 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.149.2.2: +3 -3 lines
Diff to previous 1.149.2.2 (colored) to branchpoint 1.149 (colored) next main 1.150 (colored)

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

Revision 1.149.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:39 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.149.2.1: +8 -8 lines
Diff to previous 1.149.2.1 (colored) to branchpoint 1.149 (colored)

Sync with head.

Revision 1.153 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:08 2007 UTC (16 years, 2 months ago) by dsl
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.152: +8 -8 lines
Diff to previous 1.152 (colored)

Convert all the system call entry points from:
    int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.

Revision 1.141.6.7 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:16 2007 UTC (16 years, 2 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.141.6.6: +18 -22 lines
Diff to previous 1.141.6.6 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored)

Sync with HEAD.

Revision 1.145.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:28 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.145.2.1: +19 -23 lines
Diff to previous 1.145.2.1 (colored)

Sync with HEAD.

Revision 1.149.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:40 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.149: +17 -21 lines
Diff to previous 1.149 (colored)

Sync with head.

Revision 1.122.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:41 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.6: +19 -23 lines
Diff to previous 1.122.2.6 (colored) to branchpoint 1.122 (colored)

sync with head

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

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

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

Use atomics to maintain nprocs.

Revision 1.150 / (download) - annotate - [select for diffs], Mon Dec 3 22:37:34 2007 UTC (16 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.149: +4 -6 lines
Diff to previous 1.149 (colored)

Don't make root an exception when enforcing rlimits.

Suggested by yamt@ months ago; okay christos@.

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

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

Revision 1.141.6.6 / (download) - annotate - [select for diffs], Tue Nov 27 19:38:03 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.141.6.5: +3 -3 lines
Diff to previous 1.141.6.5 (colored) to branchpoint 1.141 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.148 / (download) - annotate - [select for diffs], Tue Nov 27 01:27:30 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking-nbase
Changes since 1.147: +3 -3 lines
Diff to previous 1.147 (colored)

Tidy up the sigacts locking a bit: sigacts can be shared between
multiple processes.

Revision 1.145.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:37 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.145: +6 -7 lines
Diff to previous 1.145 (colored)

Sync with HEAD.

Revision 1.122.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:41 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.5: +6 -7 lines
Diff to previous 1.122.2.5 (colored) to branchpoint 1.122 (colored)

sync with head.

Revision 1.144.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:02 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.144: +8 -9 lines
Diff to previous 1.144 (colored) next main 1.145 (colored)

Sync with HEAD

Revision 1.141.6.5 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:02 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.141.6.4: +3 -4 lines
Diff to previous 1.141.6.4 (colored) to branchpoint 1.141 (colored)

Sync with HEAD.

Revision 1.142.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:01 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.142.2.1: +3 -4 lines
Diff to previous 1.142.2.1 (colored) to branchpoint 1.142 (colored)

sync with -HEAD

Revision 1.147 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:21 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.146: +3 -4 lines
Diff to previous 1.146 (colored)

Merge from vmlocking:

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

Revision 1.142.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:34 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.142: +22 -21 lines
Diff to previous 1.142 (colored)

sync with HEAD

Revision 1.141.6.4 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:27 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.141.6.3: +5 -5 lines
Diff to previous 1.141.6.3 (colored) to branchpoint 1.141 (colored)

Sync with HEAD.

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

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

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

Revision 1.136.2.10 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:17 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.136.2.9: +5 -5 lines
Diff to previous 1.136.2.9 (colored) next main 1.137 (colored)

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

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

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

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

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

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

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

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

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

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

- newlwp -> lwp_create

Revision 1.141.6.3 / (download) - annotate - [select for diffs], Sun Oct 28 20:11:11 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.141.6.2: +4 -4 lines
Diff to previous 1.141.6.2 (colored) to branchpoint 1.141 (colored)

Sync with HEAD.

Revision 1.122.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:22 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.4: +19 -18 lines
Diff to previous 1.122.2.4 (colored) to branchpoint 1.122 (colored)

sync with head.

Revision 1.136.2.9 / (download) - annotate - [select for diffs], Thu Oct 25 19:43:09 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.136.2.8: +3 -4 lines
Diff to previous 1.136.2.8 (colored)

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

Revision 1.145 / (download) - annotate - [select for diffs], Wed Oct 24 14:50:40 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Branch point for: mjf-devfs
Changes since 1.144: +4 -4 lines
Diff to previous 1.144 (colored)

Make ras_lookup() lockless.

Revision 1.136.2.8 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:25 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.136.2.7: +17 -16 lines
Diff to previous 1.136.2.7 (colored)

Sync with head.

Revision 1.143.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:28:42 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.143: +17 -16 lines
Diff to previous 1.143 (colored) next main 1.144 (colored)

sync with head.

Revision 1.141.6.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:59 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.141.6.1: +17 -16 lines
Diff to previous 1.141.6.1 (colored) to branchpoint 1.141 (colored)

Sync with HEAD.

Revision 1.144 / (download) - annotate - [select for diffs], Sat Sep 29 12:22:30 2007 UTC (16 years, 5 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.143: +17 -16 lines
Diff to previous 1.143 (colored)

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

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

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

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

Revision 1.122.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:47 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.3: +18 -36 lines
Diff to previous 1.122.2.3 (colored) to branchpoint 1.122 (colored)

sync with head.

Revision 1.141.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 10:22:59 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.141: +5 -7 lines
Diff to previous 1.141 (colored) next main 1.142 (colored)

Sync with HEAD.

Revision 1.136.2.7 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:30 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.136.2.6: +5 -7 lines
Diff to previous 1.136.2.6 (colored)

Sync with HEAD.

Revision 1.141.6.1 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:30 2007 UTC (16 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.141: +5 -7 lines
Diff to previous 1.141 (colored)

Sync with HEAD.

Revision 1.142 / (download) - annotate - [select for diffs], Wed Aug 15 12:07:33 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Branch point for: matt-armv6
Changes since 1.141: +5 -7 lines
Diff to previous 1.141 (colored)

Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.

Revision 1.136.2.6 / (download) - annotate - [select for diffs], Sun Jul 15 13:27:37 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.136.2.5: +3 -3 lines
Diff to previous 1.136.2.5 (colored)

Sync with head.

Revision 1.136.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:47 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.136: +11 -27 lines
Diff to previous 1.136 (colored) next main 1.137 (colored)

Sync with head.

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

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

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

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

splstatclock, spllock -> splhigh

Revision 1.136.2.5 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:18 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.136.2.4: +5 -21 lines
Diff to previous 1.136.2.4 (colored)

Sync with head.

Revision 1.139 / (download) - annotate - [select for diffs], Thu May 17 14:51:39 2007 UTC (16 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.138: +4 -20 lines
Diff to previous 1.138 (colored)

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

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

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

Revision 1.131.2.8 / (download) - annotate - [select for diffs], Mon May 7 10:55:46 2007 UTC (16 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.131.2.7: +3 -2 lines
Diff to previous 1.131.2.7 (colored) next main 1.132 (colored)

sync with head.

Revision 1.138 / (download) - annotate - [select for diffs], Mon Apr 30 14:44:30 2007 UTC (16 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.137: +3 -2 lines
Diff to previous 1.137 (colored)

Import of POSIX Asynchronous I/O.
Seems to be quite stable. Some work still left to do.

Please note, that syscalls are not yet MP-safe, because
of the file and vnode subsystems.

Reviewed by: <tech-kern>, <ad>

Revision 1.136.2.4 / (download) - annotate - [select for diffs], Tue Apr 10 11:21:16 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.136.2.3: +4 -3 lines
Diff to previous 1.136.2.3 (colored)

proc_trampoline_mp: don't grab kernel_lock for LWPs marked as MP safe.

Revision 1.136.2.3 / (download) - annotate - [select for diffs], Thu Apr 5 21:38:35 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.136.2.2: +4 -5 lines
Diff to previous 1.136.2.2 (colored)

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

Revision 1.131.2.7 / (download) - annotate - [select for diffs], Sat Mar 24 17:13:14 2007 UTC (16 years, 11 months ago) by ad
Branch: yamt-idlelwp
Changes since 1.131.2.6: +2 -12 lines
Diff to previous 1.131.2.6 (colored)

- Ensure that context switch always happens at least at IPL_SCHED, even
  if no spin lock is held. Should fix the assertion failure seen on hppa.
- Reduce the amount of spl frobbing in mi_switch.
- Add some comments.

Reviewed by yamt@.

Revision 1.131.2.6 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:01 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.131.2.5: +3 -3 lines
Diff to previous 1.131.2.5 (colored)

sync with head.

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

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

Revision 1.131.2.5 / (download) - annotate - [select for diffs], Sat Mar 17 16:54:37 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.131.2.4: +3 -3 lines
Diff to previous 1.131.2.4 (colored)

Do not do an implicit enqueue in sched_switch(), move enqueueing back to
the dispatcher. Rename sched_switch() back to sched_nextlwp(). Add for
sched_enqueue() new argument, which indicates the calling from mi_switch().

Requested by yamt@

Revision 1.136.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:53 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored)

Sync with head.

Revision 1.137 / (download) - annotate - [select for diffs], Tue Mar 13 00:35:44 2007 UTC (16 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored)

Sync with kern_proc.c: make p2->p_rasmutex a spin mutex at IPL_SCHED.

Revision 1.131.2.4 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:34 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.131.2.3: +6 -6 lines
Diff to previous 1.131.2.3 (colored)

Sync with HEAD.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:24 2007 UTC (16 years, 11 months ago) by ad
Branch: MAIN
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.135: +4 -4 lines
Diff to previous 1.135 (colored)

- Make the proclist_lock a mutex. The write:read ratio is unfavourable,
  and mutexes are cheaper use than RW locks.
- LOCK_ASSERT -> KASSERT in some places.
- Hold proclist_lock/kernel_lock longer in a couple of places.

Revision 1.135 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:03 2007 UTC (17 years ago) by christos
Branch: MAIN
Changes since 1.134: +4 -4 lines
Diff to previous 1.134 (colored)

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

Revision 1.131.2.3 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:21 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.131.2.2: +8 -8 lines
Diff to previous 1.131.2.2 (colored)

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

Revision 1.122.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:06 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.2: +117 -58 lines
Diff to previous 1.122.2.2 (colored) to branchpoint 1.122 (colored)

sync with head.

Revision 1.134 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:43 2007 UTC (17 years ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored)

TRUE -> true, FALSE -> false

Revision 1.133 / (download) - annotate - [select for diffs], Wed Feb 21 23:48:13 2007 UTC (17 years ago) by thorpej
Branch: MAIN
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored)

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

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

Revision 1.131.2.2 / (download) - annotate - [select for diffs], Tue Feb 20 21:48:45 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.131.2.1: +4 -4 lines
Diff to previous 1.131.2.1 (colored)

General Common Scheduler Framework (CSF) patch import. Huge thanks for
Daniel Sieger <dsieger at TechFak.Uni-Bielefeld de> for this work.

Short abstract: Split the dispatcher from the scheduler in order to
make the scheduler more modular. Introduce initial API for other
schedulers' implementations.

Discussed in tech-kern@
OK: yamt@, ad@

Note: further work will go soon.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:42 2007 UTC (17 years ago) by pavel
Branch: MAIN
Changes since 1.131: +6 -6 lines
Diff to previous 1.131 (colored)

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

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

Reviewed by Andrew Doran.

Revision 1.131.2.1 / (download) - annotate - [select for diffs], Sat Feb 17 10:30:55 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.131: +6 -12 lines
Diff to previous 1.131 (colored)

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

Revision 1.131 / (download) - annotate - [select for diffs], Thu Feb 15 15:13:10 2007 UTC (17 years ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.130: +6 -2 lines
Diff to previous 1.130 (colored)

Restore proc::p_userret in a limited way for Linux compat. XXX

Revision 1.130 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:30 2007 UTC (17 years ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.129: +109 -53 lines
Diff to previous 1.129 (colored)

Merge newlock2 to head.

Revision 1.126.4.10 / (download) - annotate - [select for diffs], Mon Feb 5 16:44:40 2007 UTC (17 years ago) by ad
Branch: newlock2
Changes since 1.126.4.9: +4 -4 lines
Diff to previous 1.126.4.9 (colored) to branchpoint 1.126 (colored) next main 1.127 (colored)

IPL_STATCLOCK needs to be >= IPL_CLOCK, so assume that proc::p_stmutex is
always a spinlock.

Revision 1.126.4.9 / (download) - annotate - [select for diffs], Mon Feb 5 13:16:48 2007 UTC (17 years ago) by ad
Branch: newlock2
Changes since 1.126.4.8: +9 -6 lines
Diff to previous 1.126.4.8 (colored) to branchpoint 1.126 (colored)

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

Revision 1.126.4.8 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:38 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.126.4.7: +7 -13 lines
Diff to previous 1.126.4.7 (colored) to branchpoint 1.126 (colored)

Sync with head.

Revision 1.126.4.7 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:40 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.126.4.6: +2 -3 lines
Diff to previous 1.126.4.6 (colored) to branchpoint 1.126 (colored)

Remove support for SA. Ok core@.

Revision 1.126.4.6 / (download) - annotate - [select for diffs], Sat Jan 27 01:14:54 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.126.4.5: +3 -3 lines
Diff to previous 1.126.4.5 (colored) to branchpoint 1.126 (colored)

Drop proclist_mutex and proc::p_smutex back to IPL_VM.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jan 15 17:45:33 2007 UTC (17 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.128: +3 -4 lines
Diff to previous 1.128 (colored)

Introduce kauth_proc_fork() to control credential inheritance.

Revision 1.122.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:05 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122.2.1: +4 -4 lines
Diff to previous 1.122.2.1 (colored) to branchpoint 1.122 (colored)

sync with head.

Revision 1.126.4.5 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:43 2006 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.126.4.4: +25 -9 lines
Diff to previous 1.126.4.4 (colored) to branchpoint 1.126 (colored)

Checkpoint work in progress.

Revision 1.126.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:44 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.126.6.1: +5 -5 lines
Diff to previous 1.126.6.1 (colored) to branchpoint 1.126 (colored) next main 1.127 (colored)

sync with head.

Revision 1.126.4.4 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:36 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.126.4.3: +74 -57 lines
Diff to previous 1.126.4.3 (colored) to branchpoint 1.126 (colored)

Checkpoint work in progress.

Revision 1.128 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, 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, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.127: +5 -5 lines
Diff to previous 1.127 (colored)

remove some __unused from function parameters.

Revision 1.126.4.3 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.126.4.2: +3 -4 lines
Diff to previous 1.126.4.2 (colored) to branchpoint 1.126 (colored)

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

Revision 1.126.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:10 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.126: +5 -5 lines
Diff to previous 1.126 (colored)

sync with head

Revision 1.126.4.2 / (download) - annotate - [select for diffs], Sat Oct 21 15:20:46 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.126.4.1: +27 -9 lines
Diff to previous 1.126.4.1 (colored) to branchpoint 1.126 (colored)

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

Revision 1.127 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:15 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.126: +5 -5 lines
Diff to previous 1.126 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.126.4.1 / (download) - annotate - [select for diffs], Mon Sep 11 18:07:25 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.126: +15 -6 lines
Diff to previous 1.126 (colored)

- Convert some lockmgr() locks to mutexes and RW locks.
- Acquire proclist_lock and p_crmutex in some obvious places.

Revision 1.123.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:16 2006 UTC (17 years, 5 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.123: +8 -8 lines
Diff to previous 1.123 (colored) next main 1.124 (colored)

sync with head

Revision 1.123.8.3 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:46 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.123.8.2: +4 -4 lines
Diff to previous 1.123.8.2 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored)

sync with head

Revision 1.126 / (download) - annotate - [select for diffs], Mon Jul 17 15:29:06 2006 UTC (17 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.125: +4 -4 lines
Diff to previous 1.125 (colored)

- Always make p->p_cred a private copy before modifying.
- Share credentials among processes when forking.

Revision 1.123.8.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:56 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.123.8.1: +3 -3 lines
Diff to previous 1.123.8.1 (colored) to branchpoint 1.123 (colored)

sync with head.

Revision 1.122.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:37 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.122: +8 -8 lines
Diff to previous 1.122 (colored)

sync with head.

Revision 1.124.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:07:15 2006 UTC (17 years, 8 months ago) by chap
Branch: chap-midi
Changes since 1.124: +3 -3 lines
Diff to previous 1.124 (colored) next main 1.125 (colored)

Sync with head.

Revision 1.125 / (download) - annotate - [select for diffs], Wed Jun 7 22:33:39 2006 UTC (17 years, 8 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Changes since 1.124: +3 -3 lines
Diff to previous 1.124 (colored)

merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.123.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:07 2006 UTC (17 years, 9 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.123.6.1: +7 -7 lines
Diff to previous 1.123.6.1 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored)

Sync with head.

Revision 1.123.12.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:40 2006 UTC (17 years, 9 months ago) by tron
Branch: peter-altq
Changes since 1.123: +7 -7 lines
Diff to previous 1.123 (colored) next main 1.124 (colored)

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

Revision 1.123.8.1 / (download) - annotate - [select for diffs], Wed May 24 10:58:41 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.123: +7 -7 lines
Diff to previous 1.123 (colored)

sync with head.

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

integrate kauth.

Revision 1.123.10.2 / (download) - annotate - [select for diffs], Sat May 6 23:31:30 2006 UTC (17 years, 10 months ago) by christos
Branch: elad-kernelauth
Changes since 1.123.10.1: +3 -2 lines
Diff to previous 1.123.10.1 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored)

- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.123.10.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:40 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.123: +6 -7 lines
Diff to previous 1.123 (colored)

Adapt to kernel authorization KPI.

Revision 1.123.6.1 / (download) - annotate - [select for diffs], Sat Feb 4 14:30:17 2006 UTC (18 years, 1 month ago) by simonb
Branch: simonb-timecounters
Changes since 1.123: +3 -3 lines
Diff to previous 1.123 (colored)

Adapt for timecounters: mostly use get*time() and use "time_second"
instead of "time.tv_sec".

Revision 1.123 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:29 2005 UTC (18 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.122: +2 -2 lines
Diff to previous 1.122 (colored)

merge ktrace-lwp.

Revision 1.109.2.7 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:44 2005 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.6: +7 -4 lines
Diff to previous 1.109.2.6 (colored) next main 1.110 (colored)

Sync with HEAD. Here we go again...

Revision 1.121.2.2 / (download) - annotate - [select for diffs], Mon May 23 19:09:56 2005 UTC (18 years, 9 months ago) by riz
Branch: netbsd-3
CVS Tags: 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
Changes since 1.121.2.1: +2 -5 lines
Diff to previous 1.121.2.1 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored)

Revert pullup ticket #316, because it breaks kernel compiles. A more
complete pullup request is forthcoming.
(requested by cube in ticket #341)

Revision 1.121.2.1 / (download) - annotate - [select for diffs], Sun May 22 19:33:34 2005 UTC (18 years, 9 months ago) by snj
Branch: netbsd-3
Changes since 1.121: +7 -4 lines
Diff to previous 1.121 (colored)

Pull up revision 1.122 (requested by cube in ticket #316):
Add P_CLDSIGIGN, P_NOCLDSTOP and P_NOCLDWAIT to the list of flags we want
to inherit from the parent process.

Revision 1.122 / (download) - annotate - [select for diffs], Tue May 17 19:22:19 2005 UTC (18 years, 9 months ago) by cube
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.121: +7 -4 lines
Diff to previous 1.121 (colored)

Add P_CLDSIGIGN, P_NOCLDSTOP and P_NOCLDWAIT to the list of flags we want
to inherit from the parent process.

Revision 1.119.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:23 2005 UTC (18 years, 10 months ago) by kent
Branch: kent-audio2
Changes since 1.119: +12 -10 lines
Diff to previous 1.119 (colored) next main 1.120 (colored)

sync with -current

Revision 1.119.6.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:11 2005 UTC (18 years, 11 months ago) by yamt
Branch: yamt-km
Changes since 1.119: +12 -10 lines
Diff to previous 1.119 (colored) next main 1.120 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.109.2.6 / (download) - annotate - [select for diffs], Fri Mar 4 16:51:58 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.5: +12 -10 lines
Diff to previous 1.109.2.5 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.121 / (download) - annotate - [select for diffs], Wed Mar 2 11:05:34 2005 UTC (19 years ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.120: +5 -3 lines
Diff to previous 1.120 (colored)

Copyright maintenance.

Revision 1.120 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (19 years ago) by perry
Branch: MAIN
Changes since 1.119: +9 -9 lines
Diff to previous 1.119 (colored)

nuke trailing whitespace

Revision 1.109.2.5 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:03 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.4: +2 -2 lines
Diff to previous 1.109.2.4 (colored)

Fix the sync with head I botched.

Revision 1.109.2.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:02 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.3: +4 -7 lines
Diff to previous 1.109.2.3 (colored)

Sync with HEAD.

Revision 1.119 / (download) - annotate - [select for diffs], Fri Sep 17 23:20:21 2004 UTC (19 years, 5 months ago) by enami
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.118: +4 -7 lines
Diff to previous 1.118 (colored)

- proc_alloc() already initializes p_stat to SIDL.
- copy unconditionaly inherited p_flag bits in a single place.

Revision 1.114.2.3 / (download) - annotate - [select for diffs], Sun Aug 15 14:06:29 2004 UTC (19 years, 6 months ago) by tron
Branch: netbsd-2-0
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-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
Changes since 1.114.2.2: +3 -3 lines
Diff to previous 1.114.2.2 (colored) to branchpoint 1.114 (colored) next main 1.115 (colored)

Pull up revision 1.117 (requested by jdolecek in ticket #762):
pass the fork flags down the emulation proc fork hook

Revision 1.109.2.3 / (download) - annotate - [select for diffs], Thu Aug 12 11:42:19 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.2: +12 -4 lines
Diff to previous 1.109.2.2 (colored)

Sync with HEAD.

Revision 1.114.2.2 / (download) - annotate - [select for diffs], Thu Aug 12 03:48:29 2004 UTC (19 years, 6 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.114.2.1: +4 -3 lines
Diff to previous 1.114.2.1 (colored) to branchpoint 1.114 (colored)

Pullup rev 1.116 (requested by atatat in ticket #744)

When stopfork is set, we need to set p_nrlwps, since we are not going to
be running. PR#26468

Revision 1.114.2.1 / (download) - annotate - [select for diffs], Wed Aug 11 19:56:58 2004 UTC (19 years, 6 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.114: +9 -2 lines
Diff to previous 1.114 (colored)

Pullup rev 1.118 (requested by jdolecek in ticket #741)

Linux enforces CLONE_VM if CLONE_SIGHAND in clone(2) is specified,
follow the suit - this is intended to be Linux-compatible call.

Revision 1.118 / (download) - annotate - [select for diffs], Sun Aug 8 11:02:10 2004 UTC (19 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.117: +9 -2 lines
Diff to previous 1.117 (colored)

Linux enforces CLONE_VM if CLONE_SIGHAND in clone(2) is specified,
follow the suit - this is intended to be Linux-compatible call

Revision 1.117 / (download) - annotate - [select for diffs], Sun Aug 8 11:00:05 2004 UTC (19 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored)

pass the fork flags down the emulation proc fork hook

Revision 1.116 / (download) - annotate - [select for diffs], Sat Aug 7 03:35:55 2004 UTC (19 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.115: +4 -3 lines
Diff to previous 1.115 (colored)

PR/26468: Andrew Brown: Setting stopfork can panic the kernel.
When stopfork is set, we need to set p_nrlwps, since we are not going to
ber running.

Revision 1.109.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:44 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.109.2.1: +15 -15 lines
Diff to previous 1.109.2.1 (colored)

Sync with HEAD

Revision 1.115 / (download) - annotate - [select for diffs], Thu May 6 22:20:30 2004 UTC (19 years, 10 months ago) by pk
Branch: MAIN
Changes since 1.114: +5 -3 lines
Diff to previous 1.114 (colored)

Provide a mutex for the process limits data structure.

Revision 1.114 / (download) - annotate - [select for diffs], Thu Feb 12 23:47:21 2004 UTC (20 years ago) by enami
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored)

Also defer the writing of KTR_EMUL entry.  Otherwise, the parent process
may sleep with setting KTRFAC_ACTIVE of child process and the child will
run without emitting any ktrace entry.

Revision 1.113 / (download) - annotate - [select for diffs], Wed Nov 12 21:07:38 2003 UTC (20 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.112: +7 -5 lines
Diff to previous 1.112 (colored)

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

Welcome to 1.6ZF

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

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

Revision 1.111 / (download) - annotate - [select for diffs], Tue Sep 16 12:06:07 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.110: +4 -2 lines
Diff to previous 1.110 (colored)

add siginfo lock and siginfo queue initialization.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:45 2003 UTC (20 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.109: +3 -7 lines
Diff to previous 1.109 (colored)

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

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

Revision 1.109.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:37 2003 UTC (20 years, 8 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.109 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:20 2003 UTC (20 years, 8 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.108: +1 -1 lines
Diff to previous 1.108 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.108 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:54 2003 UTC (20 years, 8 months ago) by darrenr
Branch: MAIN
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.107 / (download) - annotate - [select for diffs], Wed Mar 19 11:36:33 2003 UTC (20 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.106: +15 -89 lines
Diff to previous 1.106 (colored)

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

Revision 1.106 / (download) - annotate - [select for diffs], Fri Jan 24 01:42:53 2003 UTC (21 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.105: +8 -2 lines
Diff to previous 1.105 (colored)

Add "fork hooks", a'la "exec hooks" and "exit hooks" which allow
subsystems to do special processing to the parent and/or child at
fork time.

Revision 1.105 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:26 2003 UTC (21 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.104: +39 -44 lines
Diff to previous 1.104 (colored)

Merge the nathanw_sa branch.

Revision 1.84.2.23 / (download) - annotate - [select for diffs], Thu Dec 19 00:50:42 2002 UTC (21 years, 2 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.84.2.22: +13 -3 lines
Diff to previous 1.84.2.22 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored)

Sync with HEAD.

Revision 1.104.2.1 / (download) - annotate - [select for diffs], Wed Dec 18 01:06:08 2002 UTC (21 years, 2 months ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.104: +4 -6 lines
Diff to previous 1.104 (colored) next main 1.105 (colored)

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

Revision 1.84.2.22 / (download) - annotate - [select for diffs], Sun Dec 15 23:32:00 2002 UTC (21 years, 2 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.84.2.21: +3 -5 lines
Diff to previous 1.84.2.21 (colored) to branchpoint 1.84 (colored)

Add an "inmem" argument to newlwp(), and use it to properly set
up L_INMEM in the new LWP.  Should fix a problem mentioned to me
by Nick Hudson.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Dec 12 20:41:45 2002 UTC (21 years, 2 months ago) by jdolecek
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: gmcgarry_ucred
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

replace magic number '500' in pid allocation code with a macro PID_SKIP,
defined in <sys/proc.h> (along PID_MAX, NO_PID)

Revision 1.103 / (download) - annotate - [select for diffs], Wed Dec 11 18:09:07 2002 UTC (21 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.102: +12 -2 lines
Diff to previous 1.102 (colored)

put back portion of fork-bomb protection removed in last commit,
and make the sleep length depend on value of variable forkfsleep;
it's set to zero by default (no sleep)
this is a preparation for making the sleep length settable via sysctl

Revision 1.84.2.21 / (download) - annotate - [select for diffs], Wed Dec 11 15:44:47 2002 UTC (21 years, 2 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.84.2.20: +2 -4 lines
Diff to previous 1.84.2.20 (colored) to branchpoint 1.84 (colored)

Sync with HEAD.

Revision 1.84.2.20 / (download) - annotate - [select for diffs], Wed Dec 11 06:43:03 2002 UTC (21 years, 2 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.84.2.19: +31 -20 lines
Diff to previous 1.84.2.19 (colored) to branchpoint 1.84 (colored)

Sync with HEAD.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Dec 11 05:01:22 2002 UTC (21 years, 2 months ago) by groo
Branch: MAIN
Changes since 1.101: +2 -4 lines
Diff to previous 1.101 (colored)

Remove portion of fork-bomb protection that has unfortunate side effects.

Revision 1.101 / (download) - annotate - [select for diffs], Thu Dec 5 16:24:46 2002 UTC (21 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.100: +13 -5 lines
Diff to previous 1.100 (colored)

Couple fork-bomb defense changes:

- leave 5 processes for root-only use, the previous value of 1
  was unsufficient to execute additional commands once logged, and
  perhaps also not enough to actually login remotely with recent (open)sshd
- protect the log of "proc: table full" with ratecheck(), so that
  the message is only logged once per 10 seconds; though syslogd normally
  doesn't pass the repeated messages through, this avoids flooding
  syslogd and potentially also screen/logs
- If the process hits either system limit of number of processes in system,
  or user's limit of same, force the process to sleep for 0.5 seconds
  before returning failure. This turns 2000 rampaging fork monsters into
  2000 harmlessly snoozing fork monsters.
  The sleep is intentionally uninterruptible by signals.

These are not intended as ultimate protection agains fork-bombs.
Determined attacker can eat CPU differently than via repeating
fork() calls. But this is good enough to help protect against
programming mistakes or simple-minded tests.

Based on FreeBSD kern_fork.c change in revision 1.132 by
Mike Silbersack <silby at FreeBSD org>

Change also discussed on tech-kern@NetBSD.org, thread
'Fork bomb protection patch'.

Revision 1.100 / (download) - annotate - [select for diffs], Sat Nov 30 11:20:51 2002 UTC (21 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.99: +4 -4 lines
Diff to previous 1.99 (colored)

cosmetic fix

Revision 1.99 / (download) - annotate - [select for diffs], Sun Nov 17 08:32:44 2002 UTC (21 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.98: +6 -5 lines
Diff to previous 1.98 (colored)

change uvm_uarea_alloc() to indicate whether the returned uarea is already
backed by physical pages (ie. because it reused a previously-freed one),
so that we can skip a bunch of useless work in that case.
this fixes the underlying problem behind PR 18543, and also speeds up fork()
quite a bit (eg. 7% on my pc, 1% on my ultra2) when we get a cache hit.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Nov 13 00:51:02 2002 UTC (21 years, 3 months ago) by provos
Branch: MAIN
Changes since 1.97: +12 -12 lines
Diff to previous 1.97 (colored)

fix systrace panic that was introduced when postponing pid number allocation
approved itojun

Revision 1.84.2.19 / (download) - annotate - [select for diffs], Tue Nov 12 09:24:30 2002 UTC (21 years, 3 months ago) by skrll
Branch: nathanw_sa
Changes since 1.84.2.18: +2 -3 lines
Diff to previous 1.84.2.18 (colored) to branchpoint 1.84 (colored)

Reapply a fix lost in the catch up to -current.

Revision 1.84.2.18 / (download) - annotate - [select for diffs], Mon Nov 11 22:13:42 2002 UTC (21 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.17: +102 -82 lines
Diff to previous 1.84.2.17 (colored) to branchpoint 1.84 (colored)

Catch up to -current

Revision 1.97 / (download) - annotate - [select for diffs], Thu Nov 7 00:22:29 2002 UTC (21 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.96: +18 -5 lines
Diff to previous 1.96 (colored)

Added two sysctl-able flags: proc.curproc.stopfork and proc.curproc.stopexec
that can be used to block a process after fork(2) or exec(2) calls. The
new process is created in the SSTOP state and is never scheduled for running.

This feature is designed so that it is esay to attach the process using gdb
before it has done anything.

It works also with sproc, kthread_create, clone...

Revision 1.96 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:17 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.95: +7 -2 lines
Diff to previous 1.95 (colored)

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.95 / (download) - annotate - [select for diffs], Mon Oct 21 17:37:53 2002 UTC (21 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: kqueue-beforemerge
Changes since 1.94: +81 -81 lines
Diff to previous 1.94 (colored)

Move pid allocation to the bottom of the process allocation, so that we
don't have to deal with partially initialized proc structs in the scheduler.
Pointed out by: Artur Grabowski and Chuck Silvers.

Revision 1.84.2.17 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:52 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.16: +2 -7 lines
Diff to previous 1.84.2.16 (colored) to branchpoint 1.84 (colored)

Catch up to -current.

Revision 1.86.2.4 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:07 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.86.2.3: +4 -9 lines
Diff to previous 1.86.2.3 (colored) to branchpoint 1.86 (colored) next main 1.87 (colored)

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

Revision 1.94 / (download) - annotate - [select for diffs], Wed Sep 25 22:21:42 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.93: +2 -3 lines
Diff to previous 1.93 (colored)

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

Revision 1.93 / (download) - annotate - [select for diffs], Sun Sep 22 07:20:29 2002 UTC (21 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.92: +4 -8 lines
Diff to previous 1.92 (colored)

encapsulate knowledge of uarea allocation in some new functions.

Revision 1.84.2.16 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:03 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.15: +8 -0 lines
Diff to previous 1.84.2.15 (colored) to branchpoint 1.84 (colored)

Catch up to -current.

Revision 1.86.2.3 / (download) - annotate - [select for diffs], Fri Sep 6 08:47:48 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.86.2.2: +102 -87 lines
Diff to previous 1.86.2.2 (colored) to branchpoint 1.86 (colored)

sync kqueue branch with HEAD

Revision 1.88.8.3 / (download) - annotate - [select for diffs], Thu Aug 29 05:23:07 2002 UTC (21 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.88.8.2: +12 -2 lines
Diff to previous 1.88.8.2 (colored) to branchpoint 1.88 (colored) next main 1.89 (colored)

catch up with -current.

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

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

Revision 1.84.2.15 / (download) - annotate - [select for diffs], Tue Aug 13 02:20:05 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.14: +2 -0 lines
Diff to previous 1.84.2.14 (colored) to branchpoint 1.84 (colored)

Catch up to -current.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Aug 6 13:58:08 2002 UTC (21 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.90: +4 -2 lines
Diff to previous 1.90 (colored)

Add FORK_CLEANFILES flag to fork1(), which makes the new process start out
with a clean descriptor set (ie. not copied or shared from parent).

for rfork()

Revision 1.84.2.14 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:19 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.13: +4 -4 lines
Diff to previous 1.84.2.13 (colored) to branchpoint 1.84 (colored)

Catch up to -current.

Revision 1.84.2.13 / (download) - annotate - [select for diffs], Wed Jul 17 18:03:06 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.12: +2 -3 lines
Diff to previous 1.84.2.12 (colored) to branchpoint 1.84 (colored)

Whitespace.

Revision 1.88.8.2 / (download) - annotate - [select for diffs], Mon Jul 15 10:36:31 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.88.8.1: +4 -4 lines
Diff to previous 1.88.8.1 (colored) to branchpoint 1.88 (colored)

catch up with -current.

Revision 1.84.2.12 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:16 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.11: +2 -3 lines
Diff to previous 1.84.2.11 (colored) to branchpoint 1.84 (colored)

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

Revision 1.90 / (download) - annotate - [select for diffs], Thu Jul 11 10:37:26 2002 UTC (21 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored)

Add FORK_NOWAIT flag, which sets init as the parent of the forked
process. Useful for FreeBSD rfork() emulation.

ok'd by Christos

Revision 1.84.2.11 / (download) - annotate - [select for diffs], Mon Jun 24 22:10:42 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.10: +3 -3 lines
Diff to previous 1.84.2.10 (colored) to branchpoint 1.84 (colored)

Curproc->curlwp renaming.

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

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

Revision 1.84.2.10 / (download) - annotate - [select for diffs], Thu Jun 20 22:57:44 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.9: +2 -3 lines
Diff to previous 1.84.2.9 (colored) to branchpoint 1.84 (colored)

Oops, added one line too many when PID selection was rearranged.

Revision 1.88.8.1 / (download) - annotate - [select for diffs], Thu Jun 20 16:02:19 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.88: +90 -85 lines
Diff to previous 1.88 (colored)

catch up with -current.

Revision 1.84.2.9 / (download) - annotate - [select for diffs], Thu Jun 20 03:47:13 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.8: +90 -83 lines
Diff to previous 1.84.2.8 (colored) to branchpoint 1.84 (colored)

Catch up to -current.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Jun 17 16:22:50 2002 UTC (21 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.88: +90 -85 lines
Diff to previous 1.88 (colored)

Niels Provos systrace work, ported to NetBSD by kittenz and reworked...

Revision 1.84.2.8 / (download) - annotate - [select for diffs], Wed May 29 21:33:10 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.7: +3 -2 lines
Diff to previous 1.84.2.7 (colored) to branchpoint 1.84 (colored)

#include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)

Revision 1.88.4.2 / (download) - annotate - [select for diffs], Sun Mar 10 21:33:42 2002 UTC (21 years, 11 months ago) by thorpej
Branch: newlock
Changes since 1.88.4.1: +3 -4 lines
Diff to previous 1.88.4.1 (colored) to branchpoint 1.88 (colored) next main 1.89 (colored)

Use a pool cache for turnstiles, saving the memset (missed this in
previous commit).

Revision 1.88.4.1 / (download) - annotate - [select for diffs], Sun Mar 10 19:08:23 2002 UTC (21 years, 11 months ago) by thorpej
Branch: newlock
Changes since 1.88: +5 -2 lines
Diff to previous 1.88 (colored)

First cut implementation of turnstiles, a specialized sleep queue used for
kernel synchronization objects.  A detailed description of turnstiles
can be found in:

	Solaris Internals: Core Kernel Architecture, by Jim Mauro
	   and Richard McDougall, section 3.7.

Note this implementation does not yet implement priority inheritence,
nor does it currently differentiate between reader and writer queues
(though they are provided for in the API).

Revision 1.86.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 19:59:47 2002 UTC (22 years, 1 month ago) by thorpej
Branch: kqueue
Changes since 1.86.2.1: +5 -1 lines
Diff to previous 1.86.2.1 (colored) to branchpoint 1.86 (colored)

Sync kqueue branch with -current.

Revision 1.84.2.7 / (download) - annotate - [select for diffs], Tue Jan 8 00:32:32 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.6: +3 -2 lines
Diff to previous 1.84.2.6 (colored) to branchpoint 1.84 (colored)

Catch up to -current.

Revision 1.88 / (download) - annotate - [select for diffs], Sat Dec 8 00:35:30 2001 UTC (22 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, 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, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: newlock, gehenna-devsw
Changes since 1.87: +3 -2 lines
Diff to previous 1.87 (colored)

Make the coredump routine exec-format/emulation specific.  Split
out traditional NetBSD coredump routines into core_netbsd.c and
netbsd32_core.c (for COMPAT_NETBSD32).

Revision 1.84.2.6 / (download) - annotate - [select for diffs], Sat Nov 17 01:10:16 2001 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.5: +2 -4 lines
Diff to previous 1.84.2.5 (colored) to branchpoint 1.84 (colored)

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

Revision 1.84.2.5 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:35 2001 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.4: +4 -1 lines
Diff to previous 1.84.2.4 (colored) to branchpoint 1.84 (colored)

Catch up to -current.

Revision 1.86.6.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:47 2001 UTC (22 years, 3 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.86: +4 -1 lines
Diff to previous 1.86 (colored) next main 1.87 (colored)

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

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

add RCSIDs

Revision 1.84.2.4 / (download) - annotate - [select for diffs], Mon Nov 5 20:16:33 2001 UTC (22 years, 4 months ago) by briggs
Branch: nathanw_sa
Changes since 1.84.2.3: +2 -2 lines
Diff to previous 1.84.2.3 (colored) to branchpoint 1.84 (colored)

Call uvm_proc_fork() before newlwp() to fork the process's VM space, if
necessary.  This ensures that p2 is more-fully initialized before entering
newlwp().  This also ensures cpu_fork() will have access to p_vmspace for
both processes.

Revision 1.84.2.3 / (download) - annotate - [select for diffs], Mon Nov 5 19:59:03 2001 UTC (22 years, 4 months ago) by briggs
Branch: nathanw_sa
Changes since 1.84.2.2: +4 -4 lines
Diff to previous 1.84.2.2 (colored) to branchpoint 1.84 (colored)

KERNEL_PROC_LOCK/KERNEL_PROC_UNLOCK take struct lwp *, not struct proc *.

Revision 1.84.2.2 / (download) - annotate - [select for diffs], Fri Aug 24 00:11:28 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.84.2.1: +83 -1 lines
Diff to previous 1.84.2.1 (colored) to branchpoint 1.84 (colored)

Catch up with -current.

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Tue Jul 10 13:52:10 2001 UTC (22 years, 7 months ago) by lukem
Branch: kqueue
Changes since 1.86: +6 -1 lines
Diff to previous 1.86 (colored)

add calls to KNOTE(9) as appropriate

Revision 1.86 / (download) - annotate - [select for diffs], Sat Jul 7 23:33:54 2001 UTC (22 years, 8 months ago) by fvdl
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache, kqueue
Changes since 1.85: +3 -1 lines
Diff to previous 1.85 (colored)

flags was used uninitialized.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Jul 1 18:06:11 2001 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.84: +81 -1 lines
Diff to previous 1.84 (colored)

Linux-compatible clone(2) system call, lifted from the Linux
compatibility module.  Based on patches from Bang Jun-Young <bjy@mogua.org>.

Revision 1.61.2.7 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:36 2001 UTC (22 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.61.2.6: +12 -10 lines
Diff to previous 1.61.2.6 (colored) to branchpoint 1.61 (colored) next main 1.62 (colored)

Sync with HEAD.

Revision 1.84.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:39 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.84: +33 -37 lines
Diff to previous 1.84 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Feb 26 21:14:20 2001 UTC (23 years ago) by lukem
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.83: +12 -10 lines
Diff to previous 1.83 (colored)

minor KNF

Revision 1.61.2.6 / (download) - annotate - [select for diffs], Thu Jan 18 09:23:43 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.61.2.5: +7 -4 lines
Diff to previous 1.61.2.5 (colored) to branchpoint 1.61 (colored)

Sync with head (for UBC+NFS fixes, mostly).

Revision 1.83 / (download) - annotate - [select for diffs], Tue Jan 9 23:36:50 2001 UTC (23 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.82: +8 -5 lines
Diff to previous 1.82 (colored)

Do syscall_intern after p_traceflag has been copied to the new
process (if it is inherited), so that ktrace continues to work
properly on the child.

Revision 1.61.2.5 / (download) - annotate - [select for diffs], Fri Jan 5 17:36:38 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.61.2.4: +2 -5 lines
Diff to previous 1.61.2.4 (colored) to branchpoint 1.61 (colored)

Sync with HEAD

Revision 1.82 / (download) - annotate - [select for diffs], Sun Dec 31 17:43:41 2000 UTC (23 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

PR 4853: we fork a lot more during startup these days. Wrap nextpid to 500.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Dec 22 22:59:00 2000 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.80: +2 -5 lines
Diff to previous 1.80 (colored)

split off thread specific stuff from struct sigacts to struct sigctx, leaving
    only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.

Revision 1.61.2.4 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:20 2000 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.61.2.3: +14 -6 lines
Diff to previous 1.61.2.3 (colored) to branchpoint 1.61 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.80 / (download) - annotate - [select for diffs], Mon Dec 11 15:35:42 2000 UTC (23 years, 2 months ago) by tsutsui
Branch: MAIN
Changes since 1.79: +7 -2 lines
Diff to previous 1.79 (colored)

Use USPACE_ALIGN for an alignment argument on allocating U-area.
The default value is 0, and could be overridden by machine/vmparam.h.

Revision 1.79 / (download) - annotate - [select for diffs], Mon Dec 11 05:29:02 2000 UTC (23 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.78: +4 -1 lines
Diff to previous 1.78 (colored)

Introduce 2 new flags in types.h:
* __HAVE_SYSCALL_INTERN.  If this is defined, e_syscall is replaced by
  e_syscall_intern, which is called at key places in the kernel.  This can be
  used to set a MD syscall handler pointer.  This obsoletes and replaces the
  *_HAS_SEPARATED_SYSCALL flags.
* __HAVE_MINIMAL_EMUL.  If this is defined, certain (deprecated) elements in
  struct emul are omitted.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Dec 10 11:41:20 2000 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.77: +6 -6 lines
Diff to previous 1.77 (colored)

fork1(): write the ktrace entry before the parent is put to sleep for
FORK_PPWAIT case, so that this DTRT for vfork() too

Revision 1.61.2.3 / (download) - annotate - [select for diffs], Fri Dec 8 09:13:53 2000 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.61.2.2: +1 -1 lines
Diff to previous 1.61.2.2 (colored) to branchpoint 1.61 (colored)

Sync with HEAD.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Nov 27 04:36:41 2000 UTC (23 years, 3 months ago) by nisimura
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

Introduce uvm_km_valloc_align() and use it to glab process's USPACE
aligned on USPACE boundary in kernel virutal address.  It's benefitial
for MIPS R4000's paired TLB entry design.

Revision 1.61.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:05:19 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.61.2.1: +102 -92 lines
Diff to previous 1.61.2.1 (colored) to branchpoint 1.61 (colored)

Sync with HEAD.

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:00 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.61: +59 -36 lines
Diff to previous 1.61 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.76 / (download) - annotate - [select for diffs], Wed Nov 8 05:16:23 2000 UTC (23 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.75: +90 -92 lines
Diff to previous 1.75 (colored)

in fork1(), only add make the new proc visible (by giving it a pid
and adding it to allproc) after it's fully initialized.
this prevents the scheduler from coming in via a clock interrupt
and tripping over a partially-initialized proc.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Nov 7 12:41:52 2000 UTC (23 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.74: +7 -1 lines
Diff to previous 1.74 (colored)

add void *p_emuldata into struct proc - this can be used to hold per-process
	emulation-specific data
add process exit, exec and fork function hooks into struct emul:
* e_proc_fork() - called in fork1() after the new forked process is setup
* e_proc_exec() - called in sys_execve() after the executed process is setup
* e_proc_exit() - called in exit1() after all the other process cleanups are
  done, right before machine-dependant switch to new context; also called
  for "old" emulation from sys_execve() if emulation of executed program and
  the original process is different

This was discussed on tech-kern.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Nov 7 12:31:17 2000 UTC (23 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.73: +7 -1 lines
Diff to previous 1.73 (colored)

write KTR_EMUL entry on end of fork1() - primarily usable when the new
process never does execve(2), such as when creating a thread

Revision 1.73 / (download) - annotate - [select for diffs], Wed Sep 6 14:06:42 2000 UTC (23 years, 6 months ago) by sommerfeld
Branch: MAIN
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored)

Lock scheduler before putting new proc on run queues.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Aug 25 02:55:49 2000 UTC (23 years, 6 months ago) by sommerfeld
Branch: MAIN
Changes since 1.71: +6 -1 lines
Diff to previous 1.71 (colored)

MULTIPROCESSOR: Initialize new proc's p_cpu pointer to NULL, so
anything which looks at it before it runs won't explode.

Revision 1.71 / (download) - annotate - [select for diffs], Tue Aug 22 17:28:28 2000 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.70: +16 -1 lines
Diff to previous 1.70 (colored)

Define the MI parts of the "big kernel lock" perimeter.  From
Bill Sommerfeld.

Revision 1.70 / (download) - annotate - [select for diffs], Tue Aug 1 04:57:30 2000 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.69: +7 -23 lines
Diff to previous 1.69 (colored)

ANSI'ify.

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Tue Jul 4 16:05:34 2000 UTC (23 years, 8 months ago) by jdolecek
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored) next main 1.67 (colored)

Pullup from trunk [approved by thorpej]:

change tablefull() to accept one more parameter - optional hint

use that to inform about way to raise current limit when we reach maximum
number of processes, descriptors or vnodes

Revision 1.69 / (download) - annotate - [select for diffs], Tue Jul 4 15:33:30 2000 UTC (23 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

change tablefull() to accept one more parameter - optional hint

use that to inform about way to raise current limit when we reach maximum
number of processes, descriptors or vnodes

XXX hopefully I catched all users of tablefull()

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:20 2000 UTC (23 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.67: +1 -3 lines
Diff to previous 1.67 (colored)

remove include of <vm/vm.h>

Revision 1.67 / (download) - annotate - [select for diffs], Mon Jun 26 14:21:14 2000 UTC (23 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.66: +1 -2 lines
Diff to previous 1.66 (colored)

remove/move more mach vm header files:

	<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.

Revision 1.64.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:09:06 2000 UTC (23 years, 8 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.64: +23 -6 lines
Diff to previous 1.64 (colored) next main 1.65 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.66 / (download) - annotate - [select for diffs], Wed May 31 05:02:32 2000 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.65: +13 -1 lines
Diff to previous 1.65 (colored)

Track which process a CPU is running/has last run on by adding a
p_cpu member to struct proc.  Use this in certain places when
accessing scheduler state, etc.  For the single-processor case,
just initialize p_cpu in fork1() to avoid having to set it in the
low-level context switch code on platforms which will never have
multiprocessing.

While I'm here, comment a few places where there are known issues
for the SMP implementation.

Revision 1.65 / (download) - annotate - [select for diffs], Sun May 28 05:49:05 2000 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.64: +11 -6 lines
Diff to previous 1.64 (colored)

Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1().  In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.

Revision 1.64 / (download) - annotate - [select for diffs], Mon May 8 19:59:21 2000 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.63: +6 -4 lines
Diff to previous 1.63 (colored)

__predict_false() the test for full process table, user exceeding their
process limit, and USPACE valloc failure.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:11 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

Get rid of register declarations.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Mar 23 06:30:11 2000 UTC (23 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.61: +4 -1 lines
Diff to previous 1.61 (colored)

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.

Revision 1.54.4.2 / (download) - annotate - [select for diffs], Mon Aug 2 22:19:12 1999 UTC (24 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.54.4.1: +11 -7 lines
Diff to previous 1.54.4.1 (colored) to branchpoint 1.54 (colored) next main 1.55 (colored)

Update from trunk.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jul 22 21:08:31 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase, chs-ubc2-base
Branch point for: thorpej_scsipi
Changes since 1.60: +5 -3 lines
Diff to previous 1.60 (colored)

Add a read/write lock to the proclists and PID hash table.  Use the
write lock when doing PID allocation, and during the process exit path.
Use a read lock every where else, including within schedcpu() (interrupt
context).  Note that holding the write lock implies blocking schedcpu()
from running (blocks softclock).

PID allocation is now MP-safe.

Note this actually fixes a bug on single processor systems that was probably
extremely difficult to tickle; it was possible that schedcpu() would run
off a bad pointer if the right clock interrupt happened to come in the
middle of a LIST_INSERT_HEAD() or LIST_REMOVE() to/from allproc.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Jul 22 18:28:30 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.59: +7 -5 lines
Diff to previous 1.59 (colored)

Rearrange some code slightly.

Revision 1.54.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:24:01 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.54: +33 -7 lines
Diff to previous 1.54 (colored)

Sync w/ -current.

Revision 1.59 / (download) - annotate - [select for diffs], Thu May 13 21:58:37 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.58: +10 -6 lines
Diff to previous 1.58 (colored)

Allow the caller to specify a stack for the child process.  If NULL,
the child inherits the stack pointer from the parent (traditional
behavior).  Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).

Revision 1.58 / (download) - annotate - [select for diffs], Thu May 13 00:59:04 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +9 -5 lines
Diff to previous 1.57 (colored)

Allow an alternate exit signal (i.e. not SIGCHLD) to be delivered to the
parent, specified at fork time.  Specify a new flag to wait4(2), WALTSIG,
to wait for processes which use an alternate exit signal.

This is required for clone(2).

Revision 1.57 / (download) - annotate - [select for diffs], Fri Apr 30 21:39:51 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.56: +14 -4 lines
Diff to previous 1.56 (colored)

Pay attention to FORK_SHARECWD, FORK_SHAREFILES, and FORK_SHARESIGS.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Apr 30 21:23:49 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.55: +7 -1 lines
Diff to previous 1.55 (colored)

Pull signal actions out of struct user, make them a separate proc
substructure, and allow them to be shared.

Required for clone(2).

Revision 1.55 / (download) - annotate - [select for diffs], Fri Apr 30 18:42:59 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.54: +3 -1 lines
Diff to previous 1.54 (colored)

Break cdir/rdir/cmask info out of struct filedesc, and put it in a new
substructure, `cwdinfo'.  Implement optional sharing of this substructure.

This is required for clone(2).

Revision 1.54 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:23 1999 UTC (24 years, 11 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.53: +1 -20 lines
Diff to previous 1.53 (colored)

completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.53 / (download) - annotate - [select for diffs], Tue Feb 23 02:57:18 1999 UTC (25 years ago) by ross
Branch: MAIN
Changes since 1.52: +3 -8 lines
Diff to previous 1.52 (colored)

Replace the recent scheduler mods with calls to scheduler_{fork,wait}_hook(),
(inlined) so scheduler functionality can be kept in a single .h/.c set.
Also, the wait hook has changed the way it clips the scheduler history.

Revision 1.32.8.1 / (download) - annotate - [select for diffs], Thu Feb 4 06:23:28 1999 UTC (25 years, 1 month ago) by cgd
Branch: netbsd-1-3
Changes since 1.32: +8 -1 lines
Diff to previous 1.32 (colored) next main 1.33 (colored)

pull up revs 1.51-1.52 from trunk (bad)

Revision 1.52 / (download) - annotate - [select for diffs], Sat Jan 23 22:23:19 1999 UTC (25 years, 1 month ago) by sommerfe
Branch: MAIN
Changes since 1.51: +8 -9 lines
Diff to previous 1.51 (colored)

Tweak to earlier fix to p_estcpu:
	- no longer conditionalized
	- when traced, charge time to real parent, not debugger
	- make it clear for future rototillers that p_estcpu should be moved
	  to the "copy" region of struct proc.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Jan 23 17:02:35 1999 UTC (25 years, 1 month ago) by sommerfe
Branch: MAIN
Changes since 1.50: +9 -1 lines
Diff to previous 1.50 (colored)

Under control of "slowchild" global, make child process inherit the
scheduling penalty for being cpu-bound (p_estcpu) of its parent.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Nov 11 22:44:25 1998 UTC (25 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.49: +1 -54 lines
Diff to previous 1.49 (colored)

Move fork_kthread() to a new file, kern_kthread.c, and rename it to
kthread_create().  Implement kthread_exit() (causes a thrad to exit).
Set P_NOCLDWAIT on kernel threads, which will cause any of their children
to be reparented to init(8) (which is already prepared to wait out orphaned
processes).

Revision 1.49 / (download) - annotate - [select for diffs], Wed Nov 11 06:34:43 1998 UTC (25 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.48: +57 -4 lines
Diff to previous 1.48 (colored)

Initial version of API for creating kernel threads (likely to change somewhat
in the future):
- New function, fork_kthread(), takes entry point, argument for entry point,
  and comment for new proc.  May be called by any context, will fork the
  thread from proc0 (requires slight changes to cpu_fork()).
- cpu_set_kpc() now takes a third argument, a void *arg to pass to the
  thread entry point.  Thread entry point now takes void * instead of
  struct proc *.
- Create the pagedaemon and reaper kernel threads using fork_kthread().

Revision 1.48 / (download) - annotate - [select for diffs], Tue Sep 8 23:50:14 1998 UTC (25 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.47: +30 -10 lines
Diff to previous 1.47 (colored)

- Use proclists[], rather than checking allproc and zombproc explicitly.
- Add some comments about locking.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Aug 31 23:20:16 1998 UTC (25 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.46: +2 -3 lines
Diff to previous 1.46 (colored)

Use the pool allocator and "nointr" pool page allocator for pcred and
plimit structures.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Aug 13 02:10:57 1998 UTC (25 years, 6 months ago) by eeh
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Merge paddr_t changes into the main branch.

Revision 1.45 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:12 1998 UTC (25 years, 7 months ago) by perry
Branch: MAIN
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored)

Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
  bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)

Revision 1.44 / (download) - annotate - [select for diffs], Sun Aug 2 04:41:32 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.43: +3 -2 lines
Diff to previous 1.43 (colored)

Use a pool for proc structures.

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Thu Jul 30 14:04:04 1998 UTC (25 years, 7 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored) next main 1.44 (colored)

Split vm_offset_t and vm_size_t into paddr_t, psize_t, vaddr_t, and vsize_t.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Jun 25 21:17:16 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.42: +2 -1 lines
Diff to previous 1.42 (colored)

defopt KTRACE

Revision 1.42 / (download) - annotate - [select for diffs], Sat May 2 18:33:20 1998 UTC (25 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

New fktrace syscall from Darren Reed [with fixes from me]

Revision 1.41 / (download) - annotate - [select for diffs], Thu Apr 9 00:23:38 1998 UTC (25 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.40: +25 -1 lines
Diff to previous 1.40 (colored)

Allocate kernel virtual address space for the U-area before allocating
the new proc structure when performing a fork.  This makes it much
easier to abort a fork operation and return an error if we run out
of KVA space.

The U-area pages are still wired down in {,u}vm_fork(), as before.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:28 1998 UTC (26 years ago) by fvdl
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:09 1998 UTC (26 years ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +19 -47 lines
Diff to previous 1.1.1.2 (colored)

Import 4.4BSD-Lite2

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:09:40 1998 UTC (26 years ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +315 -1 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.39 / (download) - annotate - [select for diffs], Sat Feb 14 00:37:31 1998 UTC (26 years ago) by thorpej
Branch: MAIN
Changes since 1.38: +8 -2 lines
Diff to previous 1.38 (colored)

Prevent the session ID from disappearing if the session leader exits
(thus causing s_leader to become NULL) by storing the session ID separately
in the session structure.  Export the session ID to userspace in the
eproc structure.

Submitted by Tom Proett <proett@nas.nasa.gov>.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Feb 10 14:09:30 1998 UTC (26 years ago) by mrg
Branch: MAIN
Changes since 1.37: +3 -1 lines
Diff to previous 1.37 (colored)

- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Feb 5 07:59:50 1998 UTC (26 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.36: +17 -1 lines
Diff to previous 1.36 (colored)

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 6 21:15:41 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.35: +5 -3 lines
Diff to previous 1.35 (colored)

Allow retval to be NULL, filling it in only if it was passed.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Jan 5 05:16:28 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.34: +12 -5 lines
Diff to previous 1.34 (colored)

Also pass fork1() a struct proc **, in case the caller wants a pointer
to the newly created process.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jan 4 03:52:02 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.33: +36 -9 lines
Diff to previous 1.33 (colored)

New vfork(2) implementation, whith semantics matching those of the original
3BSD vfork(2), i.e. share address space w/ parent and block parent.

Keep statistics on the total number of forks, the number of forks that
block the parent, and the number of forks that share the address space
with the parent.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Jan 3 02:49:30 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Update for additional argument to vm_fork() ("shared" boolean).

Revision 1.32.6.1 / (download) - annotate - [select for diffs], Mon Sep 8 23:09:38 1997 UTC (26 years, 5 months ago) by thorpej
Branch: thorpej-signal
Changes since 1.32: +7 -1 lines
Diff to previous 1.32 (colored) next main 1.33 (colored)

Set up the new process's sigacts before calling vm_fork().

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jun 19 20:54:15 1997 UTC (26 years, 8 months ago) by pk
Branch: MAIN
CVS Tags: thorpej-signal-base, 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, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Branch point for: thorpej-signal, netbsd-1-3
Changes since 1.31: +1 -17 lines
Diff to previous 1.31 (colored)

Remove __FORK_BRAINDAMAGEd code; it's no longer needed.

Revision 1.30.6.1 / (download) - annotate - [select for diffs], Wed Mar 12 21:23:38 1997 UTC (26 years, 11 months ago) by is
Branch: is-newarp
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored) next main 1.31 (colored)

Merge in changes from Trunk

Revision 1.29.4.1 / (download) - annotate - [select for diffs], Wed Feb 19 04:46:51 1997 UTC (27 years ago) by rat
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) next main 1.30 (colored)

Pullup 1.30 -> 1.31 by request from Matt Green.  Fixes SUID security
bug.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Feb 18 01:30:37 1997 UTC (27 years ago) by mrg
Branch: MAIN
CVS Tags: is-newarp-before-merge
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

pass P_SUGID to child.  from freebsd.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Oct 9 00:04:39 1996 UTC (27 years, 4 months ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-base
Branch point for: is-newarp
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Use PHOLD() and PRELE() rather than frobbing p_holdcnt directly.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Feb 9 18:59:34 1996 UTC (28 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.28: +6 -1 lines
Diff to previous 1.28 (colored)

More proto fixes

Revision 1.28 / (download) - annotate - [select for diffs], Sun Feb 4 02:15:32 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.27: +5 -2 lines
Diff to previous 1.27 (colored)

First pass at prototyping

Revision 1.27 / (download) - annotate - [select for diffs], Sun Dec 10 08:26:02 1995 UTC (28 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

If __FORK_BRAINDAMAGE, continue stuffing retval[1] for the benefit of main().

Revision 1.26 / (download) - annotate - [select for diffs], Sat Dec 9 04:23:07 1995 UTC (28 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.25: +21 -10 lines
Diff to previous 1.25 (colored)

Only expect vm_fork() to return if __FORK_BRAINDAMAGE is defined.
Use splstatclock() rather than splhigh() in one place.
Eliminate unused third arg to vm_fork().

Revision 1.25 / (download) - annotate - [select for diffs], Sat Oct 7 06:28:15 1995 UTC (28 years, 5 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.24: +5 -5 lines
Diff to previous 1.24 (colored)

Prefix names of system call implementation functions with `sys_'.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Mar 18 14:35:14 1995 UTC (28 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.23: +3 -9 lines
Diff to previous 1.23 (colored)

Clean up comments related to last change, and remove an unneeded
splclock/splx pair.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Feb 23 23:41:43 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Move a couple of assignments from the parent to the child.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Oct 20 04:22:47 1994 UTC (29 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.21: +5 -4 lines
Diff to previous 1.21 (colored)

update for new syscall args description mechanism

Revision 1.21 / (download) - annotate - [select for diffs], Tue Aug 30 06:16:25 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored)

Make sure p_emul is copied on fork.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Aug 30 03:05:35 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +12 -38 lines
Diff to previous 1.19 (colored)

Convert process, file, and namei lists and hash tables to use queue.h.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Jun 29 06:32:28 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jun 15 19:59:21 1994 UTC (29 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

Turn P_NOSWAP and P_PHYSIO into a hold count, as suggested by a comment.

Revision 1.17 / (download) - annotate - [select for diffs], Thu May 19 05:57:48 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.16: +47 -54 lines
Diff to previous 1.16 (colored)

update to lite

Revision 1.16 / (download) - annotate - [select for diffs], Tue May 17 04:21:54 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.15: +320 -1 lines
Diff to previous 1.15 (colored)

copyright foo

Revision 1.15 / (download) - annotate - [select for diffs], Fri May 13 00:51:07 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)

setrq -> setrunqueue, sched -> scheduler

Revision 1.14 / (download) - annotate - [select for diffs], Thu May 5 05:38:09 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored)

lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.

Revision 1.13 / (download) - annotate - [select for diffs], Wed May 4 03:41:53 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored)

Rename a lot of process flags.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Apr 10 00:24:35 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11 (colored)

light clean

Revision 1.11 / (download) - annotate - [select for diffs], Mon Feb 21 23:10:46 1994 UTC (30 years ago) by chopps
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored)

fix incorect check of nprocs vs. maxproc.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jan 4 11:31:00 1994 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored)

field name change

Revision 1.9 / (download) - annotate - [select for diffs], Wed Dec 22 13:39:56 1993 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

add support for p_vnode, from jsp

Revision 1.8 / (download) - annotate - [select for diffs], Tue Dec 21 10:39:17 1993 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

p_spare is in the 'zero range' now

Revision 1.7 / (download) - annotate - [select for diffs], Sat Dec 18 04:20:33 1993 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

Canonicalize all #includes.

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Sun Nov 14 20:31:47 1993 UTC (30 years, 3 months ago) by mycroft
Branch: magnum
Changes since 1.5.2.1: +1 -1 lines
Diff to previous 1.5.2.1 (colored) next main 1.6 (colored)

Canonicalize all #includes.

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Fri Sep 24 08:51:02 1993 UTC (30 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

Make all files using spl*() #include cpu.h.  Changes from trunk.
init_main.c: New method of pseudo-device of initialization.
kern_clock.c: hardclock() and softclock() now take a pointer to a clockframe.
softclock() only does callouts.
kern_synch.c: Remove spurious declaration of endtsleep().  Adjust uses of
averunnable for new struct loadav.
subr_prf.c: Allow printf() formats in panic().
tty.c: averunnable changes.
vfs_subr.c: va_size and va_bytes are now quads.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Sep 15 22:30:33 1993 UTC (30 years, 5 months ago) by cgd
Branch: MAIN
CVS Tags: magnum-base
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

make allproc be volatile, and cast things accordingly.
suggested by torek, because CSRG had problems with reordering
of assignments to allproc leading to strange panics from kernels
compiled with gcc2...

Revision 1.5 / (download) - annotate - [select for diffs], Sat Aug 7 08:03:19 1993 UTC (30 years, 7 months ago) by cgd
Branch: MAIN
Branch point for: magnum
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

merge in changes from netbsd-0-9-ALPHA2

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Mon Aug 2 23:34:31 1993 UTC (30 years, 7 months ago) by cgd
Branch: netbsd-0-9
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

mark process as SIDL *before* putting it on the allproc list.
this should protect against people using fields before
they're initialized.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:35 1993 UTC (30 years, 8 months ago) by andrew
Branch: MAIN
CVS Tags: netbsd-0-9-base, netbsd-0-9-ALPHA
Branch point for: netbsd-0-9
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 2 23:10:52 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

nextpid & maxproc fixes from ws

Revision 1.2 / (download) - annotate - [select for diffs], Thu May 20 02:54:23 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

add $Id$ strings, and clean up file headers where necessary

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>