The NetBSD Project

CVS log for src/sys/sys/proc.h

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.373 / (download) - annotate - [select for diffs], Wed Oct 4 20:52:07 2023 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.372: +15 -15 lines
Diff to previous 1.372 (colored)

p->p_stat is actually locked by proc_lock so document it that way and
shuffle some fields around so it's not next to p->p_trace_enabled (that
needs some attention too, in a later change).

Revision 1.370.4.2 / (download) - annotate - [select for diffs], Wed Aug 9 17:42:01 2023 UTC (8 months, 1 week ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.370.4.1: +4 -2 lines
Diff to previous 1.370.4.1 (colored) to branchpoint 1.370 (colored) next main 1.371 (colored)

Pull up following revision(s) (requested by maya in ticket #316):

	sys/arch/m68k/include/mutex.h: revision 1.13
	sys/arch/arm/include/cpu.h: revision 1.125
	sys/arch/sun68k/include/intr.h: revision 1.21
	sys/arch/arm/include/mutex.h: revision 1.28
	sys/sys/rwlock.h: revision 1.18
	sys/arch/powerpc/include/mutex.h: revision 1.7
	sys/arch/arm/include/mutex.h: revision 1.29
	sys/arch/powerpc/include/mutex.h: revision 1.8
	sys/uvm/uvm_param.h: revision 1.42
	sys/sys/ksem.h: revision 1.16
	sys/arch/x86/include/mutex.h: revision 1.10
	sys/sys/proc.h: revision 1.372
	sys/sys/ksem.h: revision 1.17
	sys/arch/ia64/include/mutex.h: revision 1.8
	sys/arch/evbarm/include/intr.h: revision 1.29
	sys/sys/lua.h: revision 1.9
	sys/arch/next68k/include/intr.h: revision 1.23
	sys/arch/ia64/include/mutex.h: revision 1.9
	sys/arch/hp300/include/intr.h: revision 1.35
	sys/arch/hp300/include/intr.h: revision 1.36
	sys/arch/sparc/include/cpu.h: revision 1.111
	sys/arch/hppa/include/mutex.h: revision 1.16
	sys/arch/vax/include/intr.h: revision 1.31
	sys/arch/hppa/include/mutex.h: revision 1.17
	sys/arch/news68k/include/intr.h: revision 1.28
	sys/arch/hppa/include/mutex.h: revision 1.18
	sys/arch/hppa/include/intr.h: revision 1.3
	sys/arch/hppa/include/mutex.h: revision 1.19
	sys/arch/hppa/include/intr.h: revision 1.4
	sys/sys/sched.h: revision 1.92
	sys/opencrypto/cryptodev.h: revision 1.51
	sys/arch/vax/include/mutex.h: revision 1.20
	sys/arch/sparc64/include/mutex.h: revision 1.10
	sys/arch/ia64/include/sapicvar.h: revision 1.2
	sys/arch/riscv/include/mutex.h: revision 1.5
	sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
	sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
	sys/arch/riscv/include/mutex.h: revision 1.6
	sys/ddb/files.ddb: revision 1.16
	sys/arch/mac68k/include/intr.h: revision 1.32
	share/man/man4/ddb.4: revision 1.203
	sys/ddb/db_command.c: revision 1.183
	sys/arch/mips/include/mutex.h: revision 1.10
	sys/ddb/db_command.c: revision 1.184
	sys/arch/x68k/include/intr.h: revision 1.22
	sys/arch/sparc/include/psl.h: revision 1.51
	sys/arch/or1k/include/mutex.h: revision 1.4
	sys/arch/mips/include/mutex.h: revision 1.11
	sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
	sys/arch/sparc64/include/cpu.h: revision 1.134
	sys/arch/sparc/include/psl.h: revision 1.52
	sys/arch/or1k/include/mutex.h: revision 1.5
	sys/arch/mvme68k/include/intr.h: revision 1.22
	sys/arch/luna68k/include/intr.h: revision 1.16
	external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
	sys/arch/sparc/include/mutex.h: revision 1.12
	sys/arch/sparc/include/mutex.h: revision 1.13
	sys/arch/usermode/include/mutex.h: revision 1.5
	sys/arch/usermode/include/mutex.h: revision 1.6
	sys/kern/kern_core.c: revision 1.38
	usr.sbin/crash/Makefile: revision 1.49
	sys/arch/amiga/include/intr.h: revision 1.23
	sys/arch/alpha/include/mutex.h: revision 1.12
	sys/arch/alpha/include/mutex.h: revision 1.13
	sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
	sys/ddb/ddb.h: revision 1.6
	sys/arch/sparc64/include/mutex.h: revision 1.8
	sys/arch/sh3/include/mutex.h: revision 1.12
	sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
	sys/ddb/db_syncobj.c: revision 1.1
	sys/arch/vax/include/mutex.h: revision 1.18
	sys/arch/sparc64/include/psl.h: revision 1.63
	sys/arch/sparc64/include/mutex.h: revision 1.9
	sys/arch/sh3/include/mutex.h: revision 1.13
	sys/arch/evbarm/lubbock/obio.c: revision 1.13
	sys/arch/atari/include/intr.h: revision 1.23
	sys/ddb/db_syncobj.c: revision 1.2
	sys/arch/vax/include/mutex.h: revision 1.19
	sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
	sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
	sys/arch/cesfic/include/intr.h: revision 1.14
	sys/ddb/db_syncobj.h: revision 1.1
	sys/arch/x86/include/cpu.h: revision 1.134
	sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
	sys/arch/cesfic/include/intr.h: revision 1.15
	sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
	sys/sys/cpu_data.h: revision 1.54
	sys/arch/m68k/include/mutex.h: revision 1.12
	sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes.  Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h.  avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h.  And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex.  Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT.  Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.

Revision 1.372 / (download) - annotate - [select for diffs], Tue Jul 11 09:48:56 2023 UTC (9 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.371: +4 -2 lines
Diff to previous 1.371 (colored)

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

Revision 1.370.4.1 / (download) - annotate - [select for diffs], Sun May 28 09:43:26 2023 UTC (10 months, 3 weeks ago) by martin
Branch: netbsd-10
Changes since 1.370: +5 -1 lines
Diff to previous 1.370 (colored)

Pull up following revision(s) (requested by gutteridge in ticket #175):

	sys/sys/proc.h: revision 1.371
	sys/kern/vfs_lookup.c: revision 1.234

Default PROC_MACHINE_ARCH to machine_arch and use this for magic
symlinks to resolve "@machine_arch".

This keeps behaviour of magic symlinks and 'uname -p' output the same.
Fixes PR 57320.

Revision 1.371 / (download) - annotate - [select for diffs], Mon May 1 05:12:44 2023 UTC (11 months, 2 weeks ago) by mlelstv
Branch: MAIN
Changes since 1.370: +5 -1 lines
Diff to previous 1.370 (colored)

Default PROC_MACHINE_ARCH to machine_arch and use this for magic
symlinks to resolve "@machine_arch".

This keeps behaviour of magic symlinks and 'uname -p' output the same.
Fixes PR 57320.

Revision 1.370 / (download) - annotate - [select for diffs], Mon May 9 13:27:24 2022 UTC (23 months, 1 week ago) by wiz
Branch: MAIN
CVS Tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.369: +2 -2 lines
Diff to previous 1.369 (colored)

fix typo in comment

Revision 1.369 / (download) - annotate - [select for diffs], Sun Oct 10 18:07:51 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.368: +10 -1 lines
Diff to previous 1.368 (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.367.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:17 2020 UTC (3 years, 4 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.367: +1 -3 lines
Diff to previous 1.367 (colored) next main 1.368 (colored)

Sync w/ HEAD.

Revision 1.368 / (download) - annotate - [select for diffs], Sat Dec 5 18:17:01 2020 UTC (3 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.367: +1 -3 lines
Diff to previous 1.367 (colored)

Refactor interval timers to make it possible to support types other than
the BSD/POSIX per-process timers:

- "struct ptimer" is split into "struct itimer" (common interval timer
  data) and "struct ptimer" (per-process timer data, which contains a
  "struct itimer").

- Introduce a new "struct itimer_ops" that supplies information about
  the specific kind of interval timer, including it's processing
  queue, the softint handle used to schedule processing, the function
  to call when the timer fires (which adds it to the queue), and an
  optional function to call when the CLOCK_REALTIME clock is changed by
  a call to clock_settime() or settimeofday().

- Rename some fuctions to clearly identify what they're operating on
  (ptimer vs itimer).

- Use kmem(9) to allocate ptimer-related structures, rather than having
  dedicated pools for them.

Welcome to NetBSD 9.99.77.

Revision 1.367 / (download) - annotate - [select for diffs], Sat May 23 23:42:44 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.366: +2 -2 lines
Diff to previous 1.366 (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.366 / (download) - annotate - [select for diffs], Sat May 23 20:45:11 2020 UTC (3 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.365: +2 -1 lines
Diff to previous 1.365 (colored)

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

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

Revision 1.365 / (download) - annotate - [select for diffs], Thu May 7 20:02:34 2020 UTC (3 years, 11 months ago) by kamil
Branch: MAIN
Changes since 1.364: +2 -1 lines
Diff to previous 1.364 (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.364 / (download) - annotate - [select for diffs], Wed Apr 29 01:52:26 2020 UTC (3 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.363: +4 -4 lines
Diff to previous 1.363 (colored)

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

Revision 1.362.2.1 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:07 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.362: +7 -6 lines
Diff to previous 1.362 (colored) next main 1.363 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.363 / (download) - annotate - [select for diffs], Fri Apr 24 03:22:06 2020 UTC (3 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.362: +7 -6 lines
Diff to previous 1.362 (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.348.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:20 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.348.2.1: +19 -14 lines
Diff to previous 1.348.2.1 (colored) to branchpoint 1.348 (colored) next main 1.349 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.362 / (download) - annotate - [select for diffs], Mon Apr 6 08:20:05 2020 UTC (4 years ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base1, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.361: +2 -1 lines
Diff to previous 1.361 (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.361 / (download) - annotate - [select for diffs], Sun Apr 5 20:53:46 2020 UTC (4 years ago) by christos
Branch: MAIN
Changes since 1.360: +2 -2 lines
Diff to previous 1.360 (colored)

There is no "s" lock.

Revision 1.360 / (download) - annotate - [select for diffs], Sat Mar 14 20:23:51 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.359: +1 -2 lines
Diff to previous 1.359 (colored)

Make page waits (WANTED vs BUSY) interlocked by pg->interlock.  Gets RW
locks out of the equation for sleep/wakeup, and allows observing+waiting
for busy pages when holding only a read lock.  Proposed on tech-kern.

Revision 1.357.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:10 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.357: +15 -6 lines
Diff to previous 1.357 (colored) next main 1.358 (colored)

Sync with head.

Revision 1.359 / (download) - annotate - [select for diffs], Sun Feb 23 15:46:42 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.358: +2 -1 lines
Diff to previous 1.358 (colored)

UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.

Revision 1.358 / (download) - annotate - [select for diffs], Wed Jan 29 15:47:52 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.357: +14 -6 lines
Diff to previous 1.357 (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.357 / (download) - annotate - [select for diffs], Sat Oct 12 19:38:57 2019 UTC (4 years, 6 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.356: +1 -2 lines
Diff to previous 1.356 (colored)

Remove now unused p_oppid from struct proc

Revision 1.356 / (download) - annotate - [select for diffs], Mon Sep 30 21:13:33 2019 UTC (4 years, 6 months ago) by kamil
Branch: MAIN
Changes since 1.355: +2 -7 lines
Diff to previous 1.355 (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.355 / (download) - annotate - [select for diffs], Mon Jul 15 19:34:45 2019 UTC (4 years, 9 months ago) by pgoyette
Branch: MAIN
CVS Tags: netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.354: +2 -2 lines
Diff to previous 1.354 (colored)

Move a comment line get it next to the line it describes, avoiding
intervening unrelated text.

NFCI

Revision 1.354 / (download) - annotate - [select for diffs], Fri Jun 21 01:03:51 2019 UTC (4 years, 9 months ago) by kamil
Branch: MAIN
Changes since 1.353: +1 -2 lines
Diff to previous 1.353 (colored)

Eliminate PS_NOTIFYSTOP remnants from the kernel

This flag used to be useful in /proc (BSD4.4-style) debugging semantics.
Traced child events were notified without signaling the parent.

This property was removed in NetBSD-8.0 and had no users.

This change simplifies the signal code, removing dead branches.

NFCI

Revision 1.353 / (download) - annotate - [select for diffs], Tue Jun 11 23:18:55 2019 UTC (4 years, 10 months ago) by kamil
Branch: MAIN
Changes since 1.352: +4 -1 lines
Diff to previous 1.352 (colored)

Add support for PTRACE_POSIX_SPAWN to report posix_spawn(3) events

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

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

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

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

Revision 1.348.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:57 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.348: +5 -3 lines
Diff to previous 1.348 (colored)

Sync with HEAD

Revision 1.352 / (download) - annotate - [select for diffs], Sat Apr 6 11:54:21 2019 UTC (5 years ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20190609, isaki-audio2-base, isaki-audio2
Changes since 1.351: +2 -1 lines
Diff to previous 1.351 (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.351 / (download) - annotate - [select for diffs], Fri Mar 1 03:03:19 2019 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.350: +1 -3 lines
Diff to previous 1.350 (colored)

PR/53998: Joel Bertrand:  Limit the number of semaphores on a
per-user basis not a per-process.  We cannot really keep track on
a per-process basis because a parent process can create the semaphore
and a child can free it taking credit for it.  There is also a
similar issue about resource exhaustion if we limited the number
of lwps per process as opposed to per user (which we don't).

Revision 1.344.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:07 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.344.2.3: +2 -1 lines
Diff to previous 1.344.2.3 (colored) to branchpoint 1.344 (colored) next main 1.345 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.350 / (download) - annotate - [select for diffs], Wed Dec 5 18:16:51 2018 UTC (5 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.349: +2 -1 lines
Diff to previous 1.349 (colored)

As discussed in tech-kern:

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

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

- don't expose addresses for linux procfs

- welcome to 8.99.27, changes to fill_*proc ABI

Revision 1.344.2.3 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:47 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.344.2.2: +3 -1 lines
Diff to previous 1.344.2.2 (colored) to branchpoint 1.344 (colored)

Sync with HEAD

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

Revision 1.349 / (download) - annotate - [select for diffs], Fri Aug 10 21:44:59 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.348: +3 -1 lines
Diff to previous 1.348 (colored)

Allow syscall_establish() to install new syscalls when the existing
entry-point is either sys_nomodule or sys_nosys.  Update the
makesyscalls.sh script to create a const array of bits to allow
syscall_disestablish() to properly restore the original entry-point.
Update all the initializers of struct emul to initialize the pointer
to the bit array struct emul.

XXX Regen of all files created by makesyscalls.sh will come soon,
XXX followed by a kernel version bump (since struct emul is being
XXX modified).

This commit should address PR kern/45781 and also removes the need
for the work-around for that PR in file

	sys/arch/usermode/modules/syscallemu/syscallemu.c

Revision 1.344.2.2 / (download) - annotate - [select for diffs], Mon May 21 04:36:17 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.344.2.1: +3 -2 lines
Diff to previous 1.344.2.1 (colored) to branchpoint 1.344 (colored)

Sync with HEAD

Revision 1.348 / (download) - annotate - [select for diffs], Wed May 9 19:55:35 2018 UTC (5 years, 11 months ago) by kre
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.347: +3 -1 lines
Diff to previous 1.347 (colored)


Cause a process's user and system times to become non-decreasing.

This alters the invented values (ie: statistically calculated)
that are returned - for small values, the values are likely going to
be different than they were, but that's largely nonsense anyway
(except that the sum of utime & stime does equal cpu time consumed
by the process).   Once the values get large enough to be meaningful
the difference made by this change will be in the noise, and irrelevant.

This needs a couple of additions to struct proc, so we are now into 8.99.17

Revision 1.347 / (download) - annotate - [select for diffs], Sun May 6 13:40:52 2018 UTC (5 years, 11 months ago) by kamil
Branch: MAIN
Changes since 1.346: +1 -2 lines
Diff to previous 1.346 (colored)

Remove an element from struct emul: e_tracesig

e_tracesig used to be implemented for Darwin compat. Nowadays the Darwin
compatiblity layer is gone and there are no other users.

This functionality isn't used where it shall be used in the existing
codebase.

If we want to emulate debugging interfaces in compat layers we would need
to implement that from scratch anyway. We would need to be bug compatible
with other OSes too.

Proposed on tech-kern@.

Welcome to NetBSD 8.99.16!

Sponsored by <The NetBSD Foundation>

Revision 1.344.2.1 / (download) - annotate - [select for diffs], Sun Apr 22 07:20:29 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.344: +3 -3 lines
Diff to previous 1.344 (colored)

Sync with HEAD

Revision 1.346 / (download) - annotate - [select for diffs], Thu Apr 19 21:19:07 2018 UTC (6 years ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-0502, pgoyette-compat-0422
Changes since 1.345: +2 -2 lines
Diff to previous 1.345 (colored)

s/static inline/static __inline/g for consistency with other include
headers.

Revision 1.345 / (download) - annotate - [select for diffs], Mon Apr 16 14:51:59 2018 UTC (6 years ago) by kamil
Branch: MAIN
Changes since 1.344: +2 -2 lines
Diff to previous 1.344 (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.340.6.1 / (download) - annotate - [select for diffs], Thu Apr 12 13:42:49 2018 UTC (6 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.340: +2 -3 lines
Diff to previous 1.340 (colored) next main 1.341 (colored)

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

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

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

add disgusting magic to handle compat_netbsd32 as a module.

use process_*reg32 instead of struct *reg32.

Remove the filesystem tracing feature

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

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

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

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

Reduce code complexity after removal of this functionality.

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

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

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

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

Sponsored by <The NetBSD Foundation>

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

handle siginfo requests for ptrace32

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

The refactored code did not work and was generating EFAULT.

Sponsored by <The NetBSD Foundation>

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

don't ignore error from copyout_piod

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

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

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

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

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

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

Reviewed by <christos>

Sponsored by <The NetBSD Foundation>

Revision 1.344 / (download) - annotate - [select for diffs], Tue Jan 9 20:55:43 2018 UTC (6 years, 3 months ago) by maya
Branch: MAIN
CVS Tags: 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.343: +1 -2 lines
Diff to previous 1.343 (colored)

remove struct emul's e_fault.

It used to be used by COMPAT_IRIX for the purpose of overriding
uvm_fault (only implemented in MIPS), now removed.

Ride 8.99.12 version bump.

Revision 1.317.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:20 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.317.2.2: +64 -11 lines
Diff to previous 1.317.2.2 (colored) to branchpoint 1.317 (colored) next main 1.318 (colored)

update from HEAD

Revision 1.343 / (download) - annotate - [select for diffs], Tue Nov 7 19:44:05 2017 UTC (6 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.342: +2 -1 lines
Diff to previous 1.342 (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.320.6.10 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:16 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.320.6.9: +5 -3 lines
Diff to previous 1.320.6.9 (colored) to branchpoint 1.320 (colored) next main 1.321 (colored)

Sync with HEAD

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

Remove the filesystem tracing feature

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

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

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

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

Reduce code complexity after removal of this functionality.

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

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

Proposed on tech-kern@.

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

Sponsored by <The NetBSD Foundation>

Revision 1.341 / (download) - annotate - [select for diffs], Sat Jul 1 16:36:46 2017 UTC (6 years, 9 months ago) by khorben
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.340: +2 -2 lines
Diff to previous 1.340 (colored)

Typo

Revision 1.331.2.3 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:31 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.331.2.2: +2 -2 lines
Diff to previous 1.331.2.2 (colored) to branchpoint 1.331 (colored) next main 1.332 (colored)

Sync with HEAD

Revision 1.337.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:08 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.337: +4 -2 lines
Diff to previous 1.337 (colored) next main 1.338 (colored)

Sync with HEAD

Revision 1.340 / (download) - annotate - [select for diffs], Thu Mar 30 20:17:11 2017 UTC (7 years ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.339: +2 -1 lines
Diff to previous 1.339 (colored)

factor out getauxv code.

Revision 1.339 / (download) - annotate - [select for diffs], Fri Mar 24 17:40:44 2017 UTC (7 years ago) by christos
Branch: MAIN
Changes since 1.338: +1 -2 lines
Diff to previous 1.338 (colored)

Instead of copying parts of sigswitch to process_stoptrace, use it directly.
Rename process_stoptrace -> proc_stoptrace and put it in kern_sig.c so we
don't need to expose any more functions from it.

Revision 1.331.2.2 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:53 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.331.2.1: +15 -1 lines
Diff to previous 1.331.2.1 (colored) to branchpoint 1.331 (colored)

Sync with HEAD

Revision 1.338 / (download) - annotate - [select for diffs], Thu Feb 23 03:34:23 2017 UTC (7 years, 1 month ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.337: +3 -1 lines
Diff to previous 1.337 (colored)

Introduce PT_GETDBREGS and PT_SETDBREGS in ptrace(2) on i386 and amd64

This interface is modeled after FreeBSD API with the usage.

This replaced previous watchpoint API. The previous one was introduced
recently in NetBSD-current and remove its spurs without any
backward-compatibility.

Design choices for Debug Register accessors:
 - exec() (TRAP_EXEC event) must remove debug registers from LWP
 - debug registers are only per-LWP, not per-process globally
 - debug registers must not be inherited after (v)forking a process
 - debug registers must not be inherited after forking a thread
 - a debugger is responsible to set global watchpoints/breakpoints with the
   debug registers, to achieve this PTRACE_LWP_CREATE/PTRACE_LWP_EXIT event
   monitoring function is designed to be used
 - debug register traps must generate SIGTRAP with si_code TRAP_DBREG
 - debugger is responsible to retrieve debug register state to distinguish
   the exact debug register trap (DR6 is Status Register on x86)
 - kernel must not remove debug register traps after triggering a trap event
   a debugger is responsible to detach this trap with appropriate PT_SETDBREGS
   call (DR7 is Control Register on x86)
 - debug registers must not be exposed in mcontext
 - userland must not be allowed to set a trap on the kernel

Implementation notes on i386 and amd64:
 - the initial state of debug register is retrieved on boot and this value is
   stored in a local copy (initdbregs), this value is used to initialize dbreg
   context after PT_GETDBREGS
 - struct dbregs is stored in pcb as a pointer and by default not initialized
 - reserved registers (DR4-DR5, DR9-DR15) are ignored

Further ideas:
 - restrict this interface with securelevel

Tested on real hardware i386 (Intel Pentium IV) and amd64 (Intel i7).

This commit enables 390 debug register ATF tests in kernel/arch/x86.
All tests are passing.

This commit does not cover netbsd32 compat code. Currently other interface
PT_GET_SIGINFO/PT_SET_SIGINFO is required in netbsd32 compat code in order to
validate reliably PT_GETDBREGS/PT_SETDBREGS.

This implementation does not cover FreeBSD specific defines in their
<x86/reg.h>: DBREG_DR7_LOCAL_ENABLE, DBREG_DR7_GLOBAL_ENABLE, DBREG_DR7_LEN_1
etc. These values tend to be reinvented by each tracer on its own. GNU
Debugger (GDB) works with NetBSD debug registers after adding this patch:

--- gdb/amd64bsd-nat.c.orig	2016-02-10 03:19:39.000000000 +0000
+++ gdb/amd64bsd-nat.c
@@ -167,6 +167,10 @@ amd64bsd_target (void)

 #ifdef HAVE_PT_GETDBREGS

+#ifndef DBREG_DRX
+#define	DBREG_DRX(d,x)	((d)->dr[(x)])
+#endif
+
 static unsigned long
 amd64bsd_dr_get (ptid_t ptid, int regnum)
 {


Another reason to stop introducing unpopular defines covering machine
specific register macros is that these value varies across generations of
the same CPU family.

GDB demo:
  (gdb) c
  Continuing.

  Watchpoint 2: traceme

  Old value = 0
  New value = 16
  main (argc=1, argv=0x7f7fff79fe30) at test.c:8
  8               printf("traceme=%d\n", traceme);

(Currently the GDB interface is not reliable due to NetBSD support bugs)

Sponsored by <The NetBSD Foundation>

Revision 1.320.6.9 / (download) - annotate - [select for diffs], Sun Feb 5 13:41:01 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.320.6.8: +13 -1 lines
Diff to previous 1.320.6.8 (colored) to branchpoint 1.320 (colored)

Sync with HEAD

Revision 1.337 / (download) - annotate - [select for diffs], Sat Jan 14 06:36:52 2017 UTC (7 years, 3 months ago) by kamil
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.336: +8 -1 lines
Diff to previous 1.336 (colored)

Introduce PTRACE_LWP_{CREATE,EXIT} in ptrace(2) and TRAP_LWP in siginfo(5)

Add interface in ptrace(2) to track thread (LWP) events:
 - birth,
 - termination.

The purpose of this thread is to keep track of the current thread state in
a tracee and apply e.g. per-thread designed hardware assisted watchpoints.

This interface reuses the EVENT_MASK and PROCESS_STATE interface, and
shares it with PTRACE_FORK, PTRACE_VFORK and PTRACE_VFORK_DONE.

Change the following structure:

typedef struct ptrace_state {
        int     pe_report_event;
        pid_t   pe_other_pid;
} ptrace_state_t;

to

typedef struct ptrace_state {
        int     pe_report_event;
        union {
                pid_t   _pe_other_pid;
                lwpid_t _pe_lwp;
        } _option;
} ptrace_state_t;

#define pe_other_pid    _option._pe_other_pid
#define pe_lwp          _option._pe_lwp

This keeps size of ptrace_state_t unchanged as both pid_t and lwpid_t are
defined as int32_t-like integer. This change does not break existing
prebuilt software and has minimal effect on necessity for source-code
changes. In summary, this change should be binary compatible and shouldn't
break build of existing software.


Introduce new siginfo(5) type for LWP events under the SIGTRAP signal:
TRAP_LWP. This change will help debuggers to distinguish exact source of
SIGTRAP.


Add two basic t_ptrace_wait* tests:
lwp_create1:
    Verify that 1 LWP creation is intercepted by ptrace(2) with
    EVENT_MASK set to PTRACE_LWP_CREATE

lwp_exit1:
    Verify that 1 LWP creation is intercepted by ptrace(2) with
    EVENT_MASK set to PTRACE_LWP_EXIT

All tests are passing.


Surfing the previous kernel ABI bump to 7.99.59 for PTRACE_VFORK{,_DONE}.

Sponsored by <The NetBSD Foundation>

Revision 1.336 / (download) - annotate - [select for diffs], Fri Jan 13 23:00:35 2017 UTC (7 years, 3 months ago) by kamil
Branch: MAIN
Changes since 1.335: +6 -1 lines
Diff to previous 1.335 (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.320.6.8 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:29 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.320.6.7: +5 -1 lines
Diff to previous 1.320.6.7 (colored) to branchpoint 1.320 (colored)

Sync with HEAD

Revision 1.331.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:22 2016 UTC (7 years, 5 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.331: +11 -1 lines
Diff to previous 1.331 (colored)

Sync with HEAD

Revision 1.335 / (download) - annotate - [select for diffs], Wed Oct 19 09:44:01 2016 UTC (7 years, 6 months ago) by skrll
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20161204
Changes since 1.334: +5 -1 lines
Diff to previous 1.334 (colored)

PR kern/51514: ptrace(2) fails for 32-bit process on 64-bit kernel

Updated from the original patch in the PR by me.

Revision 1.320.6.7 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:11 2016 UTC (7 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.320.6.6: +11 -1 lines
Diff to previous 1.320.6.6 (colored) to branchpoint 1.320 (colored)

Sync with HEAD

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

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

Revision 1.333 / (download) - annotate - [select for diffs], Fri Sep 23 14:09:39 2016 UTC (7 years, 6 months ago) by skrll
Branch: MAIN
Changes since 1.332: +5 -1 lines
Diff to previous 1.332 (colored)

Add netbsd32_clock_getcpuclockid2 and netbsd32_wait6 functions

Revision 1.332 / (download) - annotate - [select for diffs], Tue Sep 13 07:39:45 2016 UTC (7 years, 7 months ago) by martin
Branch: MAIN
CVS Tags: localcount-20160914
Changes since 1.331: +5 -1 lines
Diff to previous 1.331 (colored)

Allow emulations to override the creation of ktrace records for posting
signals. In compat_netbsd32 use this to write the 32bit version of
the records, so a 32bit userland kdump is happy.

Revision 1.320.6.6 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:24 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.320.6.5: +2 -1 lines
Diff to previous 1.320.6.5 (colored) to branchpoint 1.320 (colored)

Sync with HEAD

Revision 1.331 / (download) - annotate - [select for diffs], Fri Jun 10 23:24:33 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.330: +2 -1 lines
Diff to previous 1.330 (colored)

GSoC 2016: Charles Cui: add SEM_NSEMS_MAX

Revision 1.320.6.5 / (download) - annotate - [select for diffs], Sun May 29 08:44:40 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.320.6.4: +2 -1 lines
Diff to previous 1.320.6.4 (colored) to branchpoint 1.320 (colored)

Sync with HEAD

Revision 1.330 / (download) - annotate - [select for diffs], Wed Apr 27 21:15:40 2016 UTC (7 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.329: +2 -1 lines
Diff to previous 1.329 (colored)

We need a flag for WCONTINUED so that we can reset it... Fixes bash issue.

Revision 1.320.6.4 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:19 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.320.6.3: +13 -7 lines
Diff to previous 1.320.6.3 (colored) to branchpoint 1.320 (colored)

Sync with HEAD

Revision 1.329 / (download) - annotate - [select for diffs], Mon Apr 4 23:07:06 2016 UTC (8 years ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.328: +2 -2 lines
Diff to previous 1.328 (colored)

no need to pass the coredump flag to exit1() since it is set and known
in one place.

Revision 1.328 / (download) - annotate - [select for diffs], Mon Apr 4 20:47:57 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.327: +13 -7 lines
Diff to previous 1.327 (colored)

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

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

Revision 1.320.6.3 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:18 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.320.6.2: +13 -2 lines
Diff to previous 1.320.6.2 (colored) to branchpoint 1.320 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.327 / (download) - annotate - [select for diffs], Tue Dec 1 01:19:02 2015 UTC (8 years, 4 months ago) by pgoyette
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.326: +2 -2 lines
Diff to previous 1.326 (colored)

Finish the rename from sc_auto --> sc_autoload

(Thanks, brad harder)

Revision 1.326 / (download) - annotate - [select for diffs], Mon Nov 30 23:17:40 2015 UTC (8 years, 4 months ago) by pgoyette
Branch: MAIN
Changes since 1.325: +2 -2 lines
Diff to previous 1.325 (colored)

Rename sc_auto to sc_autoload at suggestion of christos@

Revision 1.325 / (download) - annotate - [select for diffs], Mon Nov 30 22:47:19 2015 UTC (8 years, 4 months ago) by pgoyette
Branch: MAIN
Changes since 1.324: +10 -1 lines
Diff to previous 1.324 (colored)

Make the list of syscalls which can trigger a module autoload an
attribute of each emulation, rather than having a single global
list which applies only to the default emulation.

This changes 'struct emul' so

        Welcome to 7.99.23 !

Revision 1.324 / (download) - annotate - [select for diffs], Thu Nov 26 13:15:34 2015 UTC (8 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.323: +3 -2 lines
Diff to previous 1.323 (colored)

We never exec(2) with a kernel vmspace, so do not test for that, but instead
KASSERT() that we don't.
When calculating the load address for the interpreter (e.g. ld.elf_so),
we need to take into account wether the exec'd process will run with
topdown memory or bottom up. We can not use the current vmspace's flags
to test for that, as this happens too early. Luckily the execpack already
knows what the new state will be later, so instead of testing the current
vmspace, pass the info as additional argument to struct emul
e_vm_default_addr.
Fix all such functions and adopt all callers.

Revision 1.323 / (download) - annotate - [select for diffs], Thu Sep 24 14:33:31 2015 UTC (8 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.322: +2 -1 lines
Diff to previous 1.322 (colored)

Add proc_find_locked(), which returns the process locked and does the
sysctl access check.

Revision 1.320.6.2 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:17 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.320.6.1: +2 -1 lines
Diff to previous 1.320.6.1 (colored) to branchpoint 1.320 (colored)

Sync with HEAD

Revision 1.322 / (download) - annotate - [select for diffs], Fri Jun 19 10:18:19 2015 UTC (8 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.321: +2 -1 lines
Diff to previous 1.321 (colored)

Make kill1 public (we'll need it from compat/netbsd32)

Revision 1.320.6.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:32 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.320: +6 -1 lines
Diff to previous 1.320 (colored)

Sync with HEAD

Revision 1.321 / (download) - annotate - [select for diffs], Sat Mar 7 16:34:55 2015 UTC (9 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.320: +6 -1 lines
Diff to previous 1.320 (colored)

add dtrace syscall glue:
- adds 2 members to sysent: these are the entry and exit probe ids
  they are non-zero only when dtrace is loaded
- add an emul specific probe for dtrace: this is NULL unless the emulation
  supports dtrace and is loaded
- adjust the syscall stub call trace_enter/exit if needed for systrace
- add more info to trace_enter and exit needed by systrace

Revision 1.317.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:44 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.317.2.1: +1 -3 lines
Diff to previous 1.317.2.1 (colored) to branchpoint 1.317 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.311.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:41:18 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.311.2.4: +1 -3 lines
Diff to previous 1.311.2.4 (colored) to branchpoint 1.311 (colored) next main 1.312 (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.319.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:21 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.319: +1 -3 lines
Diff to previous 1.319 (colored) next main 1.320 (colored)

sync with head

Revision 1.320 / (download) - annotate - [select for diffs], Fri Feb 21 22:06:48 2014 UTC (10 years, 1 month ago) by skrll
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, 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.319: +1 -3 lines
Diff to previous 1.319 (colored)

Remove struct simplelock forward declaration.

Revision 1.317.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:12 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.317: +10 -4 lines
Diff to previous 1.317 (colored)

resync with head

Revision 1.311.2.4 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:30 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.311.2.3: +9 -4 lines
Diff to previous 1.311.2.3 (colored) to branchpoint 1.311 (colored)

sync with head

Revision 1.311.2.3 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:53 2013 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.311.2.2: +2 -1 lines
Diff to previous 1.311.2.2 (colored) to branchpoint 1.311 (colored)

sync with (a bit old) head

Revision 1.319 / (download) - annotate - [select for diffs], Wed Jan 2 19:39:04 2013 UTC (11 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base8, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.318: +9 -4 lines
Diff to previous 1.318 (colored)

Only expose the bulk of sys/proc.h and sys/lwp.h if _KERNEL or _KMEMUSER
is defined.
i386 and amd64 build ok.

Revision 1.318 / (download) - annotate - [select for diffs], Wed Dec 5 08:05:54 2012 UTC (11 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.317: +2 -1 lines
Diff to previous 1.317 (colored)

sys/proc.h refers sizeof(struct pcb), so include <machine/pcb.h>.

Revision 1.311.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:57 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.311.2.1: +3 -2 lines
Diff to previous 1.311.2.1 (colored) to branchpoint 1.311 (colored)

sync with head

Revision 1.317 / (download) - annotate - [select for diffs], Sun Jul 22 22:40:18 2012 UTC (11 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.316: +3 -2 lines
Diff to previous 1.316 (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.311.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:52 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.311: +4 -16 lines
Diff to previous 1.311 (colored)

sync with head

Revision 1.311.6.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:50 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.311.6.1: +2 -10 lines
Diff to previous 1.311.6.1 (colored) to branchpoint 1.311 (colored) next main 1.312 (colored)

sync to -current.

Revision 1.316 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:58 2012 UTC (12 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base10
Changes since 1.315: +2 -10 lines
Diff to previous 1.315 (colored)

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

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

merge to -current.

Revision 1.315 / (download) - annotate - [select for diffs], Sat Feb 11 23:16:18 2012 UTC (12 years, 2 months ago) by martin
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-base2
Changes since 1.314: +2 -1 lines
Diff to previous 1.314 (colored)

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

Revision 1.282.4.1 / (download) - annotate - [select for diffs], Sat Feb 4 16:57:59 2012 UTC (12 years, 2 months 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.282: +2 -1 lines
Diff to previous 1.282 (colored) next main 1.283 (colored)

Apply patch, requested by jmcneill in ticket #1668:
	sys/arch/amd64/amd64/syscall.c			patch
	sys/arch/i386/i386/syscall.c			patch
	sys/arch/i386/i386/trap.c			patch
	sys/kern/kern_sig.c				patch
	sys/kern/kern_sleepq.c				patch
	sys/kern/kern_subr.c				patch
	sys/kern/sys_process.c				patch
	sys/secmodel/bsd44/secmodel_bsd44_suser.c	patch
	sys/sys/proc.h					patch
	sys/sys/ptrace.h				patch

arch/i386/i386/machdep.c, arch/amd64/amd64/machdep.c (from
arch/x86/x86/machdep.c) by christos:
Remove code that was used to avoid register spills. setcontext(2) can change
the registers, so re-fetching will produce the wrong result for trace_exit().
arch/i386/i386/trap.c by reinoud:
Fix the illegal instruction return address. It was using the value of the
cpu's %cr2 register but thats not valid:

CR2 Contains a value called Page Fault Linear Address (PFLA). When a page
fault occurs, the address the program attempted to access is stored in the CR2
register.

And this is thus NOT the illegal instruction address!
kern/kern_sig.c by christos:
PR kern/45327: Jared McNeill: ptrace: siginfo doesn't work with traced processes
When saving the signal in p->p_xstat, clear it from the pending mask, but
don't remove it from the siginfo queue, so that next time the debugger
delivers it, the original information is found.
When posting a signal from the debugger l->l_sigpendset is not set, so we
use the process pending signal and add it back to the process pending set.
Split sigget into sigget() and siggetinfo(). When a signal comes from the
debugger (l->l_sigpendset == NULL), using siggetinfo() try to fetch the
siginfo information from l->l_sigpend and then from p->p_sigpend if it
was not found. This allows us to pass siginfo information for traps from
the debugger.
don't delete signal from the debugger.
kern/kern_sleepq.c by christos:
PR kern/40594: Antti Kantee: Don't call issignal() here to determine what errno
to set for the interrupted syscall, because issignal() will consume the signal
and it will not be delivered to the process afterwards. Instead call
sigispending() (which now returns the first pending signal) and does not
consume the signal.
We need to process SA_STOP signals immediately, and not deliver them to
the process. Instead of re-structuring the code to do that, call issignal()
like before in that case. (tail -F /file^Zfg should not get interrupted).
kern/kern_subr.c by jmcneill, christos:
PR kern/45312: ptrace: PT_SETREGS can't alter system calls

Add a new PT_SYSCALLEMU request that cancels the current syscall, for
use with PT_SYSCALL.
For PT_SYSCALLEMU, no need to stop again on syscall exit.
ifdef unused variable with -UPTRACE

kern/sys_process.c, sys/proc.h, sys/ptrace.h, secmodel/bsd44/secmodel_bsd44_suser.c by jmcneill, christos:
PR kern/43681: PT_SYSCALL appears to be broken

sys_ptrace: For PT_CONTINUE/PT_SYSCALL/PT_DETACH, modify the p_trace_enabled
flag of the target process, not the calling process.
Process the signal now, otherwise calling issignal() and ignoring
the return will lose the signal if it came from the debugger
(issignal() clears p->p_xstat)
PR kern/45312: ptrace: PT_SETREGS can't alter system calls

Add a new PT_SYSCALLEMU request that cancels the current syscall, for
use with PT_SYSCALL.
PR kern/45330: ptrace: signals can alter syscall return values

process_stoptrace: defer signal processing to userret, ok christos@

Revision 1.314 / (download) - annotate - [select for diffs], Sat Jan 28 12:22:33 2012 UTC (12 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.313: +2 -7 lines
Diff to previous 1.313 (colored)

Remove obsolete ltsleep(9) and wakeup_one(9).

Revision 1.313 / (download) - annotate - [select for diffs], Thu Jan 5 15:19:53 2012 UTC (12 years, 3 months ago) by reinoud
Branch: MAIN
Changes since 1.312: +1 -2 lines
Diff to previous 1.312 (colored)

Revert MAP_NOSYSCALLS patch.

Revision 1.312 / (download) - annotate - [select for diffs], Tue Dec 20 15:39:35 2011 UTC (12 years, 4 months ago) by reinoud
Branch: MAIN
Changes since 1.311: +2 -1 lines
Diff to previous 1.311 (colored)

Add a MAP_NOSYSCALLS flag to mmap. This flag prohibits executing of system
calls from the mapped region. This can be used for emulation perposed or for
extra security in the case of generated code.

Its implemented by adding mapping-attributes to each uvm_map_entry. These can
then be queried when needed.

Currently the MAP_NOSYSCALLS is only implemented for x86 but other
architectures are easy to adapt; see the sys/arch/x86/x86/syscall.c patch.
Port maintainers are encouraged to add them for their processor ports too.
When this feature is not yet implemented for an architecture the
MAP_NOSYSCALLS is simply ignored with virtually no cpu cost..

Revision 1.311 / (download) - annotate - [select for diffs], Fri Oct 21 02:07:07 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.310: +3 -1 lines
Diff to previous 1.310 (colored)

add proc_compare prototype.

Revision 1.310 / (download) - annotate - [select for diffs], Fri Sep 2 20:10:19 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.309: +3 -1 lines
Diff to previous 1.309 (colored)

Add support for PTRACE_FORK.
- add a field in struct proc to save the forker/forkee pid, and a flag.
- add 3 new ptrace calls: PT_GET_PROCESS_STATE, PT_GET_EVENT_MASK,
  PT_SET_EVENT_MASK
Add a PT_STRINGS constant so that we don't hard-code the list of ptrace
subcalls in other programs (kdump).

Revision 1.309 / (download) - annotate - [select for diffs], Wed Aug 31 22:58:39 2011 UTC (12 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.308: +2 -1 lines
Diff to previous 1.308 (colored)

PR# kern/45312: ptrace: PT_SETREGS can't alter system calls

Add a new PT_SYSCALLEMU request that cancels the current syscall, for
use with PT_SYSCALL.

Revision 1.308 / (download) - annotate - [select for diffs], Wed Jul 27 13:20:07 2011 UTC (12 years, 8 months ago) by uebayasi
Branch: MAIN
Changes since 1.307: +3 -1 lines
Diff to previous 1.307 (colored)

Forward-declare struct vmspace to reduce dependencies on uvm/uvm_extern.h.

Revision 1.299.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:10:12 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.299: +22 -25 lines
Diff to previous 1.299 (colored) next main 1.300 (colored)

Sync with HEAD.

Revision 1.296.2.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:12 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.296.2.3: +3 -7 lines
Diff to previous 1.296.2.3 (colored) to branchpoint 1.296 (colored) next main 1.297 (colored)

sync with head

Revision 1.307 / (download) - annotate - [select for diffs], Mon May 2 22:27:53 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.306: +4 -5 lines
Diff to previous 1.306 (colored)

Update few comments.

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

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

Revision 1.305 / (download) - annotate - [select for diffs], Wed Apr 27 00:36:48 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.304: +1 -3 lines
Diff to previous 1.304 (colored)

G/C M_EMULDATA

Revision 1.296.2.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:19 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.296.2.2: +16 -11 lines
Diff to previous 1.296.2.2 (colored) to branchpoint 1.296 (colored)

sync with head

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

Replace malloc with kmem, and remove M_SUBPROC.

Revision 1.303 / (download) - annotate - [select for diffs], Wed Apr 13 08:45:00 2011 UTC (13 years ago) by mrg
Branch: MAIN
Changes since 1.302: +16 -11 lines
Diff to previous 1.302 (colored)

expose the KSTACK_LOWEST_ADDR and KSTACK_SIZE to _KMEMUSER as well,
like the x86 versions do.  for crash(8).

Revision 1.302 / (download) - annotate - [select for diffs], Tue Mar 8 12:39:29 2011 UTC (13 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.301: +2 -1 lines
Diff to previous 1.301 (colored)

Nuke all threads belonging to a process calling exec before allowing
the exec handshake to return.

In addition to being The Right Thing To Do, fixes some nasty
conditions for CLOEXEC fd's (or at least does so in theory, I
couldn't create any problems although I tried).

Revision 1.296.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:56:24 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.296.2.1: +22 -32 lines
Diff to previous 1.296.2.1 (colored) to branchpoint 1.296 (colored)

sync with head

Revision 1.299.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 15:10:51 2011 UTC (13 years, 1 month ago) by bouyer
Branch: bouyer-quota2
Changes since 1.299.4.1: +2 -7 lines
Diff to previous 1.299.4.1 (colored) to branchpoint 1.299 (colored) next main 1.300 (colored)

Sync with HEAD

Revision 1.301 / (download) - annotate - [select for diffs], Fri Mar 4 22:25:32 2011 UTC (13 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.300: +2 -7 lines
Diff to previous 1.300 (colored)

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

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

Revision 1.299.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:05 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.299: +2 -1 lines
Diff to previous 1.299 (colored)

Sync with HEAD

Revision 1.300 / (download) - annotate - [select for diffs], Fri Jan 28 18:44:45 2011 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base7, bouyer-quota2-base
Changes since 1.299: +2 -1 lines
Diff to previous 1.299 (colored)

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

Revision 1.299 / (download) - annotate - [select for diffs], Fri Jan 14 02:06:34 2011 UTC (13 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.298: +17 -22 lines
Diff to previous 1.298 (colored)

Retire struct user, remove sys/user.h inclusions.  Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.

Revision 1.294.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:48:08 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.294.2.1: +7 -16 lines
Diff to previous 1.294.2.1 (colored) to branchpoint 1.294 (colored) next main 1.295 (colored)

Sync with HEAD.

Revision 1.274.2.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:55:11 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.274.2.5: +8 -17 lines
Diff to previous 1.274.2.5 (colored) to branchpoint 1.274 (colored) next main 1.275 (colored)

sync with head.

Revision 1.298 / (download) - annotate - [select for diffs], Wed Jul 7 01:30:38 2010 UTC (13 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, matt-mips64-premerge-20101231
Changes since 1.297: +4 -5 lines
Diff to previous 1.297 (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.296.2.1 / (download) - annotate - [select for diffs], Sat Jul 3 01:20:04 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.296: +5 -13 lines
Diff to previous 1.296 (colored)

sync with head

Revision 1.297 / (download) - annotate - [select for diffs], Thu Jul 1 02:38:31 2010 UTC (13 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.296: +5 -13 lines
Diff to previous 1.296 (colored)

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

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

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

Fixes PR/43176.

Revision 1.294.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:33 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.294: +6 -1 lines
Diff to previous 1.294 (colored)

Sync with HEAD.

Revision 1.274.2.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:42 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.274.2.4: +9 -7 lines
Diff to previous 1.274.2.4 (colored) to branchpoint 1.274 (colored)

sync with head

Revision 1.296 / (download) - annotate - [select for diffs], Wed Mar 3 00:45:55 2010 UTC (14 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.295: +5 -1 lines
Diff to previous 1.295 (colored)

comment

Revision 1.295 / (download) - annotate - [select for diffs], Sun Feb 21 02:11:39 2010 UTC (14 years, 1 month ago) by darran
Branch: MAIN
Changes since 1.294: +2 -1 lines
Diff to previous 1.294 (colored)

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

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

Ok with core@.

Revision 1.294 / (download) - annotate - [select for diffs], Thu Dec 10 14:13:54 2009 UTC (14 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip
Changes since 1.293: +2 -2 lines
Diff to previous 1.293 (colored)

Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.

Revision 1.293 / (download) - annotate - [select for diffs], Wed Nov 4 21:23:02 2009 UTC (14 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.292: +2 -2 lines
Diff to previous 1.292 (colored)

do_sys_wait(): fix previous by checking for ru != NULL.  Noticed by
Onno van der Linden.  Also, remove redundant arguments (seems that
was_zombie was not used since rev 1.177 ?).

Revision 1.292 / (download) - annotate - [select for diffs], Thu Oct 22 22:28:57 2009 UTC (14 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.291: +1 -5 lines
Diff to previous 1.291 (colored)

Avoid #ifndef __NO_CPU_LWP_FREE, only ia64 is missing cpu_lwp_free
routines and it can/should provide stubs.

Revision 1.291 / (download) - annotate - [select for diffs], Fri Oct 2 22:38:45 2009 UTC (14 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.290: +2 -1 lines
Diff to previous 1.290 (colored)

Move rlimit policy back to the subsystem.

For this we needed proc_uidmatch() exposed, which makes a lot of sense,
so put it back in sys_process.c for use in other places as well.

Revision 1.283.4.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:56 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.283.4.1: +13 -4 lines
Diff to previous 1.283.4.1 (colored) to branchpoint 1.283 (colored) next main 1.284 (colored)

Sync with HEAD.

Revision 1.274.2.4 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:38 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.274.2.3: +12 -3 lines
Diff to previous 1.274.2.3 (colored) to branchpoint 1.274 (colored)

sync with head

Revision 1.290 / (download) - annotate - [select for diffs], Wed May 27 12:15:11 2009 UTC (14 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.289: +12 -3 lines
Diff to previous 1.289 (colored)

add comments on KSTACK_LOWEST_ADDR/KSTACK_SIZE.

Revision 1.274.2.3 / (download) - annotate - [select for diffs], Sat May 16 10:41:53 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.274.2.2: +2 -2 lines
Diff to previous 1.274.2.2 (colored) to branchpoint 1.274 (colored)

sync with head

Revision 1.289 / (download) - annotate - [select for diffs], Thu May 14 23:12:14 2009 UTC (14 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4
Changes since 1.288: +2 -2 lines
Diff to previous 1.288 (colored)

update a comment.

Revision 1.283.4.1 / (download) - annotate - [select for diffs], Wed May 13 17:23:03 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.283: +16 -32 lines
Diff to previous 1.283 (colored)

Sync with HEAD.

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

Revision 1.274.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:14:35 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.274.2.1: +33 -35 lines
Diff to previous 1.274.2.1 (colored) to branchpoint 1.274 (colored)

sync with head.

Revision 1.282.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:53 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.282.2.1: +16 -32 lines
Diff to previous 1.282.2.1 (colored) to branchpoint 1.282 (colored) next main 1.283 (colored)

Sync with HEAD.

Revision 1.288 / (download) - annotate - [select for diffs], Sat Apr 25 15:06:32 2009 UTC (14 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.287: +7 -12 lines
Diff to previous 1.287 (colored)

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

Quick OK by <ad>.

Revision 1.287 / (download) - annotate - [select for diffs], Sun Apr 19 22:15:39 2009 UTC (15 years ago) by rmind
Branch: MAIN
Changes since 1.286: +7 -18 lines
Diff to previous 1.286 (colored)

- Remove a bunch of unused declarations in proc.h header.
- Move yield() and suspendsched() to sched.h, where they should belong.

Revision 1.286 / (download) - annotate - [select for diffs], Thu Apr 16 14:56:41 2009 UTC (15 years ago) by rmind
Branch: MAIN
Changes since 1.285: +1 -3 lines
Diff to previous 1.285 (colored)

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

Revision 1.285 / (download) - annotate - [select for diffs], Thu Apr 16 00:17:19 2009 UTC (15 years ago) by rmind
Branch: MAIN
Changes since 1.284: +4 -1 lines
Diff to previous 1.284 (colored)

Avoid few #ifdef KSTACK_CHECK_MAGIC.

Revision 1.284 / (download) - annotate - [select for diffs], Sat Mar 28 21:41:06 2009 UTC (15 years ago) by rmind
Branch: MAIN
Changes since 1.283: +1 -2 lines
Diff to previous 1.283 (colored)

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

Revision 1.282.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:30 2009 UTC (15 years, 3 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.282: +5 -2 lines
Diff to previous 1.282 (colored)

Sync with HEAD.

Revision 1.270.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:40 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.270.6.4: +14 -2 lines
Diff to previous 1.270.6.4 (colored) to branchpoint 1.270 (colored) next main 1.271 (colored)

Sync with HEAD.

Revision 1.280.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:35 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.280.2.1: +6 -3 lines
Diff to previous 1.280.2.1 (colored) to branchpoint 1.280 (colored) next main 1.281 (colored)

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

Revision 1.283 / (download) - annotate - [select for diffs], Wed Nov 19 18:36:10 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Changes since 1.282: +5 -2 lines
Diff to previous 1.282 (colored)

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

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

Revision 1.282 / (download) - annotate - [select for diffs], Wed Oct 22 11:14:33 2008 UTC (15 years, 5 months ago) by ad
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-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.281: +2 -2 lines
Diff to previous 1.281 (colored)

We may want to patch emul::e_sysent[] so drop the const.

Revision 1.280.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:18:09 2008 UTC (15 years, 6 months ago) by haad
Branch: haad-dm
Changes since 1.280: +10 -1 lines
Diff to previous 1.280 (colored)

Sync with HEAD.

Revision 1.281 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:21 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: MAIN
CVS Tags: haad-dm-base1
Changes since 1.280: +10 -1 lines
Diff to previous 1.280 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.270.6.4 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:20 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.270.6.3: +1 -1 lines
Diff to previous 1.270.6.3 (colored) to branchpoint 1.270 (colored)

Sync with HEAD.

Revision 1.276.2.4 / (download) - annotate - [select for diffs], Tue Jun 24 02:07:36 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.276.2.3: +1 -2 lines
Diff to previous 1.276.2.3 (colored) to branchpoint 1.276 (colored) next main 1.277 (colored)

Fix merge conflicts.

Revision 1.276.2.3 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:02 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.276.2.2: +4 -1 lines
Diff to previous 1.276.2.2 (colored) to branchpoint 1.276 (colored)

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

Revision 1.279.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:51 2008 UTC (15 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.279: +2 -2 lines
Diff to previous 1.279 (colored) next main 1.280 (colored)

Sync with head.

Revision 1.271.2.3 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:17 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.271.2.2: +3 -2 lines
Diff to previous 1.271.2.2 (colored) to branchpoint 1.271 (colored) next main 1.272 (colored)

sync with head.

Revision 1.280 / (download) - annotate - [select for diffs], Mon Jun 16 09:51:14 2008 UTC (15 years, 10 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.279: +2 -2 lines
Diff to previous 1.279 (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.270.6.3 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:37 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.270.6.2: +2 -0 lines
Diff to previous 1.270.6.2 (colored) to branchpoint 1.270 (colored)

Sync with HEAD.

Also fix build.

Revision 1.279 / (download) - annotate - [select for diffs], Wed Jun 4 12:16:06 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Branch point for: simonb-wapbl
Changes since 1.278: +2 -2 lines
Diff to previous 1.278 (colored)

Make sure the PAX flags are copied/zeroed correctly.

Revision 1.271.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:49 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.271.2.1: +2 -1 lines
Diff to previous 1.271.2.1 (colored) to branchpoint 1.271 (colored)

sync with head

Revision 1.278 / (download) - annotate - [select for diffs], Tue Jun 3 22:14:24 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.277: +2 -1 lines
Diff to previous 1.277 (colored)

Don't use proc specificdata. Speeds up mmap() and others.

Revision 1.277 / (download) - annotate - [select for diffs], Mon Jun 2 16:18:09 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Changes since 1.276: +2 -1 lines
Diff to previous 1.276 (colored)

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

Revision 1.270.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:33 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.270.6.1: +38 -70 lines
Diff to previous 1.270.6.1 (colored) to branchpoint 1.270 (colored)

Sync with HEAD.

Revision 1.276.2.2 / (download) - annotate - [select for diffs], Thu May 22 06:29:10 2008 UTC (15 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.276.2.1: +2 -1 lines
Diff to previous 1.276.2.1 (colored) to branchpoint 1.276 (colored)

Add back p_timerpend.

Revision 1.271.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:49 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.271: +39 -71 lines
Diff to previous 1.271 (colored)

sync with head.

Revision 1.274.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:51 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.274: +1 -28 lines
Diff to previous 1.274 (colored)

sync with head.

Revision 1.276.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:08 2008 UTC (15 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.276: +9 -1 lines
Diff to previous 1.276 (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.276 / (download) - annotate - [select for diffs], Tue Apr 29 13:02:03 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.275: +1 -21 lines
Diff to previous 1.275 (colored)

Move override of curlwp into lwp.h.

Revision 1.275 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:11 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.274: +1 -8 lines
Diff to previous 1.274 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.274 / (download) - annotate - [select for diffs], Fri Apr 25 11:21:18 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.273: +2 -1 lines
Diff to previous 1.273 (colored)

semexit: do nothing if the process has not used semaphores.

Revision 1.273 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:25 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.272: +30 -32 lines
Diff to previous 1.272 (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.272 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:31 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.271: +9 -13 lines
Diff to previous 1.271 (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.270.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:12 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.270: +1 -8 lines
Diff to previous 1.270 (colored)

Sync with HEAD.

Revision 1.270.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:28 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.270: +1 -8 lines
Diff to previous 1.270 (colored) next main 1.271 (colored)

sync with head.

Revision 1.253.2.5 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:10 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.253.2.4: +31 -40 lines
Diff to previous 1.253.2.4 (colored) next main 1.254 (colored)

sync with HEAD

Revision 1.201.2.10 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:47 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.9: +1 -8 lines
Diff to previous 1.201.2.9 (colored) next main 1.202 (colored)

sync with head.

Revision 1.271 / (download) - annotate - [select for diffs], Mon Mar 17 08:27:50 2008 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Branch point for: yamt-pf42
Changes since 1.270: +1 -8 lines
Diff to previous 1.270 (colored)

- simplify ASSERT_SLEEPABLE.
- move it from proc.h to systm.h.
- add some more checks.
- make it a little more lkm friendly.

Revision 1.201.2.9 / (download) - annotate - [select for diffs], Wed Feb 27 08:37:05 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.8: +31 -33 lines
Diff to previous 1.201.2.8 (colored)

sync with head.

Revision 1.270 / (download) - annotate - [select for diffs], Tue Feb 19 20:27:27 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.269: +31 -33 lines
Diff to previous 1.269 (colored)

Update field markings that describe which locks protect what.

Revision 1.258.2.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:23 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.258.2.3: +8 -17 lines
Diff to previous 1.258.2.3 (colored) next main 1.259 (colored)

Sync with HEAD.

Revision 1.201.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:47:56 2008 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.7: +9 -18 lines
Diff to previous 1.201.2.7 (colored)

sync with head

Revision 1.253.2.4 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:15 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.253.2.3: +12 -19 lines
Diff to previous 1.253.2.3 (colored)

sync with HEAD

Revision 1.262.4.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:57 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.262.4.1: +0 -1 lines
Diff to previous 1.262.4.1 (colored) to branchpoint 1.262 (colored) next main 1.263 (colored)

Sync with HEAD

Revision 1.269 / (download) - annotate - [select for diffs], Fri Jan 4 21:18:17 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: mjf-devfs-base, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.268: +1 -2 lines
Diff to previous 1.268 (colored)

Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.

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

Sync with HEAD

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

Merge vmlocking2 to head.

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

Remove systrace. Ok core@.

Revision 1.258.2.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:42 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.258.2.2: +2 -2 lines
Diff to previous 1.258.2.2 (colored)

Sync with HEAD.

Revision 1.261.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 23:05:55 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.261.2.3: +4 -4 lines
Diff to previous 1.261.2.3 (colored) to branchpoint 1.261 (colored) next main 1.262 (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.266 / (download) - annotate - [select for diffs], Wed Dec 26 22:11:52 2007 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.265: +2 -3 lines
Diff to previous 1.265 (colored)

Add PaX ASLR (Address Space Layout Randomization) [from elad and myself]

For regular (non PIE) executables randomization is enabled for:
    1. The data segment
    2. The stack

For PIE executables(*) randomization is enabled for:
    1. The program itself
    2. All shared libraries
    3. The data segment
    4. The stack

(*) To generate a PIE executable:
    - compile everything with -fPIC
    - link with -shared-libgcc -Wl,-pie

This feature is experimental, and might change. To use selectively add
    options PAX_ASLR=0
in your kernel.

Currently we are using 12 bits for the stack, program, and data segment and
16 or 24 bits for mmap, depending on __LP64__.

Revision 1.261.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:56 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.261.2.2: +3 -3 lines
Diff to previous 1.261.2.2 (colored) to branchpoint 1.261 (colored)

Sync with head.

Revision 1.265 / (download) - annotate - [select for diffs], Wed Dec 26 16:01:38 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.264: +2 -6 lines
Diff to previous 1.264 (colored)

Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.264 / (download) - annotate - [select for diffs], Tue Dec 25 18:33:48 2007 UTC (16 years, 3 months ago) by perry
Branch: MAIN
Changes since 1.263: +2 -2 lines
Diff to previous 1.263 (colored)

Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h

Revision 1.263 / (download) - annotate - [select for diffs], Sat Dec 22 01:14:53 2007 UTC (16 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.262: +2 -2 lines
Diff to previous 1.262 (colored)

use binuptime for l_stime/l_rtime.

Revision 1.261.2.2 / (download) - annotate - [select for diffs], Sat Dec 15 03:16:53 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.261.2.1: +2 -6 lines
Diff to previous 1.261.2.1 (colored) to branchpoint 1.261 (colored)

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

Revision 1.252.6.9 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:49 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.252.6.8: +3 -2 lines
Diff to previous 1.252.6.8 (colored) to branchpoint 1.252 (colored) next main 1.253 (colored)

Sync with HEAD.

Revision 1.258.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:34 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.258.2.1: +3 -2 lines
Diff to previous 1.258.2.1 (colored)

Sync with HEAD.

Revision 1.261.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:58:07 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.261: +3 -2 lines
Diff to previous 1.261 (colored)

Sync with head.

Revision 1.201.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:34:57 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.6: +3 -2 lines
Diff to previous 1.201.2.6 (colored)

sync with head

Revision 1.262 / (download) - annotate - [select for diffs], Tue Dec 4 16:56:16 2007 UTC (16 years, 4 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.261: +3 -2 lines
Diff to previous 1.261 (colored)

Use atomics to maintain nprocs.

Revision 1.258.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:49:30 2007 UTC (16 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.258: +9 -4 lines
Diff to previous 1.258 (colored)

Sync with HEAD.

Revision 1.201.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:45:33 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.5: +11 -5 lines
Diff to previous 1.201.2.5 (colored)

sync with head.

Revision 1.252.6.8 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:54 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.252.6.7: +2 -1 lines
Diff to previous 1.252.6.7 (colored) to branchpoint 1.252 (colored)

Sync with HEAD.

Revision 1.256.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:03:24 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.256: +14 -8 lines
Diff to previous 1.256 (colored) next main 1.257 (colored)

Sync with HEAD

Revision 1.261 / (download) - annotate - [select for diffs], Mon Nov 12 23:12:00 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Changes since 1.260: +2 -1 lines
Diff to previous 1.260 (colored)

Add _lwp_ctl() system call: provides a bidirectional, per-LWP communication
area between processes and the kernel.

Revision 1.252.6.7 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:51 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.252.6.6: +2 -3 lines
Diff to previous 1.252.6.6 (colored) to branchpoint 1.252 (colored)

Sync with HEAD.

Revision 1.253.2.3 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:21 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.253.2.2: +2 -3 lines
Diff to previous 1.253.2.2 (colored)

sync with -HEAD

Revision 1.260 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:43 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.259: +2 -3 lines
Diff to previous 1.259 (colored)

Merge from vmlocking:

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

Revision 1.253.2.2 / (download) - annotate - [select for diffs], Tue Nov 6 23:34:53 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.253.2.1: +26 -18 lines
Diff to previous 1.253.2.1 (colored)

sync with HEAD

Revision 1.252.6.6 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:39 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.252.6.5: +7 -2 lines
Diff to previous 1.252.6.5 (colored) to branchpoint 1.252 (colored)

Sync with HEAD.

Revision 1.259 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:45 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Changes since 1.258: +7 -2 lines
Diff to previous 1.258 (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.252.6.5 / (download) - annotate - [select for diffs], Sun Nov 4 21:03:51 2007 UTC (16 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.252.6.4: +3 -2 lines
Diff to previous 1.252.6.4 (colored) to branchpoint 1.252 (colored)

Sync with HEAD.

Revision 1.243.2.9 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:26 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.8: +7 -2 lines
Diff to previous 1.243.2.8 (colored) next main 1.244 (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.258 / (download) - annotate - [select for diffs], Thu Nov 1 21:57:44 2007 UTC (16 years, 5 months ago) by dsl
Branch: MAIN
Branch point for: mjf-devfs
Changes since 1.257: +3 -2 lines
Diff to previous 1.257 (colored)

Use one byte of p_pad1[] for p_trace_enabled where xxx_syscall_intern()
can save the result of trace_is_enabled() so that it can be efficiently
determined on every system call without having 2 separate syscall functions.
The death of syscall_fancy() looms.

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

Sync with HEAD.

Revision 1.201.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:32 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.4: +18 -13 lines
Diff to previous 1.201.2.4 (colored)

sync with head.

Revision 1.252.6.3 / (download) - annotate - [select for diffs], Fri Oct 26 15:49:21 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.252.6.2: +3 -2 lines
Diff to previous 1.252.6.2 (colored) to branchpoint 1.252 (colored)

Sync with HEAD.

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

Revision 1.243.2.8 / (download) - annotate - [select for diffs], Thu Oct 25 19:43:12 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.7: +2 -3 lines
Diff to previous 1.243.2.7 (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.257 / (download) - annotate - [select for diffs], Wed Oct 24 14:50:41 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.256: +4 -4 lines
Diff to previous 1.256 (colored)

Make ras_lookup() lockless.

Revision 1.254.2.2 / (download) - annotate - [select for diffs], Sun Oct 14 11:49:09 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.254.2.1: +3 -2 lines
Diff to previous 1.254.2.1 (colored) to branchpoint 1.254 (colored) next main 1.255 (colored)

sync with head.

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

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

Revision 1.243.2.7 / (download) - annotate - [select for diffs], Tue Oct 9 13:45:10 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.6: +13 -9 lines
Diff to previous 1.243.2.6 (colored)

Sync with head.

Revision 1.254.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:28:39 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.254: +10 -9 lines
Diff to previous 1.254 (colored)

sync with head.

Revision 1.252.6.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:28 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.252.6.1: +13 -9 lines
Diff to previous 1.252.6.1 (colored) to branchpoint 1.252 (colored)

Sync with HEAD.

Revision 1.255 / (download) - annotate - [select for diffs], Sat Sep 29 12:22:30 2007 UTC (16 years, 6 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-x86pmap-base2
Changes since 1.254: +10 -9 lines
Diff to previous 1.254 (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.252.2.2 / (download) - annotate - [select for diffs], Mon Sep 10 10:56:21 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.252.2.1: +4 -1 lines
Diff to previous 1.252.2.1 (colored) to branchpoint 1.252 (colored) next main 1.253 (colored)

Sync with HEAD.

Revision 1.254 / (download) - annotate - [select for diffs], Fri Sep 7 18:56:12 2007 UTC (16 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Changes since 1.253: +4 -1 lines
Diff to previous 1.253 (colored)

Implementation of POSIX message queues.

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

Revision 1.201.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:46:32 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.3: +17 -36 lines
Diff to previous 1.201.2.3 (colored)

sync with head.

Revision 1.253.2.1 / (download) - annotate - [select for diffs], Tue Aug 28 18:33:58 2007 UTC (16 years, 7 months ago) by matt
Branch: matt-armv6
Changes since 1.253: +6 -3 lines
Diff to previous 1.253 (colored)

Add curlwp_set() to set curlwp.  (This is for that architectures which have
a special CPU register which could be used to store curlwp (armv6, ppc)).

Revision 1.243.2.6 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:19 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.5: +1 -4 lines
Diff to previous 1.243.2.5 (colored)

Sync with HEAD.

Revision 1.243.2.5 / (download) - annotate - [select for diffs], Sun Aug 19 22:10:13 2007 UTC (16 years, 8 months ago) by yamt
Branch: vmlocking
Changes since 1.243.2.4: +3 -2 lines
Diff to previous 1.243.2.4 (colored)

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

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

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

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

Revision 1.252.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:50:58 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.252: +1 -4 lines
Diff to previous 1.252 (colored)

Sync with HEAD.

Revision 1.252.6.1 / (download) - annotate - [select for diffs], Thu Aug 9 02:37:29 2007 UTC (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.252: +1 -4 lines
Diff to previous 1.252 (colored)

Sync with HEAD.

Revision 1.253 / (download) - annotate - [select for diffs], Tue Aug 7 19:00:42 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.252: +1 -4 lines
Diff to previous 1.252 (colored)

- Fix a bug with _lwp_park() where if the computed wakeup time was under
  1 microsecond into the future, the thread could enter an untimed sleep.
- Change the signature of _lwp_park() to accept an lwpid_t and second
  hint pointer, but do so in a way that remains compatible with older
  pthread libraries. This can be used to wake another thread before the
  calling thread goes asleep, saving at least one syscall + involuntary
  context switch. This turns out to be a fairly large win on the condvar
  benchmarks that I have tried.
- Mark some more syscalls MP safe.

Revision 1.244.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:12:34 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.244: +16 -32 lines
Diff to previous 1.244 (colored) next main 1.245 (colored)

Sync with head.

Revision 1.252 / (download) - annotate - [select for diffs], Mon Jul 9 21:11:33 2007 UTC (16 years, 9 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.251: +1 -2 lines
Diff to previous 1.251 (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.243.2.4 / (download) - annotate - [select for diffs], Sun Jul 1 21:51:00 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.3: +1 -2 lines
Diff to previous 1.243.2.3 (colored)

Adapt to callout API change.

Revision 1.243.2.3 / (download) - annotate - [select for diffs], Sat Jun 9 23:58:16 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.2: +4 -1 lines
Diff to previous 1.243.2.2 (colored)

Sync with head.

Revision 1.243.2.2 / (download) - annotate - [select for diffs], Fri Jun 8 14:18:12 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.1: +13 -31 lines
Diff to previous 1.243.2.1 (colored)

Sync with head.

Revision 1.251 / (download) - annotate - [select for diffs], Sun Jun 3 09:50:12 2007 UTC (16 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.250: +4 -1 lines
Diff to previous 1.250 (colored)

Split sys__lwp_park() so that the compat/netbsd32 code can copyin and convert
its timeout then call the standard function.

Revision 1.250 / (download) - annotate - [select for diffs], Thu May 17 14:51:43 2007 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.249: +9 -27 lines
Diff to previous 1.249 (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.236.2.11 / (download) - annotate - [select for diffs], Thu May 17 13:41:56 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.236.2.10: +3 -4 lines
Diff to previous 1.236.2.10 (colored) next main 1.237 (colored)

sync with head.

Revision 1.249 / (download) - annotate - [select for diffs], Thu May 17 12:05:04 2007 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.248: +2 -2 lines
Diff to previous 1.248 (colored)

mark lwp_exit() and exit1() __noreturn__.

Revision 1.248 / (download) - annotate - [select for diffs], Tue May 8 20:10:14 2007 UTC (16 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.247: +1 -2 lines
Diff to previous 1.247 (colored)

Add the child 'rusage' of an exiting process to its own 'rusage' exactly
once, and prior to passing it to the caller of sys_wait4() and at the same
time as adding it to the parent.
Commands like:
time sh -c 'i=0; while [ $i -lt 1000 ]; do i=$(expr $i + 1); done'
now give same output.

Revision 1.247 / (download) - annotate - [select for diffs], Mon May 7 16:53:17 2007 UTC (16 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.246: +3 -3 lines
Diff to previous 1.246 (colored)

Split sys_wait4() so that compat code can fiddle with the returned 'status'
and 'rusage' without having to copy data to/from stackgap buffers.
The old split (find_stopped_child) could be removed.
amd64 seems to run netbsd32, linux and linux32 emulations. sparc64 compiles.

Revision 1.236.2.10 / (download) - annotate - [select for diffs], Mon May 7 10:56:14 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.236.2.9: +3 -2 lines
Diff to previous 1.236.2.9 (colored)

sync with head.

Revision 1.246 / (download) - annotate - [select for diffs], Mon Apr 30 20:11:41 2007 UTC (16 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.245: +1 -2 lines
Diff to previous 1.245 (colored)

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

Revision 1.245 / (download) - annotate - [select for diffs], Mon Apr 30 14:44:31 2007 UTC (16 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.244: +3 -1 lines
Diff to previous 1.244 (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.236.2.9 / (download) - annotate - [select for diffs], Sat Apr 21 15:50:22 2007 UTC (17 years ago) by ad
Branch: yamt-idlelwp
Changes since 1.236.2.8: +2 -3 lines
Diff to previous 1.236.2.8 (colored)

Some changes mainly for top/ps:

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

Revision 1.236.2.8 / (download) - annotate - [select for diffs], Tue Apr 3 15:20:43 2007 UTC (17 years ago) by matt
Branch: yamt-idlelwp
Changes since 1.236.2.7: +3 -1 lines
Diff to previous 1.236.2.7 (colored)

Allow cpu_lwp_free2 to be defined away

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

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

Revision 1.236.2.7 / (download) - annotate - [select for diffs], Fri Mar 23 20:16:55 2007 UTC (17 years, 1 month ago) by ad
Branch: yamt-idlelwp
Changes since 1.236.2.6: +4 -16 lines
Diff to previous 1.236.2.6 (colored)

curlwp is never NULL now.

Revision 1.243.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:52:05 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.243: +3 -3 lines
Diff to previous 1.243 (colored)

Sync with head.

Revision 1.236.2.6 / (download) - annotate - [select for diffs], Mon Mar 12 06:00:53 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.236.2.5: +5 -5 lines
Diff to previous 1.236.2.5 (colored)

Sync with HEAD.

Revision 1.244 / (download) - annotate - [select for diffs], Sun Mar 11 21:36:48 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.243: +3 -3 lines
Diff to previous 1.243 (colored)

Put back mtsleep() temporarily. Converting everything over to condvars
at once will take too much time..

Revision 1.236.2.5 / (download) - annotate - [select for diffs], Fri Mar 9 15:16:26 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.236.2.4: +2 -1 lines
Diff to previous 1.236.2.4 (colored)

Checkpoint:

- Addition of scheduler-specific pointers in the struct proc, lwp and
  schedstate_percpu.
- Addition of sched_lwp_fork(), sched_lwp_exit() and sched_slept() hooks.
- mi_switch() now has only one argument.
- sched_nextlwp(void) becomes sched_switch(struct lwp *) and does an
  enqueueing of LWP.
- Addition of general kern.sched sysctl node.
- Remove twice called uvmexp.swtch++, other cleanups.

Discussed on tech-kern@

Revision 1.243 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:23 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Branch point for: vmlocking
Changes since 1.242: +2 -2 lines
Diff to previous 1.242 (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.242 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:41 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.241: +2 -2 lines
Diff to previous 1.241 (colored)

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

Revision 1.236.2.4 / (download) - annotate - [select for diffs], Tue Feb 27 16:55:16 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.236.2.3: +17 -33 lines
Diff to previous 1.236.2.3 (colored)

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

Revision 1.241 / (download) - annotate - [select for diffs], Tue Feb 27 15:07:28 2007 UTC (17 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.240: +2 -2 lines
Diff to previous 1.240 (colored)

typedef pri_t and use it instead of int and u_char.

Revision 1.201.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:12:13 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.2: +201 -150 lines
Diff to previous 1.201.2.2 (colored)

sync with head.

Revision 1.236.2.3 / (download) - annotate - [select for diffs], Fri Feb 23 15:57:45 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.236.2.2: +1 -4 lines
Diff to previous 1.236.2.2 (colored)

- introduce sys/cpu.h which has cpu_idle and cpu_need_resched.
- use it where appropriate.
- while i'm here, remove several unnecessary #include.

Revision 1.240 / (download) - annotate - [select for diffs], Wed Feb 21 23:48:16 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.239: +3 -3 lines
Diff to previous 1.239 (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.236.2.2 / (download) - annotate - [select for diffs], Tue Feb 20 21:48:47 2007 UTC (17 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.236.2.1: +1 -3 lines
Diff to previous 1.236.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.239 / (download) - annotate - [select for diffs], Mon Feb 19 15:10:02 2007 UTC (17 years, 2 months ago) by cube
Branch: MAIN
Changes since 1.238: +2 -1 lines
Diff to previous 1.238 (colored)

Introduce a new member to struct emul, e_startlwp, to be used by
sys__lwp_create.  It allows using the said syscall under COMPAT_NETBSD32.

The libpthread regression tests now pass on amd64 and sparc64.

Revision 1.238 / (download) - annotate - [select for diffs], Sun Feb 18 15:20:34 2007 UTC (17 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.237: +1 -17 lines
Diff to previous 1.237 (colored)

The pre-kauth 'struct ucread' and 'struct pcred' are now only used in the
(depracted some time ago) 'struct kinfo_proc' returned by sysctl.
Move the definitions to sys/syctl.h and rename in order to ensure all the
users are located.

Revision 1.237 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:45 2007 UTC (17 years, 2 months ago) by pavel
Branch: MAIN
Changes since 1.236: +13 -14 lines
Diff to previous 1.236 (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.236.2.1 / (download) - annotate - [select for diffs], Sat Feb 17 10:31:04 2007 UTC (17 years, 2 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.236: +3 -6 lines
Diff to previous 1.236 (colored)

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

Revision 1.236 / (download) - annotate - [select for diffs], Fri Feb 16 00:39:16 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.235: +2 -2 lines
Diff to previous 1.235 (colored)

proc_free() was returning a NULL rusage pointer to wait() when a traced
process was reparented. Change proc_free() to copy the rusage to a buffer
on the stack if required, so it can be passed both to the debugger and
to the real parent process.

Fixes kern/35582 (kernel panics with gdb).

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

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

Revision 1.234 / (download) - annotate - [select for diffs], Sun Feb 11 10:47:38 2007 UTC (17 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.233: +1 -2 lines
Diff to previous 1.233 (colored)

remove a forward decl of sa_emul.

Revision 1.233 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:37 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.232: +192 -124 lines
Diff to previous 1.232 (colored)

Merge newlock2 to head.

Revision 1.225.4.12 / (download) - annotate - [select for diffs], Thu Feb 8 07:32:39 2007 UTC (17 years, 2 months ago) by skrll
Branch: newlock2
Changes since 1.225.4.11: +2 -2 lines
Diff to previous 1.225.4.11 (colored) to branchpoint 1.225 (colored) next main 1.226 (colored)

Fix typo in comment.

Revision 1.225.4.11 / (download) - annotate - [select for diffs], Mon Feb 5 13:16:48 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.225.4.10: +3 -3 lines
Diff to previous 1.225.4.10 (colored) to branchpoint 1.225 (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.225.4.10 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:42 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.225.4.9: +2 -9 lines
Diff to previous 1.225.4.9 (colored) to branchpoint 1.225 (colored)

Remove support for SA. Ok core@.

Revision 1.225.4.9 / (download) - annotate - [select for diffs], Sun Jan 28 01:34:18 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.225.4.8: +2 -3 lines
Diff to previous 1.225.4.8 (colored) to branchpoint 1.225 (colored)

- Remove the last use of mtsleep()
- sched_pause() -> kpause()

Revision 1.225.4.8 / (download) - annotate - [select for diffs], Sat Jan 27 01:29:05 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.225.4.7: +13 -11 lines
Diff to previous 1.225.4.7 (colored) to branchpoint 1.225 (colored)

- Job control shouldn't affect LWPs sleeping interruptably.
- Remove another use of mtsleep().

Revision 1.225.4.7 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:24 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.225.4.6: +2 -1 lines
Diff to previous 1.225.4.6 (colored) to branchpoint 1.225 (colored)

Sync with head.

Revision 1.201.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:55 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.1: +35 -12 lines
Diff to previous 1.201.2.1 (colored)

sync with head.

Revision 1.225.4.6 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:45 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.225.4.5: +31 -29 lines
Diff to previous 1.225.4.5 (colored) to branchpoint 1.225 (colored)

Checkpoint work in progress.

Revision 1.225.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:28 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.225.6.1: +3 -4 lines
Diff to previous 1.225.6.1 (colored) to branchpoint 1.225 (colored) next main 1.226 (colored)

sync with head.

Revision 1.232 / (download) - annotate - [select for diffs], Wed Nov 22 00:41:38 2006 UTC (17 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, newlock2-nbase, newlock2-base, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.231: +3 -3 lines
Diff to previous 1.231 (colored)

Make PaX MPROTECT use specificdata(9), freeing up two P_* flags.
While here, make more generic for upcoming PaX features.

Revision 1.225.4.5 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:47 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.225.4.4: +11 -3 lines
Diff to previous 1.225.4.4 (colored) to branchpoint 1.225 (colored)

Sync with head.

Revision 1.225.4.4 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:40 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.225.4.3: +162 -99 lines
Diff to previous 1.225.4.3 (colored) to branchpoint 1.225 (colored)

Checkpoint work in progress.

Revision 1.225.4.3 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.225.4.2: +3 -3 lines
Diff to previous 1.225.4.2 (colored) to branchpoint 1.225 (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.231 / (download) - annotate - [select for diffs], Mon Oct 23 21:39:18 2006 UTC (17 years, 5 months ago) by skrll
Branch: MAIN
Changes since 1.230: +1 -2 lines
Diff to previous 1.230 (colored)

Remove chooselwp - it doesn't exist.

Revision 1.225.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:47 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.225: +12 -2 lines
Diff to previous 1.225 (colored)

sync with head

Revision 1.225.4.2 / (download) - annotate - [select for diffs], Sat Oct 21 15:20:48 2006 UTC (17 years, 6 months ago) by ad
Branch: newlock2
Changes since 1.225.4.1: +26 -19 lines
Diff to previous 1.225.4.1 (colored) to branchpoint 1.225 (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.230 / (download) - annotate - [select for diffs], Wed Oct 11 04:51:06 2006 UTC (17 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.229: +2 -1 lines
Diff to previous 1.229 (colored)

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

Revision 1.229 / (download) - annotate - [select for diffs], Sun Oct 8 22:57:11 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.228: +2 -1 lines
Diff to previous 1.228 (colored)

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

Revision 1.228 / (download) - annotate - [select for diffs], Sun Oct 8 04:28:44 2006 UTC (17 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.227: +10 -2 lines
Diff to previous 1.227 (colored)

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

Revision 1.227 / (download) - annotate - [select for diffs], Tue Oct 3 16:07:12 2006 UTC (17 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.226: +1 -2 lines
Diff to previous 1.226 (colored)

Back out previous (p_flag2).

In 30 minutes from now Jason Thorpe will come up with an implementation
of a proplib dictionary in struct proc, so adding an int doesn't really
make any sense.

Revision 1.226 / (download) - annotate - [select for diffs], Tue Oct 3 11:23:32 2006 UTC (17 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.225: +2 -1 lines
Diff to previous 1.225 (colored)

Until we figure out the Perfect Way of adding flags to processes, add
a p_flag2. No objections on tech-kern@.

Input from simonb@, thanks!

Revision 1.225.4.1 / (download) - annotate - [select for diffs], Mon Sep 11 18:19:09 2006 UTC (17 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.225: +15 -13 lines
Diff to previous 1.225 (colored)

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

Revision 1.211.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:59:42 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.211: +49 -15 lines
Diff to previous 1.211 (colored) next main 1.212 (colored)

sync with head

Revision 1.214.2.4 / (download) - annotate - [select for diffs], Fri Aug 11 15:47:26 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.214.2.3: +22 -8 lines
Diff to previous 1.214.2.3 (colored) to branchpoint 1.214 (colored) next main 1.215 (colored)

sync with head

Revision 1.225 / (download) - annotate - [select for diffs], Sun Jul 30 21:58:11 2006 UTC (17 years, 8 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.224: +6 -3 lines
Diff to previous 1.224 (colored)

Single-thread updates to the process credential.

Revision 1.224 / (download) - annotate - [select for diffs], Fri Jul 21 10:07:29 2006 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.223: +9 -1 lines
Diff to previous 1.223 (colored)

add ASSERT_SLEEPABLE() macro to assert we can sleep.

Revision 1.223 / (download) - annotate - [select for diffs], Wed Jul 19 21:11:38 2006 UTC (17 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.222: +10 -7 lines
Diff to previous 1.222 (colored)

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

Revision 1.201.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:12:03 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201: +44 -17 lines
Diff to previous 1.201 (colored)

sync with head.

Revision 1.211.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:26 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.211.6.1: +10 -7 lines
Diff to previous 1.211.6.1 (colored) next main 1.212 (colored)

Sync with head.

Revision 1.216.4.3 / (download) - annotate - [select for diffs], Wed May 24 15:50:47 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.216.4.2: +19 -7 lines
Diff to previous 1.216.4.2 (colored) to branchpoint 1.216 (colored) next main 1.217 (colored)

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

Revision 1.214.2.3 / (download) - annotate - [select for diffs], Wed May 24 10:59:21 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.214.2.2: +10 -7 lines
Diff to previous 1.214.2.2 (colored) to branchpoint 1.214 (colored)

sync with head.

Revision 1.222 / (download) - annotate - [select for diffs], Tue May 16 00:08:25 2006 UTC (17 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.221: +3 -3 lines
Diff to previous 1.221 (colored)

Introduce PaX MPROTECT -- mprotect(2) restrictions used to strengthen
W^X mappings.

Disabled by default.

First proposed in:

	http://mail-index.netbsd.org/tech-security/2005/12/18/0000.html

More information in:

	http://pax.grsecurity.net/docs/mprotect.txt

Read relevant parts of options(4) and sysctl(3) before using!

Lots of thanks to the PaX author and Matt Thomas.

Revision 1.221 / (download) - annotate - [select for diffs], Sun May 14 21:38:18 2006 UTC (17 years, 11 months ago) by elad
Branch: MAIN
Changes since 1.220: +2 -4 lines
Diff to previous 1.220 (colored)

integrate kauth.

Revision 1.216.2.6 / (download) - annotate - [select for diffs], Thu May 11 23:31:36 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.216.2.5: +6 -1 lines
Diff to previous 1.216.2.5 (colored) to branchpoint 1.216 (colored) next main 1.217 (colored)

sync with head

Revision 1.220 / (download) - annotate - [select for diffs], Thu May 11 11:54:36 2006 UTC (17 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.219: +6 -1 lines
Diff to previous 1.219 (colored)

cleanup user.h.
- remove several #include which are not directly related to
  this header anymore.  tweak *.c accordingly.
- update comments.
- move some !_KERNEL #include to proc.h because it's more appropriate
  place these days.
- whitespace.

Revision 1.211.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:19 2006 UTC (18 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.211: +23 -6 lines
Diff to previous 1.211 (colored)

Sync with head.

Revision 1.216.2.5 / (download) - annotate - [select for diffs], Thu Apr 20 01:37:57 2006 UTC (18 years ago) by christos
Branch: elad-kernelauth
Changes since 1.216.2.4: +3 -3 lines
Diff to previous 1.216.2.4 (colored) to branchpoint 1.216 (colored)

Avoid using <sys/kauth.h>

Revision 1.216.2.4 / (download) - annotate - [select for diffs], Wed Apr 19 04:36:01 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.216.2.3: +17 -4 lines
Diff to previous 1.216.2.3 (colored) to branchpoint 1.216 (colored)

sync with head.

Revision 1.197.2.3 / (download) - annotate - [select for diffs], Fri Apr 7 12:31:52 2006 UTC (18 years ago) by tron
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
Changes since 1.197.2.2: +10 -1 lines
Diff to previous 1.197.2.2 (colored) to branchpoint 1.197 (colored) next main 1.198 (colored)

Pull up following revision(s) (requested by pavel in ticket #1244):
	sys/sys/lwp.h: revision 1.36 via patch
	sys/sys/proc.h: revision 1.219 via patch
	sys/kern/init_sysctl.c: revision 1.65 via patch
PR/32809: Pavel Cahyna: Conflicting flags in l_flag and p_flag are causing
ps(1) to print incorrect information. Annotate the flags in the header files
to make sure that flags are not being re-used and move flags so that there
are no conflicts.

Revision 1.214.2.2 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:51 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.214.2.1: +553 -0 lines
Diff to previous 1.214.2.1 (colored) to branchpoint 1.214 (colored)

sync with head.

Revision 1.219 / (download) - annotate - [select for diffs], Sat Apr 1 00:57:34 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Changes since 1.218: +12 -3 lines
Diff to previous 1.218 (colored)

PR/32809: Pavel Cahyna: Conflicting flags in l_flag and p_flag are causing
ps(1) to print incorrect information. Annotate the flags in the header files
to make sure that flags are not being re-used and move flags so that there
are no conflicts.

Revision 1.216.4.2 / (download) - annotate - [select for diffs], Fri Mar 31 09:45:29 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.216.4.1: +5 -1 lines
Diff to previous 1.216.4.1 (colored) to branchpoint 1.216 (colored)

Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.216.2.3 / (download) - annotate - [select for diffs], Thu Mar 30 22:30:27 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.216.2.2: +1 -2 lines
Diff to previous 1.216.2.2 (colored) to branchpoint 1.216 (colored)

Get rid of some stuff we no longer need here:

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

Revision 1.218 / (download) - annotate - [select for diffs], Wed Mar 29 23:02:31 2006 UTC (18 years ago) by cube
Branch: MAIN
Changes since 1.217: +5 -1 lines
Diff to previous 1.217 (colored)

Rework the _lwp* and sa_* families of syscalls so some details can be
handled differently depending on the emulation.  This paves the way for
COMPAT_NETBSD32 support of our pthread system.

Revision 1.216.4.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:29 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.216: +2 -2 lines
Diff to previous 1.216 (colored)

Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.217 / (download) - annotate - [select for diffs], Mon Mar 20 13:14:37 2006 UTC (18 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.216: +2 -2 lines
Diff to previous 1.216 (colored)

kill the last use of vm_fault_t, from Havard Eidnes

Revision 1.216.2.2 / (download) - annotate - [select for diffs], Wed Mar 8 01:01:13 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.216.2.1: +539 -0 lines
Diff to previous 1.216.2.1 (colored) to branchpoint 1.216 (colored)

Adapt to kernel authorization changes.

Revision 1.216.2.1, Tue Mar 7 03:32:06 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.216: +0 -540 lines
FILE REMOVED

file proc.h was added on branch elad-kernelauth on 2006-03-08 01:01:13 +0000

Revision 1.216 / (download) - annotate - [select for diffs], Tue Mar 7 03:32:06 2006 UTC (18 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq, elad-kernelauth
Changes since 1.215: +1 -15 lines
Diff to previous 1.215 (colored)

Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
  trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
  about KTRACE and SYSTRACE, but do no more.

Revision 1.215 / (download) - annotate - [select for diffs], Sun Mar 5 19:08:38 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.214: +15 -1 lines
Diff to previous 1.214 (colored)

Add a proc_is_traced_p() macro and use it, instead of copying the same code
in many places. Idea from thorpej.

Revision 1.214.2.1, Sun Mar 5 07:21:38 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.214: +0 -540 lines
FILE REMOVED

file proc.h was added on branch yamt-pdpolicy on 2006-04-01 12:07:51 +0000

Revision 1.214 / (download) - annotate - [select for diffs], Sun Mar 5 07:21:38 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base
Branch point for: yamt-pdpolicy
Changes since 1.213: +2 -1 lines
Diff to previous 1.213 (colored)

implement PT_SYSCALL

Revision 1.213 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:32 2006 UTC (18 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.212: +4 -1 lines
Diff to previous 1.212 (colored)

merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.

Revision 1.211.2.3 / (download) - annotate - [select for diffs], Sat Feb 18 15:39:23 2006 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.211.2.2: +4 -4 lines
Diff to previous 1.211.2.2 (colored) next main 1.212 (colored)

sync with head.

Revision 1.212 / (download) - annotate - [select for diffs], Thu Feb 16 20:17:20 2006 UTC (18 years, 2 months ago) by perry
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Changes since 1.211: +4 -4 lines
Diff to previous 1.211 (colored)

Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.

Revision 1.211.2.2 / (download) - annotate - [select for diffs], Sun Feb 5 12:23:56 2006 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.211.2.1: +1 -0 lines
Diff to previous 1.211.2.1 (colored)

define vmspace_kernel() rather than using proc0 directly.

Revision 1.211.2.1 / (download) - annotate - [select for diffs], Sat Dec 31 11:14:00 2005 UTC (18 years, 3 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.211: +3 -1 lines
Diff to previous 1.211 (colored)

uio_segflg/uio_lwp -> uio_vmspace.

Revision 1.211 / (download) - annotate - [select for diffs], Sat Dec 24 19:01:28 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.210: +8 -8 lines
Diff to previous 1.210 (colored)

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

Revision 1.210 / (download) - annotate - [select for diffs], Sat Dec 24 12:57:14 2005 UTC (18 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.209: +3 -1 lines
Diff to previous 1.209 (colored)

fix a long-standing scheduler problem that p_estcpu is doubled
for each fork-wait cycles.

- updatepri: factor out the code to decay estcpu so that it can be used
  by scheduler_wait_hook.
- scheduler_fork_hook: record how much estcpu is inherited from
  the parent process.
- scheduler_wait_hook: don't add back inherited estcpu to the parent.

Revision 1.209 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:21 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.208: +2 -2 lines
Diff to previous 1.208 (colored)

merge ktrace-lwp.

Revision 1.166.2.11 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:36 2005 UTC (18 years, 4 months ago) by christos
Branch: ktrace-lwp
Changes since 1.166.2.10: +2 -2 lines
Diff to previous 1.166.2.10 (colored) next main 1.167 (colored)

Sync with head.

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

sync with head.

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

Note that M_SUBPROC is only used on sparc/sparc64.

Revision 1.166.2.10 / (download) - annotate - [select for diffs], Thu Nov 10 14:12:12 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.166.2.9: +16 -8 lines
Diff to previous 1.166.2.9 (colored)

Sync with HEAD. Here we go again...

Revision 1.206.2.1 / (download) - annotate - [select for diffs], Wed Nov 2 11:58:11 2005 UTC (18 years, 5 months ago) by yamt
Branch: yamt-vop
Changes since 1.206: +2 -2 lines
Diff to previous 1.206 (colored) next main 1.207 (colored)

sync with head.

Revision 1.207 / (download) - annotate - [select for diffs], Tue Nov 1 09:07:53 2005 UTC (18 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base2, yamt-readahead-base
Branch point for: yamt-readahead
Changes since 1.206: +2 -2 lines
Diff to previous 1.206 (colored)

make scheduler work better when a system has many runnable processes
by making p_estcpu fixpt_t.  PR/31542.

1. schedcpu() decreases p_estcpu of all processes
   every seconds, by at least 1 regardless of load average.
2. schedclock() increases p_estcpu of curproc by 1,
   at about 16 hz.

in the consequence, if a system has >16 processes
with runnable lwps, their p_estcpu are not likely increased.

by making p_estcpu fixpt_t, we can decay it more slowly
when loadavg is high.  (ie. solve #1.)

i left kinfo_proc2::p_estcpu (ie. ps -O cpu) scaled because i have
no idea about its absolute value's usage other than debugging,
for which raw values are more valuable.

Revision 1.197.2.2 / (download) - annotate - [select for diffs], Tue Oct 4 14:16:42 2005 UTC (18 years, 6 months ago) by tron
Branch: netbsd-3
CVS Tags: 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.197.2.1: +2 -1 lines
Diff to previous 1.197.2.1 (colored) to branchpoint 1.197 (colored)

Pull up following revision(s) (requested by yamt in ticket #842):
	sys/sys/proc.h: revision 1.206
	sys/kern/kern_lwp.c: revision 1.30
	sys/kern/kern_exit.c: revision 1.151
protect p_nrlwps by sched_lock.  no objection on tech-kern@.  PR/29652.

Revision 1.197.2.1 / (download) - annotate - [select for diffs], Sun Sep 18 20:09:49 2005 UTC (18 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.197: +3 -1 lines
Diff to previous 1.197 (colored)

Pull up following revision(s) (requested by fvdl in ticket #798):
	sys/compat/sunos/sunos_exec.c: revision 1.47
	sys/compat/pecoff/pecoff_emul.c: revision 1.11
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.45
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.12
	sys/sys/proc.h: revision 1.198
	sys/compat/mach/mach_exec.c: revision 1.56
	sys/compat/freebsd/freebsd_exec.c: revision 1.27
	sys/arch/sparc64/include/vmparam.h: revision 1.27
	sys/kern/kern_resource.c: revision 1.91
	sys/compat/netbsd32/netbsd32_netbsd.c: revision 1.88
	sys/compat/osf1/osf1_exec.c: revision 1.39
	sys/compat/svr4_32/svr4_32_resource.c: revision 1.5
	sys/compat/ultrix/ultrix_misc.c: revision 1.99
	sys/compat/svr4_32/svr4_32_exec.h: revision 1.9
	sys/kern/exec_elf32.c: revision 1.103
	sys/compat/aoutm68k/aoutm68k_exec.c: revision 1.19
	sys/compat/sunos32/sunos32_exec.c: revision 1.20
	sys/compat/hpux/hpux_exec.c: revision 1.46
	sys/compat/darwin/darwin_exec.c: revision 1.40
	sys/kern/sysv_shm.c: revision 1.83
	sys/uvm/uvm_extern.h: revision 1.99
	sys/uvm/uvm_mmap.c: revision 1.89
	sys/kern/kern_exec.c: revision 1.195
	sys/compat/netbsd32/netbsd32.h: revision 1.31
	sys/arch/sparc64/sparc64/svr4_32_machdep.c: revision 1.20
	sys/compat/svr4/svr4_exec.c: revision 1.56
	sys/compat/irix/irix_exec.c: revision 1.41
	sys/compat/ibcs2/ibcs2_exec.c: revision 1.63
	sys/compat/svr4_32/svr4_32_exec.c: revision 1.16
	sys/arch/amd64/include/vmparam.h: revision 1.8
	sys/compat/linux/common/linux_exec.c: revision 1.73
Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.
* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
  for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2
Tested on amd64, compile-tested on sparc64.

Revision 1.206 / (download) - annotate - [select for diffs], Sun Aug 28 14:57:18 2005 UTC (18 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Changes since 1.205: +3 -2 lines
Diff to previous 1.205 (colored)

protect p_nrlwps by sched_lock.  no objection on tech-kern@.  PR/29652.

Revision 1.205 / (download) - annotate - [select for diffs], Fri Aug 19 20:24:33 2005 UTC (18 years, 8 months ago) by rpaulo
Branch: MAIN
Changes since 1.204: +2 -2 lines
Diff to previous 1.204 (colored)

Correct typo in comments found by Roland Illig.

Revision 1.204 / (download) - annotate - [select for diffs], Fri Aug 5 11:03:18 2005 UTC (18 years, 8 months ago) by junyoung
Branch: MAIN
Changes since 1.203: +2 -2 lines
Diff to previous 1.203 (colored)

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

Revision 1.203 / (download) - annotate - [select for diffs], Sun Jul 10 04:19:14 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.202: +1 -3 lines
Diff to previous 1.202 (colored)

don't define syscall() here because the archs that don't have syscall_intern
yet, define syscall with different signatures in trap.c

Revision 1.202 / (download) - annotate - [select for diffs], Sun Jul 10 00:45:52 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.201: +7 -1 lines
Diff to previous 1.201 (colored)

No point in declaring syscall_intern and syscall in a zillion places.

Revision 1.201 / (download) - annotate - [select for diffs], Sun May 29 21:18:25 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.200: +4 -4 lines
Diff to previous 1.200 (colored)

make ltsleep and wakeup* vars volatile.

Revision 1.200 / (download) - annotate - [select for diffs], Fri May 20 12:44:11 2005 UTC (18 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.199: +4 -1 lines
Diff to previous 1.199 (colored)

Add an e_usertrap function pointer to struct emul.

Revision 1.195.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:37 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.195: +25 -24 lines
Diff to previous 1.195 (colored) next main 1.196 (colored)

sync with -current

Revision 1.166.2.9 / (download) - annotate - [select for diffs], Fri Apr 1 14:32:11 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.166.2.8: +4 -1 lines
Diff to previous 1.166.2.8 (colored)

Sync with HEAD.

Revision 1.199 / (download) - annotate - [select for diffs], Wed Mar 30 17:07:51 2005 UTC (19 years ago) by christos
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.198: +2 -1 lines
Diff to previous 1.198 (colored)

PR/19837: Stephen Ma: signal(SIGCHLD, SIG_IGN) should not create zombies.

Revision 1.195.6.3 / (download) - annotate - [select for diffs], Sat Mar 26 18:19:20 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.195.6.2: +3 -1 lines
Diff to previous 1.195.6.2 (colored) to branchpoint 1.195 (colored) next main 1.196 (colored)

sync with head.

Revision 1.198 / (download) - annotate - [select for diffs], Sat Mar 26 05:12:36 2005 UTC (19 years ago) by fvdl
Branch: MAIN
CVS Tags: yamt-km-base4
Changes since 1.197: +3 -1 lines
Diff to previous 1.197 (colored)

Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.

* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
  for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2

Tested on amd64, compile-tested on sparc64.

Revision 1.195.6.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:52 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.195.6.1: +8 -8 lines
Diff to previous 1.195.6.1 (colored) to branchpoint 1.195 (colored)

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

Revision 1.166.2.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:54:23 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.166.2.7: +8 -8 lines
Diff to previous 1.166.2.7 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.197 / (download) - annotate - [select for diffs], Sat Feb 26 22:25:34 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.196: +8 -8 lines
Diff to previous 1.196 (colored)

nuke trailing whitespace

Revision 1.195.6.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:56 2005 UTC (19 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.195: +15 -17 lines
Diff to previous 1.195 (colored)

sync with head.

Revision 1.166.2.7 / (download) - annotate - [select for diffs], Fri Feb 4 11:48:06 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.166.2.6: +15 -17 lines
Diff to previous 1.166.2.6 (colored)

Sync with HEAD.

Revision 1.196 / (download) - annotate - [select for diffs], Thu Feb 3 19:20:01 2005 UTC (19 years, 2 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.195: +15 -17 lines
Diff to previous 1.195 (colored)

de-__P

Revision 1.166.2.6 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:30 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.166.2.5: +21 -1 lines
Diff to previous 1.166.2.5 (colored)

Sync with HEAD

Revision 1.195 / (download) - annotate - [select for diffs], Fri Oct 1 16:30:52 2004 UTC (19 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.194: +21 -1 lines
Diff to previous 1.194 (colored)

introduce a function, proclist_foreach_call, to iterate all procs on
a proclist and call the specified function for each of them.
primarily to fix a procfs locking problem, but i think that it's useful for
others as well.

while i'm here, introduce PROCLIST_FOREACH macro, which is similar to
LIST_FOREACH but skips marker entries which are used by proclist_foreach_call.

Revision 1.166.2.5 / (download) - annotate - [select for diffs], Tue Sep 21 13:38:48 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.166.2.4: +2 -2 lines
Diff to previous 1.166.2.4 (colored)

Fix the sync with head I botched.

Revision 1.166.2.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:56:30 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.166.2.3: +3 -3 lines
Diff to previous 1.166.2.3 (colored)

Sync with HEAD.

Revision 1.194 / (download) - annotate - [select for diffs], Fri Sep 17 23:26:42 2004 UTC (19 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.193: +2 -2 lines
Diff to previous 1.193 (colored)

Put the type of p_tracep back to void *; it is an implementation detail and
no need to expose to the rest of kernel.

Revision 1.191.2.1 / (download) - annotate - [select for diffs], Sun Aug 15 13:54:20 2004 UTC (19 years, 8 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.191: +2 -2 lines
Diff to previous 1.191 (colored) next main 1.192 (colored)

Pull up revision 1.193 (requested by jdolecek in ticket #762):
pass the fork flags down to the emulation fork hook, so that emulation
code can use the information for setup

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

Sync with HEAD.

Revision 1.193 / (download) - annotate - [select for diffs], Sun Aug 8 08:42:03 2004 UTC (19 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.192: +2 -2 lines
Diff to previous 1.192 (colored)

pass the fork flags down to the emulation fork hook, so that emulation
code can use the information for setup

Revision 1.166.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:56:29 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.166.2.1: +75 -58 lines
Diff to previous 1.166.2.1 (colored)

Sync with HEAD

Revision 1.192 / (download) - annotate - [select for diffs], Sat Apr 17 15:17:32 2004 UTC (20 years ago) by christos
Branch: MAIN
Changes since 1.191: +1 -2 lines
Diff to previous 1.191 (colored)

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

Revision 1.191 / (download) - annotate - [select for diffs], Fri Mar 26 15:01:16 2004 UTC (20 years ago) by drochner
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.190: +1 -6 lines
Diff to previous 1.190 (colored)

all ports define __HAVE_SIGINFO now, so remove the CPP conditionals

Revision 1.190 / (download) - annotate - [select for diffs], Fri Feb 13 11:36:23 2004 UTC (20 years, 2 months ago) by wiz
Branch: MAIN
Changes since 1.189: +2 -2 lines
Diff to previous 1.189 (colored)

Uppercase CPU, plural is CPUs.

Revision 1.189 / (download) - annotate - [select for diffs], Thu Jan 22 01:20:16 2004 UTC (20 years, 3 months ago) by matt
Branch: MAIN
Changes since 1.188: +3 -1 lines
Diff to previous 1.188 (colored)

Allow cpu_lwp_free to be a macro (for architectures which don't require
cpu_lwp_free to do anything).

Revision 1.188 / (download) - annotate - [select for diffs], Sun Jan 11 19:39:48 2004 UTC (20 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.187: +2 -3 lines
Diff to previous 1.187 (colored)

g/c process state SDEAD - it's not used anymore after 'reaper' removal

Revision 1.187 / (download) - annotate - [select for diffs], Sun Jan 11 18:37:52 2004 UTC (20 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.186: +1 -2 lines
Diff to previous 1.186 (colored)

ride 1.6ZH version bump - g/c some unused struct lwp and struct proc
fields (former reaper stuff)

Revision 1.186 / (download) - annotate - [select for diffs], Sun Jan 4 11:33:31 2004 UTC (20 years, 3 months ago) by jdolecek
Branch: MAIN
Changes since 1.185: +4 -11 lines
Diff to previous 1.185 (colored)

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

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

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

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

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

Revision 1.185 / (download) - annotate - [select for diffs], Wed Dec 24 22:53:59 2003 UTC (20 years, 3 months ago) by manu
Branch: MAIN
Changes since 1.184: +2 -4 lines
Diff to previous 1.184 (colored)

Move the sigfilter hook to a more adequate location, and rename it to better
fit what it does.

The softsignal feature is used in Darwin to trace processes. When the
traced process gets a signal, this raises an exception. The debugger will
receive the exception message, use ptrace with PT_THUPDATE to pass the
signal to the child or discard it, and then it will send a reply to the
exception message, to resume the child.

With the hook at the beginnng of kpsignal2, we are in the context of the
signal sender, which can be the kill(1) command, for instance. We cannot
afford to sleep until the debugger tells us if the signal should be
delivered or not.

Therefore, the hook to generate the Mach exception must be in the traced
process context. That was we can sleep awaiting for the debugger opinion
about the signal, this is not a problem. The hook is hence located into
issignal, at the place where normally SIGCHILD is sent to the debugger,
whereas the traced process is stopped. If the hook returns 0, we bypass
thoses operations, the Mach exception mecanism will take care of notifying
the debugger (through a Mach exception), and stop the faulting thread.

Revision 1.184 / (download) - annotate - [select for diffs], Sat Dec 20 19:01:30 2003 UTC (20 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.183: +4 -1 lines
Diff to previous 1.183 (colored)

Put back Emmanuel's sigfilter hooks, as decided by Core.

Revision 1.183 / (download) - annotate - [select for diffs], Sat Dec 20 18:22:16 2003 UTC (20 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.182: +3 -1 lines
Diff to previous 1.182 (colored)

Introduce lwp_emuldata and the associated hooks. No hook is provided for the
exec case, as the emulation already has the ability to intercept that
with the e_proc_exec hook. It is the responsability of the emulation to
take appropriaye action about lwp_emuldata in e_proc_exec.

Patch reviewed by Christos.

Revision 1.182 / (download) - annotate - [select for diffs], Sat Dec 6 04:16:33 2003 UTC (20 years, 4 months ago) by atatat
Branch: MAIN
Changes since 1.181: +2 -1 lines
Diff to previous 1.181 (colored)

The missing pieces of PROC_PID_STOPEXIT/P_STOPEXIT, a sysctl tweakable
flag that makes a process stop as it exits.

Revision 1.181 / (download) - annotate - [select for diffs], Fri Dec 5 21:12:44 2003 UTC (20 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.180: +1 -4 lines
Diff to previous 1.180 (colored)

back the sigfilter emulation hook change off

Revision 1.180 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:25 2003 UTC (20 years, 4 months ago) by atatat
Branch: MAIN
Changes since 1.179: +3 -5 lines
Diff to previous 1.179 (colored)

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.

Revision 1.179 / (download) - annotate - [select for diffs], Wed Dec 3 20:24:51 2003 UTC (20 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.178: +4 -1 lines
Diff to previous 1.178 (colored)

Add a sigfilter emulation hook. It is used at the beginning of kpsignal2()
so that a specific emulation has the oportunity to filter out some signals.

if sigfilter returns 0, then no signal is sent by kpsignal2().

There is another place where signals can be generated: trapsignal. Since this
function is already an emulation hook, no call to the sigfilter hook was
introduced in trapsignal.

This is needed to emulate the softsignal feature in COMPAT_DARWIN (signals
sent as Mach exception messages)

Revision 1.178 / (download) - annotate - [select for diffs], Thu Nov 27 23:16:47 2003 UTC (20 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.177: +2 -2 lines
Diff to previous 1.177 (colored)

Make the wakeup optionnal in proc_stop, so that it is possible to stop a
process without waking up its parent.

Revision 1.177 / (download) - annotate - [select for diffs], Mon Nov 17 19:21:24 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.176: +2 -1 lines
Diff to previous 1.176 (colored)

expose proc_stop. needed by mach/darwin emulation.

Revision 1.176 / (download) - annotate - [select for diffs], Wed Nov 12 21:07:38 2003 UTC (20 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.175: +20 -9 lines
Diff to previous 1.175 (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.175 / (download) - annotate - [select for diffs], Tue Nov 4 16:19:52 2003 UTC (20 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.174: +12 -10 lines
Diff to previous 1.174 (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).
(pad fields left in struct proc to avoid kernel bump)
Somehow this file escaped the earlier commit (in spite of being in the cvs diff
I did beforehand!)

Revision 1.174 / (download) - annotate - [select for diffs], Thu Oct 9 14:00:34 2003 UTC (20 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.173: +13 -2 lines
Diff to previous 1.173 (colored)

tweak curproc not to reference curlwp twice.
(function calls might be accompanied by curlwp.)

Revision 1.173 / (download) - annotate - [select for diffs], Fri Sep 26 12:02:57 2003 UTC (20 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.172: +2 -2 lines
Diff to previous 1.172 (colored)

Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs.  Test
compiled on most architectures.

Revision 1.172 / (download) - annotate - [select for diffs], Thu Sep 25 21:58:12 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.171: +7 -5 lines
Diff to previous 1.171 (colored)

constify sendsig/trapsignal [suggested by gimpy]

Revision 1.171 / (download) - annotate - [select for diffs], Sat Sep 13 15:55:29 2003 UTC (20 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.170: +1 -2 lines
Diff to previous 1.170 (colored)

actually remove p_dupfd from struct proc (oops)

Revision 1.170 / (download) - annotate - [select for diffs], Sat Sep 6 22:01:20 2003 UTC (20 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.169: +7 -1 lines
Diff to previous 1.169 (colored)

SA_SIGINFO changes. This is 1.5Z

Revision 1.169 / (download) - annotate - [select for diffs], Sun Aug 24 17:52:47 2003 UTC (20 years, 7 months ago) by chs
Branch: MAIN
Changes since 1.168: +2 -1 lines
Diff to previous 1.168 (colored)

add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.

Revision 1.168 / (download) - annotate - [select for diffs], Thu Aug 7 16:34:10 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.167: +2 -6 lines
Diff to previous 1.167 (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.167 / (download) - annotate - [select for diffs], Tue Jul 8 06:49:21 2003 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.166: +13 -14 lines
Diff to previous 1.166 (colored)

prototype must not carry variable name

Revision 1.166.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:27:16 2003 UTC (20 years, 9 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (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.166 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:26 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.165: +2 -2 lines
Diff to previous 1.165 (colored)

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

Revision 1.165 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:21 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.164: +3 -3 lines
Diff to previous 1.164 (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.164 / (download) - annotate - [select for diffs], Tue Jun 3 18:50:59 2003 UTC (20 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.163: +22 -22 lines
Diff to previous 1.163 (colored)

pad the flag arguments to 8 hex chars.

Revision 1.163 / (download) - annotate - [select for diffs], Sat Mar 22 14:35:38 2003 UTC (21 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.162: +2 -2 lines
Diff to previous 1.162 (colored)

for NO_PGID, use ((pid_t)-1) rather than (-(pid_t)1)

Revision 1.162 / (download) - annotate - [select for diffs], Wed Mar 19 11:36:36 2003 UTC (21 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.161: +12 -24 lines
Diff to previous 1.161 (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.161 / (download) - annotate - [select for diffs], Wed Mar 12 22:16:31 2003 UTC (21 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.160: +2 -1 lines
Diff to previous 1.160 (colored)

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

Revision 1.160 / (download) - annotate - [select for diffs], Tue Feb 18 08:37:43 2003 UTC (21 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.159: +2 -2 lines
Diff to previous 1.159 (colored)

KNF kern_prot.c

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

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

Revision 1.158 / (download) - annotate - [select for diffs], Fri Feb 14 10:11:56 2003 UTC (21 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.157: +3 -1 lines
Diff to previous 1.157 (colored)

Split sys_wait4 so that code isn't duplicated in compat tree.
(approved by christos)

Revision 1.157 / (download) - annotate - [select for diffs], Tue Feb 4 13:41:49 2003 UTC (21 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.156: +4 -4 lines
Diff to previous 1.156 (colored)

constify wait channels of ltsleep/wakeup.  they are never dereferenced.

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

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

Revision 1.155 / (download) - annotate - [select for diffs], Fri Jan 24 16:24:44 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.154: +3 -1 lines
Diff to previous 1.154 (colored)

Add a pointer to p1003.1b semaphore data.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Jan 22 12:52:14 2003 UTC (21 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.153: +4 -4 lines
Diff to previous 1.153 (colored)

make KSTACK_CHECK_* compile after sa merge.

Revision 1.153 / (download) - annotate - [select for diffs], Sat Jan 18 09:53:19 2003 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.152: +74 -110 lines
Diff to previous 1.152 (colored)

Merge the nathanw_sa branch.

Revision 1.124.2.31 / (download) - annotate - [select for diffs], Sun Dec 29 20:56:55 2002 UTC (21 years, 3 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.124.2.30: +2 -1 lines
Diff to previous 1.124.2.30 (colored) to branchpoint 1.124 (colored) next main 1.125 (colored)

Sync with HEAD.

Revision 1.152 / (download) - annotate - [select for diffs], Sat Dec 21 23:52:05 2002 UTC (21 years, 4 months ago) by gmcgarry
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Changes since 1.151: +2 -1 lines
Diff to previous 1.151 (colored)

Re-add yield().  Only used by compat code at the moment.

Revision 1.151 / (download) - annotate - [select for diffs], Sat Dec 21 16:22:10 2002 UTC (21 years, 4 months ago) by manu
Branch: MAIN
Changes since 1.150: +2 -1 lines
Diff to previous 1.150 (colored)

Comment what e_fault in struct emul does

Revision 1.150 / (download) - annotate - [select for diffs], Fri Dec 20 05:43:10 2002 UTC (21 years, 4 months ago) by gmcgarry
Branch: MAIN
Changes since 1.149: +1 -2 lines
Diff to previous 1.149 (colored)

Remove yield() until the scheduler supports the sched_yield(2) system
call.

Revision 1.124.2.30 / (download) - annotate - [select for diffs], Thu Dec 19 00:59:47 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.124.2.29: +7 -1 lines
Diff to previous 1.124.2.29 (colored) to branchpoint 1.124 (colored)

Sync with HEAD.

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

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

Revision 1.149 / (download) - annotate - [select for diffs], Thu Dec 12 20:41:47 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Branch point for: gmcgarry_ucred
Changes since 1.148: +7 -1 lines
Diff to previous 1.148 (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.124.2.29 / (download) - annotate - [select for diffs], Mon Nov 11 22:16:32 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.28: +5 -1 lines
Diff to previous 1.124.2.28 (colored) to branchpoint 1.124 (colored)

Catch up to -current

Revision 1.148 / (download) - annotate - [select for diffs], Thu Nov 7 00:22:28 2002 UTC (21 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.147: +3 -1 lines
Diff to previous 1.147 (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.147 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:59 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.146: +3 -1 lines
Diff to previous 1.146 (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.124.2.28 / (download) - annotate - [select for diffs], Fri Oct 18 03:36:05 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.27: +2 -1 lines
Diff to previous 1.124.2.27 (colored) to branchpoint 1.124 (colored)

Restore resetprocpriority().

Revision 1.124.2.27 / (download) - annotate - [select for diffs], Fri Oct 18 03:32:03 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.26: +1 -4 lines
Diff to previous 1.124.2.26 (colored) to branchpoint 1.124 (colored)

Remove one more conflicting definition. Still needs some cleanup.

Revision 1.124.2.26 / (download) - annotate - [select for diffs], Fri Oct 18 03:30:14 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.25: +1 -14 lines
Diff to previous 1.124.2.25 (colored) to branchpoint 1.124 (colored)

Sort out the location of a few interface definitions.

Revision 1.124.2.25 / (download) - annotate - [select for diffs], Fri Oct 18 02:45:42 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.24: +22 -2 lines
Diff to previous 1.124.2.24 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.133.2.6 / (download) - annotate - [select for diffs], Thu Oct 10 18:44:46 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.133.2.5: +13 -5 lines
Diff to previous 1.133.2.5 (colored) to branchpoint 1.133 (colored) next main 1.134 (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.124.2.24 / (download) - annotate - [select for diffs], Thu Oct 3 23:49:30 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.23: +2 -2 lines
Diff to previous 1.124.2.23 (colored) to branchpoint 1.124 (colored)

Implement CLOCK_VIRTUAL and CLOCK_PROF support for POSIX timers. Factor
out some common code between POSIX timers and BSD timers along the way.

Revision 1.146 / (download) - annotate - [select for diffs], Sun Sep 22 05:36:49 2002 UTC (21 years, 7 months ago) by gmcgarry
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base
Changes since 1.145: +11 -4 lines
Diff to previous 1.145 (colored)

Separate the scheduler from the context switching code.

This is done by adding an extra argument to mi_switch() and
cpu_switch() which specifies the new process.  If NULL is passed,
then the new function chooseproc() is invoked to wait for a new
process to appear on the run queue.

Also provides an opportunity for optimisations if "switching to self".

Also added are C versions of the setrunqueue() and remrunqueue()
low-level primitives if __HAVE_MD_RUNQUEUE is not defined by MD code.

All these changes are contingent upon the __HAVE_CHOOSEPROC flag being
defined by MD code to indicate that cpu_switch() supports the changes.

Revision 1.145 / (download) - annotate - [select for diffs], Sat Sep 21 21:14:54 2002 UTC (21 years, 7 months ago) by manu
Branch: MAIN
Changes since 1.144: +2 -1 lines
Diff to previous 1.144 (colored)

- Introduce a e_fault field in struct proc to provide emulation specific
memory fault handler. IRIX uses irix_vm_fault, and all other emulation
use NULL, which means to use uvm_fault.

- While we are there, explicitely set to NULL the uninitialized fields in
struct emul: e_fault and e_sysctl on most ports

- e_fault is used by the trap handler, for now only on mips. In order to avoid
intrusive modifications in UVM, the function pointed by e_fault does not
has exactly the same protoype as uvm_fault:
int uvm_fault __P((struct vm_map *, vaddr_t, vm_fault_t, vm_prot_t));
int e_fault __P((struct proc *, vaddr_t, vm_fault_t, vm_prot_t));

- In IRIX share groups, all the VM space is shared, except one page.
This bounds us to have different VM spaces and synchronize modifications
to the VM space accross share group members. We need an IRIX specific hook
to the page fault handler in order to propagate VM space modifications
caused by page faults.

Revision 1.124.2.23 / (download) - annotate - [select for diffs], Tue Sep 17 21:23:53 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.22: +5 -0 lines
Diff to previous 1.124.2.22 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.133.2.5 / (download) - annotate - [select for diffs], Fri Sep 6 08:50:01 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.133.2.4: +33 -5 lines
Diff to previous 1.133.2.4 (colored) to branchpoint 1.133 (colored)

sync kqueue branch with HEAD

Revision 1.137.2.3 / (download) - annotate - [select for diffs], Thu Aug 29 00:56:59 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.137.2.2: +10 -4 lines
Diff to previous 1.137.2.2 (colored) to branchpoint 1.137 (colored) next main 1.138 (colored)

catch up with -current.

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

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

Revision 1.124.2.22 / (download) - annotate - [select for diffs], Tue Aug 13 02:20:23 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.21: +2 -1 lines
Diff to previous 1.124.2.21 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.143 / (download) - annotate - [select for diffs], Tue Aug 6 13:58:09 2002 UTC (21 years, 8 months ago) by pooka
Branch: MAIN
Changes since 1.142: +2 -1 lines
Diff to previous 1.142 (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.124.2.21 / (download) - annotate - [select for diffs], Thu Aug 1 03:24:04 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.20: +2 -2 lines
Diff to previous 1.124.2.20 (colored) to branchpoint 1.124 (colored)

Merge: p_oppid -> p_opptr.

Revision 1.124.2.20 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:58 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.19: +23 -3 lines
Diff to previous 1.124.2.19 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.137.4.1 / (download) - annotate - [select for diffs], Mon Jul 29 15:37:58 2002 UTC (21 years, 8 months ago) by lukem
Branch: netbsd-1-6
CVS Tags: 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
Changes since 1.137: +4 -4 lines
Diff to previous 1.137 (colored) next main 1.138 (colored)

Pull up revision 1.142 (requested by jdolocek in ticket #557):
Make sure that the pointer to old parent process for ptraced children
gets reset properly when the old parent exits before the child. A flag
is set in old parent process when the child is reparented in ptrace(2).
If it's set when process is exiting, all running processes have their
'old parent process' pointer checked and reset if appropriate. Also
change to use 'struct proc *' pointer directly, rather than pid_t.
This fixes security/14444 by David Sainty.
Reviewed by Christos Zoulas.

Revision 1.142 / (download) - annotate - [select for diffs], Thu Jul 25 20:04:04 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.141: +4 -4 lines
Diff to previous 1.141 (colored)

Make sure that the pointer to old parent process for ptraced children
gets reset properly when the old parent exits before the child. A flag
is set in old parent process when the child is reparented in ptrace(2).
If it's set when process is exiting, all running processes have their
'old parent process' pointer checked and reset if appropriate. Also
change to use 'struct proc *' pointer directly, rather than pid_t.
This fixes security/14444 by David Sainty.

Reviewed by Christos Zoulas.

Revision 1.137.2.2 / (download) - annotate - [select for diffs], Mon Jul 15 10:37:15 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.137.2.1: +22 -2 lines
Diff to previous 1.137.2.1 (colored) to branchpoint 1.137 (colored)

catch up with -current.

Revision 1.124.2.19 / (download) - annotate - [select for diffs], Fri Jul 12 03:04:05 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.18: +2 -2 lines
Diff to previous 1.124.2.18 (colored) to branchpoint 1.124 (colored)

Add prototype for exit_lwps().

Revision 1.124.2.18 / (download) - annotate - [select for diffs], Fri Jul 12 01:35:47 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.17: +2 -1 lines
Diff to previous 1.124.2.17 (colored) to branchpoint 1.124 (colored)

#include <sys/lwp.h> here. Basically everything that needs proc.h also
needs lwp.h.

Revision 1.141 / (download) - annotate - [select for diffs], Thu Jul 11 10:37:27 2002 UTC (21 years, 9 months ago) by pooka
Branch: MAIN
Changes since 1.140: +2 -1 lines
Diff to previous 1.140 (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.140 / (download) - annotate - [select for diffs], Thu Jul 4 23:32:15 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.139: +2 -2 lines
Diff to previous 1.139 (colored)

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.

Revision 1.139 / (download) - annotate - [select for diffs], Tue Jul 2 20:27:47 2002 UTC (21 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.138: +20 -1 lines
Diff to previous 1.138 (colored)

add KSTACK_CHECK_MAGIC. discussed on tech-kern.

Revision 1.124.2.17 / (download) - annotate - [select for diffs], Mon Jun 24 22:12:19 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.16: +6 -4 lines
Diff to previous 1.124.2.16 (colored) to branchpoint 1.124 (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.133.2.4 / (download) - annotate - [select for diffs], Sun Jun 23 17:51:58 2002 UTC (21 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.133.2.3: +4 -1 lines
Diff to previous 1.133.2.3 (colored) to branchpoint 1.133 (colored)

catch up with -current on kqueue branch

Revision 1.124.2.16 / (download) - annotate - [select for diffs], Thu Jun 20 23:01:37 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.15: +1 -3 lines
Diff to previous 1.124.2.15 (colored) to branchpoint 1.124 (colored)

Merge goof: Don't want two copies of p_textvp in struct proc.

Revision 1.137.2.1 / (download) - annotate - [select for diffs], Thu Jun 20 15:53:03 2002 UTC (21 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.137: +3 -1 lines
Diff to previous 1.137 (colored)

catch up with -current.

Revision 1.124.2.15 / (download) - annotate - [select for diffs], Thu Jun 20 03:50:14 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.14: +6 -2 lines
Diff to previous 1.124.2.14 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.138 / (download) - annotate - [select for diffs], Mon Jun 17 16:23:58 2002 UTC (21 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.137: +3 -1 lines
Diff to previous 1.137 (colored)

Systrace support.

Revision 1.124.2.14 / (download) - annotate - [select for diffs], Sat May 4 17:15:15 2002 UTC (21 years, 11 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.124.2.13: +2 -1 lines
Diff to previous 1.124.2.13 (colored) to branchpoint 1.124 (colored)

Add a forward decl for struct lwp.

Revision 1.124.2.13 / (download) - annotate - [select for diffs], Wed Apr 17 00:06:29 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.12: +4 -1 lines
Diff to previous 1.124.2.12 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.137 / (download) - annotate - [select for diffs], Tue Apr 2 20:20:00 2002 UTC (22 years ago) by jdolecek
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.136: +4 -1 lines
Diff to previous 1.136 (colored)

move emulation-specific sysctl hook from struct execsw to struct emul,
where it belongs

Revision 1.136.4.1 / (download) - annotate - [select for diffs], Sun Mar 10 19:08:25 2002 UTC (22 years, 1 month ago) by thorpej
Branch: newlock
Changes since 1.136: +2 -1 lines
Diff to previous 1.136 (colored) next main 1.137 (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.124.2.12 / (download) - annotate - [select for diffs], Thu Feb 28 04:15:25 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.11: +17 -17 lines
Diff to previous 1.124.2.11 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.133.2.3 / (download) - annotate - [select for diffs], Mon Feb 11 20:10:45 2002 UTC (22 years, 2 months ago) by jdolecek
Branch: kqueue
Changes since 1.133.2.2: +22 -21 lines
Diff to previous 1.133.2.2 (colored) to branchpoint 1.133 (colored)

Sync w/ -current.

Revision 1.74.2.3 / (download) - annotate - [select for diffs], Mon Jan 14 15:19:24 2002 UTC (22 years, 3 months ago) by he
Branch: netbsd-1-4
Changes since 1.74.2.2: +20 -19 lines
Diff to previous 1.74.2.2 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored)

Pull up revision 1.136 (via patch, requested by he):
  Fix a ptrace/execve race condition which could be used to modify
  the child process' image during execve.  This would be a security
  issue due to setuid programs.

Revision 1.98.2.3 / (download) - annotate - [select for diffs], Sat Jan 12 01:02:20 2002 UTC (22 years, 3 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.98.2.2: +21 -20 lines
Diff to previous 1.98.2.2 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored)

Pull up revision 1.136 (partial, via patch, requested by christos):
  Fix a ptrace/execve race condition which could be used to modify
  the child process' image during execve.  This would be a security
  issue due to setuid programs.

Revision 1.124.2.11 / (download) - annotate - [select for diffs], Fri Jan 11 23:39:51 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.10: +2 -1 lines
Diff to previous 1.124.2.10 (colored) to branchpoint 1.124 (colored)

More catchup.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Jan 11 21:16:27 2002 UTC (22 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: newlock-base, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: newlock
Changes since 1.135: +22 -21 lines
Diff to previous 1.135 (colored)

Fix a ptrace/execve race that could be used to modify the child process's
image during execve. This is a security issue because one can
do that to setuid programs... From FreeBSD.

Revision 1.133.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:04:46 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.133.2.1: +5 -1 lines
Diff to previous 1.133.2.1 (colored) to branchpoint 1.133 (colored)

Sync kqueue branch with -current.

Revision 1.124.2.10 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:44 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.9: +2 -1 lines
Diff to previous 1.124.2.9 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.124.2.9 / (download) - annotate - [select for diffs], Sat Dec 8 04:22:17 2001 UTC (22 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.124.2.8: +2 -2 lines
Diff to previous 1.124.2.8 (colored) to branchpoint 1.124 (colored)

cpu_fork() -> cpu_lwp_fork().  This logically forks an LWP, not a
complete process.  As noted by Gregory McGarry on tech-kern.

Revision 1.135 / (download) - annotate - [select for diffs], Sat Dec 8 00:35:32 2001 UTC (22 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.134: +2 -1 lines
Diff to previous 1.134 (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.124.2.8 / (download) - annotate - [select for diffs], Tue Nov 27 03:17:19 2001 UTC (22 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.124.2.7: +1 -2 lines
Diff to previous 1.124.2.7 (colored) to branchpoint 1.124 (colored)

Make lockmgr() lwp-aware:
- Locks are counted against LWPs, not procs.
- When we record the lockholder in the lock structure, we need to
  also record the lwpid.
- When we are checking who holds the lock, also consider lwpid.

Fixes a "locking against myself" panic reported by Allen Briggs that
could be easily triggered by redirecting the output of an LWP-using
program to a file.

Revision 1.124.2.7 / (download) - annotate - [select for diffs], Sat Nov 17 01:10:17 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.6: +3 -3 lines
Diff to previous 1.124.2.6 (colored) to branchpoint 1.124 (colored)

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

Revision 1.124.2.6 / (download) - annotate - [select for diffs], Sat Nov 17 00:37:38 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.5: +6 -1 lines
Diff to previous 1.124.2.5 (colored) to branchpoint 1.124 (colored)

Add a hook (function and argument) to be called when returning to userspace.

Revision 1.133.4.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:48:13 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.133: +4 -1 lines
Diff to previous 1.133 (colored) next main 1.134 (colored)

Catch up with -current.

Revision 1.124.2.5 / (download) - annotate - [select for diffs], Tue Sep 25 16:31:13 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.4: +2 -2 lines
Diff to previous 1.124.2.4 (colored) to branchpoint 1.124 (colored)

Change the struct emul->e_setregs function type to take a lwp rather
than a proc.

Revision 1.124.2.4 / (download) - annotate - [select for diffs], Fri Sep 21 22:37:01 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.3: +4 -1 lines
Diff to previous 1.124.2.3 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.134 / (download) - annotate - [select for diffs], Tue Sep 18 19:36:32 2001 UTC (22 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2
Changes since 1.133: +4 -1 lines
Diff to previous 1.133 (colored)

Make the setregs hook emulation-specific, rather than executable
format specific.
Struct emul has a e_setregs hook back, which points to emulation-specific
setregs function. es_setregs of struct execsw now only points to
optional executable-specific setup function (this is only used for
ECOFF).

Revision 1.124.2.3 / (download) - annotate - [select for diffs], Thu Aug 30 23:26:58 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.2: +1 -2 lines
Diff to previous 1.124.2.2 (colored) to branchpoint 1.124 (colored)

The BIGLOCK flag is lwp-specific, not proc-specific.

Revision 1.133.2.1 / (download) - annotate - [select for diffs], Tue Jul 10 13:26:11 2001 UTC (22 years, 9 months ago) by lukem
Branch: kqueue
Changes since 1.133: +3 -1 lines
Diff to previous 1.133 (colored)

add struct klist p_klist to struct proc

Revision 1.124.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:09:51 2001 UTC (22 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.124.2.1: +9 -5 lines
Diff to previous 1.124.2.1 (colored) to branchpoint 1.124 (colored)

Catch up to -current.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Jun 18 02:00:55 2001 UTC (22 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.132: +2 -1 lines
Diff to previous 1.132 (colored)

Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Jun 16 21:44:27 2001 UTC (22 years, 10 months ago) by manu
Branch: MAIN
Changes since 1.131: +1 -11 lines
Diff to previous 1.131 (colored)

Removed obsoletes EMUL_NO_BSD_ASYNCIO_PIPE and EMUL_NO_SIGIO_ON_READ flags.
Async I/O OS specifities should now handled in OS specific code. Linux
has been done, but other emulation should be handled. See case LINUX_F_SETFL
in sys/compat/linux/common/linux_file.c:linux_sys_fcntl() for more details.

The data that has been collected yet:

                                  Net Free Open Linux SunOS AIX OSF1 Darwin
send SIGIO to write end of pipe		Y  N    N     N     N    N   Y     Y
send SIGIO to read end of pipe      Y  Y    N     N     N    ?   Y     ?
send SIGIO to write end of socket   Y  Y    Y     N     N    Y   Y     Y
send SIGIO to read end of socket    Y  Y    Y     Y     Y    ?   Y     ?

Revision 1.131 / (download) - annotate - [select for diffs], Wed May 30 12:07:05 2001 UTC (22 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.130: +2 -2 lines
Diff to previous 1.130 (colored)

use _KERNEL_OPT

Revision 1.130 / (download) - annotate - [select for diffs], Sat May 19 17:28:33 2001 UTC (22 years, 11 months ago) by manu
Branch: MAIN
Changes since 1.129: +1 -1 lines
Diff to previous 1.129 (colored)

Backed out a previous commit that was incomplete and hence broke several
emulation package build

Revision 1.129 / (download) - annotate - [select for diffs], Sat May 19 08:52:05 2001 UTC (22 years, 11 months ago) by manu
Branch: MAIN
Changes since 1.128: +2 -2 lines
Diff to previous 1.128 (colored)

Moved e_flags outsied of ifdef __HAVE_MINIMAL_EMUL in struct emul
and removed an ifdef that was taking care of this problem

Revision 1.128 / (download) - annotate - [select for diffs], Mon May 7 09:55:15 2001 UTC (22 years, 11 months ago) by manu
Branch: MAIN
Changes since 1.127: +11 -3 lines
Diff to previous 1.127 (colored)

Changed EMUL_BSD_ASYNCIO_PIPE to EMUL_NO_BSD_ASYNCIO_PIPE, so that
the native emulation (NetBSD) does not have a flag.

Revision 1.127 / (download) - annotate - [select for diffs], Sun May 6 19:09:54 2001 UTC (22 years, 11 months ago) by manu
Branch: MAIN
Changes since 1.126: +7 -2 lines
Diff to previous 1.126 (colored)

Added two flags to emulation packages:

EMUL_BSD_ASYNCIO_PIPE notes that the emulated binaries expect the original
BSD pipe behavior for asynchronous I/O, which is to fire SIGIO on read() and
write(). OSes without this flag do not expect any SIGIO to be fired on
read() and write() for pipes, even when async I/O was requested. As far as
we know, the OSes that need EMUL_BSD_ASYNCIO_PIPE are NetBSD, OSF/1 and
Darwin.

EMUL_NO_SIGIO_ON_READ notes that the emulated binaries that requested
asynchrnous I/O expect the reader process to be notified by a SIGIO, but
not the writer process. OSes without this flag expect the reader and the
writer to be notified when some data has arrived or when some data have been
read. As far as we know, the OSes that need EMUL_NO_SIGIO_ON_READ are Linux
and SunOS.

Revision 1.126 / (download) - annotate - [select for diffs], Mon Apr 30 01:13:21 2001 UTC (22 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored)

remove some lint

Revision 1.125 / (download) - annotate - [select for diffs], Mon Apr 23 19:21:05 2001 UTC (23 years ago) by simonb
Branch: MAIN
CVS Tags: thorpej_scsipi_beforemerge
Changes since 1.124: +2 -2 lines
Diff to previous 1.124 (colored)

Add a comment for p_comm, from Bill Sommerfeld.

Revision 1.84.2.7 / (download) - annotate - [select for diffs], Mon Mar 12 13:32:05 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.84.2.6: +236 -208 lines
Diff to previous 1.84.2.6 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored)

Sync with HEAD.

Revision 1.124.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:50:02 2001 UTC (23 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.124: +60 -100 lines
Diff to previous 1.124 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.124 / (download) - annotate - [select for diffs], Sun Mar 4 20:49:34 2001 UTC (23 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.123: +7 -1 lines
Diff to previous 1.123 (colored)

ifndef some more routines that are macros on the vax port.

Revision 1.123 / (download) - annotate - [select for diffs], Tue Feb 27 22:10:27 2001 UTC (23 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.122: +7 -2 lines
Diff to previous 1.122 (colored)

revert part of previous and change cpu_wait prototype back to using __P():
	void cpu_wait __P((struct proc *));
until there's consensus on the correct way to fix this, ports that
#define cpu_wait should at least be able to compile again.

Revision 1.122 / (download) - annotate - [select for diffs], Mon Feb 26 16:32:48 2001 UTC (23 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.121: +229 -212 lines
Diff to previous 1.121 (colored)

convert to ANSI KNF

Revision 1.84.2.6 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:37 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.84.2.5: +3 -3 lines
Diff to previous 1.84.2.5 (colored) to branchpoint 1.84 (colored)

Sync with HEAD.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Jan 25 20:18:51 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.120: +2 -2 lines
Diff to previous 1.120 (colored)

Make e_errno of struct emul 'const int *' (was 'int *'), since the errno
mapping tables were constified recently.
This fixes compile problem reported by Ken Wellsch on current-users@.

Revision 1.120 / (download) - annotate - [select for diffs], Thu Jan 25 19:14:40 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.119: +2 -2 lines
Diff to previous 1.119 (colored)

move misplaced comment to where it belongs

Revision 1.84.2.5 / (download) - annotate - [select for diffs], Fri Jan 5 17:36:59 2001 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.84.2.4: +6 -11 lines
Diff to previous 1.84.2.4 (colored) to branchpoint 1.84 (colored)

Sync with HEAD

Revision 1.119 / (download) - annotate - [select for diffs], Fri Dec 22 23:19:15 2000 UTC (23 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.118: +2 -3 lines
Diff to previous 1.118 (colored)

struct proc: g/c p_unused

Revision 1.118 / (download) - annotate - [select for diffs], Fri Dec 22 22:59:01 2000 UTC (23 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.117: +5 -9 lines
Diff to previous 1.117 (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.117 / (download) - annotate - [select for diffs], Tue Dec 19 22:08:36 2000 UTC (23 years, 4 months ago) by scw
Branch: MAIN
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

Change struct emul's "char e_name[8]" field to "const char *e_name"
to allow for emulation names >= 8 characters.

Revision 1.84.2.4 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:40 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.84.2.3: +11 -9 lines
Diff to previous 1.84.2.3 (colored) to branchpoint 1.84 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.116 / (download) - annotate - [select for diffs], Mon Dec 11 05:29:03 2000 UTC (23 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.115: +10 -5 lines
Diff to previous 1.115 (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.115 / (download) - annotate - [select for diffs], Sat Dec 9 12:34:14 2000 UTC (23 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.114: +2 -3 lines
Diff to previous 1.114 (colored)

change the type of e_syscall in struct emul to
	void (*e_syscall) __P((void))
since it's not uniform between ports

Revision 1.114 / (download) - annotate - [select for diffs], Sat Dec 9 07:06:52 2000 UTC (23 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.113: +2 -4 lines
Diff to previous 1.113 (colored)

Nuke some emul flags.

Revision 1.84.2.3 / (download) - annotate - [select for diffs], Fri Dec 8 09:19:43 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.84.2.2: +12 -1 lines
Diff to previous 1.84.2.2 (colored) to branchpoint 1.84 (colored)

Sync with HEAD.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Dec 1 17:59:12 2000 UTC (23 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.112: +5 -1 lines
Diff to previous 1.112 (colored)

add three emul flags:
EMUL_HAS_SYS___syscall - has SYS___syscall
EMUL_GETPID_PASS_PPID  - pass parent pid in getpid()
EMUL_GETID_PASS_EID    - pass also effective id in get[ug]id()

Revision 1.112 / (download) - annotate - [select for diffs], Fri Dec 1 12:28:30 2000 UTC (23 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.111: +9 -2 lines
Diff to previous 1.111 (colored)

add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables

change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need
to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed
change explicit emul_find() calls in probe functions to get the emulation
path from the checked exec switch entry's emulation

remove no longer needed header files

add e_flags and e_syscall to struct emul; these are unsed and empty for now

Revision 1.84.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:06:39 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.84.2.1: +11 -12 lines
Diff to previous 1.84.2.1 (colored) to branchpoint 1.84 (colored)

Sync with HEAD.

Revision 1.111 / (download) - annotate - [select for diffs], Tue Nov 21 00:37:56 2000 UTC (23 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.110: +3 -11 lines
Diff to previous 1.110 (colored)

restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures

Revision 1.84.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:11:33 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.84: +57 -25 lines
Diff to previous 1.84 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.110 / (download) - annotate - [select for diffs], Sun Nov 19 00:56:39 2000 UTC (23 years, 5 months ago) by sommerfeld
Branch: MAIN
Changes since 1.109: +4 -15 lines
Diff to previous 1.109 (colored)

Back out mistaken commits.

Revision 1.109 / (download) - annotate - [select for diffs], Sun Nov 19 00:54:50 2000 UTC (23 years, 5 months ago) by sommerfeld
Branch: MAIN
Changes since 1.108: +15 -4 lines
Diff to previous 1.108 (colored)

Extend kinfo_proc2 with CPU id

Revision 1.108 / (download) - annotate - [select for diffs], Thu Nov 16 20:04:33 2000 UTC (23 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.107: +2 -2 lines
Diff to previous 1.107 (colored)

pass pointer to used exec_package to emulation-specific exec hook -
emulation code may make decisions based on e.g. exec format

Revision 1.107 / (download) - annotate - [select for diffs], Mon Nov 13 21:32:19 2000 UTC (23 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.106: +2 -2 lines
Diff to previous 1.106 (colored)

change the type of *syscallnames[] array to 'const char * const foo[]'

Revision 1.106 / (download) - annotate - [select for diffs], Tue Nov 7 12:41:53 2000 UTC (23 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.105: +8 -1 lines
Diff to previous 1.105 (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.98.2.2 / (download) - annotate - [select for diffs], Wed Sep 6 08:41:41 2000 UTC (23 years, 7 months ago) by bouyer
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.98.2.1: +2 -1 lines
Diff to previous 1.98.2.1 (colored) to branchpoint 1.98 (colored)

Pull up (approved by thorpej):
sys/proc.h 1.104 -> 1.105
sys/kern/kern_synch.c 1.93 -> 1.94 (via patch to remove SMPism)
sys/kern/vfs_subr.c 1.137 -> 1.138

Add a suspendsched() fuctions, which stops scheduling of users processes
(exept curproc) by putting all SRUN and SSLEEP non-P_SYSTEM processes
in SSTOP state.

In vfs_shutdown() use suspendsched() suspend scheduling, and use tsleep()
instead of DELAY to give kernel threads a chance to run (needed to flush
buffers to a RAID disk). Also, keep trying flushing buffers when the number of
dirty buffers decreases (20 rounds may not be enouth for a very large buffer
cache).

Revision 1.105 / (download) - annotate - [select for diffs], Tue Sep 5 16:27:51 2000 UTC (23 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.104: +2 -1 lines
Diff to previous 1.104 (colored)

Implement suspendsched() by putting all sleeping and runnable processes
in SSTOP state, execpt P_SYSTEM and curproc processes. We have to way to
find the original state of the process so we can't restart scheduling,
so this can only be used at shutdown time.

XXX suspendsched() should also deal with processes running on other CPUs.
I don't know how to do that, and as long as we have a kernel big lock,
this shouldn't be a problem.

Revision 1.104 / (download) - annotate - [select for diffs], Tue Sep 5 16:20:27 2000 UTC (23 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.103: +20 -24 lines
Diff to previous 1.103 (colored)

Back out the suspendsched()/resumesched() thing, per request of Jason Thorpe &
Bill Sommerfeld. suspendsched() will be implemented in a different way.

Revision 1.103 / (download) - annotate - [select for diffs], Thu Aug 31 14:36:19 2000 UTC (23 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.102: +25 -21 lines
Diff to previous 1.102 (colored)

Add the sched_suspend/sched_resume functions, as discussed on tech-kern,
with the following modifications to the initial patch:
- rename SHOLD and P_HOST to SSUSPEND and P_SUSPEND to avoid confusion with
  PHOLD()
- don't deal with SSUSPEND/P_SUSPEND in fork1(), if we come here while
  scheduler is suspended we're forking proc0, which can't have P_SUSPEND set.

sched_suspend() suspends the scheduling of users process, by removing all
processes from the run queues and changing their state from SRUN to
SSUSPEND. Also mark all user process but curproc P_SUSPEND.
When a process has to be put in SRUN and is marked P_SUSPEND, it's placed in
the SSUSPEND state instead.
sched_resume() places all SSUSPEND processes back in SRUN, clear the P_SUSPEND
flag.

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

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

Revision 1.101 / (download) - annotate - [select for diffs], Sat Aug 12 22:41:53 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)

Don't bother with a trampoline to start the pagedaemon and
reaper threads.

Revision 1.100 / (download) - annotate - [select for diffs], Sat Aug 12 16:38:43 2000 UTC (23 years, 8 months ago) by sommerfeld
Branch: MAIN
Changes since 1.99: +4 -2 lines
Diff to previous 1.99 (colored)

Add P_BIGLOCK process flag, indicating that the processor should hold
the kernel "big lock" when running this process.
(this is largely a placeholder for now; big lock code will be added later).

Revision 1.98.2.1 / (download) - annotate - [select for diffs], Fri Aug 11 23:07:41 2000 UTC (23 years, 8 months ago) by thorpej
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.98: +2 -3 lines
Diff to previous 1.98 (colored)

Pullup from trunk:
It doesn't make sense to charge simple locks to proc's, because
simple locks are held by CPUs.  Remove p_simple_locks (which was
unused anyway, really), and add a LOCKDEBUG check for held simple
locks in mi_switch().  Grow p_locks to an int to take up the space
previously used by p_simple_locks so that the proc structure doens't
change size.

Revision 1.99 / (download) - annotate - [select for diffs], Mon Aug 7 21:55:22 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.98: +2 -3 lines
Diff to previous 1.98 (colored)

It doesn't make sense to charge simple locks to proc's, because
simple locks are held by CPUs.  Remove p_simple_locks (which was
unused anyway, really), and add a LOCKDEBUG check for held simple
locks in mi_switch().  Grow p_locks to an int to take up the space
previously used by p_simple_locks so that the proc structure doens't
change size.

Revision 1.95.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:10:26 2000 UTC (23 years, 10 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.95: +19 -4 lines
Diff to previous 1.95 (colored) next main 1.96 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.98 / (download) - annotate - [select for diffs], Thu Jun 8 05:50:40 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.97: +10 -2 lines
Diff to previous 1.97 (colored)

Change tsleep() to ltsleep(), which takes an interlock argument.  The
interlock is released once the scheduler is locked, so that a race
between a sleeper and an awakener is prevented in a multiprocessor
environment.  Provide a tsleep() macro that provides the old API.

Revision 1.97 / (download) - annotate - [select for diffs], Wed May 31 05:02:36 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.96: +3 -1 lines
Diff to previous 1.96 (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.96 / (download) - annotate - [select for diffs], Sun May 28 05:49:06 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.95: +8 -3 lines
Diff to previous 1.95 (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.95 / (download) - annotate - [select for diffs], Sat May 27 05:00:47 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.94: +1 -2 lines
Diff to previous 1.94 (colored)

All users of the old sleep() are now gone; nuke it.

Revision 1.94 / (download) - annotate - [select for diffs], Sat May 27 00:40:48 2000 UTC (23 years, 10 months ago) by sommerfeld
Branch: MAIN
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored)

Reduce use of curproc in several places:

 - Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()

Revision 1.93 / (download) - annotate - [select for diffs], Fri May 26 21:20:32 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.92: +3 -20 lines
Diff to previous 1.92 (colored)

First sweep at scheduler state cleanup.  Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.

Revision 1.92 / (download) - annotate - [select for diffs], Fri May 26 02:23:14 2000 UTC (23 years, 10 months ago) by simonb
Branch: MAIN
Changes since 1.91: +7 -1 lines
Diff to previous 1.91 (colored)

Add some new sysctls to help abolish the dreaded "proc size mismatch"
errors from ps(1) and some other kernel grovellers, and return some
data that has previously only been accessable with /dev/kmem read
access.  The sysctls are:

 + KERN_PROC2 - return an array of fixed sized "struct kinfo_proc2"
   structures that contain most of the useful user-level data in
   "struct proc" and "struct user".  The sysctl also takes the size of
   each element, so that if "struct kinfo_proc2" grows over time old
   binaries will still be able to request a fixed size amount of data.
 + KERN_PROC_ARGS - return the argv or envv for a particular process id.
   envv will only be returned if the process has the same user id as the
   requestor or if the requestor is root.
 + KERN_FSCALE - return the current kernel fixpt scale factor.
 + KERN_CCPU - return the scheduler exponential decay value.
 + KERN_CP_TIME - return cpu time state counters.

With input and suggestions from many people on tech-kern.

Revision 1.91 / (download) - annotate - [select for diffs], Fri May 26 00:36:53 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.90: +10 -2 lines
Diff to previous 1.90 (colored)

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor.  Test against SONPROC as appropriate rather than
combinations of SRUN and curproc.  Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.

Revision 1.74.2.2 / (download) - annotate - [select for diffs], Sun Apr 30 20:12:04 2000 UTC (23 years, 11 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003
Changes since 1.74.2.1: +4 -3 lines
Diff to previous 1.74.2.1 (colored) to branchpoint 1.74 (colored)

Modify/re-do last pull-up (via patch, requested by sommerfeld):
  Fix two bugs:
   o A malicious or erroneous program can hog the CPU in uiomove()
   o A ktrace of such a program can hog large amounts of kernel memory
  This version of the fix does not increase the size of struct proc
  compared to 1.4.2.

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Sun Apr 30 12:07:06 2000 UTC (23 years, 11 months ago) by he
Branch: netbsd-1-4
Changes since 1.74: +19 -1 lines
Diff to previous 1.74 (colored)

Pull up revision 1.88 (via patch, requested by sommerfeld):
  Fix two bugs:
   o A malicious or erroneous program can hog the CPU in uiomove()
   o A ktrace of such a program can hog large amounts of kernel memory
  This increses the size of struct proc, so kernel-grovellers need
  rebuild after this.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Apr 10 01:48:56 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored)

Make `whichqs' volatile so that C code can safely loop around it.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Mar 28 06:01:05 2000 UTC (24 years ago) by simonb
Branch: MAIN
Changes since 1.88: +2 -3 lines
Diff to previous 1.88 (colored)

Remove duplicate declaration if uvm_swapin() - it's in <uvm/uvm_extern.h>.
Extern the declaration of initproc.

Revision 1.88 / (download) - annotate - [select for diffs], Thu Mar 23 20:37:58 2000 UTC (24 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.87: +13 -1 lines
Diff to previous 1.87 (colored)

Track if a process has been through a round-robin cycle without yielding
the CPU, and mark that it should yield if that happens.

Based on a discussion with Artur Grabowski.

Revision 1.87 / (download) - annotate - [select for diffs], Thu Mar 23 06:31:51 2000 UTC (24 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.86: +4 -1 lines
Diff to previous 1.86 (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.86 / (download) - annotate - [select for diffs], Fri Feb 11 19:22:54 2000 UTC (24 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.85: +1 -2 lines
Diff to previous 1.85 (colored)

Add some very simple code to auto-size the kmem_map.  We take the
amount of physical memory, divide it by 4, and then allow machine
dependent code to place upper and lower bounds on the size.  Export
the computed value to userspace via the new "vm.nkmempages" sysctl.

NKMEMCLUSTERS is now deprecated and will generate an error if you
attempt to use it.  The new option, should you choose to use it,
is called NKMEMPAGES, and two new options NKMEMPAGES_MIN and
NKMEMPAGES_MAX allow the user to configure the bounds in the kernel
config file.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Feb 6 16:47:57 2000 UTC (24 years, 2 months ago) by eeh
Branch: MAIN
Changes since 1.84: +4 -2 lines
Diff to previous 1.84 (colored)

Add new P_32 flag for processes running 32-bit emulation.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Sep 28 14:47:04 1999 UTC (24 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi
Changes since 1.83: +2 -1 lines
Diff to previous 1.83 (colored)

Remplace kern.shortcorename sysctl with a more flexible sheme,
core filename format, which allow to change the name of the core dump,
and to relocate it in a directory. Credits to Bill Sommerfeld for giving me
the idea :)
The default core filename format can be changed by options DEFCORENAME and/or
kern.defcorename
Create a new sysctl tree, proc, which holds per-process values (for now
the corename format, and resources limits). Process is designed by its pid
at the second level name. These values are inherited on fork, and the corename
fomat is reset to defcorename on suid/sgid exec.
Create a p_sugid() function, to take appropriate actions on suid/sgid
exec (for now set the P_SUGID flag and reset the per-proc corename).
Adjust dosetrlimit() to allow changing limits of one proc by another, with
credential controls.

Revision 1.83 / (download) - annotate - [select for diffs], Tue Aug 10 23:33:27 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +17 -5 lines
Diff to previous 1.82 (colored)

Pull in <machine/cpu.h> in the MULTIPROCESSOR case to get curcpu() for
use in the `curproc' declaration.  Note that machine-dependent code can
still override `curproc' in the single- and multi-processor case as before,
for its own convencience (the SPARC port does this, for example).

Revision 1.74.4.2 / (download) - annotate - [select for diffs], Mon Aug 2 22:56:00 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.74.4.1: +20 -6 lines
Diff to previous 1.74.4.1 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored)

Update from trunk.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Jul 26 23:00:58 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.81: +2 -1 lines
Diff to previous 1.81 (colored)

Implement wakeup_one(), which wakes up the highest priority process
first in line for the specified identifier.  For use in places where
you don't want a Thundering Herd.

While here, add an optimization to wakeup() suggested by Ross Harvey.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Jul 25 06:30:33 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored)

Turn the proclist lock into a read/write spinlock.  Update proclist locking
calls to reflect this.  Also, block statclock rather than softclock during
in the proclist locking functions, to address a problem reported on
current-users by Sean Doran.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Jul 22 21:08:32 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.79: +9 -1 lines
Diff to previous 1.79 (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.79 / (download) - annotate - [select for diffs], Thu Jul 22 18:13:36 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.78: +8 -2 lines
Diff to previous 1.78 (colored)

Rework the process exit path, in preparation for making process exit
and PID allocation MP-safe.  A new process state is added: SDEAD.  This
state indicates that a process is dead, but not yet a zombie (has not
yet been processed by the process reaper).

SDEAD processes exist on both the zombproc list (via p_list) and deadproc
(via p_hash; the proc has been removed from the pidhash earlier in the exit
path).  When the reaper deals with a process, it changes the state to
SZOMB, so that wait4 can process it.

Add a P_ZOMBIE() macro, which treats a proc in SZOMB or SDEAD as a zombie,
and update various parts of the kernel to reflect the new state.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Jul 15 23:18:42 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.77: +4 -5 lines
Diff to previous 1.77 (colored)

A few things to make the Linux clone(2) emulation work a bit better:
- When the exit signal is specified to be 0, don't just assume they
  meant SIGCHLD.  In the Linux world, this appears to mean "don't deliver
  an exit signal at all".
- Simplify P_EXITSIG(); don't check against initproc here, just change
  the exit signal to SIGCHLD if reparenting to initproc.

A very simple clone(2) test program now works, and the MpegTV package
starts, but doesn't run properly yet (I believe there is a separate
bug which keeps it from working properly).

Revision 1.74.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:30:21 1999 UTC (24 years, 10 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.74: +15 -2 lines
Diff to previous 1.74 (colored)

Sync w/ -current.

Revision 1.77 / (download) - annotate - [select for diffs], Thu May 13 21:58:37 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.76: +3 -2 lines
Diff to previous 1.76 (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.76 / (download) - annotate - [select for diffs], Thu May 13 00:59:03 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.75: +10 -2 lines
Diff to previous 1.75 (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.75 / (download) - annotate - [select for diffs], Fri Apr 30 18:40:05 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.74: +5 -1 lines
Diff to previous 1.74 (colored)

Make the proc structure reference the new cwdinfo structure, and define
a few more sharing flags for fork1().

Revision 1.74 / (download) - annotate - [select for diffs], Thu Mar 25 04:45:56 1999 UTC (25 years, 1 month ago) by sommerfe
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: netbsd-1-4, chs-ubc2
Changes since 1.73: +2 -1 lines
Diff to previous 1.73 (colored)

Disallow tracing of processes unless tracer's root directory is at or
above tracee's root directory.

Revision 1.73 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:29 1999 UTC (25 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.72: +1 -16 lines
Diff to previous 1.72 (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.72 / (download) - annotate - [select for diffs], Mon Jan 25 16:00:06 1999 UTC (25 years, 2 months ago) by kleink
Branch: MAIN
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored)

Adapt the System V behaviour of a child process inheriting its parent's
ucontext link but still reset it on exec().

Revision 1.71 / (download) - annotate - [select for diffs], Sat Jan 23 22:23:19 1999 UTC (25 years, 3 months ago) by sommerfe
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (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.70 / (download) - annotate - [select for diffs], Thu Jan 21 23:12:50 1999 UTC (25 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.69: +2 -1 lines
Diff to previous 1.69 (colored)

Add p_ctxlink void * member to keep the struct ucontext uc_link member,
used in svr4 emulation.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Nov 11 22:44:25 1998 UTC (25 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.68: +1 -3 lines
Diff to previous 1.68 (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.68 / (download) - annotate - [select for diffs], Wed Nov 11 06:34:43 1998 UTC (25 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.67: +3 -1 lines
Diff to previous 1.67 (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.67 / (download) - annotate - [select for diffs], Mon Oct 19 11:51:53 1998 UTC (25 years, 6 months ago) by pk
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.66: +7 -1 lines
Diff to previous 1.66 (colored)

Allow `curproc' to be defined in <machine/proc.h> to enable a transition
to SMP support.

Revision 1.66 / (download) - annotate - [select for diffs], Fri Sep 18 18:35:16 1998 UTC (25 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.65: +3 -5 lines
Diff to previous 1.65 (colored)

Add NOCLDWAIT (from FreeBSD)

Revision 1.65 / (download) - annotate - [select for diffs], Fri Sep 11 12:50:13 1998 UTC (25 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.64: +4 -6 lines
Diff to previous 1.64 (colored)

Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.

Revision 1.64 / (download) - annotate - [select for diffs], Tue Sep 8 23:47:49 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.63: +19 -2 lines
Diff to previous 1.63 (colored)

- Add a new proclist, deadproc, which holds dead-but-not-yet-zombie
  processes.
- Create a new data structure, the proclist_desc, which contains a
  pointer to a proclist, and eventually, a pointer to the lock for that
  proclist.  Declare a static array of proclist_descs, proclists[],
  consisting of allproc, deadproc, and zombproc.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Sep 1 01:02:34 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored)

Use the pool allocator and the "nointr" pool page allocator for rusage
structures.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Aug 31 23:20:17 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.61: +3 -1 lines
Diff to previous 1.61 (colored)

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

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

Use a pool for proc structures.

Revision 1.60 / (download) - annotate - [select for diffs], Sat May 2 18:41:47 1998 UTC (25 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

fktrace changes.

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

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:51 1998 UTC (26 years, 1 month ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +42 -23 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:11:07 1998 UTC (26 years, 1 month ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +263 -1 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.58 / (download) - annotate - [select for diffs], Sat Feb 14 00:37:26 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +2 -1 lines
Diff to previous 1.57 (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.57 / (download) - annotate - [select for diffs], Tue Feb 10 14:08:48 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.56: +5 -1 lines
Diff to previous 1.56 (colored)

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

Revision 1.56 / (download) - annotate - [select for diffs], Thu Feb 5 08:00:42 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.55: +12 -1 lines
Diff to previous 1.55 (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.55 / (download) - annotate - [select for diffs], Mon Jan 5 05:16:26 1998 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

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

Revision 1.54 / (download) - annotate - [select for diffs], Sun Jan 4 03:53:04 1998 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.53: +7 -1 lines
Diff to previous 1.53 (colored)

Define flags passed to fork1().  Currently "block parent" and "share vmspace"
are defined.

Revision 1.50.2.2 / (download) - annotate - [select for diffs], Tue Oct 14 16:03:33 1997 UTC (26 years, 6 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.50.2.1: +4 -4 lines
Diff to previous 1.50.2.1 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Oct 10 08:19:50 1997 UTC (26 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-base
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

GC pageproc and bclnlist.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Oct 9 12:50:00 1997 UTC (26 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

Make wmesg arguments to various functions const.

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Tue Sep 16 03:51:30 1997 UTC (26 years, 7 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Sep 11 23:02:36 1997 UTC (26 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way.  (See tech-kern.)

Revision 1.50.4.1 / (download) - annotate - [select for diffs], Mon Sep 8 23:13:26 1997 UTC (26 years, 7 months ago) by thorpej
Branch: thorpej-signal
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored) next main 1.51 (colored)

Significantly restructure the way signal state for a process is stored.
Rather than using bitmasks to redundantly store the information kept
in the process's sigacts (because the sigacts was kept in the u-area),
hang sigacts directly off the process, and access it directly.

Simplify signal setup code tremendously by storing information in
the sigacts as an array of struct sigactions, rather than in a different
format, since userspace uses sigactions.

Make sigacts sharable by adding reference counting.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jul 6 12:32:39 1997 UTC (26 years, 9 months ago) by fvdl
Branch: MAIN
CVS Tags: thorpej-signal-base, marc-pcmcia-bp
Branch point for: thorpej-signal, marc-pcmcia
Changes since 1.49: +4 -1 lines
Diff to previous 1.49 (colored)

Add lock count fields to proc structure. Always define NCPU to 1 for now
in lock.h

Revision 1.49 / (download) - annotate - [select for diffs], Mon Apr 28 04:49:35 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
CVS Tags: bouyer-scsipi
Changes since 1.48: +3 -4 lines
Diff to previous 1.48 (colored)

Reinstate P_FSTRACE, with different semantics:
* Never send a SIGCHLD to the parent if P_FSTRACE is set.
* Do not permit mixing ptrace(2) and procfs; only permit using the one that
  was attached.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Apr 28 02:51:45 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.47: +1 -2 lines
Diff to previous 1.47 (colored)

Remove remnants of P_FSTRACE, which is no longer used.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Nov 6 19:33:39 1996 UTC (27 years, 5 months ago) by cgd
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored)

Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed.  Rename remrq() to
remrunqueue().  Also, move remrunqueue() prototype from vm/vm_extern.h
to sys/proc.h, so that it's in the same place as the setrunqueue() prototype
and other related prototypes.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Oct 2 18:05:09 1996 UTC (27 years, 6 months ago) by ws
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Sep 7 12:41:33 1996 UTC (27 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.44: +1 -2 lines
Diff to previous 1.44 (colored)

Implement poll(2).

Revision 1.44 / (download) - annotate - [select for diffs], Mon Apr 22 01:23:21 1996 UTC (28 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.43: +4 -1 lines
Diff to previous 1.43 (colored)

add prototypes from <sys/cpu.h> to the appropriate places

Revision 1.43 / (download) - annotate - [select for diffs], Thu Mar 14 18:59:11 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

filedesc.h, proc.h: Rename fdopen() to filedescopen() so that it does not
		    conflict with the floppy driver.
conf.h: Protect against multiple inclusions. The reason will become apparent
	soon.
systm.h: Bring Debugger() prototype into scope.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Feb 9 18:25:23 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.41: +6 -1 lines
Diff to previous 1.41 (colored)

Filesystem prototype changes

Revision 1.41 / (download) - annotate - [select for diffs], Sun Aug 13 09:04:43 1995 UTC (28 years, 8 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.40: +9 -2 lines
Diff to previous 1.40 (colored)

Add PHOLD() and PRELE() macros, used to hold a process in core and release it.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Apr 22 19:40:33 1995 UTC (29 years ago) by christos
Branch: MAIN
Changes since 1.39: +31 -15 lines
Diff to previous 1.39 (colored)

- new struct emul for OS emulations.
- deprecated exec_setup_fcn
- deprecated EMUL_???
- added sunos_machdep.c for the m68k ports.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Apr 13 20:48:59 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.38: +3 -4 lines
Diff to previous 1.38 (colored)

EMUL_IBCS2_ELF -> EMUL_SVR4; EMUL_IBCS2_{COFF,XOUT} -> EMUL_IBCS2

Revision 1.38 / (download) - annotate - [select for diffs], Sun Mar 26 20:24:32 1995 UTC (29 years, 1 month ago) by jtc
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

KERNEL -> _KERNEL

Revision 1.37 / (download) - annotate - [select for diffs], Tue Feb 28 23:04:47 1995 UTC (29 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.36: +2 -1 lines
Diff to previous 1.36 (colored)

add an EMUL constant for Linux emulation

Revision 1.36 / (download) - annotate - [select for diffs], Sun Jan 8 22:53:30 1995 UTC (29 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

light cleanup, related to spacing...

Revision 1.35 / (download) - annotate - [select for diffs], Sat Dec 24 15:08:02 1994 UTC (29 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.34: +7 -1 lines
Diff to previous 1.34 (colored)

various function definitions.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Oct 30 19:09:45 1994 UTC (29 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

DTRT with thread id.

Revision 1.29.2.3 / (download) - annotate - [select for diffs], Thu Oct 6 05:07:47 1994 UTC (29 years, 6 months ago) by mycroft
Branch: netbsd-1-0
CVS Tags: 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
Changes since 1.29.2.2: +5 -4 lines
Diff to previous 1.29.2.2 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored)

Update from trunk.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Sep 5 01:13:10 1994 UTC (29 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.32: +5 -4 lines
Diff to previous 1.32 (colored)

New iBCS2 code from Scott.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Aug 30 03:07:03 1994 UTC (29 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.31: +25 -21 lines
Diff to previous 1.31 (colored)

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

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Mon Aug 15 22:02:33 1994 UTC (29 years, 8 months ago) by mycroft
Branch: netbsd-1-0
Changes since 1.29.2.1: +3 -3 lines
Diff to previous 1.29.2.1 (colored) to branchpoint 1.29 (colored)

update from trunk

Revision 1.31 / (download) - annotate - [select for diffs], Mon Aug 15 22:02:20 1994 UTC (29 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Add EMUL_IBCS2_COFF, and rename EMUL_IBCS2 to EMUL_IBCS2_ELF.

Revision 1.29.2.1 / (download) - annotate - [select for diffs], Sun Aug 14 07:45:11 1994 UTC (29 years, 8 months ago) by mycroft
Branch: netbsd-1-0
Changes since 1.29: +4 -2 lines
Diff to previous 1.29 (colored)

update from trunk

Revision 1.30 / (download) - annotate - [select for diffs], Sun Aug 14 00:55:09 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.29: +4 -2 lines
Diff to previous 1.29 (colored)

add a new p_emul value, clean up slightly.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jun 29 06:44:52 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.28: +279 -1 lines
Diff to previous 1.28 (colored)

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

Revision 1.28 / (download) - annotate - [select for diffs], Mon Jun 27 19:31:45 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.27: +1 -1 lines
Diff to previous 1.27 (colored)

new standard, minimally intrusive ID format

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jun 15 20:00:15 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.26: +1 -1 lines
Diff to previous 1.26 (colored)

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

Revision 1.26 / (download) - annotate - [select for diffs], Sun May 22 01:11:38 1994 UTC (29 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +1 -1 lines
Diff to previous 1.25 (colored)

add EMUL_IBCS2

Revision 1.25 / (download) - annotate - [select for diffs], Sat May 21 06:14:56 1994 UTC (29 years, 11 months ago) by glass
Branch: MAIN
Changes since 1.24: +1 -1 lines
Diff to previous 1.24 (colored)

add ultrix emulation flag

Revision 1.24 / (download) - annotate - [select for diffs], Sat May 21 03:52:04 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.23: +1 -1 lines
Diff to previous 1.23 (colored)

update to 4.4-Lite; no serious changes

Revision 1.23 / (download) - annotate - [select for diffs], Fri May 13 08:01:32 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.22: +1 -1 lines
Diff to previous 1.22 (colored)

kill 3 bogons, note more to go...

Revision 1.22 / (download) - annotate - [select for diffs], Thu May 5 09:11:37 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +1 -1 lines
Diff to previous 1.21 (colored)

Now setpri() is really toast.

Revision 1.21 / (download) - annotate - [select for diffs], Thu May 5 05:40:13 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Wed May 4 03:42:32 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.19: +1 -1 lines
Diff to previous 1.19 (colored)

Rename a lot of process flags.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Apr 29 04:41:49 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.18: +1 -1 lines
Diff to previous 1.18 (colored)

kill syscall name aliases. no user-visible changes

Revision 1.18.2.2 / (download) - annotate - [select for diffs], Wed Apr 6 21:24:35 1994 UTC (30 years ago) by cgd
Branch: nvm
Changes since 1.18.2.1: +1 -0 lines
Diff to previous 1.18.2.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

add SUGID

Revision 1.18.2.1, Wed Apr 6 21:24:34 1994 UTC (30 years ago) by cgd
Branch: nvm
Changes since 1.18: +0 -1 lines
FILE REMOVED

file proc.h was added on branch nvm on 1994-04-06 21:24:35 +0000

Revision 1.18 / (download) - annotate - [select for diffs], Wed Apr 6 21:24:34 1994 UTC (30 years ago) by cgd
Branch: MAIN
CVS Tags: wnvm, nvm-base
Branch point for: nvm
Changes since 1.17: +1 -1 lines
Diff to previous 1.17 (colored)

add SUGID

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jan 20 21:23:15 1994 UTC (30 years, 3 months ago) by ws
Branch: MAIN
Changes since 1.16: +1 -1 lines
Diff to previous 1.16 (colored)

Make procfs really work for debugging.
Implement not & notepg files in procfs.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jan 8 15:19:11 1994 UTC (30 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 (colored)

Move some prototypes to a better location.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jan 8 11:19:50 1994 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)

core reorg

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jan 4 11:07:41 1994 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored)

field name change

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 22 13:20:26 1993 UTC (30 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored)

add proto for proc_reparent() function from jsp.
he gave us the function, but i'm not sure exactly where the proto
should go...

Revision 1.12 / (download) - annotate - [select for diffs], Tue Dec 21 09:45:43 1993 UTC (30 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11 (colored)

All the world is *not* an i386.

Revision 1.6.4.4 / (download) - annotate - [select for diffs], Tue Dec 21 08:19:37 1993 UTC (30 years, 4 months ago) by cgd
Branch: magnum
Changes since 1.6.4.3: +1 -1 lines
Diff to previous 1.6.4.3 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

update from trunk

Revision 1.11 / (download) - annotate - [select for diffs], Tue Dec 21 08:18:39 1993 UTC (30 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored)

move EMUL_* definitions to a sane location , and fix them up some

Revision 1.10 / (download) - annotate - [select for diffs], Tue Dec 21 06:22:33 1993 UTC (30 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored)

move things around as appropriate, add 7 more spares (to round to 256)

Revision 1.9 / (download) - annotate - [select for diffs], Tue Dec 21 05:28:27 1993 UTC (30 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

delete stupidity, add a few fields

Revision 1.8 / (download) - annotate - [select for diffs], Sun Dec 12 19:19:04 1993 UTC (30 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

add per-process emulation variable
support for OMAGIC/NMAGIC executables
STACKGAP support needed by compatibility functions

Revision 1.6.4.3 / (download) - annotate - [select for diffs], Wed Nov 10 06:34:22 1993 UTC (30 years, 5 months ago) by deraadt
Branch: magnum
Changes since 1.6.4.2: +1 -1 lines
Diff to previous 1.6.4.2 (colored) to branchpoint 1.6 (colored)

set/reset emulation environment at the right times
keep arg buffer around for later use

Revision 1.6.4.2 / (download) - annotate - [select for diffs], Fri Sep 24 08:57:57 1993 UTC (30 years, 7 months ago) by mycroft
Branch: magnum
Changes since 1.6.4.1: +1 -1 lines
Diff to previous 1.6.4.1 (colored) to branchpoint 1.6 (colored)

Changes from trunk.
conf.h, disk.h, disklabel.h: strategy functions return void.  dump functions
take dev, blkno, maddr, and length.
dkstat.h: Add CP_INTR.
mount.h: Make fsid_t a structure with two longs inside, now that quad is gone.
proc.h: Replace p_[us]time with p_[usi]ticks.
systm.h: Don't declare spl*() or psuedo-device attach functions.  Declare
endtsleep().  Change declaration of panic().
types.h: Replace u_quad and quad with u_quad_t and quad_t, which use the GCC
`long long' type.  Modify qaddr_t accordingly.
vnode.h: Change va_size and va_bytes to u_quad_ts.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Sep 15 22:31:02 1993 UTC (30 years, 7 months ago) by cgd
Branch: MAIN
CVS Tags: magnum-base
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (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.6.4.1 / (download) - annotate - [select for diffs], Tue Sep 14 18:34:54 1993 UTC (30 years, 7 months ago) by mycroft
Branch: magnum
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

kernel.h:  from 4.4:  Several things moved to gmon.h.  New stathz and profhz.
proc.h:  from 4.4:  New SPROFIL.
resource.h:  from 4.4:  New struct loadavg.  averunnable and avenrun moved
here.
systm.h:  from 4.4:  Nuke startrtclock() and enablertclock().  Add initclocks()
and cpu_initclocks().  Rename gatherstats() to statclock().
Incorporate changes from main branch.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jun 27 05:59:05 1993 UTC (30 years, 9 months ago) by andrew
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Branch point for: magnum
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

ANSIfications - lots of function prototyping.

Revision 1.5 / (download) - annotate - [select for diffs], Thu May 20 16:22:51 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

add rcs ids as necessary, and also clean up headers

Revision 1.4 / (download) - annotate - [select for diffs], Thu May 20 11:48:50 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

have proc.h, socketvar.h, tty.h include select.h automatically

Revision 1.3 / (download) - annotate - [select for diffs], Sat May 15 02:39:53 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

fix the fact that p_wmesg was in the wrong section of the proc struct

Revision 1.2 / (download) - annotate - [select for diffs], Mon Apr 19 01:23:00 1993 UTC (31 years ago) by mycroft
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

Add consistent multiple-inclusion protection.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month 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 (31 years, 1 month 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>