The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.88.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:27:47 2026 UTC (11 days, 11 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.88.2.1: preferred, colored; branchpoint 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88.2.1: +3 -5 lines
Sync with HEAD

Revision 1.84.20.3: download - view: text, markup, annotated - select for diffs
Sat Oct 24 10:39:51 2026 UTC (3 weeks, 2 days ago) by martin
Branches: netbsd-10
Diff to: previous 1.84.20.2: preferred, colored; branchpoint 1.84: preferred, colored; next MAIN 1.85: preferred, colored
Changes since revision 1.84.20.2: +2 -4 lines
Pull up following revision(s) (requested by riastradh in ticket #541):

	sys/compat/netbsd32/netbsd32_signal.c: revision 1.57
	sys/kern/kern_fork.c: revision 1.235
	sys/kern/exec_subr.c: revision 1.93 (via patch)
	sys/kern/kern_exec.c: revision 1.534 (via patch)
	sys/kern/kern_exec.c: revision 1.535 (via patch)
	sys/kern/exec_script.c: revision 1.86 (via patch)

exec: Free struct exec_package::ep_emul_arg in more error paths.

We should really formalize the destruction path for these temporary
exec data structures; these error branches are all tangled messes of
spaghetti.

PR kern/60657: panic: kernel diagnostic assertion "epp->ep_emul_arg
== NULL" failed: file
"/home/riastradh/netbsd/current/src/sys/kern/kern_exec.c", line 535

Test case forthcoming (it would panic the testbed) as part of

PR kern/60653: posix_spawn(3) causes incorrect stack base information
which is how I stumbled upon this.


Test various methods of getting the process's stack base and size.
And test the effect of fork, vfork, failed execve, and posix_spawn on
them.

PR kern/60653: posix_spawn(3) causes incorrect stack base information


t_signal_and_sp: Link against libpthread unconditionally now.

Required by new test cases added for:
PR kern/60653: posix_spawn(3) causes incorrect stack base information


execve(2): Set p_stackbase in execve_runproc, not execve_loadvm.
execve_loadvm must not have side effects on the running process for
two reasons:

1. If execve(2) fails, it has to be able to back out and return to
   the calling process.  For example, the shell will execute the
   first of a series of candidate paths that works when it searches
   $PATH, and if one fails, it has to be able to move on to try the
   next.
2. The caller may be the _parent_ process -- this is the case when
   we're in posix_spawn.

Instead, it must be set in execve_runproc, after we're committed to
the exec and can't back out -- and we're definitely operating on the
process that is executing a new image, not on its parent!
p_stackbase and its assignment in exec_setup_stack, a subroutine of
execve_loadvm, were introduced with the PaX ASLR changes back in 2007
in order to pass the true stack base via AT_STACKBASE in the ELF
auxv, and in order to have getcontext() return the true stack base,
in the face of address space layout randomization.

This change, however, broke the stack base returned by getcontext()
in programs that have tried to exec other programs and failed in
various ways.  And made the later introduction of posix_spawn break
the stack base in the _parent_.

To fix this, we set p_stackbase -- under p_lock, to avoid racing with
sysctl_doeproc in another thread -- only in execve_runproc once we're
committed to the exec, but before copyoutargs -> es_copyargs =
elf_copyargs -> elf_populate_auxv needs to read it.  (That said,
elf_populate_auxv(..., pack, ...) could just use pack->es_minsaddr
directly anyway, and then we wouldn't have that ordering constraint.)

PR kern/60653: posix_spawn(3) causes incorrect stack base information


fork(2), vfork(2): Copy the parent's stack base pointer to the child.

Don't just leak whatever random stack pointer some recycled struct
proc had!

TBD: Move p_stackbase in struct proc so this is covered by the memcpy
above, in a separate commit so we can pull this one up without any
change to the layout of struct proc.
PR kern/60653: posix_spawn(3) causes incorrect stack base information


compat32: Advertise true stack base to getcontext(2).
Needs adjustment for PaX ASLR.

This was missed as part of:
Module Name:    src
Committed By:   christos
Date:           Wed Dec 26 22:11:54 UTC 2007
Add PaX ASLR (Address Space Layout Randomization) [from elad and myself]
https://mail-index.NetBSD.org/source-changes/2007/12/26/msg195243.html

PR kern/60877: t_signal_and_sp test failure with i386 userland on amd64
kernel

Revision 1.91.2.1: download - view: text, markup, annotated - select for diffs
Sat Oct 24 10:26:01 2026 UTC (3 weeks, 2 days ago) by martin
Branches: netbsd-11
CVS tags: netbsd-11-1-RELEASE
Diff to: previous 1.91: preferred, colored; next MAIN 1.92: preferred, colored
Changes since revision 1.91: +2 -4 lines
Pull up following revision(s) (requested by riastradh in ticket #541):

	sys/compat/netbsd32/netbsd32_signal.c: revision 1.57
	tests/kernel/h_getstack.c: revision 1.1
	sys/kern/kern_fork.c: revision 1.235
	sys/kern/exec_subr.c: revision 1.93
	tests/kernel/Makefile: revision 1.100
	tests/kernel/t_signal_and_sp.c: revision 1.22
	tests/kernel/t_signal_and_sp.c: revision 1.23
	tests/kernel/t_signal_and_sp.c: revision 1.24
	distrib/sets/lists/tests/mi: revision 1.1429
	tests/kernel/Makefile: revision 1.99
	distrib/sets/lists/debug/mi: revision 1.518
	tests/kernel/getstack.c: revision 1.1
	sys/compat/linux32/arch/aarch64/linux32_exec_machdep.c: revision 1.3
	tests/kernel/getstack.h: revision 1.1
	sys/kern/kern_exec.c: revision 1.534
	sys/kern/kern_exec.c: revision 1.535
	sys/kern/exec_script.c: revision 1.86

exec: Free struct exec_package::ep_emul_arg in more error paths.

We should really formalize the destruction path for these temporary
exec data structures; these error branches are all tangled messes of
spaghetti.

PR kern/60657: panic: kernel diagnostic assertion "epp->ep_emul_arg
== NULL" failed: file
"/home/riastradh/netbsd/current/src/sys/kern/kern_exec.c", line 535

Test case forthcoming (it would panic the testbed) as part of

PR kern/60653: posix_spawn(3) causes incorrect stack base information
which is how I stumbled upon this.


Test various methods of getting the process's stack base and size.
And test the effect of fork, vfork, failed execve, and posix_spawn on
them.

PR kern/60653: posix_spawn(3) causes incorrect stack base information


t_signal_and_sp: Link against libpthread unconditionally now.

Required by new test cases added for:
PR kern/60653: posix_spawn(3) causes incorrect stack base information


execve(2): Set p_stackbase in execve_runproc, not execve_loadvm.
execve_loadvm must not have side effects on the running process for
two reasons:

1. If execve(2) fails, it has to be able to back out and return to
   the calling process.  For example, the shell will execute the
   first of a series of candidate paths that works when it searches
   $PATH, and if one fails, it has to be able to move on to try the
   next.
2. The caller may be the _parent_ process -- this is the case when
   we're in posix_spawn.

Instead, it must be set in execve_runproc, after we're committed to
the exec and can't back out -- and we're definitely operating on the
process that is executing a new image, not on its parent!
p_stackbase and its assignment in exec_setup_stack, a subroutine of
execve_loadvm, were introduced with the PaX ASLR changes back in 2007
in order to pass the true stack base via AT_STACKBASE in the ELF
auxv, and in order to have getcontext() return the true stack base,
in the face of address space layout randomization.

This change, however, broke the stack base returned by getcontext()
in programs that have tried to exec other programs and failed in
various ways.  And made the later introduction of posix_spawn break
the stack base in the _parent_.

To fix this, we set p_stackbase -- under p_lock, to avoid racing with
sysctl_doeproc in another thread -- only in execve_runproc once we're
committed to the exec, but before copyoutargs -> es_copyargs =
elf_copyargs -> elf_populate_auxv needs to read it.  (That said,
elf_populate_auxv(..., pack, ...) could just use pack->es_minsaddr
directly anyway, and then we wouldn't have that ordering constraint.)

PR kern/60653: posix_spawn(3) causes incorrect stack base information


fork(2), vfork(2): Copy the parent's stack base pointer to the child.

Don't just leak whatever random stack pointer some recycled struct
proc had!

TBD: Move p_stackbase in struct proc so this is covered by the memcpy
above, in a separate commit so we can pull this one up without any
change to the layout of struct proc.
PR kern/60653: posix_spawn(3) causes incorrect stack base information


compat32: Advertise true stack base to getcontext(2).
Needs adjustment for PaX ASLR.

This was missed as part of:
Module Name:    src
Committed By:   christos
Date:           Wed Dec 26 22:11:54 UTC 2007
Add PaX ASLR (Address Space Layout Randomization) [from elad and myself]
https://mail-index.NetBSD.org/source-changes/2007/12/26/msg195243.html

PR kern/60877: t_signal_and_sp test failure with i386 userland on amd64
kernel

Revision 1.93: download - view: text, markup, annotated - select for diffs
Fri Aug 28 12:02:15 2026 UTC (2 months, 2 weeks ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +2 -4 lines
execve(2): Set p_stackbase in execve_runproc, not execve_loadvm.

execve_loadvm must not have side effects on the running process for
two reasons:

1. If execve(2) fails, it has to be able to back out and return to
   the calling process.  For example, the shell will execute the
   first of a series of candidate paths that works when it searches
   $PATH, and if one fails, it has to be able to move on to try the
   next.

2. The caller may be the _parent_ process -- this is the case when
   we're in posix_spawn.

Instead, it must be set in execve_runproc, after we're committed to
the exec and can't back out -- and we're definitely operating on the
process that is executing a new image, not on its parent!

p_stackbase and its assignment in exec_setup_stack, a subroutine of
execve_loadvm, were introduced with the PaX ASLR changes back in 2007
in order to pass the true stack base via AT_STACKBASE in the ELF
auxv, and in order to have getcontext() return the true stack base,
in the face of address space layout randomization.

This change, however, broke the stack base returned by getcontext()
in programs that have tried to exec other programs and failed in
various ways.  And made the later introduction of posix_spawn break
the stack base in the _parent_.

To fix this, we set p_stackbase -- under p_lock, to avoid racing with
sysctl_doeproc in another thread -- only in execve_runproc once we're
committed to the exec, but before copyoutargs -> es_copyargs =
elf_copyargs -> elf_populate_auxv needs to read it.  (That said,
elf_populate_auxv(..., pack, ...) could just use pack->es_minsaddr
directly anyway, and then we wouldn't have that ordering constraint.)

PR kern/60653: posix_spawn(3) causes incorrect stack base information

Revision 1.92: download - view: text, markup, annotated - select for diffs
Mon May 11 02:05:31 2026 UTC (6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -3 lines
PGOFSET -> PAGE_MASK

Revision 1.88.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 2 05:57:40 2025 UTC (15 months, 2 weeks ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +18 -15 lines
Sync with HEAD

Revision 1.91: download - view: text, markup, annotated - select for diffs
Fri Dec 6 16:48:13 2024 UTC (23 months, 1 week ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20250801, netbsd-11-base, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5, netbsd-11-0-RC4, netbsd-11-0-RC3, netbsd-11-0-RC2, netbsd-11-0-RC1
Branch point for: netbsd-11
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +3 -3 lines
sys/kern/kern_exec.c, exec_*.c: Nix trailing whitespace.

No functional change intended.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Fri Dec 6 16:19:41 2024 UTC (23 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +8 -7 lines
sys/kern/kern_exec.c, exec_*.c: Sprinkle SET_ERROR dtrace probes.

PR kern/58378: Kernel error code origination lacks dtrace probes

Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Dec 6 16:18:41 2024 UTC (23 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +11 -9 lines
sys/kern/kern_exec.c, exec_*.c: Sort includes.

No functional change intended.

Revision 1.78.2.5: download - view: text, markup, annotated - select for diffs
Wed Nov 29 12:29:05 2023 UTC (2 years, 11 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.78.2.4: preferred, colored; branchpoint 1.78: preferred, colored; next MAIN 1.79: preferred, colored
Changes since revision 1.78.2.4: +3 -3 lines
Additionally pull up the following for ticket #1920:

	sys/kern/exec_subr.c		1.87

Fix build for kernels w/o PAX_MPROTECT.

Revision 1.82.10.2: download - view: text, markup, annotated - select for diffs
Wed Nov 29 12:27:05 2023 UTC (2 years, 11 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-5-RELEASE, netbsd-9-4-RELEASE
Diff to: previous 1.82.10.1: preferred, colored; branchpoint 1.82: preferred, colored; next MAIN 1.83: preferred, colored
Changes since revision 1.82.10.1: +3 -3 lines
Additionally pull up the following for ticket #1769:

	sys/kern/exec_subr.c		1.87

Fix build for kernels w/o PAX_MPROTECT.

Revision 1.84.20.2: download - view: text, markup, annotated - select for diffs
Wed Nov 29 12:25:17 2023 UTC (2 years, 11 months ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-2-RELEASE, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2
Diff to: previous 1.84.20.1: preferred, colored; branchpoint 1.84: preferred, colored
Changes since revision 1.84.20.1: +3 -3 lines
Additionally pull up the following for ticket #477:

	sys/kern/exec_subr.c		1.87

Fix build for kernels w/o PAX_MPROTECT.

Revision 1.78.2.4: download - view: text, markup, annotated - select for diffs
Tue Nov 28 13:00:52 2023 UTC (2 years, 11 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.78.2.3: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.3: +8 -5 lines
Pull up following revision(s) (requested by riastradh in ticket #1920):

	tests/lib/libc/sys/t_setrlimit.c: revision 1.8
	tests/lib/libc/sys/t_setrlimit.c: revision 1.9
	sys/kern/exec_subr.c: revision 1.86

t_setrlimit: Verify changing RLIMIT_STACK affects access to stack.
PR kern/57711

exec: Map noaccess part of stack with prot=NONE, maxprot=READ|WRITE.
This way, setrlimit(RLIMT_STACK) can grant READ|WRITE access when
increasing the stack size.
PR kern/57711

Revision 1.82.10.1: download - view: text, markup, annotated - select for diffs
Tue Nov 28 12:59:21 2023 UTC (2 years, 11 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +8 -5 lines
Pull up following revision(s) (requested by riastradh in ticket #1769):

	tests/lib/libc/sys/t_setrlimit.c: revision 1.8
	tests/lib/libc/sys/t_setrlimit.c: revision 1.9
	sys/kern/exec_subr.c: revision 1.86

t_setrlimit: Verify changing RLIMIT_STACK affects access to stack.
PR kern/57711

exec: Map noaccess part of stack with prot=NONE, maxprot=READ|WRITE.
This way, setrlimit(RLIMT_STACK) can grant READ|WRITE access when
increasing the stack size.
PR kern/57711

Revision 1.84.20.1: download - view: text, markup, annotated - select for diffs
Tue Nov 28 12:56:28 2023 UTC (2 years, 11 months ago) by martin
Branches: netbsd-10
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +8 -5 lines
Pull up following revision(s) (requested by riastradh in ticket #477):

	tests/lib/libc/sys/t_setrlimit.c: revision 1.8
	tests/lib/libc/sys/t_setrlimit.c: revision 1.9
	sys/kern/exec_subr.c: revision 1.86

t_setrlimit: Verify changing RLIMIT_STACK affects access to stack.
PR kern/57711

exec: Map noaccess part of stack with prot=NONE, maxprot=READ|WRITE.
This way, setrlimit(RLIMT_STACK) can grant READ|WRITE access when
increasing the stack size.
PR kern/57711

Revision 1.88: download - view: text, markup, annotated - select for diffs
Tue Nov 21 14:35:36 2023 UTC (2 years, 11 months ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base
Branch point for: perseant-exfatfs
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -3 lines
pax(9): Rework header file more coherently to nix some needless #ifs.

Cleans up some of the fallout from PR kern/57711 fixes.

Could do a little more to nix PAX_SEGVGUARD conditionals but maybe
not worth it.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Nov 21 12:12:26 2023 UTC (2 years, 11 months ago) by martin
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +3 -3 lines
Stopgap build fix for kernels w/o PAX_MPROTECT after the fixes
for PR 57711: mark variable as unused (sometimes, e.g. in macppc kernels).

Revision 1.86: download - view: text, markup, annotated - select for diffs
Tue Nov 21 00:09:18 2023 UTC (2 years, 11 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +8 -5 lines
exec: Map noaccess part of stack with prot=NONE, maxprot=READ|WRITE.

This way, setrlimit(RLIMT_STACK) can grant READ|WRITE access when
increasing the stack size.

PR kern/57711

XXX pullup-10
XXX pullup-9
XXX pullup-8

Revision 1.85: download - view: text, markup, annotated - select for diffs
Sun Apr 9 09:18:09 2023 UTC (3 years, 7 months ago) by riastradh
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +4 -3 lines
kern: KASSERT(A && B) -> KASSERT(A); KASSERT(B)

Revision 1.82.6.2: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:42 2020 UTC (6 years, 6 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.82.6.1: preferred, colored; branchpoint 1.82: preferred, colored; next MAIN 1.83: preferred, colored
Changes since revision 1.82.6.1: +1 -1 lines
Sync with HEAD

Revision 1.83.4.1: download - view: text, markup, annotated - select for diffs
Mon Apr 20 11:29:10 2020 UTC (6 years, 6 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.83: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83: +3 -3 lines
Sync with HEAD

Revision 1.84: download - view: text, markup, annotated - select for diffs
Mon Apr 13 19:23:18 2020 UTC (6 years, 7 months ago) by ad
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, netbsd-10-base, netbsd-10-0-RC1, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +3 -3 lines
Replace most uses of vp->v_usecount with a call to vrefcnt(vp), a function
that hides the details and does atomic_load_relaxed().  Signature matches
FreeBSD.

Revision 1.82.6.1: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:51 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +8 -6 lines
Merge changes from current as of 20200406

Revision 1.82.12.1: download - view: text, markup, annotated - select for diffs
Fri Jan 17 21:47:35 2020 UTC (6 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.82: preferred, colored; next MAIN 1.83: preferred, colored
Changes since revision 1.82: +8 -6 lines
Sync with head.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Jan 12 18:30:58 2020 UTC (6 years, 10 months ago) by ad
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1
Branch point for: bouyer-xenpvh
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +8 -6 lines
Tidy up the vnode locking around execve() on ELF images to acquire and
release the locks fewer times.  Proposed on tech-kern a very long time go.

Revision 1.70.12.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:38:44 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.70.12.1: preferred, colored; branchpoint 1.70: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70.12.1: +49 -36 lines
update from HEAD

Revision 1.78.2.3: download - view: text, markup, annotated - select for diffs
Thu Aug 31 08:32:39 2017 UTC (9 years, 2 months ago) by bouyer
Branches: 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, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.78.2.2: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.2: +16 -2 lines
Pull up following revision(s) (requested by joerg in ticket #234):
	sys/arch/amd64/include/vmparam.h: revision 1.43
	sys/kern/exec_subr.c: revision 1.79
	lib/libpthread/pthread_int.h: revision 1.94
	sys/arch/mips/include/vmparam.h: revision 1.58
	sys/arch/mips/include/vmparam.h: revision 1.59
	lib/libpthread/TODO: revision 1.19
	sys/arch/powerpc/include/vmparam.h: revision 1.20
	sys/arch/riscv/include/vmparam.h: revision 1.2
	sys/arch/riscv/include/vmparam.h: revision 1.3
	sys/arch/i386/include/vmparam.h: revision 1.85
	tests/lib/libpthread/t_join.c: revision 1.9
	sys/uvm/uvm_meter.c: revision 1.66
	sys/uvm/uvm_param.h: revision 1.36
	sys/kern/exec_subr.c: revision 1.80
	sys/uvm/uvm_param.h: revision 1.37
	sys/kern/exec_subr.c: revision 1.81
	sys/kern/exec_subr.c: revision 1.82
	lib/libpthread/pthread_attr_getguardsize.3: revision 1.4
	lib/libpthread/pthread.c: revision 1.148
	lib/libpthread/pthread_attr.c: revision 1.17
	sys/arch/amd64/include/vmparam.h: revision 1.42
Always include a 1MB guard area beyond the end of stack. While ASLR will
normally create a guard area as well, this provides a deterministic area
for all binaries.
Mitigates the rest of CVE-2017-1000374 and CVE-2017-1000375 from
Qualys.
Revert for the moment, creates problems on i386.
Recommit exec_subr.c revision 1.79:
  Always include a 1MB guard area beyond the end of stack. While ASLR will
  normally create a guard area as well, this provides a deterministic area
  for all binaries.
  Mitigates the rest of CVE-2017-1000374 and CVE-2017-1000375 from
  Qualys.
Additionally, change VM_DEFAULT_ADDRESS_TOPDOWN to include
user_stack_guard_size in the size reservation.
Update VM_DEFAULT_ADDRESS32_TOPDOWN to include guard area.
Export the guard size of the main thread via vm.guard_size. Add a
complementary writable sysctl for the initial guard size of threads
created via pthread_create. Let the existing attribut accessors do the
right thing. Raise the default guard size for threads to 64KB.

Revision 1.71.6.4: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:07 2017 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.71.6.3: preferred, colored; branchpoint 1.71: preferred, colored; next MAIN 1.72: preferred, colored
Changes since revision 1.71.6.3: +35 -11 lines
Sync with HEAD

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun Jul 2 16:41:33 2017 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, 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, isaki-audio2-base, isaki-audio2, ad-namecache-base
Branch point for: phil-wifi, netbsd-9, ad-namecache
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +4 -3 lines
Export the guard size of the main thread via vm.guard_size. Add a
complementary writable sysctl for the initial guard size of threads
created via pthread_create. Let the existing attribut accessors do the
right thing. Raise the default guard size for threads to 64KB.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Fri Jun 23 21:28:38 2017 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +15 -2 lines
Recommit exec_subr.c revision 1.79:
  Always include a 1MB guard area beyond the end of stack. While ASLR will
  normally create a guard area as well, this provides a deterministic area
  for all binaries.

  Mitigates the rest of CVE-2017-1000374 and CVE-2017-1000375 from
  Qualys.

Additionally, change VM_DEFAULT_ADDRESS_TOPDOWN to include
user_stack_guard_size in the size reservation.

Revision 1.78.2.2: download - view: text, markup, annotated - select for diffs
Wed Jun 21 18:26:42 2017 UTC (9 years, 4 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.78.2.1: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.1: +2 -15 lines
revert ticket 50

Revision 1.78.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 18:12:40 2017 UTC (9 years, 4 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +15 -2 lines
Pull up following revision(s) (requested by joerg in ticket #50):
	sys/kern/exec_subr.c: revision 1.79
Always include a 1MB guard area beyond the end of stack. While ASLR will
normally create a guard area as well, this provides a deterministic area
for all binaries.
Mitigates the rest of CVE-2017-1000374 and CVE-2017-1000375 from
Qualys.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Mon Jun 19 19:02:16 2017 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +0 -13 lines
Revert for the moment, creates problems on i386.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Mon Jun 19 15:53:16 2017 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +15 -2 lines
Always include a 1MB guard area beyond the end of stack. While ASLR will
normally create a guard area as well, this provides a deterministic area
for all binaries.

Mitigates the rest of CVE-2017-1000374 and CVE-2017-1000375 from
Qualys.

Revision 1.76.8.1: download - view: text, markup, annotated - select for diffs
Thu May 11 02:58:40 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.76: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76: +21 -11 lines
Sync with HEAD

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun May 7 22:54:54 2017 UTC (9 years, 6 months ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, netbsd-8-base
Branch point for: netbsd-8
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +18 -17 lines
de-triplicate.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sat May 6 21:34:51 2017 UTC (9 years, 6 months ago) by joerg
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +17 -8 lines
Extend the mmap(2) interface to allow requesting protections for later
use with mprotect(2), but without enabling them immediately.

Extend the mremap(2) interface to allow duplicating mappings, i.e.
create a second range of virtual addresses references the same physical
pages. Duplicated mappings can have different effective protections.

Adjust PAX mprotect logic to disallow effective protections of W&X, but
allow one mapping W and another X protections. This obsoletes using
temporary files for purposes like JIT.

Adjust PAX logic for mmap(2) and mprotect(2) to fail if W&X is requested
and not silently drop the X protection.

Improve test cases to ensure correct operation of the changed
interfaces.

Revision 1.71.6.3: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:37 2016 UTC (10 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.71.6.2: preferred, colored; branchpoint 1.71: preferred, colored
Changes since revision 1.71.6.2: +17 -19 lines
Sync with HEAD

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun May 22 14:26:09 2016 UTC (10 years, 5 months ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: prg-localcount2
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +2 -4 lines
reduce #ifdef mess caused by PaX

Revision 1.75: download - view: text, markup, annotated - select for diffs
Fri May 13 17:33:43 2016 UTC (10 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +18 -18 lines
- make pax aslr stack eat up to 1/8 of the max stack space insted of 1/4
  and reduce the length of the randomization bits since this is unused.
- call the pax aslr stack function sooner so we don't need to re-adjust the
  stack size.
- adjust the stack max resource limit to account for the maximum space that
  can be lost by aslr
- tidy up debugging printfs

Revision 1.71.6.2: download - view: text, markup, annotated - select for diffs
Fri Apr 22 15:44:16 2016 UTC (10 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.71.6.1: preferred, colored; branchpoint 1.71: preferred, colored
Changes since revision 1.71.6.1: +5 -14 lines
Sync with HEAD

Revision 1.74: download - view: text, markup, annotated - select for diffs
Thu Apr 7 12:06:50 2016 UTC (10 years, 7 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20160422
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +2 -5 lines
remove more ifdefs

Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu Apr 7 03:31:12 2016 UTC (10 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +5 -11 lines
Add PAX_MPROTECT_DEBUG

Revision 1.71.6.1: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:05 2015 UTC (10 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -3 lines
Sync with HEAD (as of 26th Dec)

Revision 1.72: download - view: text, markup, annotated - select for diffs
Sat Sep 26 16:12:24 2015 UTC (11 years, 1 month ago) by maxv
Branches: MAIN
CVS tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -3 lines
Revamp the way processes are PaX'ed in the kernel. Sent on tech-kern@ two
months ago, but no one reviewed it - probably because it's not a trivial
change.

This change fixes the following bug: when loading a PaX'ed binary, the
kernel updates the PaX flag of the calling process before it makes sure
the new process is actually launched. If the kernel fails to launch the
new process, it does not restore the PaX flag of the calling process,
leaving it in an inconsistent state.

Actually, simply restoring it would be horrible as well, since in the
meantime another thread may have used the flag.

The solution is therefore: modify all the functions used by PaX so that
they take as argument the exec package instead of the lwp, and set the PaX
flag in the process *right before* launching the new process - it cannot
fail in the meantime.

Revision 1.70.12.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:28 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +12 -12 lines
Rebase to HEAD as of a few days ago.

Revision 1.70.2.1: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:03 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.70: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70: +12 -12 lines
sync with head.

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

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

Revision 1.70.16.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:07 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.70: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70: +12 -12 lines
sync with head

Revision 1.71: download - view: text, markup, annotated - select for diffs
Sat Mar 29 09:31:11 2014 UTC (12 years, 7 months ago) by maxv
Branches: 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, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: nick-nhusb
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +12 -12 lines
Style

Revision 1.70: download - view: text, markup, annotated - select for diffs
Mon Aug 8 06:30:43 2011 UTC (15 years, 3 months ago) by enami
Branches: MAIN
CVS tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, 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, khorben-n900, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys, rmind-smpnet
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +4 -3 lines
Bounds process's stack size with max_stack_size so that 32bit
binary works regardless of stack size limit setting.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Thu Jun 23 23:42:44 2011 UTC (15 years, 4 months ago) by matt
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +4 -4 lines
Allow PAX_ASLR to be used by itself.

Revision 1.66.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:26 2011 UTC (15 years, 5 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.66: preferred, colored; next MAIN 1.67: preferred, colored
Changes since revision 1.66: +30 -4 lines
Sync with HEAD.

Revision 1.61.8.1.4.1: download - view: text, markup, annotated - select for diffs
Fri May 20 08:11:27 2011 UTC (15 years, 6 months ago) by matt
Branches: matt-nb5-mips64
Diff to: previous 1.61.8.1: preferred, colored; next MAIN 1.61.8.2: preferred, colored
Changes since revision 1.61.8.1: +5 -5 lines
bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).

Revision 1.63.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:12 2011 UTC (15 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.63.4.1: preferred, colored; branchpoint 1.63: preferred, colored; next MAIN 1.64: preferred, colored
Changes since revision 1.63.4.1: +35 -7 lines
sync with head

Revision 1.67.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 15:10:38 2011 UTC (15 years, 8 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.67: preferred, colored; next MAIN 1.68: preferred, colored
Changes since revision 1.67: +27 -1 lines
Sync with HEAD

Revision 1.68: download - view: text, markup, annotated - select for diffs
Fri Mar 4 04:25:58 2011 UTC (15 years, 8 months ago) by christos
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +29 -3 lines
PR/44673: Arna Clauson: Latest MAXSSIZ bump broke netbsd32 emulation on amd64.
- Use MAXSSIZ32 instead of MAXSSIZ for 32 bit binaries
- Default MAXXSIZ32 to a quarter of MAXSSIZ (good enough?)
- Add debugging
XXX: Note that:
	- sparc32 MAXSSIZ is larger than sparc64 MAXSSIZ
	- sparc64 MAXSSIZ32 != sparc32 MAXSSIZ

Revision 1.67: download - view: text, markup, annotated - select for diffs
Mon Jan 17 07:13:31 2011 UTC (15 years, 10 months ago) by uebayasi
Branches: MAIN
CVS tags: bouyer-quota2-base
Branch point for: bouyer-quota2
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -3 lines
Include internal definitions (uvm/uvm.h) only where necessary.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri Dec 17 22:35:07 2010 UTC (15 years, 11 months ago) by yamt
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +4 -2 lines
new_vmcmd: assertions

Revision 1.63.2.2: download - view: text, markup, annotated - select for diffs
Fri Oct 22 07:22:24 2010 UTC (16 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.63.2.1: preferred, colored; branchpoint 1.63: preferred, colored; next MAIN 1.64: preferred, colored
Changes since revision 1.63.2.1: +3 -3 lines
Sync with HEAD (-D20101022).

Revision 1.60.10.4: download - view: text, markup, annotated - select for diffs
Sat Oct 9 03:32:30 2010 UTC (16 years, 1 month ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.60.10.3: preferred, colored; branchpoint 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60.10.3: +5 -5 lines
sync with head

Revision 1.61.8.1.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 31 10:55:34 2010 UTC (16 years, 2 months ago) by bouyer
Branches: netbsd-5-0
Diff to: previous 1.61.8.1: preferred, colored; next MAIN 1.61.8.2: preferred, colored
Changes since revision 1.61.8.1: +5 -5 lines
Pull up following revision(s) (requested by christos in ticket #1444):
	sys/kern/kern_pax.c: revision 1.24
	sys/kern/exec_subr.c: revision 1.65
Fix issues with stack allocation and pax aslr:
- since the size is unsigned, don't check just that it is > 0, but limit
  it to the MAXSSIZ
- if the stack size is reduced because of aslr, make sure we reduce the
  actual allocation by the same size so that the size does not wrap around.
NB: Must be pulled up to 5.x!

Revision 1.61.8.2: download - view: text, markup, annotated - select for diffs
Tue Aug 31 10:55:00 2010 UTC (16 years, 2 months ago) by bouyer
Branches: 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, netbsd-5-1-RELEASE, netbsd-5-1-RC4, 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, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.61.8.1: preferred, colored; branchpoint 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61.8.1: +5 -5 lines
Pull up following revision(s) (requested by christos in ticket #1444):
	sys/kern/kern_pax.c: revision 1.24
	sys/kern/exec_subr.c: revision 1.65
Fix issues with stack allocation and pax aslr:
- since the size is unsigned, don't check just that it is > 0, but limit
  it to the MAXSSIZ
- if the stack size is reduced because of aslr, make sure we reduce the
  actual allocation by the same size so that the size does not wrap around.
NB: Must be pulled up to 5.x!

Revision 1.65: download - view: text, markup, annotated - select for diffs
Mon Aug 23 20:53:08 2010 UTC (16 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +5 -5 lines
Fix issues with stack allocation and pax aslr:
- since the size is unsigned, don't check just that it is > 0, but limit
  it to the MAXSSIZ
- if the stack size is reduced because of aslr, make sure we reduce the
  actual allocation by the same size so that the size does not wrap around.
NB: Must be pulled up to 5.x!

Revision 1.63.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:47:25 2010 UTC (16 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -3 lines
Sync with HEAD.

Revision 1.60.10.3: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:37 2010 UTC (16 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.60.10.2: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.10.2: +3 -3 lines
sync with head.

Revision 1.63.4.1: download - view: text, markup, annotated - select for diffs
Sat Jul 3 01:19:52 2010 UTC (16 years, 4 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -3 lines
sync with head

Revision 1.64: download - view: text, markup, annotated - select for diffs
Thu Jun 24 13:03:11 2010 UTC (16 years, 4 months ago) by hannken
Branches: MAIN
CVS tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -3 lines
Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.

Revision 1.60.10.2: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:15 2010 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.60.10.1: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.10.1: +11 -9 lines
sync with head

Revision 1.63: download - view: text, markup, annotated - select for diffs
Thu Dec 10 14:13:54 2009 UTC (16 years, 11 months ago) by matt
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +11 -9 lines
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.61.12.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:21:56 2009 UTC (17 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61: +9 -6 lines
Sync with HEAD.

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

Revision 1.60.10.1: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:46 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +9 -9 lines
sync with head.

Revision 1.61.6.1: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:36:59 2009 UTC (17 years, 6 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61: +9 -6 lines
Sync with HEAD.

Revision 1.61.8.1: download - view: text, markup, annotated - select for diffs
Wed Apr 1 00:25:22 2009 UTC (17 years, 7 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-0, matt-nb5-mips64
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +9 -6 lines
Pull up following revision(s) (requested by mrg in ticket #622):
	bin/csh/csh.1: revision 1.46
	bin/csh/func.c: revision 1.37
	bin/ps/print.c: revision 1.111
	bin/ps/ps.c: revision 1.74
	bin/sh/miscbltin.c: revision 1.38
	bin/sh/sh.1: revision 1.92 via patch
	external/bsd/top/dist/machine/m_netbsd.c: revision 1.7
	lib/libkvm/kvm_proc.c: revision 1.82
	sys/arch/mips/mips/cpu_exec.c: revision 1.55
	sys/compat/darwin/darwin_exec.c: revision 1.57
	sys/compat/ibcs2/ibcs2_exec.c: revision 1.73
	sys/compat/irix/irix_resource.c: revision 1.15
	sys/compat/linux/arch/amd64/linux_exec_machdep.c: revision 1.16
	sys/compat/linux/arch/i386/linux_exec_machdep.c: revision 1.12
	sys/compat/linux/common/linux_limit.h: revision 1.5
	sys/compat/osf1/osf1_resource.c: revision 1.14
	sys/compat/svr4/svr4_resource.c: revision 1.18
	sys/compat/svr4_32/svr4_32_resource.c: revision 1.17
	sys/kern/exec_subr.c: revision 1.62
	sys/kern/init_sysctl.c: revision 1.160
	sys/kern/kern_exec.c: revision 1.288
	sys/kern/kern_resource.c: revision 1.151
	sys/sys/param.h: patch
	sys/sys/resource.h: revision 1.31
	sys/sys/sysctl.h: revision 1.184
	sys/uvm/uvm_extern.h: revision 1.153
	sys/uvm/uvm_glue.c: revision 1.136
	sys/uvm/uvm_mmap.c: revision 1.128
	usr.bin/systat/ps.c: revision 1.32
- - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.
- - adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.
- - add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)
- - patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)
- - patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.
- - update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)
this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.
tested on i386 and sparc64, build tested on several other platforms.
thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Mar 29 01:02:50 2009 UTC (17 years, 7 months ago) by mrg
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +9 -6 lines
- add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)

Revision 1.60.12.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:31:50 2008 UTC (18 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60: +2 -5 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.60.6.1: download - view: text, markup, annotated - select for diffs
Thu Jun 5 19:14:36 2008 UTC (18 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60: +2 -5 lines
Sync with HEAD.

Also fix build.

Revision 1.60.8.1: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:38 2008 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60: +2 -5 lines
sync with head

Revision 1.61: download - view: text, markup, annotated - select for diffs
Mon Jun 2 16:16:27 2008 UTC (18 years, 5 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, 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, simonb-wapbl, nick-hppapmap-base2, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, mjf-devfs2-base, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, jym-xensuspend
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -5 lines
Don't needlessly acquire v_interlock.

Revision 1.54.6.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:58 2008 UTC (18 years, 7 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.54.6.2: preferred, colored; branchpoint 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54.6.2: +3 -3 lines
sync with HEAD

Revision 1.55.4.2: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:06:45 2008 UTC (18 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.55.4.1: preferred, colored; branchpoint 1.55: preferred, colored; next MAIN 1.56: preferred, colored
Changes since revision 1.55.4.1: +16 -10 lines
Sync with HEAD.

Revision 1.44.2.8: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:24:06 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.44.2.7: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44.2.7: +3 -3 lines
sync with head.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon Jan 28 20:09:06 2008 UTC (18 years, 9 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base2, yamt-pf42-base, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, wrstuden-revivesa, mjf-devfs2
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -3 lines
Authorize using the LWP cached credentials, not process credentials.

Revision 1.44.2.7: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:45:59 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.44.2.6: preferred, colored
Changes since revision 1.44.2.6: +15 -9 lines
sync with head

Revision 1.54.6.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:55:57 2008 UTC (18 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.54.6.1: preferred, colored; branchpoint 1.54: preferred, colored
Changes since revision 1.54.6.1: +16 -10 lines
sync with HEAD

Revision 1.56.6.2: download - view: text, markup, annotated - select for diffs
Tue Jan 8 22:11:29 2008 UTC (18 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.56.6.1: preferred, colored; branchpoint 1.56: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56.6.1: +4 -5 lines
Sync with HEAD

Revision 1.59: download - view: text, markup, annotated - select for diffs
Thu Jan 3 14:29:31 2008 UTC (18 years, 10 months ago) by yamt
Branches: MAIN
CVS tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +6 -7 lines
malloc -> kmem_alloc

Revision 1.56.6.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:55:44 2008 UTC (18 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +11 -4 lines
Sync with HEAD

Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Jan 2 11:48:48 2008 UTC (18 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +4 -4 lines
Merge vmlocking2 to head.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Wed Dec 26 22:11:48 2007 UTC (18 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +9 -2 lines
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.55.4.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:20:25 2007 UTC (18 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +3 -3 lines
Sync with HEAD.

Revision 1.44.2.6: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:32:35 2007 UTC (18 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.44.2.5: preferred, colored
Changes since revision 1.44.2.5: +3 -3 lines
sync with head

Revision 1.56.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 4 13:03:12 2007 UTC (18 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.56: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56: +4 -4 lines
Pull the vmlocking changes into a new branch.

Revision 1.54.4.2: download - view: text, markup, annotated - select for diffs
Tue Nov 27 19:38:00 2007 UTC (18 years, 11 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.54.4.1: preferred, colored; branchpoint 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54.4.1: +3 -3 lines
Sync with HEAD. amd64 Xen support needs testing.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Nov 26 19:02:00 2007 UTC (18 years, 11 months ago) by pooka
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +3 -3 lines
Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern

Revision 1.54.6.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:31:26 2007 UTC (19 years ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +6 -5 lines
sync with HEAD

Revision 1.44.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:35:18 2007 UTC (19 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.44.2.4: preferred, colored
Changes since revision 1.44.2.4: +6 -5 lines
sync with head.

Revision 1.54.4.1: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:48:26 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +6 -5 lines
Sync with HEAD.

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

Revision 1.54.8.1: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:48:37 2007 UTC (19 years, 1 month ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54: +6 -5 lines
sync with head.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Wed Oct 10 20:42:26 2007 UTC (19 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +6 -5 lines
Merge from vmlocking:

- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.

Revision 1.44.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:40:40 2007 UTC (19 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.44.2.3: preferred, colored
Changes since revision 1.44.2.3: +16 -15 lines
sync with head.

Revision 1.52.2.3: download - view: text, markup, annotated - select for diffs
Mon Aug 20 21:27:26 2007 UTC (19 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.2.2: preferred, colored; branchpoint 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52.2.2: +15 -14 lines
Sync with HEAD.

Revision 1.52.10.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:49:04 2007 UTC (19 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52: +15 -14 lines
Sync with HEAD.

Revision 1.54.10.2: download - view: text, markup, annotated - select for diffs
Fri Jul 27 08:26:39 2007 UTC (19 years, 3 months ago) by pooka
Branches: matt-mips64
Diff to: previous 1.54.10.1: preferred, colored; branchpoint 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54.10.1: +416 -0 lines
Change unused fflags parameter in VOP_MMAP to prot and pass in
desired vm protection.

Revision 1.54.10.1
Fri Jul 27 08:26:38 2007 UTC (19 years, 3 months ago) by pooka
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.54: +0 -416 lines
file exec_subr.c was added on branch matt-mips64 on 2007-07-27 08:26:39 +0000

Revision 1.54: download - view: text, markup, annotated - select for diffs
Fri Jul 27 08:26:38 2007 UTC (19 years, 3 months ago) by pooka
Branches: MAIN
CVS tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6, jmcneill-pm
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +9 -9 lines
Change unused fflags parameter in VOP_MMAP to prot and pass in
desired vm protection.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Jul 22 19:16:04 2007 UTC (19 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +9 -8 lines
Retire uvn_attach() - it abuses VXLOCK and its functionality,
setting vnode sizes, is handled elsewhere: file system vnode creation
or spec_open() for regular files or block special files, respectively.

Add a call to VOP_MMAP() to the pagedvn exec path, since the vnode
is being memory mapped.

reviewed by tech-kern & wrstuden

Revision 1.52.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 17 21:31:18 2007 UTC (19 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52.2.1: preferred, colored; branchpoint 1.52: preferred, colored
Changes since revision 1.52.2.1: +6 -5 lines
- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.52.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 13 17:50:50 2007 UTC (19 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +4 -4 lines
Pull in the initial set of changes for the vmlocking branch.

Revision 1.50.4.2: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:58:31 2007 UTC (19 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.50.4.1: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.4.1: +3 -3 lines
Sync with HEAD.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:03:03 2007 UTC (19 years, 8 months ago) by christos
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base, mjf-ufs-trans-base, mjf-ufs-trans
Branch point for: vmlocking, nick-csl-alignment
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +3 -3 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.50.4.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:54:16 2007 UTC (19 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +4 -4 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.44.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:11:03 2007 UTC (19 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.44.2.2: preferred, colored
Changes since revision 1.44.2.2: +4 -4 lines
sync with head.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Feb 22 06:34:42 2007 UTC (19 years, 8 months ago) by thorpej
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +4 -4 lines
TRUE -> true, FALSE -> false

Revision 1.44.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:50:04 2006 UTC (19 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.44.2.1: preferred, colored
Changes since revision 1.44.2.1: +16 -7 lines
sync with head.

Revision 1.49.4.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:21 2006 UTC (20 years ago) by ad
Branches: newlock2
Diff to: previous 1.49: preferred, colored; next MAIN 1.50: preferred, colored
Changes since revision 1.49: +14 -5 lines
Sync with head.

Revision 1.49.6.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:07:09 2006 UTC (20 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.49: preferred, colored; next MAIN 1.50: preferred, colored
Changes since revision 1.49: +14 -5 lines
sync with head

Revision 1.50: download - view: text, markup, annotated - select for diffs
Thu Oct 5 14:48:32 2006 UTC (20 years, 1 month ago) by chs
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Branch point for: yamt-idlelwp
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +14 -5 lines
add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).

Revision 1.46.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:57:15 2006 UTC (20 years, 2 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46: +54 -17 lines
sync with head

Revision 1.46.8.2: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:45:46 2006 UTC (20 years, 3 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.46.8.1: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.8.1: +4 -4 lines
sync with head

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Jul 23 22:06:10 2006 UTC (20 years, 3 months ago) by ad
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +4 -4 lines
Use the LWP cached credentials where sane.

Revision 1.44.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:09:37 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +88 -32 lines
sync with head.

Revision 1.47.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 04:07:15 2006 UTC (20 years, 5 months ago) by chap
Branches: chap-midi
Diff to: previous 1.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47: +52 -15 lines
Sync with head.

Revision 1.46.6.1: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:38:06 2006 UTC (20 years, 5 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46: +54 -17 lines
Sync with head.

Revision 1.46.12.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:40 2006 UTC (20 years, 5 months ago) by tron
Branches: peter-altq
Diff to: previous 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46: +54 -17 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.46.8.1: download - view: text, markup, annotated - select for diffs
Wed May 24 10:58:40 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +54 -17 lines
sync with head.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat May 20 15:45:37 2006 UTC (20 years, 6 months ago) by elad
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +52 -15 lines
Better implementation of PaX MPROTECT, after looking some more into the
code and not trying to use temporary solutions.

Lots of comments and help from YAMAMOTO Takashi, also thanks to the PaX
author for being quick to recognize that something fishy's going on. :)

Hook up in mmap/vmcmd rather than (ugh!) uvm_map_protect().

Next time I suggest to commit a temporary solution just revoke my
commit bit.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun May 14 21:15:11 2006 UTC (20 years, 6 months ago) by elad
Branches: MAIN
Branch point for: chap-midi
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +4 -4 lines
integrate kauth.

Revision 1.46.10.1: download - view: text, markup, annotated - select for diffs
Wed Mar 8 00:53:40 2006 UTC (20 years, 8 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46: +4 -4 lines
Adapt to kernel authorization KPI.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:24:29 2005 UTC (20 years, 11 months ago) by christos
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +17 -13 lines
merge ktrace-lwp.

Revision 1.37.2.7: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:09:44 2005 UTC (21 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.37.2.6: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37.2.6: +25 -10 lines
Sync with HEAD. Here we go again...

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Jul 6 23:08:57 2005 UTC (21 years, 4 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +23 -8 lines
Collect vmcmd statistics.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sun May 29 22:24:14 2005 UTC (21 years, 5 months ago) by christos
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +4 -4 lines
- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

Revision 1.42.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:23 2005 UTC (21 years, 6 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.42: preferred, colored; next MAIN 1.43: preferred, colored
Changes since revision 1.42: +9 -9 lines
sync with -current

Revision 1.42.6.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:36:11 2005 UTC (21 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.42: preferred, colored; next MAIN 1.43: preferred, colored
Changes since revision 1.42: +9 -9 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.37.2.6: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:51:58 2005 UTC (21 years, 8 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.37.2.5: preferred, colored
Changes since revision 1.37.2.5: +9 -9 lines
Sync with HEAD.

Hi Perry!

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Feb 26 21:34:55 2005 UTC (21 years, 8 months ago) by perry
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +9 -9 lines
nuke trailing whitespace

Revision 1.37.2.5: download - view: text, markup, annotated - select for diffs
Fri Feb 4 07:09:28 2005 UTC (21 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.37.2.4: preferred, colored
Changes since revision 1.37.2.4: +4 -4 lines
Adapt to branch.

Revision 1.37.2.4: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:35:03 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.37.2.3: preferred, colored
Changes since revision 1.37.2.3: +15 -11 lines
Fix the sync with head I botched.

Revision 1.37.2.3: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:53:02 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.37.2.2: preferred, colored
Changes since revision 1.37.2.2: +11 -15 lines
Sync with HEAD.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri Sep 17 14:11:25 2004 UTC (22 years, 2 months ago) by skrll
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -3 lines
There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe

Revision 1.37.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:52:43 2004 UTC (22 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.37.2.1: preferred, colored
Changes since revision 1.37.2.1: +62 -7 lines
Sync with HEAD

Revision 1.29.10.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 09:53:46 2003 UTC (23 years, 1 month ago) by tron
Branches: netbsd-1-6
CVS tags: 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
Diff to: previous 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29: +1 -4 lines
Pull up revision 1.31 (requested by junyoung in ticket #1488):
count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Aug 29 01:44:02 2003 UTC (23 years, 2 months ago) by junyoung
Branches: MAIN
CVS tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -6 lines
Expand NEW_VMCMD() macro to a real function new_vmcmd() for the
non-debugging case as well, rather than expanding it inline. This saves
a bunch of kernel bits, e.g. 4kB from GENERIC on i386.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Aug 24 17:52:47 2003 UTC (23 years, 2 months ago) by chs
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +5 -6 lines
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.39: download - view: text, markup, annotated - select for diffs
Thu Aug 21 15:17:03 2003 UTC (23 years, 3 months ago) by yamt
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +7 -4 lines
don't make zero-sized mappings.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Aug 8 18:53:14 2003 UTC (23 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +59 -2 lines
GC: exec_foo_setup_stack; use exec_setup_stack, and provide a way for
emulations to override it.

Revision 1.37.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 2 15:26:35 2003 UTC (23 years, 4 months ago) by darrenr
Branches: ktrace-lwp
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +15 -11 lines
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.37: download - view: text, markup, annotated - select for diffs
Sun Jun 29 22:31:17 2003 UTC (23 years, 4 months ago) by fvdl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +9 -13 lines
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Jun 28 14:21:52 2003 UTC (23 years, 4 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +15 -11 lines
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.35: download - view: text, markup, annotated - select for diffs
Wed Feb 26 21:18:23 2003 UTC (23 years, 8 months ago) by matt
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -16 lines
Make elf32 load_file work properly with TOPDOWN by mapping psections in
reverse order.  Remove TOPDOWN support from VMCMDs since elf32 does the
right stuff now.  With these changes, VAX can now use TOPDOWN.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu Feb 20 22:16:07 2003 UTC (23 years, 9 months ago) by atatat
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +19 -8 lines
Introduce "top down" memory management for mmap()ed allocations.  This
means that the dynamic linker gets mapped in at the top of available
user virtual memory (typically just below the stack), shared libraries
get mapped downwards from that point, and calls to mmap() that don't
specify a preferred address will get mapped in below those.

This means that the heap and the mmap()ed allocations will grow
towards each other, allowing one or the other to grow larger than
before.  Previously, the heap was limited to MAXDSIZ by the placement
of the dynamic linker (and the process's rlimits) and the space
available to mmap was hobbled by this reservation.

This is currently only enabled via an *option* for the i386 platform
(though other platforms are expected to follow).  Add "options
USE_TOPDOWN_VM" to your kernel config file, rerun config, and rebuild
your kernel to take advantage of this.

Note that the pmap_prefer() interface has not yet been modified to
play nicely with this, so those platforms require a bit more work
(most notably the sparc) before they can use this new memory
arrangement.

This change also introduces a VM_DEFAULT_ADDRESS() macro that picks
the appropriate default address based on the size of the allocation or
the size of the process's text segment accordingly.  Several drivers
and the SYSV SHM address assignment were changed to use this instead
of each one picking their own "default".

Revision 1.33: download - view: text, markup, annotated - select for diffs
Thu Jan 30 20:03:46 2003 UTC (23 years, 9 months ago) by atatat
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +8 -5 lines
Two small changes to the ELF exec code:

(1) ELFNAME(load_file)() now takes a pointer to the entry point
offset, instead of taking a pointer to the entry point itself.  This
allows proper adjustment of the ultimate entry point at a higher level
if the object containing the entry point is moved before the exec is
finished.

(2) Introduce VMCMD_FIXED, which means the address at which a given
vmcmd describes a mapping is fixed (ie, should not be moved).  Don't
set this for entries pertaining to ld.so.

Also some minor comment/whitespace tweaks.

Revision 1.26.2.6: download - view: text, markup, annotated - select for diffs
Wed Jan 15 18:58:31 2003 UTC (23 years, 10 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.26.2.5: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.2.5: +11 -2 lines
Sync with HEAD.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Jan 12 05:24:17 2003 UTC (23 years, 10 months ago) by matt
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +11 -2 lines
In vmcmd_readvn, if the page is mapped executable and PMAP_NEED_PROCWR
is defined, call pmap_procwr to synchronize the icache.  This fixes the
problem of dynamic programs crashing on powerpc systems.

Revision 1.26.2.5: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:44:50 2002 UTC (24 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.26.2.4: preferred, colored
Changes since revision 1.26.2.4: +0 -3 lines
Catch up to -current.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat Oct 5 22:34:05 2002 UTC (24 years, 1 month ago) by chs
Branches: MAIN
CVS tags: kqueue-beforemerge, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -5 lines
count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).

Revision 1.27.2.3: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:47:39 2002 UTC (24 years, 2 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.27.2.2: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.2.2: +3 -3 lines
sync kqueue branch with HEAD

Revision 1.29.8.1: download - view: text, markup, annotated - select for diffs
Thu Aug 29 05:23:05 2002 UTC (24 years, 2 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29: +3 -3 lines
catch up with -current.

Revision 1.26.2.4: download - view: text, markup, annotated - select for diffs
Tue Aug 27 23:47:21 2002 UTC (24 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.26.2.3: preferred, colored
Changes since revision 1.26.2.3: +2 -2 lines
Catch up to -current.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Aug 25 19:13:08 2002 UTC (24 years, 2 months ago) by thorpej
Branches: MAIN
CVS tags: kqueue-base, gehenna-devsw-base
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +3 -3 lines
Fix a signed/unsigned comparison warning from GCC 3.3.

Revision 1.27.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 10 19:59:41 2002 UTC (24 years, 10 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.27.2.1: preferred, colored; branchpoint 1.27: preferred, colored
Changes since revision 1.27.2.1: +4 -1 lines
Sync kqueue branch with -current.

Revision 1.26.2.3: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:16:32 2001 UTC (25 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.26.2.2: preferred, colored
Changes since revision 1.26.2.2: +4 -1 lines
Catch up to -current.

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

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Nov 12 15:25:04 2001 UTC (25 years ago) by lukem
Branches: MAIN
CVS tags: thorpej-mips-cache-base, newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +4 -1 lines
add RCSIDs

Revision 1.26.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:11:23 2001 UTC (25 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.26.2.1: preferred, colored
Changes since revision 1.26.2.1: +25 -1 lines
Catch up with -current.

Revision 1.27.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 04:13:39 2001 UTC (25 years, 3 months ago) by lukem
Branches: kqueue
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +25 -1 lines
update to -current

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Jul 14 02:08:29 2001 UTC (25 years, 4 months ago) by christos
Branches: MAIN
CVS tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +25 -1 lines
- add exec_read_from and make exec_elf32 use it.
- add a macho probe function

Revision 1.26.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 9 01:57:51 2001 UTC (25 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +22 -39 lines
Catch up with -current.

Revision 1.17.2.4: download - view: text, markup, annotated - select for diffs
Tue Mar 27 15:32:23 2001 UTC (25 years, 7 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.17.2.3: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.2.3: +21 -38 lines
Sync with HEAD.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Mar 15 06:10:55 2001 UTC (25 years, 8 months ago) by chs
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: kqueue
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +22 -39 lines
eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>

Revision 1.17.2.3: download - view: text, markup, annotated - select for diffs
Fri Dec 8 09:13:52 2000 UTC (25 years, 11 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.17.2.2: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.2: +1 -0 lines
Sync with HEAD.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Nov 27 08:39:42 2000 UTC (25 years, 11 months ago) by chs
Branches: MAIN
Branch point for: nathanw_sa
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -1 lines
Initial integration of the Unified Buffer Cache project.

Revision 1.17.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:05:17 2000 UTC (25 years, 11 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.17.2.1: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.1: +2 -2 lines
Sync with HEAD.

Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 18:08:55 2000 UTC (26 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +30 -32 lines
Update thorpej_scsipi to -current as of a month ago

Revision 1.18.2.2: download - view: text, markup, annotated - select for diffs
Sun Nov 5 22:43:40 2000 UTC (26 years ago) by tv
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2
Diff to: previous 1.18.2.1: preferred, colored; branchpoint 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.2.1: +4 -2 lines
Pullup 1.21 [shin] and 1.25 [releng]:
Correct omissions inadvertantly introduced when the non-debug
version (macro) was updated in exec.h.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Nov 5 22:41:35 2000 UTC (26 years ago) by tv
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
8 spaces -> tab

Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Sep 13 15:00:24 2000 UTC (26 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +4 -4 lines
Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Aug 2 20:42:03 2000 UTC (26 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +7 -6 lines
MALLOC()/FREE() are not to be used for variable sized allocations.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Tue Aug 1 04:57:29 2000 UTC (26 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +11 -26 lines
ANSI'ify.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Jul 13 09:34:23 2000 UTC (26 years, 4 months ago) by mjacob
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +4 -2 lines
Correct omissions inadvertantly introduced when the non-debug
version (macro) was updated in exec.h.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Jun 27 17:41:12 2000 UTC (26 years, 4 months ago) by mrg
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1 -3 lines
remove include of <vm/vm.h>

Revision 1.17.10.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 17:09:03 2000 UTC (26 years, 5 months ago) by minoura
Branches: minoura-xpg4dl
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +3 -1 lines
Sync w/ netbsd-1-5-base.

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 16:26:13 2000 UTC (26 years, 5 months ago) by matt
Branches: netbsd-1-5
CVS tags: netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +11 -1 lines
Add vmcmd_readvn vmcmd.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Jun 21 05:41:07 2000 UTC (26 years, 5 months ago) by matt
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +11 -1 lines
Add vmcmd_readvn (which was the 2nd halt of vmcmd_map_readvn).

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Jun 13 04:25:31 2000 UTC (26 years, 5 months ago) by chs
Branches: MAIN
CVS tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -1 lines
make sure that the size we pass to uvm_map() is a multiple of PAGESIZE.
this should fix PR 10175 and prevent the panic of PR 10079.

Revision 1.16.4.2: download - view: text, markup, annotated - select for diffs
Mon Aug 2 22:19:11 1999 UTC (27 years, 3 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.16.4.1: preferred, colored; branchpoint 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16.4.1: +12 -3 lines
Update from trunk.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Jul 7 20:23:45 1999 UTC (27 years, 4 months ago) by ws
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, minoura-xpg4dl-base, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase, chs-ubc2-base
Branch point for: thorpej_scsipi, minoura-xpg4dl
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +12 -3 lines
Handle misalignment in vmcmd_map_readvn and vmcmd_map_zero correctly.

Revision 1.16.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 7 04:25:30 1999 UTC (27 years, 5 months ago) by chs
Branches: chs-ubc2
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -1 lines
merge everything from chs-ubc branch.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Mar 24 05:51:22 1999 UTC (27 years, 8 months ago) by mrg
Branches: MAIN
CVS tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -38 lines
completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 9 06:06:31 1998 UTC (28 years ago) by chs
Branches: chs-ubc
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +3 -1 lines
initial snapshot.  lots left to do.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Aug 4 04:03:11 1998 UTC (28 years, 3 months ago) by perry
Branches: MAIN
CVS tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base
Branch point for: chs-ubc
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
  bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Jul 28 18:11:39 1998 UTC (28 years, 3 months ago) by thorpej
Branches: MAIN
CVS tags: eeh-paddr_t-base, eeh-paddr_t
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -2 lines
Don't cast the null residual pointer passed to vn_rdwr().

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Feb 23 18:53:22 1998 UTC (28 years, 8 months ago) by chuck
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +16 -3 lines
fix uvm-related protection error: we can't write protect the
vmcmd_map_readvn() area until after we do vn_rdwr().  should fix
problem reported by sean doran.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Feb 10 14:09:20 1998 UTC (28 years, 9 months ago) by mrg
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -1 lines
- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Feb 5 07:59:45 1998 UTC (28 years, 9 months ago) by mrg
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +92 -3 lines
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.9.6.1: download - view: text, markup, annotated - select for diffs
Wed Dec 11 05:32:45 1996 UTC (29 years, 11 months ago) by mycroft
Branches: netbsd-1-2
CVS tags: netbsd-1-2-PATCH001
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +8 -3 lines
From trunk:
Change the exec locking protocol to fix a deadlock.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Sep 30 23:18:45 1996 UTC (30 years, 1 month ago) by cgd
Branches: MAIN
CVS tags: thorpej-signal-base, thorpej-signal, thorpej-setroot, 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, mrg-vm-swap, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, is-newarp-before-merge, is-newarp-base, is-newarp, bouyer-scsipi
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +8 -3 lines
exec vnode locking protocol changes: in a nutshell, don't keep vnodes
locked for any longer than we have to.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Dec 4 03:10:42 1994 UTC (31 years, 11 months ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Branch point for: netbsd-1-2
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -14 lines
Use common fdclose() rather than a private version.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Jun 29 06:32:13 1994 UTC (32 years, 4 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon May 23 03:04:57 1994 UTC (32 years, 6 months ago) by cgd
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +6 -7 lines
cast, also, use vm_map_protect rather than vm_protect

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Mar 27 09:08:21 1994 UTC (32 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -3 lines
expand uid_t/gid_t/off_t

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Jan 28 23:47:10 1994 UTC (32 years, 9 months ago) by jtc
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -2 lines
Fix spelling error in Copyright notice

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Jan 16 03:07:33 1994 UTC (32 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +16 -2 lines
add function for FD handling

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Jan 13 02:29:32 1994 UTC (32 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -17 lines
EXEC_DEBUG -> DEBUG, and trim extra debugging code, for now

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Jan 8 18:05:38 1994 UTC (32 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -3 lines
de-macroify kill_vmcmds()

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Jan 8 07:15:02 1994 UTC (32 years, 10 months ago) by cgd
Branches: MAIN
far reaching but relatively minor cleanup and slight reorg of exec code

Diff request

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

Log view options

CVSweb <webmaster@jp.NetBSD.org>