The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.352 / (download) - annotate - [select for diffs], Wed May 2 23:33:11 2012 UTC (3 weeks, 2 days ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, HEAD
Changes since 1.351: +173 -139 lines
Diff to previous 1.351 (colored)

Revert posix_spawn() clean up for now, there are some bugs.

Revision 1.351 / (download) - annotate - [select for diffs], Mon Apr 30 21:19:58 2012 UTC (3 weeks, 4 days ago) by rmind
Branch: MAIN
Changes since 1.350: +139 -173 lines
Diff to previous 1.350 (colored)

posix_spawn:
- Remove copy-pasting in error paths, use execve_free_{vmspace,data}().
- Move some code (both in the init and exit paths) out of the locks.
- Slightly simplify do_posix_spawn() callers.
- Add few asserts and comments.

Revision 1.332.2.5 / (download) - annotate - [select for diffs], Sun Apr 29 23:05:04 2012 UTC (3 weeks, 5 days ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.332.2.4: +270 -134 lines
Diff to previous 1.332.2.4 (colored) to branchpoint 1.332 (colored) next main 1.333 (colored)

sync to latest -current.

Revision 1.329.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:23 2012 UTC (5 weeks, 4 days ago) by yamt
Branch: yamt-pagecache
Changes since 1.329: +1059 -263 lines
Diff to previous 1.329 (colored) next main 1.330 (colored)

sync with head

Revision 1.339.2.5 / (download) - annotate - [select for diffs], Mon Apr 16 15:28:19 2012 UTC (5 weeks, 4 days ago) by riz
Branch: netbsd-6
Changes since 1.339.2.4: +11 -3 lines
Diff to previous 1.339.2.4 (colored) to branchpoint 1.339 (colored) next main 1.340 (colored)

Pull up following revision(s) (requested by martin in ticket #181):
	sys/kern/kern_exec.c: revision 1.350
Fix leak in a posix_spawn error path, from Greg Oster.

Revision 1.350 / (download) - annotate - [select for diffs], Sun Apr 15 15:35:00 2012 UTC (5 weeks, 5 days ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base9
Changes since 1.349: +11 -3 lines
Diff to previous 1.349 (colored)

Fix leak in a posix_spawn error path, from Greg Oster.

Revision 1.339.2.4 / (download) - annotate - [select for diffs], Thu Apr 12 17:05:36 2012 UTC (6 weeks, 1 day ago) by riz
Branch: netbsd-6
Changes since 1.339.2.3: +262 -134 lines
Diff to previous 1.339.2.3 (colored) to branchpoint 1.339 (colored)

Pull up following revision(s) (requested by martin in ticket #175):
	sys/kern/kern_exit.c: revision 1.238
	tests/lib/libc/gen/posix_spawn/t_fileactions.c: revision 1.4
	tests/lib/libc/gen/posix_spawn/t_fileactions.c: revision 1.5
	sys/uvm/uvm_extern.h: revision 1.183
	lib/libc/gen/posix_spawn_fileactions.c: revision 1.2
	sys/kern/kern_exec.c: revision 1.348
	sys/kern/kern_exec.c: revision 1.349
	sys/compat/netbsd32/syscalls.master: revision 1.95
	sys/uvm/uvm_glue.c: revision 1.159
	sys/uvm/uvm_map.c: revision 1.317
	sys/compat/netbsd32/netbsd32.h: revision 1.95
	sys/kern/exec_elf.c: revision 1.38
	sys/sys/spawn.h: revision 1.2
	sys/sys/exec.h: revision 1.135
	sys/compat/netbsd32/netbsd32_execve.c: revision 1.34
Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat
Fix asynchronous posix_spawn child exit status (and test for it).

Revision 1.349 / (download) - annotate - [select for diffs], Mon Apr 9 19:42:06 2012 UTC (6 weeks, 4 days ago) by martin
Branch: MAIN
Changes since 1.348: +3 -3 lines
Diff to previous 1.348 (colored)

Fix asynchronous posix_spawn child exit status (and test for it).

Revision 1.348 / (download) - annotate - [select for diffs], Sun Apr 8 11:27:44 2012 UTC (6 weeks, 5 days ago) by martin
Branch: MAIN
Changes since 1.347: +262 -134 lines
Diff to previous 1.347 (colored)

Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat

Revision 1.332.2.4 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:38 2012 UTC (7 weeks, 1 day ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.332.2.3: +12 -5 lines
Diff to previous 1.332.2.3 (colored) to branchpoint 1.332 (colored)

sync to latest -current.

Revision 1.347 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:52 2012 UTC (2 months, 1 week ago) by elad
Branch: MAIN
CVS Tags: jmcneill-usbmp-base8
Changes since 1.346: +14 -7 lines
Diff to previous 1.346 (colored)

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

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

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

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

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

Revision 1.332.2.3 / (download) - annotate - [select for diffs], Sun Mar 11 01:52:29 2012 UTC (2 months, 2 weeks ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.332.2.2: +10 -4 lines
Diff to previous 1.332.2.2 (colored) to branchpoint 1.332 (colored)

sync to latest -current

Revision 1.339.2.3 / (download) - annotate - [select for diffs], Sat Mar 10 16:49:01 2012 UTC (2 months, 2 weeks ago) by riz
Branch: netbsd-6
Changes since 1.339.2.2: +12 -6 lines
Diff to previous 1.339.2.2 (colored) to branchpoint 1.339 (colored)

Pull up following revision(s) (requested by martin in ticket #107):
	sys/kern/kern_exec.c: revision 1.345
	sys/kern/kern_exec.c: revision 1.346
Make sure the child of a posix_spawn operation is not preempted during
the times when it does not have any vm_space.
Should fix PR kern/46153.
Remove a KPREEMPT_ENABLE() in an error path I overlooked in the previous
change - pointed out by Manuel Bouyer.
While there, add a KASSERT() to make sure we have preemption enabled in
the success case.

Revision 1.346 / (download) - annotate - [select for diffs], Sat Mar 10 14:35:05 2012 UTC (2 months, 2 weeks ago) by martin
Branch: MAIN
CVS Tags: jmcneill-usbmp-base7
Changes since 1.345: +4 -3 lines
Diff to previous 1.345 (colored)

Remove a KPREEMPT_ENABLE() in an error path I overlooked in the previous
change - pointed out by Manuel Bouyer.
While there, add a KASSERT() to make sure we have preemption enabled in
the success case.

Revision 1.345 / (download) - annotate - [select for diffs], Sat Mar 10 08:46:45 2012 UTC (2 months, 2 weeks ago) by martin
Branch: MAIN
Changes since 1.344: +10 -5 lines
Diff to previous 1.344 (colored)

Make sure the child of a posix_spawn operation is not preempted during
the times when it does not have any vm_space.
Should fix PR kern/46153.

Revision 1.332.2.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:45 2012 UTC (3 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.332.2.1: +113 -114 lines
Diff to previous 1.332.2.1 (colored) to branchpoint 1.332 (colored)

sync to -current.

Revision 1.339.2.2 / (download) - annotate - [select for diffs], Wed Feb 22 18:43:35 2012 UTC (3 months ago) by riz
Branch: netbsd-6
Changes since 1.339.2.1: +83 -81 lines
Diff to previous 1.339.2.1 (colored) to branchpoint 1.339 (colored)

Pull up following revision(s) (requested by martin in ticket #17):
	sys/kern/kern_exec.c: revision 1.342
	sys/kern/kern_exec.c: revision 1.343
	sys/kern/kern_exec.c: revision 1.344
Posix spawn fixes:
- split the file actions allocation and freeing into separate functions
- use pnbuf
- don't play games with pointers (partially freeing stuff etc), only check
  fa and sa and free as needed using the same code.
- use copyinstr properly
- KM_SLEEP allocation can't fail
- if path allocation failed midway, we would be possibily freeing
  userland strings.
- use sizeof(*var) instead sizeof(type)
fix fae free'ing, from enami.
keep track of the original array length so we can pass it to kmem_free, from
enami

Revision 1.344 / (download) - annotate - [select for diffs], Tue Feb 21 04:13:22 2012 UTC (3 months ago) by christos
Branch: MAIN
CVS Tags: jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.343: +11 -14 lines
Diff to previous 1.343 (colored)

keep track of the original array length so we can pass it to kmem_free, from
enami

Revision 1.343 / (download) - annotate - [select for diffs], Tue Feb 21 03:44:54 2012 UTC (3 months ago) by christos
Branch: MAIN
Changes since 1.342: +4 -3 lines
Diff to previous 1.342 (colored)

fix fae free'ing, from enami.

Revision 1.339.2.1 / (download) - annotate - [select for diffs], Mon Feb 20 21:54:56 2012 UTC (3 months ago) by sborrill
Branch: netbsd-6
Changes since 1.339: +82 -46 lines
Diff to previous 1.339 (colored)

Pull up the following revisions(s) (requested by martin in ticket #14):
	include/spawn.h:		revision 1.2
	sys/kern/kern_exec.c:		revision 1.341
	sys/uvm/uvm_glue.c:		revision 1.157
	tests/lib/libc/gen/posix_spawn/t_fileactions.c:	revision 1.3

posix_spawn: fix kernel bug when passing empty fileactions (PR kern/46038)
and add a test case for this.  Fix potential race condition, doublefreeing
of memory and memory leaks in error cases.

Revision 1.342 / (download) - annotate - [select for diffs], Mon Feb 20 18:18:30 2012 UTC (3 months ago) by christos
Branch: MAIN
Changes since 1.341: +85 -81 lines
Diff to previous 1.341 (colored)

Posix spawn fixes:
- split the file actions allocation and freeing into separate functions
- use pnbuf
- don't play games with pointers (partially freeing stuff etc), only check
  fa and sa and free as needed using the same code.
- use copyinstr properly
- KM_SLEEP allocation can't fail
- if path allocation failed midway, we would be possibily freeing
  userland strings.
- use sizeof(*var) instead sizeof(type)

Revision 1.341 / (download) - annotate - [select for diffs], Mon Feb 20 12:19:55 2012 UTC (3 months ago) by martin
Branch: MAIN
Changes since 1.340: +82 -46 lines
Diff to previous 1.340 (colored)

More posix_spawn fallout:
Fix a kmem_alloc() call with zero size (PR kern/46038), allow file actions
to be passed, even if empty.
Rearange p_reflock locking for the child, avoid a double free in an
error case, avoid a memory leak in another error case - all pointed out
by yamt.
During blocking operations early in the child borrow the kernel vmspace
(as suggested by yamt).

Revision 1.340 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:49 2012 UTC (3 months ago) by rmind
Branch: MAIN
Changes since 1.339: +3 -42 lines
Diff to previous 1.339 (colored)

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

Revision 1.332.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:28 2012 UTC (3 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.332: +856 -217 lines
Diff to previous 1.332 (colored)

merge to -current.

Revision 1.339 / (download) - annotate - [select for diffs], Sun Feb 12 20:11:03 2012 UTC (3 months, 1 week ago) by martin
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.338: +3 -3 lines
Diff to previous 1.338 (colored)

Fix SDT_PROBE macro argument overlooked in argument renaming, noted by <chs>

Revision 1.338 / (download) - annotate - [select for diffs], Sun Feb 12 13:14:37 2012 UTC (3 months, 1 week ago) by martin
Branch: MAIN
Changes since 1.337: +10 -2 lines
Diff to previous 1.337 (colored)

Minor tweaks to posix_spawn error handling.
The standard allows "open" file actions for descriptors that are alreay
open, add support for that.

Revision 1.337 / (download) - annotate - [select for diffs], Sat Feb 11 23:16:17 2012 UTC (3 months, 1 week ago) by martin
Branch: MAIN
Changes since 1.336: +830 -209 lines
Diff to previous 1.336 (colored)

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

Revision 1.336 / (download) - annotate - [select for diffs], Fri Feb 3 20:11:54 2012 UTC (3 months, 3 weeks ago) by matt
Branch: MAIN
Changes since 1.335: +17 -4 lines
Diff to previous 1.335 (colored)

Add a hook for freeing an ep_emul_arg.  Add a wrapper routine
(exec_free_emul_arg) to call the hook and then clear the ep_emul_arg
and ep_emul_arg_free members in the exec_package.
Change users/accessors to use these routines.
Approved by releng.

Revision 1.335 / (download) - annotate - [select for diffs], Wed Jan 25 18:26:26 2012 UTC (3 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.334: +3 -3 lines
Diff to previous 1.334 (colored)

Add a macro to align the length of the stack, not the pointer itself, since
we always want the alignment to grow the length.

Revision 1.334 / (download) - annotate - [select for diffs], Tue Jan 24 20:03:36 2012 UTC (4 months ago) by christos
Branch: MAIN
Changes since 1.333: +4 -7 lines
Diff to previous 1.333 (colored)

Use and define ALIGN() ALIGN_POINTER() and STACK_ALIGN() consistently,
and avoid definining them in 10 different places if not needed.

Revision 1.333 / (download) - annotate - [select for diffs], Sun Dec 4 15:12:07 2011 UTC (5 months, 3 weeks ago) by dholland
Branch: MAIN
Changes since 1.332: +4 -4 lines
Diff to previous 1.332 (colored)

Revert Christos's accidental changes.

Revision 1.332 / (download) - annotate - [select for diffs], Thu Nov 24 19:55:22 2011 UTC (6 months ago) by christos
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.331: +6 -5 lines
Diff to previous 1.331 (colored)

fix incomplete statement.

Revision 1.331 / (download) - annotate - [select for diffs], Thu Nov 24 17:09:14 2011 UTC (6 months ago) by christos
Branch: MAIN
Changes since 1.330: +14 -7 lines
Diff to previous 1.330 (colored)

make the diagnostic messages more informative.

Revision 1.330 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:25 2011 UTC (6 months ago) by tls
Branch: MAIN
Changes since 1.329: +4 -3 lines
Diff to previous 1.329 (colored)

First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.

Revision 1.329 / (download) - annotate - [select for diffs], Fri Sep 16 21:02:28 2011 UTC (8 months, 1 week ago) by reinoud
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.328: +8 -6 lines
Diff to previous 1.328 (colored)

Improve diagnostics message on entry point too low/high checking

Revision 1.328 / (download) - annotate - [select for diffs], Sat Aug 27 18:11:48 2011 UTC (8 months, 4 weeks ago) by reinoud
Branch: MAIN
Changes since 1.327: +4 -4 lines
Diff to previous 1.327 (colored)

Also fix DPRINTF()'s for DEBUG_EXEC

Revision 1.327 / (download) - annotate - [select for diffs], Sat Aug 27 18:07:10 2011 UTC (8 months, 4 weeks ago) by reinoud
Branch: MAIN
Changes since 1.326: +10 -10 lines
Diff to previous 1.326 (colored)

Fix DPRINTF()'s missing the extra parenteses

Revision 1.326 / (download) - annotate - [select for diffs], Sat Aug 27 17:51:38 2011 UTC (8 months, 4 weeks ago) by reinoud
Branch: MAIN
Changes since 1.325: +32 -5 lines
Diff to previous 1.325 (colored)

Enhance EXEC_DEBUG by also printing the UVM commands

Revision 1.325 / (download) - annotate - [select for diffs], Fri Aug 26 19:07:13 2011 UTC (8 months, 4 weeks ago) by jmcneill
Branch: MAIN
Changes since 1.324: +3 -2 lines
Diff to previous 1.324 (colored)

defflag DEBUG_EXEC

Revision 1.324 / (download) - annotate - [select for diffs], Fri Aug 26 12:52:01 2011 UTC (9 months ago) by jmcneill
Branch: MAIN
Changes since 1.323: +3 -3 lines
Diff to previous 1.323 (colored)

Fix a typo in r1.243: test for STACKALIGN not STACKLALIGN:

"If STACKALIGN is defined, use it instead of ALIGN.  Some arches need a
 stack more aligned that ALIGN will give."

Revision 1.323 / (download) - annotate - [select for diffs], Fri Aug 26 09:29:16 2011 UTC (9 months ago) by reinoud
Branch: MAIN
Changes since 1.322: +10 -12 lines
Diff to previous 1.322 (colored)

Provide a better fix for the checks

Revision 1.322 / (download) - annotate - [select for diffs], Fri Aug 26 09:13:08 2011 UTC (9 months ago) by reinoud
Branch: MAIN
Changes since 1.321: +11 -5 lines
Diff to previous 1.321 (colored)

Change aprint_verbose() to a normal printf() surrounded by #ifdef DIAGNOSTIC

Revision 1.321 / (download) - annotate - [select for diffs], Fri Aug 26 09:07:48 2011 UTC (9 months ago) by reinoud
Branch: MAIN
Changes since 1.320: +3 -3 lines
Diff to previous 1.320 (colored)

Fix check for VM_MIN_ADDRESS since it doesn't need to be a constant

Revision 1.320 / (download) - annotate - [select for diffs], Fri Aug 26 06:56:11 2011 UTC (9 months ago) by christos
Branch: MAIN
Changes since 1.319: +4 -2 lines
Diff to previous 1.319 (colored)

fix compilation for VM_MIN_ADDRESS == 0

Revision 1.319 / (download) - annotate - [select for diffs], Thu Aug 25 19:54:30 2011 UTC (9 months ago) by reinoud
Branch: MAIN
Changes since 1.318: +3 -3 lines
Diff to previous 1.318 (colored)

Move debug -> verbose

Revision 1.318 / (download) - annotate - [select for diffs], Thu Aug 25 19:14:07 2011 UTC (9 months ago) by reinoud
Branch: MAIN
Changes since 1.317: +14 -3 lines
Diff to previous 1.317 (colored)

On a verbose kernel boot show why executables are denied due to their start
adresses. This will hardly ever occure in real-life.

Revision 1.317 / (download) - annotate - [select for diffs], Mon Aug 8 12:08:53 2011 UTC (9 months, 2 weeks ago) by manu
Branch: MAIN
Changes since 1.316: +15 -2 lines
Diff to previous 1.316 (colored)

First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.

Revision 1.314.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:18 2011 UTC (11 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.314: +9 -2 lines
Diff to previous 1.314 (colored) next main 1.315 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.294.2.6 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:28 2011 UTC (11 months, 2 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.294.2.5: +7 -0 lines
Diff to previous 1.294.2.5 (colored) to branchpoint 1.294 (colored) next main 1.295 (colored)

sync with head

Revision 1.316 / (download) - annotate - [select for diffs], Mon Jun 6 22:04:34 2011 UTC (11 months, 2 weeks ago) by matt
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.315: +5 -2 lines
Diff to previous 1.315 (colored)

Add some more MI hook points for PCU.  Discard the PCU state at lwp_exit and
at exec time.  Before forking, save the PCU state so that cpu_lwp_fork
doesn't have.  Remove MD code which did that before.

Revision 1.304.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:27 2011 UTC (11 months, 2 weeks ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.304: +109 -52 lines
Diff to previous 1.304 (colored) next main 1.305 (colored)

Sync with HEAD.

Revision 1.315 / (download) - annotate - [select for diffs], Wed Jun 1 21:24:59 2011 UTC (11 months, 3 weeks ago) by alnsn
Branch: MAIN
Changes since 1.314: +6 -2 lines
Diff to previous 1.314 (colored)

kern/42030 - tracking of file descriptors by ktrace/kdump

Revision 1.294.2.5 / (download) - annotate - [select for diffs], Tue May 31 03:05:01 2011 UTC (11 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.294.2.4: +0 -1 lines
Diff to previous 1.294.2.4 (colored) to branchpoint 1.294 (colored)

sync with head

Revision 1.280.4.3.4.3 / (download) - annotate - [select for diffs], Fri Apr 29 08:20:14 2011 UTC (12 months, 3 weeks ago) by matt
Branch: matt-nb5-mips64
Changes since 1.280.4.3.4.2: +5 -2 lines
Diff to previous 1.280.4.3.4.2 (colored) to branchpoint 1.280.4.3 (colored) next main 1.281 (colored)

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

Revision 1.314 / (download) - annotate - [select for diffs], Tue Apr 26 16:36:42 2011 UTC (13 months ago) by joerg
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.313: +2 -3 lines
Diff to previous 1.313 (colored)

Remove IRIX emulation

Revision 1.294.2.4 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:07 2011 UTC (13 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.294.2.3: +39 -28 lines
Diff to previous 1.294.2.3 (colored) to branchpoint 1.294 (colored)

sync with head

Revision 1.232.2.2.6.2 / (download) - annotate - [select for diffs], Sun Mar 20 20:52:01 2011 UTC (14 months ago) by bouyer
Branch: netbsd-4-0
Changes since 1.232.2.2.6.1: +25 -3 lines
Diff to previous 1.232.2.2.6.1 (colored) to branchpoint 1.232.2.2 (colored) next main 1.232.2.3 (colored)

Pull up following revision(s) (requested by spz in ticket #1421):
	sys/kern/kern_exec.c: revision 1.269 via patch
Check for number of processes resource violation in execve().

Revision 1.232.2.4 / (download) - annotate - [select for diffs], Sun Mar 20 20:51:52 2011 UTC (14 months ago) by bouyer
Branch: netbsd-4
Changes since 1.232.2.3: +25 -3 lines
Diff to previous 1.232.2.3 (colored) to branchpoint 1.232 (colored) next main 1.233 (colored)

Pull up following revision(s) (requested by spz in ticket #1421):
	sys/kern/kern_exec.c: revision 1.269 via patch
Check for number of processes resource violation in execve().

Revision 1.313 / (download) - annotate - [select for diffs], Mon Mar 14 20:12:40 2011 UTC (14 months, 1 week ago) by jakllsch
Branch: MAIN
Changes since 1.312: +5 -5 lines
Diff to previous 1.312 (colored)

Make debugging code compile.

Revision 1.312 / (download) - annotate - [select for diffs], Sun Mar 13 23:44:14 2011 UTC (14 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.311: +41 -30 lines
Diff to previous 1.311 (colored)

fix debugging printfs.

Revision 1.294.2.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:14 2011 UTC (14 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.294.2.2: +107 -62 lines
Diff to previous 1.294.2.2 (colored) to branchpoint 1.294 (colored)

sync with head

Revision 1.305.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 15:10:38 2011 UTC (14 months, 3 weeks ago) by bouyer
Branch: bouyer-quota2
Changes since 1.305.2.1: +44 -24 lines
Diff to previous 1.305.2.1 (colored) next main 1.306 (colored)

Sync with HEAD

Revision 1.311 / (download) - annotate - [select for diffs], Fri Mar 4 22:25:31 2011 UTC (14 months, 3 weeks ago) by joerg
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.310: +28 -21 lines
Diff to previous 1.310 (colored)

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

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

Revision 1.310 / (download) - annotate - [select for diffs], Fri Mar 4 04:17:12 2011 UTC (14 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.309: +14 -5 lines
Diff to previous 1.309 (colored)

better debugging messages.

Revision 1.309 / (download) - annotate - [select for diffs], Tue Mar 1 18:53:10 2011 UTC (14 months, 3 weeks ago) by joerg
Branch: MAIN
Changes since 1.308: +5 -2 lines
Diff to previous 1.308 (colored)

Ensure that the LWP private area has a consistent value after exec.

Revision 1.308 / (download) - annotate - [select for diffs], Mon Feb 21 20:23:29 2011 UTC (15 months ago) by pooka
Branch: MAIN
Changes since 1.307: +3 -2 lines
Diff to previous 1.307 (colored)

Borrow the lwpctl data area from the parent for the vfork() child.
Otherwise the child will incorrectly see it is not running on any
CPU.  Among other things, this fixes crashes from having
LD_PRELOAD=libpthread.so set in the env.

reviewed by tech-kern

Revision 1.305.2.1 / (download) - annotate - [select for diffs], Thu Feb 17 12:00:44 2011 UTC (15 months, 1 week ago) by bouyer
Branch: bouyer-quota2
Changes since 1.305: +3 -2 lines
Diff to previous 1.305 (colored)

Sync with HEAD

Revision 1.307 / (download) - annotate - [select for diffs], Tue Feb 15 16:49:54 2011 UTC (15 months, 1 week ago) by pooka
Branch: MAIN
CVS Tags: bouyer-quota2-base
Changes since 1.306: +3 -3 lines
Diff to previous 1.306 (colored)

fix snafu

Revision 1.306 / (download) - annotate - [select for diffs], Tue Feb 15 15:54:28 2011 UTC (15 months, 1 week ago) by pooka
Branch: MAIN
Changes since 1.305: +3 -2 lines
Diff to previous 1.305 (colored)

Support FD_CLOEXEC in rump kernels.

Revision 1.305 / (download) - annotate - [select for diffs], Tue Jan 18 08:21:03 2011 UTC (16 months, 1 week ago) by matt
Branch: MAIN
Branch point for: bouyer-quota2
Changes since 1.304: +37 -15 lines
Diff to previous 1.304 (colored)

Add more detailed debug printfs (one for each error case).

Revision 1.304 / (download) - annotate - [select for diffs], Sat Dec 18 01:36:19 2010 UTC (17 months, 1 week ago) by rmind
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr
Changes since 1.303: +4 -2 lines
Diff to previous 1.303 (colored)

- Fix a few possible locking issues in execve1() and exit1().  Add a note
  that scheduler locks are special in this regard - adaptive locks cannot
  be in the path due to turnstiles.  Randomly spotted/reported by uebayasi@.
- Remove unused lwp_relock() and replace lwp_lock_retry() by simplifying
  lwp_lock() and sleepq_enter() a little.
- Give alllwp its own cache-line and mark lwp_cache pointer as read-mostly.

OK ad@

Revision 1.303 / (download) - annotate - [select for diffs], Tue Nov 30 10:43:05 2010 UTC (17 months, 3 weeks ago) by dholland
Branch: MAIN
Changes since 1.302: +3 -3 lines
Diff to previous 1.302 (colored)

Abolish the SAVENAME and HASBUF flags. There is now always a buffer,
so the path in a struct componentname is now always valid during VOP
calls.

Revision 1.302 / (download) - annotate - [select for diffs], Tue Nov 30 10:30:02 2010 UTC (17 months, 3 weeks ago) by dholland
Branch: MAIN
Changes since 1.301: +4 -6 lines
Diff to previous 1.301 (colored)

Abolish struct componentname's cn_pnbuf. Use the path buffer in the
pathbuf object passed to namei as work space instead. (For now a pnbuf
pointer appears in struct nameidata, to support certain unclean things
that haven't been fixed yet, but it will be going away in the future.)

This removes the need for the SAVENAME and HASBUF namei flags.

Revision 1.301 / (download) - annotate - [select for diffs], Fri Nov 19 06:44:42 2010 UTC (18 months ago) by dholland
Branch: MAIN
Changes since 1.300: +19 -17 lines
Diff to previous 1.300 (colored)

Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.

Revision 1.293.2.3 / (download) - annotate - [select for diffs], Fri Oct 22 07:22:26 2010 UTC (19 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.293.2.2: +0 -4 lines
Diff to previous 1.293.2.2 (colored) to branchpoint 1.293 (colored) next main 1.294 (colored)

Sync with HEAD (-D20101022).

Revision 1.272.2.6 / (download) - annotate - [select for diffs], Sat Oct 9 03:32:31 2010 UTC (19 months, 2 weeks ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.2.5: +2 -6 lines
Diff to previous 1.272.2.5 (colored) to branchpoint 1.272 (colored) next main 1.273 (colored)

sync with head

Revision 1.300 / (download) - annotate - [select for diffs], Sat Aug 21 13:19:39 2010 UTC (21 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3
Changes since 1.299: +2 -6 lines
Diff to previous 1.299 (colored)

Update the rest of the kernel to conform to the module subsystem's new
locking protocol.

Revision 1.280.4.3.4.2 / (download) - annotate - [select for diffs], Thu Aug 19 07:23:24 2010 UTC (21 months, 1 week ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.280.4.3.4.1: +34 -12 lines
Diff to previous 1.280.4.3.4.1 (colored) to branchpoint 1.280.4.3 (colored)

Add some more debug printfs for various failures.

Revision 1.293.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:26 2010 UTC (21 months, 1 week ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.293.2.1: +53 -31 lines
Diff to previous 1.293.2.1 (colored) to branchpoint 1.293 (colored)

Sync with HEAD.

Revision 1.272.2.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:38 2010 UTC (21 months, 2 weeks ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.2.4: +55 -33 lines
Diff to previous 1.272.2.4 (colored) to branchpoint 1.272 (colored)

sync with head.

Revision 1.299 / (download) - annotate - [select for diffs], Wed Jul 7 01:30:37 2010 UTC (22 months, 2 weeks ago) by chs
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.298: +10 -6 lines
Diff to previous 1.298 (colored)

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

Revision 1.294.2.2 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:53 2010 UTC (22 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.294.2.1: +3 -3 lines
Diff to previous 1.294.2.1 (colored) to branchpoint 1.294 (colored)

sync with head

Revision 1.298 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:11 2010 UTC (23 months ago) by hannken
Branch: MAIN
Changes since 1.297: +3 -3 lines
Diff to previous 1.297 (colored)

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.294.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:56 2010 UTC (23 months, 3 weeks ago) by rmind
Branch: rmind-uvmplock
Changes since 1.294: +46 -28 lines
Diff to previous 1.294 (colored)

sync with head

Revision 1.297 / (download) - annotate - [select for diffs], Wed May 12 03:40:38 2010 UTC (2 years ago) by rmind
Branch: MAIN
Changes since 1.296: +7 -5 lines
Diff to previous 1.296 (colored)

execve1: move few PNBUF_PUT() outside the lock paths.

Revision 1.296 / (download) - annotate - [select for diffs], Sun May 2 23:22:51 2010 UTC (2 years ago) by dholland
Branch: MAIN
Changes since 1.295: +4 -4 lines
Diff to previous 1.295 (colored)

Blanking the path buffer only needs to be done when DIAGNOSTIC.
(I meant to set it back this way before committing but evidently forgot
last night. Thanks to rmind for noticing.)

Revision 1.295 / (download) - annotate - [select for diffs], Sun May 2 05:30:20 2010 UTC (2 years ago) by dholland
Branch: MAIN
Changes since 1.294: +42 -26 lines
Diff to previous 1.294 (colored)

Remove the nameidata from struct exec_package. It was used only for two
things: passing an argument to check_exec, which is better done explicitly,
and handing back the resolved pathname generated by namei, which we can
make an explicit slot for in struct exec_package instead. While here,
perform some related tidyup, and store the kernel-side copy of the path
to the executable as well as the pointer into userspace. (But the latter
should probably be removed in the future.)

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

Sync with HEAD.

Revision 1.280.4.3.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:16 2010 UTC (2 years, 1 month ago) by matt
Branch: matt-nb5-mips64
Changes since 1.280.4.3: +7 -5 lines
Diff to previous 1.280.4.3 (colored)

sync to netbsd-5

Revision 1.272.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:16 2010 UTC (2 years, 2 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.2.3: +59 -37 lines
Diff to previous 1.272.2.3 (colored) to branchpoint 1.272 (colored)

sync with head

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

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

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

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

no functional change

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

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

Revision 1.291 / (download) - annotate - [select for diffs], Sun Oct 25 01:14:03 2009 UTC (2 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.290: +33 -34 lines
Diff to previous 1.290 (colored)

Initialise struct emul members by name (it is readable now and one can search
them in the tree).

Revision 1.232.2.3 / (download) - annotate - [select for diffs], Sat Sep 5 13:45:43 2009 UTC (2 years, 8 months ago) by bouyer
Branch: netbsd-4
Changes since 1.232.2.2: +7 -3 lines
Diff to previous 1.232.2.2 (colored) to branchpoint 1.232 (colored)

Pull up following revision(s) (requested by dsl in ticket #1352):
	sys/kern/kern_exec.c: patch
Fix ktrace of data from iovec based system calls.
Fixes PR/41819

Revision 1.232.2.2.6.1 / (download) - annotate - [select for diffs], Sat Sep 5 13:45:28 2009 UTC (2 years, 8 months ago) by bouyer
Branch: netbsd-4-0
Changes since 1.232.2.2: +7 -3 lines
Diff to previous 1.232.2.2 (colored)

Pull up following revision(s) (requested by dsl in ticket #1352):
	sys/kern/kern_exec.c: patch
Fix ktrace of data from iovec based system calls.
Fixes PR/41819

Revision 1.272.2.3 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:16 2009 UTC (2 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.2.2: +3 -2 lines
Diff to previous 1.272.2.2 (colored) to branchpoint 1.272 (colored)

sync with head.

Revision 1.290 / (download) - annotate - [select for diffs], Thu Aug 6 21:33:54 2009 UTC (2 years, 9 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.289: +3 -2 lines
Diff to previous 1.289 (colored)

ktrace the arguments to script interpreters that come from the script.
Fixes PR/33021

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

Sync with HEAD.

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

sync with head

Revision 1.289 / (download) - annotate - [select for diffs], Tue Jun 2 23:21:38 2009 UTC (2 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.288: +3 -6 lines
Diff to previous 1.288 (colored)

Declare extern syscallnames in a header.

Revision 1.284.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (3 years ago) by jym
Branch: jym-xensuspend
Changes since 1.284: +7 -5 lines
Diff to previous 1.284 (colored)

Sync with HEAD.

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

Revision 1.272.2.1 / (download) - annotate - [select for diffs], Mon May 4 08:13:46 2009 UTC (3 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272: +293 -362 lines
Diff to previous 1.272 (colored)

sync with head.

Revision 1.280.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (3 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.280.2.2: +6 -5 lines
Diff to previous 1.280.2.2 (colored) to branchpoint 1.280 (colored) next main 1.281 (colored)

Sync with HEAD.

Revision 1.280.4.3 / (download) - annotate - [select for diffs], Wed Apr 1 21:03:04 2009 UTC (3 years, 1 month ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.280.4.2: +5 -5 lines
Diff to previous 1.280.4.2 (colored) to branchpoint 1.280 (colored) next main 1.281 (colored)

Pull up following revision(s) (requested by christos in ticket #573):
	sys/kern/kern_exec.c: revision 1.286
don't enforce maxproc resource limits for root.

Revision 1.280.4.2 / (download) - annotate - [select for diffs], Wed Apr 1 00:25:22 2009 UTC (3 years, 1 month ago) by snj
Branch: netbsd-5
Changes since 1.280.4.1: +3 -2 lines
Diff to previous 1.280.4.1 (colored) to branchpoint 1.280 (colored)

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.288 / (download) - annotate - [select for diffs], Sun Mar 29 01:02:50 2009 UTC (3 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.287: +3 -2 lines
Diff to previous 1.287 (colored)

- 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.287 / (download) - annotate - [select for diffs], Tue Mar 24 21:00:05 2009 UTC (3 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.286: +5 -5 lines
Diff to previous 1.286 (colored)

use kauth instead of uid != 0

Revision 1.286 / (download) - annotate - [select for diffs], Sat Mar 7 19:23:02 2009 UTC (3 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.285: +5 -5 lines
Diff to previous 1.285 (colored)

don't enforce maxproc resource limits for root.

Revision 1.280.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:55 2009 UTC (3 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.280.2.1: +3 -2 lines
Diff to previous 1.280.2.1 (colored) to branchpoint 1.280 (colored)

Sync with HEAD.

Revision 1.285 / (download) - annotate - [select for diffs], Fri Feb 13 22:41:04 2009 UTC (3 years, 3 months ago) by apb
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.284: +3 -2 lines
Diff to previous 1.284 (colored)

Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.

Revision 1.280.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (3 years, 4 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.280: +179 -340 lines
Diff to previous 1.280 (colored)

Sync with HEAD.

Revision 1.268.6.6 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:18 2009 UTC (3 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.268.6.5: +216 -339 lines
Diff to previous 1.268.6.5 (colored) to branchpoint 1.268 (colored) next main 1.269 (colored)

Sync with HEAD.

Revision 1.284 / (download) - annotate - [select for diffs], Wed Dec 17 20:51:36 2008 UTC (3 years, 5 months ago) by cegger
Branch: MAIN
CVS Tags: mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.283: +3 -3 lines
Diff to previous 1.283 (colored)

kill MALLOC and FREE macros.

Revision 1.277.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:08 2008 UTC (3 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.277.2.1: +184 -343 lines
Diff to previous 1.277.2.1 (colored) to branchpoint 1.277 (colored) next main 1.278 (colored)

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

Revision 1.283 / (download) - annotate - [select for diffs], Fri Nov 28 10:55:10 2008 UTC (3 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.282: +8 -4 lines
Diff to previous 1.282 (colored)

exec_add, exec_remove: allow zero entries in case a module provides nothing.

Revision 1.282 / (download) - annotate - [select for diffs], Wed Nov 19 18:36:06 2008 UTC (3 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.281: +175 -288 lines
Diff to previous 1.281 (colored)

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

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

Revision 1.280.4.1 / (download) - annotate - [select for diffs], Tue Nov 18 17:11:52 2008 UTC (3 years, 6 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1
Changes since 1.280: +4 -11 lines
Diff to previous 1.280 (colored)

Apply patch (requested by ad in ticket #83):
Expose exec_lock for the changes in ticket #75.

Revision 1.281 / (download) - annotate - [select for diffs], Wed Nov 12 12:36:16 2008 UTC (3 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.280: +2 -54 lines
Diff to previous 1.280 (colored)

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.

Revision 1.280 / (download) - annotate - [select for diffs], Tue Oct 21 20:52:11 2008 UTC (3 years, 7 months ago) by matt
Branch: MAIN
CVS Tags: netbsd-5-base, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.279: +8 -6 lines
Diff to previous 1.279 (colored)

Only define/use saemul_netbsd if KERN_SA is defined.  (maybe this should be
moved to compat_sa.c)

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

Sync with HEAD.

Revision 1.279 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:20 2008 UTC (3 years, 7 months ago) by wrstuden
Branch: MAIN
CVS Tags: haad-dm-base1
Changes since 1.278: +39 -3 lines
Diff to previous 1.278 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.278 / (download) - annotate - [select for diffs], Sat Oct 11 13:40:57 2008 UTC (3 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.277: +3 -3 lines
Diff to previous 1.277 (colored)

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

Revision 1.272.4.7 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:42 2008 UTC (3 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.272.4.6: +70 -18 lines
Diff to previous 1.272.4.6 (colored) to branchpoint 1.272 (colored) next main 1.273 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.272.4.6 / (download) - annotate - [select for diffs], Mon Jul 21 19:13:45 2008 UTC (3 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.272.4.5: +9 -2 lines
Diff to previous 1.272.4.5 (colored) to branchpoint 1.272 (colored)

Add support for compiling SA as an option. Implied by COMPAT_40.

i386 kernels both with COMPAT_40 and with no compat options (and thus
no SA) compile.

No functional changes intended.

Revision 1.274.2.3 / (download) - annotate - [select for diffs], Thu Jul 3 18:38:11 2008 UTC (3 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.274.2.2: +63 -11 lines
Diff to previous 1.274.2.2 (colored) next main 1.275 (colored)

Sync with head.

Revision 1.268.6.5 / (download) - annotate - [select for diffs], Wed Jul 2 19:08:20 2008 UTC (3 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.268.6.4: +61 -9 lines
Diff to previous 1.268.6.4 (colored) to branchpoint 1.268 (colored)

Sync with HEAD.

Revision 1.277 / (download) - annotate - [select for diffs], Wed Jul 2 17:28:57 2008 UTC (3 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.276: +63 -11 lines
Diff to previous 1.276 (colored)

Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.

Revision 1.268.6.4 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (3 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.268.6.3: +15 -16 lines
Diff to previous 1.268.6.3 (colored) to branchpoint 1.268 (colored)

Sync with HEAD.

Revision 1.274.2.2 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:38 2008 UTC (3 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.274.2.1: +10 -10 lines
Diff to previous 1.274.2.1 (colored)

Sync with head.

Revision 1.272.4.5 / (download) - annotate - [select for diffs], Fri Jun 27 01:34:26 2008 UTC (3 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.272.4.4: +3 -3 lines
Diff to previous 1.272.4.4 (colored) to branchpoint 1.272 (colored)

Add getucontext32_sa() and getucontext_sa(), and use them. They
are sa-specific versions of getucontext{,32}(). The main difference
is that they do NOT require the p_lock be held. We report an empty
signal mask, both to avoid needing p_lock and because the process
signal mask is almost always 0 for SA.

Revision 1.276 / (download) - annotate - [select for diffs], Tue Jun 24 18:04:52 2008 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.275: +10 -10 lines
Diff to previous 1.275 (colored)

execve1:

- Properly terminate the fake argument list.
- Fix two double-frees.

Revision 1.272.4.4 / (download) - annotate - [select for diffs], Tue Jun 24 02:14:43 2008 UTC (3 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.272.4.3: +6 -5 lines
Diff to previous 1.272.4.3 (colored) to branchpoint 1.272 (colored)

Fix conflict as part of recent sync with -current.

Revision 1.272.4.3 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:50 2008 UTC (3 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.272.4.2: +6 -7 lines
Diff to previous 1.272.4.2 (colored) to branchpoint 1.272 (colored)

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

Revision 1.274.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:35 2008 UTC (3 years, 11 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.274: +5 -7 lines
Diff to previous 1.274 (colored)

Sync with head.

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

sync with head.

Revision 1.275 / (download) - annotate - [select for diffs], Mon Jun 16 09:51:14 2008 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.274: +5 -7 lines
Diff to previous 1.274 (colored)

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

No functional change.

Revision 1.274 / (download) - annotate - [select for diffs], Fri Jun 6 22:21:11 2008 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Branch point for: simonb-wapbl
Changes since 1.273: +6 -5 lines
Diff to previous 1.273 (colored)

PR kern/38881 execve(2) panic: lock error, with path argument > PATH_MAX

Revision 1.268.6.3 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:36 2008 UTC (3 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.268.6.2: +1 -0 lines
Diff to previous 1.268.6.2 (colored) to branchpoint 1.268 (colored)

Sync with HEAD.

Also fix build.

Revision 1.273 / (download) - annotate - [select for diffs], Wed Jun 4 12:16:06 2008 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.272: +3 -2 lines
Diff to previous 1.272 (colored)

Make sure the PAX flags are copied/zeroed correctly.

Revision 1.268.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:08 2008 UTC (3 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.268.6.1: +19 -20 lines
Diff to previous 1.268.6.1 (colored) to branchpoint 1.268 (colored)

Sync with HEAD.

Revision 1.272.4.2 / (download) - annotate - [select for diffs], Thu May 22 06:22:20 2008 UTC (4 years ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.272.4.1: +18 -3 lines
Diff to previous 1.272.4.1 (colored) to branchpoint 1.272 (colored)

Put back SA-clearing flags in execve1. Now use lwp_{un,}lock() for
locking.

Revision 1.270.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:07 2008 UTC (4 years ago) by yamt
Branch: yamt-pf42
Changes since 1.270: +21 -22 lines
Diff to previous 1.270 (colored)

sync with head.

Revision 1.272.4.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:03 2008 UTC (4 years ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.272: +16 -2 lines
Diff to previous 1.272 (colored)

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

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

Revision 1.272 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:24 2008 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa
Changes since 1.271: +14 -15 lines
Diff to previous 1.271 (colored)

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

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

Revision 1.271 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.270: +9 -9 lines
Diff to previous 1.270 (colored)

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

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

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

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

Revision 1.268.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:01 2008 UTC (4 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.268: +26 -5 lines
Diff to previous 1.268 (colored)

Sync with HEAD.

Revision 1.201.2.11 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:01 2008 UTC (4 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.10: +5 -5 lines
Diff to previous 1.201.2.10 (colored) next main 1.202 (colored)

sync with head.

Revision 1.268.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:13 2008 UTC (4 years, 2 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.268: +23 -2 lines
Diff to previous 1.268 (colored) next main 1.269 (colored)

sync with head.

Revision 1.247.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:58 2008 UTC (4 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.247.2.3: +40 -13 lines
Diff to previous 1.247.2.3 (colored) to branchpoint 1.247 (colored) next main 1.248 (colored)

sync with HEAD

Revision 1.270 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Branch point for: yamt-pf42
Changes since 1.269: +5 -5 lines
Diff to previous 1.269 (colored)

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

Revision 1.201.2.10 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:55 2008 UTC (4 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.9: +23 -2 lines
Diff to previous 1.201.2.9 (colored)

sync with head.

Revision 1.269 / (download) - annotate - [select for diffs], Sun Feb 24 21:46:04 2008 UTC (4 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base
Changes since 1.268: +23 -2 lines
Diff to previous 1.268 (colored)

Check for number of processes resource violation in execve().

Revision 1.251.2.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:45 2008 UTC (4 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.251.2.3: +87 -82 lines
Diff to previous 1.251.2.3 (colored) to branchpoint 1.251 (colored) next main 1.252 (colored)

Sync with HEAD.

Revision 1.201.2.9 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:10 2008 UTC (4 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.8: +4 -5 lines
Diff to previous 1.201.2.8 (colored)

sync with head.

Revision 1.268 / (download) - annotate - [select for diffs], Sat Feb 2 20:42:18 2008 UTC (4 years, 3 months ago) by elad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.267: +4 -5 lines
Diff to previous 1.267 (colored)

KTRFAC_ROOT -> KTRFAC_PERSISTENT, and update comments.

Discussed with christos@ and yamt@.

Revision 1.201.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:03 2008 UTC (4 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.7: +89 -83 lines
Diff to previous 1.201.2.7 (colored)

sync with head

Revision 1.257.4.3 / (download) - annotate - [select for diffs], Sun Jan 20 17:51:42 2008 UTC (4 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.257.4.2: +15 -8 lines
Diff to previous 1.257.4.2 (colored) to branchpoint 1.257 (colored) next main 1.258 (colored)

Sync with HEAD

Revision 1.267 / (download) - annotate - [select for diffs], Sun Jan 20 10:15:50 2008 UTC (4 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.266: +17 -10 lines
Diff to previous 1.266 (colored)

Don't allocated the stackgap during exec (but do allocate 32 bytes
for 'stack grows up' systems for the _rtld interface).

Revision 1.247.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:01 2008 UTC (4 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.247.2.2: +123 -90 lines
Diff to previous 1.247.2.2 (colored) to branchpoint 1.247 (colored)

sync with HEAD

Revision 1.257.4.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:32 2008 UTC (4 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.257.4.1: +9 -13 lines
Diff to previous 1.257.4.1 (colored) to branchpoint 1.257 (colored)

Sync with HEAD

Revision 1.266 / (download) - annotate - [select for diffs], Thu Jan 3 14:36:58 2008 UTC (4 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.265: +11 -15 lines
Diff to previous 1.265 (colored)

- malloc -> kmem_alloc
- kill M_EXEC.

Revision 1.257.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:48 2008 UTC (4 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.257: +64 -61 lines
Diff to previous 1.257 (colored)

Sync with HEAD

Revision 1.265 / (download) - annotate - [select for diffs], Wed Jan 2 19:44:37 2008 UTC (4 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.264: +13 -12 lines
Diff to previous 1.264 (colored)

use kmem_alloc instead of malloc.

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

Merge vmlocking2 to head.

Revision 1.263 / (download) - annotate - [select for diffs], Mon Dec 31 15:32:10 2007 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.262: +3 -27 lines
Diff to previous 1.262 (colored)

Remove systrace. Ok core@.

Revision 1.262 / (download) - annotate - [select for diffs], Fri Dec 28 17:14:50 2007 UTC (4 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.261: +7 -7 lines
Diff to previous 1.261 (colored)

Provide 8 more bits of stack randomization, from the PaX author.

While here, don't make too much use of one random value, and call
arc4random() directly. Allows for the removal of 'ep_random' from the
exec_package.

Prompted by and okay christos@.

Revision 1.251.2.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:45:58 2007 UTC (4 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.251.2.2: +6 -6 lines
Diff to previous 1.251.2.2 (colored) to branchpoint 1.251 (colored)

Sync with HEAD.

Revision 1.261 / (download) - annotate - [select for diffs], Wed Dec 26 22:49:19 2007 UTC (4 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.260: +4 -3 lines
Diff to previous 1.260 (colored)

Fix build without debug enabled:

/usr/src/sys/kern/kern_exec.c: In function 'execve1':
/usr/src/sys/kern/kern_exec.c:505: warning: empty body in an if-statement

Revision 1.260 / (download) - annotate - [select for diffs], Wed Dec 26 22:11:49 2007 UTC (4 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.259: +20 -8 lines
Diff to previous 1.259 (colored)

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

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

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

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

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

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

Revision 1.256.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:38 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.256.2.2: +6 -6 lines
Diff to previous 1.256.2.2 (colored) to branchpoint 1.256 (colored) next main 1.257 (colored)

Sync with head.

Revision 1.259 / (download) - annotate - [select for diffs], Wed Dec 26 16:01:35 2007 UTC (4 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.258: +29 -17 lines
Diff to previous 1.258 (colored)

Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.256.2.2 / (download) - annotate - [select for diffs], Fri Dec 21 12:53:39 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.256.2.1: +25 -17 lines
Diff to previous 1.256.2.1 (colored) to branchpoint 1.256 (colored)

Use a mutex to serialize sigobject init.

Revision 1.258 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:08 2007 UTC (4 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.257: +5 -5 lines
Diff to previous 1.257 (colored)

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

Revision 1.256.2.1 / (download) - annotate - [select for diffs], Sat Dec 15 03:16:55 2007 UTC (4 years, 5 months ago) by ad
Branch: vmlocking2
Changes since 1.256: +7 -2 lines
Diff to previous 1.256 (colored)

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

Revision 1.246.4.9 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:16 2007 UTC (4 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.246.4.8: +3 -3 lines
Diff to previous 1.246.4.8 (colored) to branchpoint 1.246 (colored) next main 1.247 (colored)

Sync with HEAD.

Revision 1.257 / (download) - annotate - [select for diffs], Sat Dec 8 19:29:47 2007 UTC (4 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.256: +3 -3 lines
Diff to previous 1.256 (colored)

Remove cn_lwp from struct componentname.  curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.

Revision 1.251.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:27 2007 UTC (4 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.251.2.1: +49 -20 lines
Diff to previous 1.251.2.1 (colored) to branchpoint 1.251 (colored)

Sync with HEAD.

Revision 1.201.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:40 2007 UTC (4 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.6: +49 -20 lines
Diff to previous 1.201.2.6 (colored)

sync with head

Revision 1.246.4.8 / (download) - annotate - [select for diffs], Mon Dec 3 16:14:48 2007 UTC (4 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.246.4.7: +43 -14 lines
Diff to previous 1.246.4.7 (colored) to branchpoint 1.246 (colored)

Sync with HEAD.

Revision 1.256 / (download) - annotate - [select for diffs], Mon Dec 3 02:20:24 2007 UTC (4 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Branch point for: vmlocking2
Changes since 1.255: +3 -3 lines
Diff to previous 1.255 (colored)

kill a diagnostic for now.

Revision 1.255 / (download) - annotate - [select for diffs], Mon Dec 3 02:06:58 2007 UTC (4 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.254: +43 -14 lines
Diff to previous 1.254 (colored)

- add an elf aux vector entry for implementing $ORIGIN.
- the code to convert from a vnode to a path is commented out now until
  a better solution is implemented. Only absolute paths work for now
  (which is most of the cases).

requested by core

Revision 1.246.4.7 / (download) - annotate - [select for diffs], Tue Nov 27 19:38:02 2007 UTC (4 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.246.4.6: +8 -8 lines
Diff to previous 1.246.4.6 (colored) to branchpoint 1.246 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.254 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:01 2007 UTC (4 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.253: +8 -8 lines
Diff to previous 1.253 (colored)

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.251.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:36 2007 UTC (4 years, 6 months ago) by mjf
Branch: mjf-devfs
Changes since 1.251: +13 -19 lines
Diff to previous 1.251 (colored)

Sync with HEAD.

Revision 1.201.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:40 2007 UTC (4 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.5: +13 -19 lines
Diff to previous 1.201.2.5 (colored)

sync with head.

Revision 1.246.4.6 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:39 2007 UTC (4 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.246.4.5: +7 -2 lines
Diff to previous 1.246.4.5 (colored) to branchpoint 1.246 (colored)

Sync with HEAD.

Revision 1.249.2.2 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:00 2007 UTC (4 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.249.2.1: +12 -18 lines
Diff to previous 1.249.2.1 (colored) to branchpoint 1.249 (colored) next main 1.250 (colored)

Sync with HEAD

Revision 1.253 / (download) - annotate - [select for diffs], Mon Nov 12 23:11:58 2007 UTC (4 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.252: +7 -2 lines
Diff to previous 1.252 (colored)

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

Revision 1.246.4.5 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:01 2007 UTC (4 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.246.4.4: +8 -19 lines
Diff to previous 1.246.4.4 (colored) to branchpoint 1.246 (colored)

Sync with HEAD.

Revision 1.247.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:00 2007 UTC (4 years, 6 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.247.2.1: +8 -19 lines
Diff to previous 1.247.2.1 (colored) to branchpoint 1.247 (colored)

sync with -HEAD

Revision 1.252 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:20 2007 UTC (4 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.251: +8 -19 lines
Diff to previous 1.251 (colored)

Merge from vmlocking:

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

Revision 1.247.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:33 2007 UTC (4 years, 6 months ago) by matt
Branch: matt-armv6
Changes since 1.247: +30 -18 lines
Diff to previous 1.247 (colored)

sync with HEAD

Revision 1.246.4.4 / (download) - annotate - [select for diffs], Sun Oct 28 20:11:10 2007 UTC (4 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.246.4.3: +3 -3 lines
Diff to previous 1.246.4.3 (colored) to branchpoint 1.246 (colored)

Sync with HEAD.

Revision 1.201.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:22 2007 UTC (4 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.4: +30 -18 lines
Diff to previous 1.201.2.4 (colored)

sync with head.

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

Sync with HEAD.

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

Revision 1.249.2.1 / (download) - annotate - [select for diffs], Thu Oct 25 22:39:59 2007 UTC (4 years, 7 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.249: +3 -3 lines
Diff to previous 1.249 (colored)

Sync with HEAD.

Revision 1.243.2.5 / (download) - annotate - [select for diffs], Thu Oct 25 19:43:08 2007 UTC (4 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.4: +8 -19 lines
Diff to previous 1.243.2.4 (colored) to branchpoint 1.243 (colored) next main 1.244 (colored)

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

Revision 1.251 / (download) - annotate - [select for diffs], Wed Oct 24 14:50:40 2007 UTC (4 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.250: +3 -3 lines
Diff to previous 1.250 (colored)

Make ras_lookup() lockless.

Revision 1.243.2.4 / (download) - annotate - [select for diffs], Tue Oct 23 20:17:09 2007 UTC (4 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.3: +3 -3 lines
Diff to previous 1.243.2.3 (colored) to branchpoint 1.243 (colored)

Sync with head.

Revision 1.250 / (download) - annotate - [select for diffs], Fri Oct 19 12:16:42 2007 UTC (4 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.249: +3 -3 lines
Diff to previous 1.249 (colored)

machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.243.2.3 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:24 2007 UTC (4 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.2: +28 -16 lines
Diff to previous 1.243.2.2 (colored) to branchpoint 1.243 (colored)

Sync with head.

Revision 1.248.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:28:41 2007 UTC (4 years, 7 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.248: +4 -2 lines
Diff to previous 1.248 (colored) next main 1.249 (colored)

sync with head.

Revision 1.246.4.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:58 2007 UTC (4 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.246.4.1: +28 -16 lines
Diff to previous 1.246.4.1 (colored) to branchpoint 1.246 (colored)

Sync with HEAD.

Revision 1.249 / (download) - annotate - [select for diffs], Tue Oct 2 12:01:17 2007 UTC (4 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.248: +4 -2 lines
Diff to previous 1.248 (colored)

Add a comment clarifying that in the succesful case the function
returns from the middle of the loop.

Revision 1.248 / (download) - annotate - [select for diffs], Thu Sep 20 20:51:38 2007 UTC (4 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.247: +26 -16 lines
Diff to previous 1.247 (colored)

- add debugging info to the remaining failure cases in execve1.
- use size_t where appropriate.

Revision 1.201.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:45 2007 UTC (4 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.3: +93 -65 lines
Diff to previous 1.201.2.3 (colored)

sync with head.

Revision 1.245.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:22:58 2007 UTC (4 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.245.2.1: +7 -16 lines
Diff to previous 1.245.2.1 (colored) to branchpoint 1.245 (colored) next main 1.246 (colored)

Sync with HEAD.

Revision 1.243.2.2 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:29 2007 UTC (4 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.243.2.1: +7 -17 lines
Diff to previous 1.243.2.1 (colored) to branchpoint 1.243 (colored)

Sync with HEAD.

Revision 1.246.4.1 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:29 2007 UTC (4 years, 9 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.246: +7 -16 lines
Diff to previous 1.246 (colored)

Sync with HEAD.

Revision 1.245.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:07 2007 UTC (4 years, 9 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.245: +2 -3 lines
Diff to previous 1.245 (colored)

Sync with HEAD.

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

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

Revision 1.246.6.2 / (download) - annotate - [select for diffs], Sun Jul 22 19:16:06 2007 UTC (4 years, 10 months ago) by pooka
Branch: matt-mips64
Changes since 1.246.6.1: +1536 -0 lines
Diff to previous 1.246.6.1 (colored) to branchpoint 1.246 (colored) next main 1.247 (colored)

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.246.6.1, Sun Jul 22 19:16:05 2007 UTC (4 years, 10 months ago) by pooka
Branch: matt-mips64
Changes since 1.246: +0 -1536 lines
FILE REMOVED

file kern_exec.c was added on branch matt-mips64 on 2007-07-22 19:16:06 +0000

Revision 1.246 / (download) - annotate - [select for diffs], Sun Jul 22 19:16:05 2007 UTC (4 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, jmcneill-pm
Changes since 1.245: +2 -3 lines
Diff to previous 1.245 (colored)

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.243.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:45 2007 UTC (4 years, 10 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.243: +76 -42 lines
Diff to previous 1.243 (colored) next main 1.244 (colored)

Sync with head.

Revision 1.243.2.1 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:17 2007 UTC (4 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.243: +76 -42 lines
Diff to previous 1.243 (colored)

Sync with head.

Revision 1.245 / (download) - annotate - [select for diffs], Thu May 17 14:51:38 2007 UTC (5 years ago) by yamt
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.244: +3 -3 lines
Diff to previous 1.244 (colored)

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

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

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

Revision 1.237.2.4 / (download) - annotate - [select for diffs], Mon May 7 10:55:45 2007 UTC (5 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.237.2.3: +75 -41 lines
Diff to previous 1.237.2.3 (colored) to branchpoint 1.237 (colored) next main 1.238 (colored)

sync with head.

Revision 1.244 / (download) - annotate - [select for diffs], Sun Apr 22 08:30:00 2007 UTC (5 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.243: +75 -41 lines
Diff to previous 1.243 (colored)

Change the way that emulations locate files within the emulation root to
  avoid having to allocate space in the 'stackgap'
  - which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
  the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
  during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
  search for absolute pathnames in the emulation root, if that fails it will
  retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
  of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
  relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
  inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
  the real root is returned instead (matching the behaviour of emul_lookup,
  but being a cheap comparison here) so that programs that scan "../.."
  looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
  CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
  TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.

Revision 1.237.2.3 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:33 2007 UTC (5 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.237.2.2: +14 -10 lines
Diff to previous 1.237.2.2 (colored) to branchpoint 1.237 (colored)

Sync with HEAD.

Revision 1.243 / (download) - annotate - [select for diffs], Fri Mar 9 22:25:56 2007 UTC (5 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.242: +6 -2 lines
Diff to previous 1.242 (colored)

If STACKALIGN is defined, use it instead of ALIGN.  Some arches need a
stack more aligned that ALIGN will give.

Revision 1.237.2.2 / (download) - annotate - [select for diffs], Fri Mar 9 15:16:23 2007 UTC (5 years, 2 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.237.2.1: +3 -3 lines
Diff to previous 1.237.2.1 (colored) to branchpoint 1.237 (colored)

Checkpoint:

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

Discussed on tech-kern@

Revision 1.242 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:24 2007 UTC (5 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.241: +6 -6 lines
Diff to previous 1.241 (colored)

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

Revision 1.241 / (download) - annotate - [select for diffs], Mon Mar 5 04:59:20 2007 UTC (5 years, 2 months ago) by dogcow
Branch: MAIN
Changes since 1.240: +6 -6 lines
Diff to previous 1.240 (colored)

die, caddr_t, die.

Revision 1.237.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:20 2007 UTC (5 years, 2 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.237: +11 -10 lines
Diff to previous 1.237 (colored)

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

Revision 1.201.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:05 2007 UTC (5 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.2: +122 -90 lines
Diff to previous 1.201.2.2 (colored)

sync with head.

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

TRUE -> true, FALSE -> false

Revision 1.239 / (download) - annotate - [select for diffs], Mon Feb 19 15:10:04 2007 UTC (5 years, 3 months ago) by cube
Branch: MAIN
Changes since 1.238: +3 -2 lines
Diff to previous 1.238 (colored)

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

The libpthread regression tests now pass on amd64 and sparc64.

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

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

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

Reviewed by Andrew Doran.

Revision 1.237 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:30 2007 UTC (5 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.236: +110 -80 lines
Diff to previous 1.236 (colored)

Merge newlock2 to head.

Revision 1.227.4.10 / (download) - annotate - [select for diffs], Fri Feb 9 21:03:53 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.227.4.9: +6 -5 lines
Diff to previous 1.227.4.9 (colored) to branchpoint 1.227 (colored) next main 1.228 (colored)

Sync with HEAD.

Revision 1.236 / (download) - annotate - [select for diffs], Thu Feb 8 00:26:50 2007 UTC (5 years, 3 months ago) by elad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.235: +5 -4 lines
Diff to previous 1.235 (colored)

style nit

Revision 1.227.4.9 / (download) - annotate - [select for diffs], Mon Feb 5 16:44:40 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.227.4.8: +4 -4 lines
Diff to previous 1.227.4.8 (colored) to branchpoint 1.227 (colored)

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

Revision 1.235 / (download) - annotate - [select for diffs], Mon Feb 5 14:34:29 2007 UTC (5 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.234: +3 -3 lines
Diff to previous 1.234 (colored)

typo.

Revision 1.227.4.8 / (download) - annotate - [select for diffs], Mon Feb 5 13:16:48 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.227.4.7: +10 -6 lines
Diff to previous 1.227.4.7 (colored) to branchpoint 1.227 (colored)

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

Revision 1.227.4.7 / (download) - annotate - [select for diffs], Wed Jan 31 19:56:38 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.227.4.6: +11 -4 lines
Diff to previous 1.227.4.6 (colored) to branchpoint 1.227 (colored)

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

Revision 1.227.4.6 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:40 2007 UTC (5 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.227.4.5: +4 -29 lines
Diff to previous 1.227.4.5 (colored) to branchpoint 1.227 (colored)

Remove support for SA. Ok core@.

Revision 1.227.4.5 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:06 2007 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.227.4.4: +18 -13 lines
Diff to previous 1.227.4.4 (colored) to branchpoint 1.227 (colored)

Sync with head.

Revision 1.201.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:05 2006 UTC (5 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201.2.1: +68 -40 lines
Diff to previous 1.201.2.1 (colored)

sync with head.

Revision 1.232.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 05:22:43 2006 UTC (5 years, 4 months ago) by riz
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, matt-nb4-arm-base, matt-nb4-arm
Branch point for: netbsd-4-0
Changes since 1.232.2.1: +5 -4 lines
Diff to previous 1.232.2.1 (colored) to branchpoint 1.232 (colored)

Pull up following revision(s) (requested by elad in ticket #299):
	sys/kern/kern_exec.c: revision 1.234
Use ndp->ni_cnd.cn_pnbuf, not epp->ep_ndp->ni_dirp, for the pathname
for Veriexec/PaX purposes.
(this is safe here because the nameiop is LOOKUP.)
Fixes part of PR/35278.

Revision 1.227.4.4 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:43 2006 UTC (5 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.227.4.3: +28 -23 lines
Diff to previous 1.227.4.3 (colored) to branchpoint 1.227 (colored)

Checkpoint work in progress.

Revision 1.234 / (download) - annotate - [select for diffs], Sat Dec 23 17:23:51 2006 UTC (5 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.233: +7 -6 lines
Diff to previous 1.233 (colored)

Use ndp->ni_cnd.cn_pnbuf, not epp->ep_ndp->ni_dirp, for the pathname
for Veriexec/PaX purposes.

(this is safe here because the nameiop is LOOKUP.)

Fixes part of PR/35278.

Revision 1.227.6.3 / (download) - annotate - [select for diffs], Thu Dec 21 15:07:59 2006 UTC (5 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.227.6.2: +6 -11 lines
Diff to previous 1.227.6.2 (colored) to branchpoint 1.227 (colored) next main 1.228 (colored)

sync with head.

Revision 1.232.2.1 / (download) - annotate - [select for diffs], Thu Dec 21 14:25:45 2006 UTC (5 years, 5 months ago) by tron
Branch: netbsd-4
Changes since 1.232: +6 -11 lines
Diff to previous 1.232 (colored)

Pull up following revision(s) (requested by elad in ticket #294):
	sys/kern/exec_script.c: revision 1.53
	sys/kern/kern_exec.c: revision 1.233
	sys/sys/exec.h: revision 1.115
Remove the third argument from check_exec() and just check for ep_flags
in the exec_package to know if we need to use VERIEXEC_DIRECT or
VERIEXEC_INDIRECT.
Suggested by and okay yamt@

Revision 1.233 / (download) - annotate - [select for diffs], Wed Dec 20 11:35:29 2006 UTC (5 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5
Changes since 1.232: +6 -11 lines
Diff to previous 1.232 (colored)

Remove the third argument from check_exec() and just check for ep_flags
in the exec_package to know if we need to use VERIEXEC_DIRECT or
VERIEXEC_INDIRECT.

Suggested by and okay yamt@

Revision 1.227.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:44 2006 UTC (5 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.227.6.1: +16 -7 lines
Diff to previous 1.227.6.1 (colored) to branchpoint 1.227 (colored)

sync with head.

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

Initial implementation of PaX Segvguard (this is still work-in-progress,
it's just to get it out of my local tree).

Revision 1.227.4.3 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:36 2006 UTC (5 years, 6 months ago) by ad
Branch: newlock2
Changes since 1.227.4.2: +70 -37 lines
Diff to previous 1.227.4.2 (colored) to branchpoint 1.227 (colored)

Checkpoint work in progress.

Revision 1.231 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (5 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.230: +6 -6 lines
Diff to previous 1.230 (colored)

remove some __unused from function parameters.

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

sync with head

Revision 1.227.4.2 / (download) - annotate - [select for diffs], Sat Oct 21 15:20:46 2006 UTC (5 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.227.4.1: +20 -14 lines
Diff to previous 1.227.4.1 (colored) to branchpoint 1.227 (colored)

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

Revision 1.230 / (download) - annotate - [select for diffs], Tue Oct 17 18:21:29 2006 UTC (5 years, 7 months ago) by dogcow
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.229: +2 -4 lines
Diff to previous 1.229 (colored)

now that we have -Wno-unused-parameter, back out all the tremendously ugly
code to gratuitously access said parameters.

Revision 1.229 / (download) - annotate - [select for diffs], Fri Oct 13 16:53:36 2006 UTC (5 years, 7 months ago) by dogcow
Branch: MAIN
Changes since 1.228: +4 -2 lines
Diff to previous 1.228 (colored)

More -Wunused fallout. sprinkle __unused when possible; otherwise, use the
	do { if (&x) {} } while (/* CONSTCOND */ 0);
construct as suggested by uwe in <20061012224845.GA9449@snark.ptc.spbu.ru>.

Revision 1.228 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:14 2006 UTC (5 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.227: +6 -6 lines
Diff to previous 1.227 (colored)

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

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

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

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

sync with head

Revision 1.214.2.4 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:46 2006 UTC (5 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.214.2.3: +56 -33 lines
Diff to previous 1.214.2.3 (colored) to branchpoint 1.214 (colored) next main 1.215 (colored)

sync with head

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

Single-thread updates to the process credential.

Revision 1.226 / (download) - annotate - [select for diffs], Wed Jul 26 09:33:57 2006 UTC (5 years, 10 months ago) by dogcow
Branch: MAIN
Changes since 1.225: +1 -1 lines
Diff to previous 1.225 (colored)

at the request of elad, as veriexec.h has returned, revert the changes
from 2006-07-25.

Revision 1.225 / (download) - annotate - [select for diffs], Tue Jul 25 00:23:06 2006 UTC (5 years, 10 months ago) by dogcow
Branch: MAIN
Changes since 1.224: +3 -3 lines
Diff to previous 1.224 (colored)

mechanically go through and
 s,include "veriexec.h",include <sys/verified_exec.h>,
as the former has apparently gone away.

Revision 1.224 / (download) - annotate - [select for diffs], Mon Jul 24 16:37:28 2006 UTC (5 years, 10 months ago) by elad
Branch: MAIN
Changes since 1.223: +3 -3 lines
Diff to previous 1.223 (colored)

some fixes:
  - adapt to NVERIEXEC in init_sysctl.c.
  - we now need "veriexec.h" for NVERIEXEC.
  - "opt_verified_exec.h" -> "opt_veriexec.h", and include it only where
    it is needed.

Revision 1.223 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:11 2006 UTC (5 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.222: +10 -12 lines
Diff to previous 1.222 (colored)

Use the LWP cached credentials where sane.

Revision 1.222 / (download) - annotate - [select for diffs], Sat Jul 22 10:34:26 2006 UTC (5 years, 10 months ago) by elad
Branch: MAIN
Changes since 1.221: +8 -8 lines
Diff to previous 1.221 (colored)

deprecate the VERIFIED_EXEC option; now we only need the pseudo-device to
enable it. while here, some config file tweaks.

tons of input from cube@ (thanks!) and okay blymn@.

Revision 1.221 / (download) - annotate - [select for diffs], Wed Jul 19 21:11:37 2006 UTC (5 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.220: +20 -15 lines
Diff to previous 1.220 (colored)

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

Revision 1.220 / (download) - annotate - [select for diffs], Mon Jul 17 15:29:06 2006 UTC (5 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.219: +22 -10 lines
Diff to previous 1.219 (colored)

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

Revision 1.219 / (download) - annotate - [select for diffs], Fri Jul 14 18:41:40 2006 UTC (5 years, 10 months ago) by elad
Branch: MAIN
Changes since 1.218: +4 -4 lines
Diff to previous 1.218 (colored)

okay, since there was no way to divide this to two commits, here it goes..

introduce fileassoc(9), a kernel interface for associating meta-data with
files using in-kernel memory. this is very similar to what we had in
veriexec till now, only abstracted so it can be used more easily by more
consumers.

this also prompted the redesign of the interface, making it work on vnodes
and mounts and not directly on devices and inodes. internally, we still
use file-id but that's gonna change soon... the interface will remain
consistent.

as a result, veriexec went under some heavy changes to conform to the new
interface. since we no longer use device numbers to identify file-systems,
the veriexec sysctl stuff changed too: kern.veriexec.count.dev_N is now
kern.veriexec.tableN.* where 'N' is NOT the device number but rather a
way to distinguish several mounts.

also worth noting is the plugging of unmount/delete operations
wrt/fileassoc and veriexec.

tons of input from yamt@, wrstuden@, martin@, and christos@.

Revision 1.201.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:37 2006 UTC (5 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.201: +104 -65 lines
Diff to previous 1.201 (colored)

sync with head.

Revision 1.212.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:07 2006 UTC (5 years, 11 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.212.6.1: +20 -18 lines
Diff to previous 1.212.6.1 (colored) next main 1.213 (colored)

Sync with head.

Revision 1.214.6.3 / (download) - annotate - [select for diffs], Wed May 24 15:50:40 2006 UTC (6 years ago) by tron
Branch: peter-altq
Changes since 1.214.6.2: +20 -16 lines
Diff to previous 1.214.6.2 (colored) to branchpoint 1.214 (colored) next main 1.215 (colored)

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

Revision 1.214.2.3 / (download) - annotate - [select for diffs], Wed May 24 10:58:40 2006 UTC (6 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.214.2.2: +22 -18 lines
Diff to previous 1.214.2.2 (colored) to branchpoint 1.214 (colored)

sync with head.

Revision 1.218 / (download) - annotate - [select for diffs], Sun May 14 21:15:11 2006 UTC (6 years ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.217: +20 -18 lines
Diff to previous 1.217 (colored)

integrate kauth.

Revision 1.214.4.5 / (download) - annotate - [select for diffs], Sat May 6 23:31:30 2006 UTC (6 years ago) by christos
Branch: elad-kernelauth
Changes since 1.214.4.4: +3 -2 lines
Diff to previous 1.214.4.4 (colored) to branchpoint 1.214 (colored) next main 1.215 (colored)

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

Approved by core.

Revision 1.212.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:58 2006 UTC (6 years, 1 month ago) by simonb
Branch: simonb-timecounters
Changes since 1.212: +23 -7 lines
Diff to previous 1.212 (colored)

Sync with head.

Revision 1.214.4.4 / (download) - annotate - [select for diffs], Wed Apr 19 05:13:59 2006 UTC (6 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.214.4.3: +19 -4 lines
Diff to previous 1.214.4.3 (colored) to branchpoint 1.214 (colored)

sync with head.

Revision 1.217 / (download) - annotate - [select for diffs], Fri Apr 14 23:54:21 2006 UTC (6 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.216: +4 -2 lines
Diff to previous 1.216 (colored)

Coverity CID 1739: Plug leak.

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

sync with head.

Revision 1.214.6.2 / (download) - annotate - [select for diffs], Fri Mar 31 09:45:27 2006 UTC (6 years, 1 month ago) by tron
Branch: peter-altq
Changes since 1.214.6.1: +15 -2 lines
Diff to previous 1.214.6.1 (colored) to branchpoint 1.214 (colored)

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

Revision 1.216 / (download) - annotate - [select for diffs], Wed Mar 29 23:02:31 2006 UTC (6 years, 1 month ago) by cube
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Changes since 1.215: +15 -2 lines
Diff to previous 1.215 (colored)

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

Revision 1.214.6.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:26 2006 UTC (6 years, 2 months ago) by tron
Branch: peter-altq
Changes since 1.214: +4 -4 lines
Diff to previous 1.214 (colored)

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

Revision 1.215 / (download) - annotate - [select for diffs], Wed Mar 22 01:14:46 2006 UTC (6 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.214: +4 -4 lines
Diff to previous 1.214 (colored)

There is no need to use MALLOC/FREE when rebuilding the execsw array
due to LKM loading/unloading.  This is not performance critical.

Revision 1.214.4.3 / (download) - annotate - [select for diffs], Fri Mar 10 00:11:55 2006 UTC (6 years, 2 months ago) by elad
Branch: elad-kernelauth
Changes since 1.214.4.2: +3 -4 lines
Diff to previous 1.214.4.2 (colored) to branchpoint 1.214 (colored)

Remove unnecessary call to kauth_cred_setrefcnt().
Also remove an XXX comment.

Revision 1.214.4.2 / (download) - annotate - [select for diffs], Wed Mar 8 22:12:35 2006 UTC (6 years, 2 months ago) by elad
Branch: elad-kernelauth
Changes since 1.214.4.1: +4 -3 lines
Diff to previous 1.214.4.1 (colored) to branchpoint 1.214 (colored)

Fix some issues with set-id binaries.

Revision 1.214.4.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:40 2006 UTC (6 years, 2 months ago) by elad
Branch: elad-kernelauth
Changes since 1.214: +19 -18 lines
Diff to previous 1.214 (colored)

Adapt to kernel authorization KPI.

Revision 1.214.2.1, Sun Mar 5 07:21:38 2006 UTC (6 years, 2 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.214: +0 -1422 lines
FILE REMOVED

file kern_exec.c was added on branch yamt-pdpolicy on 2006-04-01 12:07:39 +0000

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

implement PT_SYSCALL

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

sync with head.

Revision 1.213 / (download) - annotate - [select for diffs], Thu Feb 9 19:18:57 2006 UTC (6 years, 3 months ago) by manu
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Changes since 1.212: +5 -4 lines
Diff to previous 1.212 (colored)

Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough so
that the i386 license manager part of amd64 version of Fluent works.

While I'm here, add SysV IPC to COMPAT_LINUX/amd64

Revision 1.212 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:29 2005 UTC (6 years, 5 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.211: +27 -25 lines
Diff to previous 1.211 (colored)

merge ktrace-lwp.

Revision 1.169.2.10 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:44 2005 UTC (6 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.9: +94 -36 lines
Diff to previous 1.169.2.9 (colored) next main 1.170 (colored)

Sync with HEAD. Here we go again...

Revision 1.209.2.1 / (download) - annotate - [select for diffs], Wed Nov 2 11:58:11 2005 UTC (6 years, 6 months ago) by yamt
Branch: yamt-vop
Changes since 1.209: +7 -4 lines
Diff to previous 1.209 (colored) next main 1.210 (colored)

sync with head.

Revision 1.185.2.2.2.1 / (download) - annotate - [select for diffs], Mon Oct 31 21:01:45 2005 UTC (6 years, 6 months ago) by tron
Branch: netbsd-2
Changes since 1.185.2.2: +7 -4 lines
Diff to previous 1.185.2.2 (colored) next main 1.185.2.3 (colored)

Apply patch (requested by dan in ticket #5955):
Don't clear unconditionally P_SUGID when we exec. Clear it only when
the real and effective user and group ids match. From Tavis Ormandy.

Revision 1.185.2.2.4.1 / (download) - annotate - [select for diffs], Mon Oct 31 21:00:23 2005 UTC (6 years, 6 months ago) by tron
Branch: netbsd-2-1
Changes since 1.185.2.2: +7 -4 lines
Diff to previous 1.185.2.2 (colored) next main 1.185.2.3 (colored)

Apply patch (requested by dan in ticket #5955):
Don't clear unconditionally P_SUGID when we exec. Clear it only when
the real and effective user and group ids match. From Tavis Ormandy.

Revision 1.185.2.3 / (download) - annotate - [select for diffs], Mon Oct 31 20:53:02 2005 UTC (6 years, 6 months ago) by tron
Branch: netbsd-2-0
Changes since 1.185.2.2: +7 -4 lines
Diff to previous 1.185.2.2 (colored) to branchpoint 1.185 (colored) next main 1.186 (colored)

Apply patch (requested by dan in ticket #5955):
Don't clear unconditionally P_SUGID when we exec. Clear it only when
the real and effective user and group ids match. From Tavis Ormandy.

Revision 1.152.4.1 / (download) - annotate - [select for diffs], Mon Oct 31 20:46:24 2005 UTC (6 years, 6 months ago) by tron
Branch: netbsd-1-6
Changes since 1.152: +7 -4 lines
Diff to previous 1.152 (colored) next main 1.153 (colored)

Apply patch (requested by dan in ticket #5924):
Don't clear unconditionally P_SUGID when we exec. Clear it only when
the real and effective user and group ids match. From Tavis Ormandy.

Revision 1.194.4.11 / (download) - annotate - [select for diffs], Mon Oct 31 13:25:31 2005 UTC (6 years, 6 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.194.4.10: +7 -4 lines
Diff to previous 1.194.4.10 (colored) to branchpoint 1.194 (colored) next main 1.195 (colored)

Apply patch (requested by dan in ticket #922):
Don't clear unconditionally P_SUGID when we exec. Clear it only when
the real and effective user and group ids match. From Tavis Ormandy.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Oct 31 04:39:41 2005 UTC (6 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Changes since 1.210: +23 -24 lines
Diff to previous 1.210 (colored)

back out the lwp portion of the previous commit which is not ready yet to
be committed.

Revision 1.210 / (download) - annotate - [select for diffs], Mon Oct 31 04:31:58 2005 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.209: +31 -27 lines
Diff to previous 1.209 (colored)

Don't clear unconditionally P_SUGID when we exec. Clear it only when the
real and effective user and group ids match. From Tavis Ormandy.

Revision 1.194.4.10 / (download) - annotate - [select for diffs], Sun Sep 18 20:09:50 2005 UTC (6 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.194.4.9: +6 -3 lines
Diff to previous 1.194.4.9 (colored) to branchpoint 1.194 (colored)

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

Revision 1.194.4.9 / (download) - annotate - [select for diffs], Thu Sep 8 21:06:31 2005 UTC (6 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.194.4.8: +5 -7 lines
Diff to previous 1.194.4.8 (colored) to branchpoint 1.194 (colored)

Apply patch (requested by elad in ticket #740):
Defopt VERIFIED_EXEC.

Revision 1.194.4.8 / (download) - annotate - [select for diffs], Tue Aug 23 14:45:20 2005 UTC (6 years, 9 months ago) by tron
Branch: netbsd-3
Changes since 1.194.4.7: +7 -5 lines
Diff to previous 1.194.4.7 (colored) to branchpoint 1.194 (colored)

Backout ticket 685. It causes build failures.

Revision 1.194.4.7 / (download) - annotate - [select for diffs], Tue Aug 23 13:43:48 2005 UTC (6 years, 9 months ago) by tron
Branch: netbsd-3
Changes since 1.194.4.6: +5 -7 lines
Diff to previous 1.194.4.6 (colored) to branchpoint 1.194 (colored)

Pull up revision 1.205 (requested by elad in ticket #685):
defopt verified_exec.

Revision 1.209 / (download) - annotate - [select for diffs], Fri Aug 19 02:04:03 2005 UTC (6 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Changes since 1.208: +8 -4 lines
Diff to previous 1.208 (colored)

Better debugging info on failure

Revision 1.208 / (download) - annotate - [select for diffs], Fri Aug 5 11:14:32 2005 UTC (6 years, 9 months ago) by junyoung
Branch: MAIN
Changes since 1.207: +3 -3 lines
Diff to previous 1.207 (colored)

Use NULL where appropriate.

Revision 1.194.4.6 / (download) - annotate - [select for diffs], Thu Aug 4 18:16:13 2005 UTC (6 years, 9 months ago) by tron
Branch: netbsd-3
Changes since 1.194.4.5: +3 -5 lines
Diff to previous 1.194.4.5 (colored) to branchpoint 1.194 (colored)

Pull up revision 1.207 (requested by elad in ticket #633):
Simplify previous commit.

Revision 1.194.4.5 / (download) - annotate - [select for diffs], Thu Aug 4 18:14:56 2005 UTC (6 years, 9 months ago) by tron
Branch: netbsd-3
Changes since 1.194.4.4: +3 -2 lines
Diff to previous 1.194.4.4 (colored) to branchpoint 1.194 (colored)

Pull up revision 1.206 (requested by elad in ticket #633):
Use real executed program in logs instead of the script that was executed.
For example, this used to give false logs of matching fingerprint for
foo.sh while foo.sh don't have an entry, and the program executed (and
matching the fingerprint) is the interpreter - /bin/sh.

Revision 1.207 / (download) - annotate - [select for diffs], Fri Jul 29 22:57:34 2005 UTC (6 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.206: +3 -5 lines
Diff to previous 1.206 (colored)

Simplify previous commit.

Revision 1.206 / (download) - annotate - [select for diffs], Fri Jul 29 22:37:11 2005 UTC (6 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.205: +5 -4 lines
Diff to previous 1.205 (colored)

Use real executed program in logs instead of the script that was executed.

For example, this used to give false logs of matching fingerprint for
foo.sh while foo.sh don't have an entry, and the program executed (and
matching the fingerprint) is the interpreter - /bin/sh.

Revision 1.205 / (download) - annotate - [select for diffs], Sat Jul 16 22:47:18 2005 UTC (6 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.204: +5 -7 lines
Diff to previous 1.204 (colored)

defopt verified_exec.

Revision 1.204 / (download) - annotate - [select for diffs], Mon Jul 11 20:15:26 2005 UTC (6 years, 10 months ago) by cube
Branch: MAIN
Changes since 1.203: +30 -14 lines
Diff to previous 1.203 (colored)

Split sys_execve() and add execve1() that does most of the work, and takes
as an argument a function that will retrieve an element of the pointer
arrays in user space.  This allows COMPAT_NETBSD32 to share the code for
the emulated version of execve(2), and fixes various issues that came from
the slow drift between the two implementations.

Note:  when splitting up a syscall function, I'll use two different ways
       of naming the resulting helper function.  If it stills does
       copyin/out operations, it will be named <syscall>1().  If it does
       not (as it was the case for get/setitimer), it will be named
       do<syscall>.

Revision 1.203 / (download) - annotate - [select for diffs], Sun Jul 10 04:20:34 2005 UTC (6 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.202: +6 -2 lines
Diff to previous 1.202 (colored)

define syscall here.

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

don't declare syscall and syscall_intern.

Revision 1.194.4.4 / (download) - annotate - [select for diffs], Sat Jul 2 18:50:06 2005 UTC (6 years, 10 months ago) by tron
Branch: netbsd-3
Changes since 1.194.4.3: +1 -33 lines
Diff to previous 1.194.4.3 (colored) to branchpoint 1.194 (colored)

Backout revision (requested by elad in ticket #487):
Backout systrace related changes. Only the the verified exec subsystem
fix which was accidentally committed with these changes should have been
pulled up.

Revision 1.194.4.3 / (download) - annotate - [select for diffs], Sat Jul 2 17:53:32 2005 UTC (6 years, 10 months ago) by tron
Branch: netbsd-3
Changes since 1.194.4.2: +37 -5 lines
Diff to previous 1.194.4.2 (colored) to branchpoint 1.194 (colored)

Pull up revision 1.200 (requested by elad in ticket #487):
From marius@openbsd:
Add an exec message so that whenever a set-uid/gid process executes a new
image which we may control, the exec does not go by unnoticed.

Revision 1.201 / (download) - annotate - [select for diffs], Mon Jun 27 17:11:21 2005 UTC (6 years, 10 months ago) by elad
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.200: +6 -3 lines
Diff to previous 1.200 (colored)

From marius@openbsd:

Fix an issue when scripts are executed under systrace where the argv[0]
would be normalized, and hence break scripts that depend on how they were
called.

Revision 1.200 / (download) - annotate - [select for diffs], Sun Jun 26 19:58:29 2005 UTC (6 years, 11 months ago) by elad
Branch: MAIN
Changes since 1.199: +39 -7 lines
Diff to previous 1.199 (colored)

From marius@openbsd:

Add an exec message so that whenever a set-uid/gid process executes a new
image which we may control, the exec does not go by unnoticed.

Revision 1.194.4.2 / (download) - annotate - [select for diffs], Sat Jun 11 08:53:53 2005 UTC (6 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.194.4.1: +1 -2 lines
Diff to previous 1.194.4.1 (colored) to branchpoint 1.194 (colored)

Pull up revision 1.199 (requested by elad in ticket #443):
Use the defined VERIEXEC_DIRECT instead of the (incorrect) 0 magic number.

Revision 1.199 / (download) - annotate - [select for diffs], Fri Jun 10 23:32:16 2005 UTC (6 years, 11 months ago) by elad
Branch: MAIN
Changes since 1.198: +3 -4 lines
Diff to previous 1.198 (colored)

Use the defined VERIEXEC_DIRECT instead of the (incorrect) 0 magic number.

Revision 1.194.4.1 / (download) - annotate - [select for diffs], Fri Jun 10 14:48:28 2005 UTC (6 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.194: +7 -3 lines
Diff to previous 1.194 (colored)

Pull up revision 1.197 (requested by elad in ticket #389):
Rototill of the verified exec functionality.
* We now use hash tables instead of a list to store the in kernel
fingerprints.
* Fingerprint methods handling has been made more flexible, it is now
even simpler to add new methods.
* the loader no longer passes in magic numbers representing the
fingerprint method so veriexecctl is not longer kernel specific.
* fingerprint methods can be tailored out using options in the kernel
config file.
* more fingerprint methods added - rmd160, sha256/384/512
* veriexecctl can now report the fingerprint methods supported by the
running kernel.
* regularised the naming of some portions of veriexec.

Revision 1.198 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (6 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.197: +4 -3 lines
Diff to previous 1.197 (colored)

- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

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

sync with -current

Revision 1.197 / (download) - annotate - [select for diffs], Wed Apr 20 13:44:46 2005 UTC (7 years, 1 month ago) by blymn
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.196: +7 -3 lines
Diff to previous 1.196 (colored)

Rototill of the verified exec functionality.
  * We now use hash tables instead of a list to store the in kernel
    fingerprints.
  * Fingerprint methods handling has been made more flexible, it is now
    even simpler to add new methods.
  * the loader no longer passes in magic numbers representing the
    fingerprint method so veriexecctl is not longer kernel specific.
  * fingerprint methods can be tailored out using options in the kernel
    config file.
  * more fingerprint methods added - rmd160, sha256/384/512
  * veriexecctl can now report the fingerprint methods supported by the
    running kernel.
  * regularised the naming of some portions of veriexec.

Revision 1.169.2.9 / (download) - annotate - [select for diffs], Fri Apr 1 14:30:56 2005 UTC (7 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.8: +11 -7 lines
Diff to previous 1.169.2.8 (colored)

Sync with HEAD.

Revision 1.196 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:37 2005 UTC (7 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.195: +7 -6 lines
Diff to previous 1.195 (colored)

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.

Revision 1.191.6.4 / (download) - annotate - [select for diffs], Sat Mar 26 18:19:20 2005 UTC (7 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.191.6.3: +6 -3 lines
Diff to previous 1.191.6.3 (colored) to branchpoint 1.191 (colored) next main 1.192 (colored)

sync with head.

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

Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.

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

Tested on amd64, compile-tested on sparc64.

Revision 1.191.6.3 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:11 2005 UTC (7 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.191.6.2: +3 -3 lines
Diff to previous 1.191.6.2 (colored) to branchpoint 1.191 (colored)

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

Revision 1.169.2.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:51:58 2005 UTC (7 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.7: +3 -3 lines
Diff to previous 1.169.2.7 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.194 / (download) - annotate - [select for diffs], Fri Feb 18 00:21:37 2005 UTC (7 years, 3 months ago) by peter
Branch: MAIN
CVS Tags: yamt-km-base3, netbsd-3-base, matt-timespec
Branch point for: netbsd-3
Changes since 1.193: +3 -3 lines
Diff to previous 1.193 (colored)

Remove one repeated word.  From Martin VñÈiard.

Revision 1.169.2.7 / (download) - annotate - [select for diffs], Tue Feb 15 21:33:29 2005 UTC (7 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.6: +3 -3 lines
Diff to previous 1.169.2.6 (colored)

Sync with HEAD.

Revision 1.191.6.2 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:52 2005 UTC (7 years, 3 months ago) by yamt
Branch: yamt-km
Changes since 1.191.6.1: +3 -3 lines
Diff to previous 1.191.6.1 (colored) to branchpoint 1.191 (colored)

sync with head.

Revision 1.193 / (download) - annotate - [select for diffs], Sat Feb 12 09:38:25 2005 UTC (7 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

vm_map_max needs a struct pointer, so add a missing deref here

Revision 1.192 / (download) - annotate - [select for diffs], Fri Feb 11 02:12:03 2005 UTC (7 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.191: +3 -3 lines
Diff to previous 1.191 (colored)

use vm_map_{min,max}() instead of dereferencing the vm_map pointer directly.
define and use vm_map_set{min,max}() for modifying these values.
remove the {min,max}_offset aliases for these vm_map fields to be more
namespace-friendly.  PR 26475.

Revision 1.191.6.1 / (download) - annotate - [select for diffs], Tue Jan 25 12:59:35 2005 UTC (7 years, 4 months ago) by yamt
Branch: yamt-km
Changes since 1.191: +7 -6 lines
Diff to previous 1.191 (colored)

convert to new apis.

Revision 1.169.2.6 / (download) - annotate - [select for diffs], Mon Jan 24 08:59:40 2005 UTC (7 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.5: +4 -4 lines
Diff to previous 1.169.2.5 (colored)

Adapt to branch.

Revision 1.169.2.5 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:03 2004 UTC (7 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.4: +3 -3 lines
Diff to previous 1.169.2.4 (colored)

Sync with HEAD

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

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

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

Revision 1.169.2.4 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:03 2004 UTC (7 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.3: +24 -22 lines
Diff to previous 1.169.2.3 (colored)

Fix the sync with head I botched.

Revision 1.169.2.3 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:02 2004 UTC (7 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.2: +27 -29 lines
Diff to previous 1.169.2.2 (colored)

Sync with HEAD.

Revision 1.190 / (download) - annotate - [select for diffs], Fri Sep 17 14:11:25 2004 UTC (7 years, 8 months ago) by skrll
Branch: MAIN
Changes since 1.189: +3 -3 lines
Diff to previous 1.189 (colored)

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.189 / (download) - annotate - [select for diffs], Fri Sep 10 06:09:15 2004 UTC (7 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.188: +4 -4 lines
Diff to previous 1.188 (colored)

fix/adjust comment a little

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

Sync with HEAD

Revision 1.188 / (download) - annotate - [select for diffs], Sun Jul 18 21:29:26 2004 UTC (7 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.187: +15 -6 lines
Diff to previous 1.187 (colored)

add support for hppa to the MI scheduler activations kernel code:
 - on hppa the stack grows up, so handle that using the STACK_* macros.

Revision 1.185.2.2 / (download) - annotate - [select for diffs], Sun Jun 27 13:33:52 2004 UTC (7 years, 11 months ago) by he
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-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
Branch point for: netbsd-2-1, netbsd-2
Changes since 1.185.2.1: +14 -2 lines
Diff to previous 1.185.2.1 (colored) to branchpoint 1.185 (colored)

Pull up revision 1.187 (requested by chs in ticket #558):
  Add a workaround for PR#25664, which describes a failure
  to map sigcode for Tru64 binaries.

Revision 1.185.2.1 / (download) - annotate - [select for diffs], Sun Jun 27 13:28:00 2004 UTC (7 years, 11 months ago) by he
Branch: netbsd-2-0
Changes since 1.185: +12 -14 lines
Diff to previous 1.185 (colored)

Pull up revision 1.186 (requested by chs in ticket #557):
  Rearrange the handling of p_textvp so that the ref-counting
  is correct.  Fixes PR#35663.

Revision 1.187 / (download) - annotate - [select for diffs], Sun Jun 27 00:55:08 2004 UTC (7 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.186: +14 -2 lines
Diff to previous 1.186 (colored)

add a workaround for PR 25664 (failure to map sigcode for Tru64 binaries).

Revision 1.186 / (download) - annotate - [select for diffs], Sun Jun 27 00:41:03 2004 UTC (7 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.185: +12 -14 lines
Diff to previous 1.185 (colored)

rearrange the handling of p_textvp so that the ref-counting is correct.
fixes PR 25663.

Revision 1.185 / (download) - annotate - [select for diffs], Fri Mar 26 17:13:37 2004 UTC (8 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.184: +4 -4 lines
Diff to previous 1.184 (colored)

all ports define __HAVE_SIGINFO now, so remove the CPP conditionals

Revision 1.184 / (download) - annotate - [select for diffs], Thu Mar 25 18:29:24 2004 UTC (8 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.183: +5 -4 lines
Diff to previous 1.183 (colored)

In exec_sigcode_map(), do nothing if the sigcode is of
size 0.
This way, individual ports can circumvent sigcode mapping
by setting sigcode/esigcode.
(would be better to clean up the __HAVE_SIGINFO/COMPAT_XX
stuff, but it is not a good moment now)

Revision 1.183 / (download) - annotate - [select for diffs], Fri Mar 5 11:30:50 2004 UTC (8 years, 2 months ago) by junyoung
Branch: MAIN
Changes since 1.182: +19 -19 lines
Diff to previous 1.182 (colored)

Drop trailing spaces.

Revision 1.182 / (download) - annotate - [select for diffs], Fri Feb 6 08:02:59 2004 UTC (8 years, 3 months ago) by junyoung
Branch: MAIN
Changes since 1.181: +6 -6 lines
Diff to previous 1.181 (colored)

Rename es_check in struct execsw to es_makecmds.

Revision 1.181 / (download) - annotate - [select for diffs], Thu Feb 5 22:26:52 2004 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.180: +3 -3 lines
Diff to previous 1.180 (colored)

Don't use uao_reference, directly use the pgops instead. XXX: we should
prolly make all the uao_ functions used in pgops static.

Revision 1.180 / (download) - annotate - [select for diffs], Sat Dec 20 19:01:30 2003 UTC (8 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.179: +3 -2 lines
Diff to previous 1.179 (colored)

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

Revision 1.179 / (download) - annotate - [select for diffs], Sat Dec 20 18:22:17 2003 UTC (8 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.178: +4 -2 lines
Diff to previous 1.178 (colored)

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

Patch reviewed by Christos.

Revision 1.178 / (download) - annotate - [select for diffs], Fri Dec 5 21:12:43 2003 UTC (8 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.177: +0 -1 lines
Diff to previous 1.177 (colored)

back the sigfilter emulation hook change off

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

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

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

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

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

Revision 1.176 / (download) - annotate - [select for diffs], Mon Nov 17 22:52:09 2003 UTC (8 years, 6 months ago) by cl
Branch: MAIN
Changes since 1.175: +4 -8 lines
Diff to previous 1.175 (colored)

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

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

Revision 1.175 / (download) - annotate - [select for diffs], Wed Nov 12 21:07:38 2003 UTC (8 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.174: +3 -2 lines
Diff to previous 1.174 (colored)

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

Welcome to 1.6ZF

Revision 1.174 / (download) - annotate - [select for diffs], Mon Sep 15 00:33:35 2003 UTC (8 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.173: +3 -2 lines
Diff to previous 1.173 (colored)

include opt_compat_netbsd.h, otherwise we don't get the right signal
trampoline code in compat code.

Revision 1.173 / (download) - annotate - [select for diffs], Wed Sep 10 16:43:35 2003 UTC (8 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.172: +12 -4 lines
Diff to previous 1.172 (colored)

we don't need sigreturn and sigcode glue if we are not compat_16 anymore.

Revision 1.172 / (download) - annotate - [select for diffs], Fri Aug 29 13:29:32 2003 UTC (8 years, 8 months ago) by enami
Branch: MAIN
Changes since 1.171: +4 -4 lines
Diff to previous 1.171 (colored)

Use VM_DEFAULT_ADDRESS as a hint to map sigcode instead of an equivalent
value of !TOPDOWN_VM case.

Revision 1.171 / (download) - annotate - [select for diffs], Sun Aug 24 17:52:47 2003 UTC (8 years, 9 months ago) by chs
Branch: MAIN
Changes since 1.170: +73 -18 lines
Diff to previous 1.170 (colored)

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

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

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

originally from openbsd, adapted for netbsd by me.

Revision 1.170 / (download) - annotate - [select for diffs], Wed Jul 16 22:42:48 2003 UTC (8 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.169: +10 -2 lines
Diff to previous 1.169 (colored)

Add ktrace of env and args during exec.

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:36 2003 UTC (8 years, 10 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.169: +26 -24 lines
Diff to previous 1.169 (colored)

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

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

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

Revision 1.168 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:53 2003 UTC (8 years, 11 months ago) by darrenr
Branch: MAIN
Changes since 1.167: +26 -24 lines
Diff to previous 1.167 (colored)

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

Bump the kernel rev up to 1.6V

Revision 1.167 / (download) - annotate - [select for diffs], Thu Apr 10 20:57:01 2003 UTC (9 years, 1 month ago) by manu
Branch: MAIN
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (colored)

typo

Revision 1.166 / (download) - annotate - [select for diffs], Thu Apr 10 19:38:26 2003 UTC (9 years, 1 month ago) by manu
Branch: MAIN
Changes since 1.165: +3 -3 lines
Diff to previous 1.165 (colored)

Prefer C comments instead of C++ like comments

Revision 1.165 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:43 2003 UTC (9 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.164: +4 -2 lines
Diff to previous 1.164 (colored)

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

Revision 1.164 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:25 2003 UTC (9 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.163: +44 -9 lines
Diff to previous 1.163 (colored)

Merge the nathanw_sa branch.

Revision 1.163.2.2 / (download) - annotate - [select for diffs], Thu Dec 19 05:22:11 2002 UTC (9 years, 5 months ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.163.2.1: +14 -17 lines
Diff to previous 1.163.2.1 (colored) to branchpoint 1.163 (colored) next main 1.164 (colored)

Try harder to share credentials on exec.  From David Laight.

Revision 1.163.2.1 / (download) - annotate - [select for diffs], Wed Dec 18 01:06:06 2002 UTC (9 years, 5 months ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.163: +9 -5 lines
Diff to previous 1.163 (colored)

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

Revision 1.138.2.20 / (download) - annotate - [select for diffs], Wed Dec 11 06:43:02 2002 UTC (9 years, 5 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.138.2.19: +38 -8 lines
Diff to previous 1.138.2.19 (colored) to branchpoint 1.138 (colored) next main 1.139 (colored)

Sync with HEAD.

Revision 1.163 / (download) - annotate - [select for diffs], Sun Nov 17 22:53:46 2002 UTC (9 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: gmcgarry_ucred
Changes since 1.162: +38 -8 lines
Diff to previous 1.162 (colored)

add support for __MACHINE_STACK_GROWS_UP platforms.  from fredette@

Revision 1.138.2.19 / (download) - annotate - [select for diffs], Tue Nov 12 20:11:04 2002 UTC (9 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.18: +6 -3 lines
Diff to previous 1.138.2.18 (colored) to branchpoint 1.138 (colored)

LWPify P_STOPEXEC code.

Revision 1.138.2.18 / (download) - annotate - [select for diffs], Mon Nov 11 22:13:39 2002 UTC (9 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.17: +35 -2 lines
Diff to previous 1.138.2.17 (colored) to branchpoint 1.138 (colored)

Catch up to -current

Revision 1.162 / (download) - annotate - [select for diffs], Thu Nov 7 00:22:30 2002 UTC (9 years, 6 months ago) by manu
Branch: MAIN
Changes since 1.161: +14 -2 lines
Diff to previous 1.161 (colored)

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

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

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

Revision 1.161 / (download) - annotate - [select for diffs], Fri Nov 1 19:27:05 2002 UTC (9 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.160: +3 -3 lines
Diff to previous 1.160 (colored)

set emul_netbsd's e_nsysent to SYS_NSYSENT, not SYS_MAXSYSCALL

Revision 1.160 / (download) - annotate - [select for diffs], Tue Oct 29 12:31:23 2002 UTC (9 years, 6 months ago) by blymn
Branch: MAIN
Changes since 1.159: +21 -3 lines
Diff to previous 1.159 (colored)

Added support for fingerprinted executables aka verified exec

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

merge kqueue branch into -current

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

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

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

Revision 1.138.2.17 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:51 2002 UTC (9 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.16: +9 -7 lines
Diff to previous 1.138.2.16 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

Revision 1.142.2.7 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:05 2002 UTC (9 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.142.2.6: +6 -4 lines
Diff to previous 1.142.2.6 (colored) next main 1.143 (colored)

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

Revision 1.158 / (download) - annotate - [select for diffs], Tue Oct 8 15:50:11 2002 UTC (9 years, 7 months ago) by junyoung
Branch: MAIN
CVS Tags: kqueue-beforemerge
Changes since 1.157: +7 -7 lines
Diff to previous 1.157 (colored)

- char * -> caddr_t
- Fix typo.

Revision 1.157 / (download) - annotate - [select for diffs], Fri Sep 27 15:37:43 2002 UTC (9 years, 8 months ago) by provos
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.156: +4 -4 lines
Diff to previous 1.156 (colored)

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

Revision 1.156 / (download) - annotate - [select for diffs], Sat Sep 21 21:15:02 2002 UTC (9 years, 8 months ago) by manu
Branch: MAIN
Changes since 1.155: +4 -2 lines
Diff to previous 1.155 (colored)

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

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

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

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

Revision 1.138.2.16 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:01 2002 UTC (9 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.15: +8 -0 lines
Diff to previous 1.138.2.15 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

Revision 1.142.2.6 / (download) - annotate - [select for diffs], Fri Sep 6 08:47:46 2002 UTC (9 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.142.2.5: +17 -7 lines
Diff to previous 1.142.2.5 (colored)

sync kqueue branch with HEAD

Revision 1.152.2.1 / (download) - annotate - [select for diffs], Thu Aug 29 05:23:06 2002 UTC (9 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.152: +17 -7 lines
Diff to previous 1.152 (colored) next main 1.153 (colored)

catch up with -current.

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

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

Revision 1.138.2.15 / (download) - annotate - [select for diffs], Tue Aug 27 23:47:22 2002 UTC (9 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.14: +9 -7 lines
Diff to previous 1.138.2.14 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Aug 26 21:07:39 2002 UTC (9 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.153: +4 -4 lines
Diff to previous 1.153 (colored)

- Implement passing AT_{R,E}{U,G}ID in the elf aux vector.
- Pass struct proc to copyargs
- fix svr4_copyargs functions

Revision 1.153 / (download) - annotate - [select for diffs], Sun Aug 25 21:18:15 2002 UTC (9 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.152: +7 -5 lines
Diff to previous 1.152 (colored)

Fix some signed/unsigned comparison warnings from GCC 3.3.

Revision 1.138.2.14 / (download) - annotate - [select for diffs], Sat Jul 13 23:27:02 2002 UTC (9 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.13: +2 -6 lines
Diff to previous 1.138.2.13 (colored) to branchpoint 1.138 (colored)

Remove comment; this function's head has now been examined.

Revision 1.138.2.13 / (download) - annotate - [select for diffs], Fri Jul 12 03:09:57 2002 UTC (9 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.12: +30 -2 lines
Diff to previous 1.138.2.12 (colored) to branchpoint 1.138 (colored)

On exec(), clean up POSIX timers, scheduler activations state, and LWPs
other than the caller.

Revision 1.138.2.12 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:14 2002 UTC (9 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.11: +2 -3 lines
Diff to previous 1.138.2.11 (colored) to branchpoint 1.138 (colored)

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

Revision 1.142.2.5 / (download) - annotate - [select for diffs], Sun Jun 23 17:49:27 2002 UTC (9 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.142.2.4: +8 -4 lines
Diff to previous 1.142.2.4 (colored)

catch up with -current on kqueue branch

Revision 1.138.2.11 / (download) - annotate - [select for diffs], Thu Jun 20 03:47:11 2002 UTC (9 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.10: +6 -2 lines
Diff to previous 1.138.2.10 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

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

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

(Behold the Power of Ed)

Revision 1.110.4.8 / (download) - annotate - [select for diffs], Fri Apr 26 17:51:39 2002 UTC (10 years, 1 month ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.110.4.7: +5 -1 lines
Diff to previous 1.110.4.7 (colored) to branchpoint 1.110 (colored) next main 1.111 (colored)

Pull up revision 1.152 (requested by christos):
  If a set{u,g}id binary is invoked with fd < 3 closed, open those
  file desciptors to /dev/null.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Apr 23 15:11:25 2002 UTC (10 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.151: +6 -2 lines
Diff to previous 1.151 (colored)

From OpenBSD, via FreeBSD: If a set{u,g}id binary is invoked with fd < 3
closed, open those fds to /dev/null.

XXX: This needs to be fixed in a better way. The kernel should not need to
know about /dev/null or special case 0, 1, 2.

Revision 1.138.2.9 / (download) - annotate - [select for diffs], Wed Apr 17 00:06:17 2002 UTC (10 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.8: +4 -4 lines
Diff to previous 1.138.2.8 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

Revision 1.151 / (download) - annotate - [select for diffs], Tue Apr 2 20:18:07 2002 UTC (10 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.150: +4 -4 lines
Diff to previous 1.150 (colored)

expose emul_search()

Revision 1.150.4.1 / (download) - annotate - [select for diffs], Sun Mar 17 06:37:51 2002 UTC (10 years, 2 months ago) by thorpej
Branch: newlock
Changes since 1.150: +18 -17 lines
Diff to previous 1.150 (colored) next main 1.151 (colored)

Make the exec_lock an rwlock, and rename it to exec_rwlock.

Revision 1.138.2.8 / (download) - annotate - [select for diffs], Thu Feb 28 04:14:44 2002 UTC (10 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.7: +4 -2 lines
Diff to previous 1.138.2.7 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

Revision 1.142.2.4 / (download) - annotate - [select for diffs], Mon Feb 11 20:10:23 2002 UTC (10 years, 3 months ago) by jdolecek
Branch: kqueue
Changes since 1.142.2.3: +15 -3 lines
Diff to previous 1.142.2.3 (colored)

Sync w/ -current.

Revision 1.100.2.5 / (download) - annotate - [select for diffs], Mon Jan 14 15:18:47 2002 UTC (10 years, 4 months ago) by he
Branch: netbsd-1-4
Changes since 1.100.2.4: +14 -1 lines
Diff to previous 1.100.2.4 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored)

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

Revision 1.110.4.7 / (download) - annotate - [select for diffs], Mon Jan 14 10:49:30 2002 UTC (10 years, 4 months ago) by he
Branch: netbsd-1-5
Changes since 1.110.4.6: +3 -1 lines
Diff to previous 1.110.4.6 (colored) to branchpoint 1.110 (colored)

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

Revision 1.150 / (download) - annotate - [select for diffs], Sat Jan 12 14:20:30 2002 UTC (10 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: newlock-base, ifpoll-base, ifpoll, eeh-devprop-base, eeh-devprop
Branch point for: newlock
Changes since 1.149: +4 -2 lines
Diff to previous 1.149 (colored)

Clear the P_INEXEC flag in other labels. Pointed out by he@netbsd.org

Revision 1.110.4.6 / (download) - annotate - [select for diffs], Sat Jan 12 01:02:48 2002 UTC (10 years, 4 months ago) by he
Branch: netbsd-1-5
Changes since 1.110.4.5: +12 -1 lines
Diff to previous 1.110.4.5 (colored) to branchpoint 1.110 (colored)

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

Revision 1.138.2.7 / (download) - annotate - [select for diffs], Fri Jan 11 23:39:38 2002 UTC (10 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.6: +13 -3 lines
Diff to previous 1.138.2.6 (colored) to branchpoint 1.138 (colored)

More catchup.

Revision 1.149 / (download) - annotate - [select for diffs], Fri Jan 11 21:16:27 2002 UTC (10 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.148: +13 -3 lines
Diff to previous 1.148 (colored)

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

Revision 1.142.2.3 / (download) - annotate - [select for diffs], Thu Jan 10 19:59:46 2002 UTC (10 years, 4 months ago) by thorpej
Branch: kqueue
Changes since 1.142.2.2: +22 -6 lines
Diff to previous 1.142.2.2 (colored)

Sync kqueue branch with -current.

Revision 1.138.2.6 / (download) - annotate - [select for diffs], Tue Jan 8 00:32:32 2002 UTC (10 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.5: +16 -6 lines
Diff to previous 1.138.2.5 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

Revision 1.148 / (download) - annotate - [select for diffs], Sat Dec 8 00:35:30 2001 UTC (10 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.147: +6 -2 lines
Diff to previous 1.147 (colored)

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

Revision 1.147 / (download) - annotate - [select for diffs], Fri Nov 23 22:02:39 2001 UTC (10 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.146: +12 -6 lines
Diff to previous 1.146 (colored)

if the LKM support is not compiled in, don't bother using exec_lock
at all, it's only needed in LKM case

use #if defined(LKM) || defined(_LKM) condition for netbsd32_execve.c,
to DTRT when either compiled statically into kernel with LKM support,
or compiled as a LKM

Revision 1.138.2.5 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:34 2001 UTC (10 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.4: +4 -1 lines
Diff to previous 1.138.2.4 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

Revision 1.145.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:46 2001 UTC (10 years, 6 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.145: +4 -1 lines
Diff to previous 1.145 (colored) next main 1.146 (colored)

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

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

add RCSIDs

Revision 1.144.2.2 / (download) - annotate - [select for diffs], Mon Oct 1 12:46:49 2001 UTC (10 years, 7 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.144.2.1: +5 -2 lines
Diff to previous 1.144.2.1 (colored) to branchpoint 1.144 (colored) next main 1.145 (colored)

Catch up with -current.

Revision 1.138.2.4 / (download) - annotate - [select for diffs], Fri Sep 21 22:36:24 2001 UTC (10 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.3: +5 -2 lines
Diff to previous 1.138.2.3 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

Revision 1.145 / (download) - annotate - [select for diffs], Tue Sep 18 19:36:33 2001 UTC (10 years, 8 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.144: +5 -2 lines
Diff to previous 1.144 (colored)

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

Revision 1.144.2.1 / (download) - annotate - [select for diffs], Tue Sep 18 19:13:53 2001 UTC (10 years, 8 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.144: +2 -2 lines
Diff to previous 1.144 (colored)

Various changes to make cloning devices possible:

	* Add an extra argument (struct vnode **) to VOP_OPEN. If it is
	  not NULL, specfs will create a cloned (aliased) vnode during
	  the call, and return it there. The caller should release and
	  unlock the original vnode if a new vnode was returned. The
	  new vnode is returned locked.

	* Add a flag field to the cdevsw and bdevsw structures.
	  DF_CLONING indicates that it wants a new vnode for each
	  open (XXX is there a better way? devprop?)

	* If a device is cloning, always call the close entry
	  point for a VOP_CLOSE.


Also, rewrite cons.c to do the right thing with vnodes. Use VOPs
rather then direct device entry calls. Suggested by mycroft@

Light to moderate testing done an i386 system (arch doesn't matter
though, these are MI changes).

Revision 1.138.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 00:11:27 2001 UTC (10 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.2: +49 -44 lines
Diff to previous 1.138.2.2 (colored) to branchpoint 1.138 (colored)

Catch up with -current.

Revision 1.142.2.2 / (download) - annotate - [select for diffs], Fri Aug 3 04:13:40 2001 UTC (10 years, 9 months ago) by lukem
Branch: kqueue
Changes since 1.142.2.1: +49 -44 lines
Diff to previous 1.142.2.1 (colored)

update to -current

Revision 1.144 / (download) - annotate - [select for diffs], Sun Jul 29 21:22:42 2001 UTC (10 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.143: +29 -24 lines
Diff to previous 1.143 (colored)

- make copyargs function return the reason it failed and pass a pointer to
  the stack, so that it can be modified.
- pass the error code in the exit code in addition to aborting.
- kill the second exit1() call; it does not make any sense.

Revision 1.100.2.4 / (download) - annotate - [select for diffs], Thu Jul 19 13:36:19 2001 UTC (10 years, 10 months ago) by perry
Branch: netbsd-1-4
Changes since 1.100.2.3: +14 -6 lines
Diff to previous 1.100.2.3 (colored) to branchpoint 1.100 (colored)

Pull-up patch requested by Luke Mewburn.

Original commit message:

	In check_exec(), don't bother checking P_TRACED along with
	MNT_NOSUID, just check MNT_NOSUID to clear the S{U,G}ID bits
	in the attributes for the vnode we're about to exec.

	We now check P_TRACED right before we would actually perform
	the s{u,g}id function in the exec code.

	This closes a race condition between exec of a setuid binary
	and ptrace(2).

Revision 1.143 / (download) - annotate - [select for diffs], Sun Jul 15 20:49:40 2001 UTC (10 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.142: +22 -22 lines
Diff to previous 1.142 (colored)

Use DPRINTF, and print all exec_vmcmds when we are debugging.
Don't use DEBUG, use DEBUG_EXEC to turn all that on.

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

add calls to KNOTE(9) as appropriate

Revision 1.138.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:06:47 2001 UTC (10 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138.2.1: +17 -6 lines
Diff to previous 1.138.2.1 (colored) to branchpoint 1.138 (colored)

Catch up to -current.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Jun 18 02:00:55 2001 UTC (10 years, 11 months ago) by christos
Branch: MAIN
Branch point for: kqueue
Changes since 1.141: +2 -1 lines
Diff to previous 1.141 (colored)

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

Revision 1.110.4.5 / (download) - annotate - [select for diffs], Sat Jun 16 20:19:30 2001 UTC (10 years, 11 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.110.4.4: +16 -6 lines
Diff to previous 1.110.4.4 (colored) to branchpoint 1.110 (colored)

Pull up revision 1.141 (requested by thorpej):
  Close a race condition between exec of a setuid binary and
  ptrace(2): check P_TRACED right before adjusting the privilege
  settings in the exec code.

Revision 1.141 / (download) - annotate - [select for diffs], Fri Jun 15 17:24:19 2001 UTC (10 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.140: +16 -6 lines
Diff to previous 1.140 (colored)

In check_exec(), don't bother checking P_TRACED along with
MNT_NOSUID, just check MNT_NOSUID to clear the S{U,G}ID bits
in the attributes for the vnode we're about to exec.

We now check P_TRACED right before we would actually perform
the s{u,g}id function in the exec code.

This closes a race condition between exec of a setuid binary
and ptrace(2).

Revision 1.140 / (download) - annotate - [select for diffs], Mon May 7 09:55:14 2001 UTC (11 years ago) by manu
Branch: MAIN
Changes since 1.139: +2 -2 lines
Diff to previous 1.139 (colored)

Changed EMUL_BSD_ASYNCIO_PIPE to EMUL_NO_BSD_ASYNCIO_PIPE, so that
the native emulation (NetBSD) does not have a flag.

Revision 1.139 / (download) - annotate - [select for diffs], Sun May 6 19:09:54 2001 UTC (11 years ago) by manu
Branch: MAIN
Changes since 1.138: +2 -2 lines
Diff to previous 1.138 (colored)

Added two flags to emulation packages:

EMUL_BSD_ASYNCIO_PIPE notes that the emulated binaries expect the original
BSD pipe behavior for asynchronous I/O, which is to fire SIGIO on read() and
write(). OSes without this flag do not expect any SIGIO to be fired on
read() and write() for pipes, even when async I/O was requested. As far as
we know, the OSes that need EMUL_BSD_ASYNCIO_PIPE are NetBSD, OSF/1 and
Darwin.

EMUL_NO_SIGIO_ON_READ notes that the emulated binaries that requested
asynchrnous I/O expect the reader process to be notified by a SIGIO, but
not the writer process. OSes without this flag expect the reader and the
writer to be notified when some data has arrived or when some data have been
read. As far as we know, the OSes that need EMUL_NO_SIGIO_ON_READ are Linux
and SunOS.

Revision 1.103.2.7 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:35 2001 UTC (11 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.103.2.6: +96 -97 lines
Diff to previous 1.103.2.6 (colored) to branchpoint 1.103 (colored) next main 1.104 (colored)

Sync with HEAD.

Revision 1.138.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:39 2001 UTC (11 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.138: +15 -7 lines
Diff to previous 1.138 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.138 / (download) - annotate - [select for diffs], Mon Feb 26 20:43:25 2001 UTC (11 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.137: +85 -87 lines
Diff to previous 1.137 (colored)

convert to ANSI KNF

Revision 1.137 / (download) - annotate - [select for diffs], Wed Feb 21 00:47:21 2001 UTC (11 years, 3 months ago) by eeh
Branch: MAIN
Changes since 1.136: +1 -9 lines
Diff to previous 1.136 (colored)

Remove old compatibility hack.  Should no longer be needed.

Revision 1.136 / (download) - annotate - [select for diffs], Wed Feb 14 18:21:43 2001 UTC (11 years, 3 months ago) by eeh
Branch: MAIN
Changes since 1.135: +12 -3 lines
Diff to previous 1.135 (colored)

Support flexible process address space limits and bump kernel version number.

Revision 1.103.2.6 / (download) - annotate - [select for diffs], Sun Feb 11 19:16:45 2001 UTC (11 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.103.2.5: +2 -2 lines
Diff to previous 1.103.2.5 (colored) to branchpoint 1.103 (colored)

Sync with HEAD.

Revision 1.135 / (download) - annotate - [select for diffs], Tue Feb 6 17:01:53 2001 UTC (11 years, 3 months ago) by eeh
Branch: MAIN
Changes since 1.134: +2 -2 lines
Diff to previous 1.134 (colored)

Specify a process' address space limits for uvmspace_exec().

Revision 1.103.2.5 / (download) - annotate - [select for diffs], Fri Jan 5 17:36:37 2001 UTC (11 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.103.2.4: +2 -2 lines
Diff to previous 1.103.2.4 (colored) to branchpoint 1.103 (colored)

Sync with HEAD

Revision 1.134 / (download) - annotate - [select for diffs], Fri Dec 22 22:58:59 2000 UTC (11 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored)

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

This addresses kern/10981 by Matthew Orgass.

Revision 1.103.2.4 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:20 2000 UTC (11 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.103.2.3: +436 -21 lines
Diff to previous 1.103.2.3 (colored) to branchpoint 1.103 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.133 / (download) - annotate - [select for diffs], Mon Dec 11 05:29:02 2000 UTC (11 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.132: +17 -5 lines
Diff to previous 1.132 (colored)

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

Revision 1.132 / (download) - annotate - [select for diffs], Sun Dec 10 12:42:30 2000 UTC (11 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.131: +2 -2 lines
Diff to previous 1.131 (colored)

emul_unregister(): fix incorrect loop condition - execsw[] is not NULL
terminated

Revision 1.131 / (download) - annotate - [select for diffs], Sat Dec 9 12:38:23 2000 UTC (11 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.130: +3 -1 lines
Diff to previous 1.130 (colored)

always fill in e_syscall in respective emul_*; if the emulation doesn't
have it's own separated *_syscall() function, use syscall()

Revision 1.130 / (download) - annotate - [select for diffs], Fri Dec 8 19:42:12 2000 UTC (11 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.129: +420 -19 lines
Diff to previous 1.129 (colored)

add infrastructure to load emulations and their executable support dynamically
via LKM

Revision 1.103.2.3 / (download) - annotate - [select for diffs], Fri Dec 8 09:13:53 2000 UTC (11 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.103.2.2: +21 -9 lines
Diff to previous 1.103.2.2 (colored) to branchpoint 1.103 (colored)

Sync with HEAD.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Dec 7 16:14:35 2000 UTC (11 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.128: +8 -3 lines
Diff to previous 1.128 (colored)

update comment about the sense of placement of NDINIT()

Revision 1.128 / (download) - annotate - [select for diffs], Fri Dec 1 19:41:49 2000 UTC (11 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.127: +5 -1 lines
Diff to previous 1.127 (colored)

set the EMUL_HAS_SYS___syscall flag for emul_netbsd

Revision 1.127 / (download) - annotate - [select for diffs], Fri Dec 1 12:28:31 2000 UTC (11 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.126: +2 -1 lines
Diff to previous 1.126 (colored)

add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables

change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need
to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed
change explicit emul_find() calls in probe functions to get the emulation
path from the checked exec switch entry's emulation

remove no longer needed header files

add e_flags and e_syscall to struct emul; these are unsed and empty for now

Revision 1.126 / (download) - annotate - [select for diffs], Tue Nov 28 12:24:34 2000 UTC (11 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.125: +9 -8 lines
Diff to previous 1.125 (colored)

wrap newly introduced >80 char lines.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Nov 27 08:39:43 2000 UTC (11 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.124: +2 -1 lines
Diff to previous 1.124 (colored)

Initial integration of the Unified Buffer Cache project.

Revision 1.103.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:05:18 2000 UTC (11 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.103.2.1: +62 -12 lines
Diff to previous 1.103.2.1 (colored) to branchpoint 1.103 (colored)

Sync with HEAD.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Nov 21 00:37:56 2000 UTC (11 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.123: +43 -15 lines
Diff to previous 1.123 (colored)

restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures

Revision 1.103.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:08:59 2000 UTC (11 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.103: +94 -39 lines
Diff to previous 1.103 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.123 / (download) - annotate - [select for diffs], Thu Nov 16 20:04:33 2000 UTC (11 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.122: +6 -2 lines
Diff to previous 1.122 (colored)

pass pointer to used exec_package to emulation-specific exec hook -
emulation code may make decisions based on e.g. exec format

Revision 1.122 / (download) - annotate - [select for diffs], Tue Nov 7 12:41:52 2000 UTC (11 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.121: +20 -2 lines
Diff to previous 1.121 (colored)

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

This was discussed on tech-kern.

Revision 1.110.4.4 / (download) - annotate - [select for diffs], Fri Nov 3 19:59:41 2000 UTC (11 years, 6 months ago) by tv
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2
Changes since 1.110.4.3: +23 -1 lines
Diff to previous 1.110.4.3 (colored) to branchpoint 1.110 (colored)

Pullup 1.114 by patcxh [matt]:
Extend the vmcmd stuff a bit.  Add a flags field and define
VMCMD_BASE & VMCMD_RELATIVE.  This allows one to add vmcmds
which are relative to previous entries.  This is needed for
loading the VAX ld.elf_so
[releng: fixes problems with new i386 ld.elf_so too]

Revision 1.110.4.3 / (download) - annotate - [select for diffs], Wed Oct 18 16:23:59 2000 UTC (11 years, 7 months ago) by tv
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-BETA
Changes since 1.110.4.2: +19 -5 lines
Diff to previous 1.110.4.2 (colored) to branchpoint 1.110 (colored)

Pullup by patch [eeh]:
Support userspace at multiple addresses by making PSSTRINGS variable (using
p_psstr), and fix stackgap_init() appropriately.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Sep 28 19:05:07 2000 UTC (11 years, 7 months ago) by eeh
Branch: MAIN
Changes since 1.120: +13 -11 lines
Diff to previous 1.120 (colored)

Add support for variable end of user stacks needed to support COMPAT_NETBSD32:

	`struct vmspace' has a new field `vm_minsaddr' which is the user TOS.

	PS_STRINGS is deprecated in favor of curproc->p_pstr which is derived
	from `vm_minsaddr'.

	Bump the kernel version number.

Revision 1.120 / (download) - annotate - [select for diffs], Thu Aug 3 20:41:22 2000 UTC (11 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.119: +6 -6 lines
Diff to previous 1.119 (colored)

Convert namei pathname buffer allocation to use the pool allocator.

Revision 1.119 / (download) - annotate - [select for diffs], Wed Aug 2 20:36:33 2000 UTC (11 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.118: +6 -6 lines
Diff to previous 1.118 (colored)

MALLOC()/FREE() should not be used for variable sized allocations.
(A few remain here -- need to fix exec_script.c)

Revision 1.118 / (download) - annotate - [select for diffs], Tue Aug 1 04:57:29 2000 UTC (11 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.117: +5 -13 lines
Diff to previous 1.117 (colored)

ANSI'ify.

Revision 1.110.4.2 / (download) - annotate - [select for diffs], Mon Jul 31 02:41:26 2000 UTC (11 years, 9 months ago) by mrg
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.110.4.1: +6 -2 lines
Diff to previous 1.110.4.1 (colored) to branchpoint 1.110 (colored)

pull up 1.117 (approved by thorpej):
>Fix the sparc_v9 hack...

Revision 1.117 / (download) - annotate - [select for diffs], Thu Jul 27 13:45:59 2000 UTC (11 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.116: +6 -2 lines
Diff to previous 1.116 (colored)

Fix the sparc_v9 hack...

Revision 1.110.4.1 / (download) - annotate - [select for diffs], Wed Jul 26 23:10:28 2000 UTC (11 years, 10 months ago) by mycroft
Branch: netbsd-1-5
Changes since 1.110: +7 -3 lines
Diff to previous 1.110 (colored)

Approved by thorpej:
Store argc as a long, per ELF ABI.

syssrc/sys/kern/kern_exec.c				1.115 -> 1.116

Revision 1.116 / (download) - annotate - [select for diffs], Wed Jul 26 15:42:09 2000 UTC (11 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.115: +7 -3 lines
Diff to previous 1.115 (colored)

The ELF ABI declares that argc must fill an `argument slot'.  Make it so.
For __sparc_v9__ only, do a hack to make old executables continue to work --
for now.

Revision 1.115 / (download) - annotate - [select for diffs], Thu Jul 13 02:33:36 2000 UTC (11 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.114: +1 -4 lines
Diff to previous 1.114 (colored)

remove a debugging printf.

Revision 1.114 / (download) - annotate - [select for diffs], Thu Jul 13 01:24:05 2000 UTC (11 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.113: +16 -1 lines
Diff to previous 1.113 (colored)

Extend the vmcmd stuff a bit.  Add a flags field and define
VMCMD_BASE & VMCMD_RELATIVE.  This allows one to add vmcmds
which are relative to previous entries.  This is needed for
loading the VAX ld.elf_so

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

remove include of <vm/vm.h>

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

remove/move more mach vm header files:

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

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

Revision 1.111 / (download) - annotate - [select for diffs], Wed Jun 21 05:43:33 2000 UTC (11 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.110: +31 -5 lines
Diff to previous 1.110 (colored)

Add some kernel printfs (under DEBUG) to print messages when bad things
happen in a exec.

Revision 1.110 / (download) - annotate - [select for diffs], Sat May 27 00:40:45 2000 UTC (12 years ago) by sommerfeld
Branch: MAIN
CVS Tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.109: +2 -2 lines
Diff to previous 1.109 (colored)

Reduce use of curproc in several places:

 - Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()

Revision 1.109 / (download) - annotate - [select for diffs], Fri May 26 02:24:37 2000 UTC (12 years ago) by simonb
Branch: MAIN
Changes since 1.108: +8 -1 lines
Diff to previous 1.108 (colored)

Fill in locators for process argv/envp data after ps_strings is built.

Revision 1.108 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:11 2000 UTC (12 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored)

Get rid of register declarations.

Revision 1.100.2.3 / (download) - annotate - [select for diffs], Tue Feb 1 22:55:07 2000 UTC (12 years, 3 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002
Changes since 1.100.2.2: +3 -1 lines
Diff to previous 1.100.2.2 (colored) to branchpoint 1.100 (colored)

Pull up revision 1.107 (requested by fvdl):
  Close procfs security hole.  Fixes SA#2000-001.

Revision 1.107 / (download) - annotate - [select for diffs], Tue Jan 25 01:15:14 2000 UTC (12 years, 4 months ago) by fvdl
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.106: +3 -1 lines
Diff to previous 1.106 (colored)

Add an exec hook mechanism, where kernel subsystem can register to
execute certain functions when a process does an exec(). Currently
uses a global list. Could possibly be done using a per-process list,
but this needs more thought.

Revision 1.106 / (download) - annotate - [select for diffs], Wed Jan 5 08:11:31 2000 UTC (12 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

reverse (and fix) the logic of the other change; it cause semi-random alpha SIGABRT for longer command lines

Revision 1.105 / (download) - annotate - [select for diffs], Thu Dec 30 15:59:26 1999 UTC (12 years, 4 months ago) by eeh
Branch: MAIN
Changes since 1.104: +9 -4 lines
Diff to previous 1.104 (colored)

Handle args for 32-bit emulation processes properly.

Revision 1.103.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:35:51 1999 UTC (12 years, 5 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.103: +5 -1 lines
Diff to previous 1.103 (colored) next main 1.104 (colored)

Pull up to last week's -current.

Revision 1.100.6.1 / (download) - annotate - [select for diffs], Tue Nov 30 13:34:41 1999 UTC (12 years, 5 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.100: +2 -1 lines
Diff to previous 1.100 (colored) next main 1.101 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.100.2.2 / (download) - annotate - [select for diffs], Sat Nov 27 15:29:27 1999 UTC (12 years, 6 months ago) by he
Branch: netbsd-1-4
Changes since 1.100.2.1: +5 -1 lines
Diff to previous 1.100.2.1 (colored) to branchpoint 1.100 (colored)

Pull up revision 1.104 (requested by is):
  Add explicit instruction and data cache flush on machines which
  needs it when installing the signal trampoline code.  This makes
  regress/sys/kern/sigtramp work on m68060 processors.

Revision 1.104 / (download) - annotate - [select for diffs], Sun Nov 21 17:04:05 1999 UTC (12 years, 6 months ago) by is
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.103: +5 -1 lines
Diff to previous 1.103 (colored)

Call the machine dependent code to do d-cache/i-cache synchronization, for
architectures that need it. Without this, at least on Motorola 68040 and 68060
machines, the sigtramp regression test fails.

Revision 1.103 / (download) - annotate - [select for diffs], Tue Sep 28 14:47:03 1999 UTC (12 years, 8 months ago) by bouyer
Branch: MAIN
CVS Tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored)

Remplace kern.shortcorename sysctl with a more flexible sheme,
core filename format, which allow to change the name of the core dump,
and to relocate it in a directory. Credits to Bill Sommerfeld for giving me
the idea :)
The default core filename format can be changed by options DEFCORENAME and/or
kern.defcorename
Create a new sysctl tree, proc, which holds per-process values (for now
the corename format, and resources limits). Process is designed by its pid
at the second level name. These values are inherited on fork, and the corename
fomat is reset to defcorename on suid/sgid exec.
Create a p_sugid() function, to take appropriate actions on suid/sgid
exec (for now set the P_SUGID flag and reset the per-proc corename).
Adjust dosetrlimit() to allow changing limits of one proc by another, with
credential controls.

Revision 1.100.2.1 / (download) - annotate - [select for diffs], Mon Aug 9 03:08:25 1999 UTC (12 years, 9 months ago) by cgd
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH001
Changes since 1.100: +2 -1 lines
Diff to previous 1.100 (colored)

pull up rev 1.102 from trunk (ross).  Addresses NetBSD Security
Alert SA1999-011.

Revision 1.102 / (download) - annotate - [select for diffs], Mon Aug 9 02:42:20 1999 UTC (12 years, 9 months ago) by ross
Branch: MAIN
Changes since 1.101: +2 -1 lines
Diff to previous 1.101 (colored)

Call stopprofclock(p) from sys_execve().

Revision 1.100.4.2 / (download) - annotate - [select for diffs], Mon Jun 21 01:24:01 1999 UTC (12 years, 11 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.100.4.1: +2 -2 lines
Diff to previous 1.100.4.1 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored)

Sync w/ -current.

Revision 1.100.4.1 / (download) - annotate - [select for diffs], Mon Jun 7 04:25:30 1999 UTC (12 years, 11 months ago) by chs
Branch: chs-ubc2
Changes since 1.100: +2 -1 lines
Diff to previous 1.100 (colored)

merge everything from chs-ubc branch.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Apr 27 05:28:44 1999 UTC (13 years, 1 month ago) by cgd
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)

correct comment: turn off set-id if MNT_NOSUID is set, not MNT_NOEXEC.

Revision 1.96.2.1 / (download) - annotate - [select for diffs], Fri Apr 9 04:21:57 1999 UTC (13 years, 1 month ago) by chs
Branch: chs-ubc
Changes since 1.96: +4 -1 lines
Diff to previous 1.96 (colored) next main 1.97 (colored)

call uvn_attach() in check_exec() before reading from the file
with vn_rdwr().  somehow the lack of this wasn't a problem on sparc.

Revision 1.100 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:22 1999 UTC (13 years, 2 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001-oldtag, kame_14_19990705, kame_14_19990628
Branch point for: netbsd-1-4, kame, chs-ubc2
Changes since 1.99: +1 -29 lines
Diff to previous 1.99 (colored)

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

Revision 1.99 / (download) - annotate - [select for diffs], Fri Feb 26 23:38:55 1999 UTC (13 years, 3 months ago) by wrstuden
Branch: MAIN
Changes since 1.98: +11 -7 lines
Diff to previous 1.98 (colored)

Modify VOP_CLOSE vnode op to always take a locked vnode. Change vn_close
to pass down a locked node. Modify union_copyup() to call VOP_CLOSE
locked nodes.

Also fix a bug in union_copyup() where a lock on the lower vnode would
only be released if VOP_OPEN didn't fail.

Revision 1.98 / (download) - annotate - [select for diffs], Mon Jan 25 16:00:06 1999 UTC (13 years, 4 months ago) by kleink
Branch: MAIN
Changes since 1.97: +2 -1 lines
Diff to previous 1.97 (colored)

Adapt the System V behaviour of a child process inheriting its parent's
ucontext link but still reset it on exec().

Revision 1.97 / (download) - annotate - [select for diffs], Fri Jan 22 20:51:04 1999 UTC (13 years, 4 months ago) by kleink
Branch: MAIN
Changes since 1.96: +2 -2 lines
Diff to previous 1.96 (colored)

Indentation nit.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Sep 11 12:50:10 1998 UTC (13 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base
Branch point for: chs-ubc
Changes since 1.95: +6 -4 lines
Diff to previous 1.95 (colored)

Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.

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

Merge paddr_t changes into the main branch.

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

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

Revision 1.93.2.1 / (download) - annotate - [select for diffs], Thu Jul 30 14:04:04 1998 UTC (13 years, 9 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.93: +8 -8 lines
Diff to previous 1.93 (colored) next main 1.94 (colored)

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

Revision 1.93 / (download) - annotate - [select for diffs], Tue Jul 28 18:37:47 1998 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

Change the "aresid" argument of vn_rdwr() from an int * to a size_t *,
to match the new uio_resid type.

Revision 1.92 / (download) - annotate - [select for diffs], Thu Jun 25 21:17:15 1998 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.91: +2 -1 lines
Diff to previous 1.91 (colored)

defopt KTRACE

Revision 1.91 / (download) - annotate - [select for diffs], Sat May 2 18:33:19 1998 UTC (14 years ago) by christos
Branch: MAIN
Changes since 1.90: +4 -7 lines
Diff to previous 1.90 (colored)

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

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

Merge with Lite2 + local changes

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:09:39 1998 UTC (14 years, 2 months ago) by fvdl
Branch: netbsd, CSRG
CVS Tags: lite-2, lite-1, date-03-may-96
Changes since 1.1: +64 -1 lines
Diff to previous 1.1 (colored)

Import 4.4BSD-Lite for reference

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

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

Revision 1.88 / (download) - annotate - [select for diffs], Thu Feb 5 07:59:48 1998 UTC (14 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.87: +30 -1 lines
Diff to previous 1.87 (colored)

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

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

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)

Revision 1.87 / (download) - annotate - [select for diffs], Thu Jan 1 02:43:18 1998 UTC (14 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.86: +1 -4 lines
Diff to previous 1.86 (colored)

No longer needs to include sys/shm.h.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Dec 31 07:47:44 1997 UTC (14 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.85: +9 -14 lines
Diff to previous 1.85 (colored)

Split out the code that prepares a VM space for exec into a new
vmspace_exec() function.

Revision 1.84.4.1 / (download) - annotate - [select for diffs], Tue Sep 16 03:51:02 1997 UTC (14 years, 8 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.84: +4 -3 lines
Diff to previous 1.84 (colored) next main 1.85 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Sep 11 23:02:32 1997 UTC (14 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-base
Changes since 1.84: +4 -3 lines
Diff to previous 1.84 (colored)

Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way.  (See tech-kern.)

Revision 1.84 / (download) - annotate - [select for diffs], Thu May 8 16:20:07 1997 UTC (15 years ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.83: +4 -6 lines
Diff to previous 1.83 (colored)

Pass the vnode type to vaccess(), and use it when checking VEXEC.  Make sure
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.

Revision 1.83 / (download) - annotate - [select for diffs], Thu May 8 10:19:13 1997 UTC (15 years ago) by mycroft
Branch: MAIN
Changes since 1.82: +6 -6 lines
Diff to previous 1.82 (colored)

va_mode contains stat bits.  Use S_IS[UG]ID rather than VS[UG]ID.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Apr 23 20:18:16 1997 UTC (15 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.81: +1 -5 lines
Diff to previous 1.81 (colored)

Do not return success when checking for execute permission by super-user and no
execute bits are set.  Also, this test is no longer needed in execve(2).

Revision 1.81 / (download) - annotate - [select for diffs], Thu Apr 10 19:45:40 1997 UTC (15 years, 1 month ago) by kleink
Branch: MAIN
Changes since 1.80: +2 -5 lines
Diff to previous 1.80 (colored)

Back out last change: just return EACCESS for any non-VREG file.
Fixes PR/3472 from Matthias Pfaller.

Revision 1.80 / (download) - annotate - [select for diffs], Fri Mar 14 06:12:11 1997 UTC (15 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.79: +5 -2 lines
Diff to previous 1.79 (colored)

Return EISDIR for directories, not EACCES.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Jan 7 10:41:02 1997 UTC (15 years, 4 months ago) by mrg
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

only set P_SUGID once.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Dec 22 10:21:07 1996 UTC (15 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.77: +6 -5 lines
Diff to previous 1.77 (colored)

* catch up with system call argument type fixups/const poisoning.
* Fix arguments to various copyin()/copyout() invocations, to avoid
  gratuitous casts.
* Some KNF formatting fixes

Revision 1.75.4.1 / (download) - annotate - [select for diffs], Wed Dec 11 05:32:46 1996 UTC (15 years, 5 months ago) by mycroft
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.75: +19 -13 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

From trunk:
Change the exec locking protocol to fix a deadlock.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Sep 30 23:18:46 1996 UTC (15 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.76: +17 -12 lines
Diff to previous 1.76 (colored)

exec vnode locking protocol changes: in a nutshell, don't keep vnodes
locked for any longer than we have to.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Sep 26 23:34:47 1996 UTC (15 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.75: +6 -5 lines
Diff to previous 1.75 (colored)

fix some typos and clean up some comments.

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

More proto fixes

Revision 1.74 / (download) - annotate - [select for diffs], Sun Feb 4 02:15:20 1996 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.73: +20 -19 lines
Diff to previous 1.73 (colored)

First pass at prototyping

Revision 1.73 / (download) - annotate - [select for diffs], Sat Dec 9 04:11:00 1995 UTC (16 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.72: +3 -1 lines
Diff to previous 1.72 (colored)

If we abort, make sure to free ep_emul_arg.

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

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

Revision 1.71 / (download) - annotate - [select for diffs], Tue Sep 19 21:44:57 1995 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.70: +6 -5 lines
Diff to previous 1.70 (colored)

Make system calls conform to a standard prototype and bring those
prototypes into scope.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Jul 19 15:19:08 1995 UTC (16 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.69: +6 -1 lines
Diff to previous 1.69 (colored)

Add KTR_EMUL to indicate a switch between syscall emulations.
Currently this record is emitted only on exec. Maybe it should
be emitted on ktrace() attach too.

Revision 1.69 / (download) - annotate - [select for diffs], Tue May 16 14:19:03 1995 UTC (17 years ago) by mycroft
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

Generate the new ps_strings format.

Revision 1.68 / (download) - annotate - [select for diffs], Mon May 1 22:36:45 1995 UTC (17 years ago) by cgd
Branch: MAIN
Changes since 1.67: +10 -3 lines
Diff to previous 1.67 (colored)

remember first error code (if any) that's different than ENOEXEC.
Not perfect, but there's no perfect solution to the "multiple interesting
error codes" problem.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Apr 22 19:42:52 1995 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.66: +59 -85 lines
Diff to previous 1.66 (colored)

- new copyargs routine.
- use emul_xxx
- deprecate nsysent; use constant SYS_MAXSYSCALL instead.
- deprecate ep_setup
- call sendsig and setregs indirectly.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Apr 10 18:28:09 1995 UTC (17 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

Change `fdclose' to `fdrelease', to avoid confusion with device interfaces.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Apr 7 22:33:23 1995 UTC (17 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.64: +14 -7 lines
Diff to previous 1.64 (colored)

Use sigcode fields in package structure. This seems to be the cleanest
way to deal with seperate trampoline code for emulation of other OSs,
it avoids having to clutter up kern_exec.c any further.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Mar 9 12:05:39 1995 UTC (17 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

copy*str() should use size_t.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Mar 8 01:23:00 1995 UTC (17 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.62: +6 -5 lines
Diff to previous 1.62 (colored)

use long for argc, envc, and u_long for len.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Feb 28 23:09:01 1995 UTC (17 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.61: +27 -1 lines
Diff to previous 1.61 (colored)

various XXX changes that linux bins need to get their args correctly.

Revision 1.61 / (download) - annotate - [select for diffs], Wed Feb 22 01:39:56 1995 UTC (17 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.60: +3 -2 lines
Diff to previous 1.60 (colored)

Align the stack even if envp is NULL.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Feb 4 14:44:48 1995 UTC (17 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.59: +5 -5 lines
Diff to previous 1.59 (colored)

Optimize differently.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Feb 4 14:22:13 1995 UTC (17 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.58: +7 -9 lines
Diff to previous 1.58 (colored)

Small optimization.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Dec 4 03:10:45 1994 UTC (17 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

Use common fdclose() rather than a private version.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Oct 24 05:32:34 1994 UTC (17 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.56: +16 -7 lines
Diff to previous 1.56 (colored)

change exec_setup_fcn() to be more useful (from christos)

Revision 1.56 / (download) - annotate - [select for diffs], Thu Oct 20 04:22:43 1994 UTC (17 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.55: +13 -7 lines
Diff to previous 1.55 (colored)

update for new syscall args description mechanism

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

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

Revision 1.54 / (download) - annotate - [select for diffs], Wed Jun 8 11:28:35 1994 UTC (17 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.53: +1 -1 lines
Diff to previous 1.53 (colored)

Update to 4.4-Lite fs code.

Revision 1.53 / (download) - annotate - [select for diffs], Fri May 27 08:45:17 1994 UTC (18 years ago) by mycroft
Branch: MAIN
Changes since 1.52: +1 -1 lines
Diff to previous 1.52 (colored)

fname --> path

Revision 1.52 / (download) - annotate - [select for diffs], Fri May 27 07:58:37 1994 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.51: +1 -1 lines
Diff to previous 1.51 (colored)

return 0 on success

Revision 1.51 / (download) - annotate - [select for diffs], Tue May 24 02:39:15 1994 UTC (18 years ago) by cgd
Branch: MAIN
Changes since 1.50: +1 -1 lines
Diff to previous 1.50 (colored)

MIN -> min, MAX -> max

Revision 1.50 / (download) - annotate - [select for diffs], Sat May 21 07:48:10 1994 UTC (18 years ago) by cgd
Branch: MAIN
Changes since 1.49: +1 -1 lines
Diff to previous 1.49 (colored)

struct execve_args now defined in exec.h

Revision 1.49 / (download) - annotate - [select for diffs], Sat May 7 04:17:10 1994 UTC (18 years ago) by cgd
Branch: MAIN
Changes since 1.48: +1 -1 lines
Diff to previous 1.48 (colored)

kill bogus include

Revision 1.48 / (download) - annotate - [select for diffs], Wed May 4 03:41:51 1994 UTC (18 years ago) by cgd
Branch: MAIN
Changes since 1.47: +1 -1 lines
Diff to previous 1.47 (colored)

Rename a lot of process flags.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Apr 29 04:41:28 1994 UTC (18 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.46: +1 -1 lines
Diff to previous 1.46 (colored)

kill syscall name aliases. no user-visible changes

Revision 1.46 / (download) - annotate - [select for diffs], Thu Apr 7 00:40:20 1994 UTC (18 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.45: +1 -1 lines
Diff to previous 1.45 (colored)

SUGID semantics, similar to 4.4BSD

Revision 1.45 / (download) - annotate - [select for diffs], Wed Feb 16 01:21:06 1994 UTC (18 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.44: +1 -1 lines
Diff to previous 1.44 (colored)

simplify error returns, and fix bugs

Revision 1.44 / (download) - annotate - [select for diffs], Sat Feb 12 07:19:11 1994 UTC (18 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.43: +1 -1 lines
Diff to previous 1.43 (colored)

Fix typo in last change.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Feb 12 07:02:34 1994 UTC (18 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.42: +1 -1 lines
Diff to previous 1.42 (colored)

ditto on the last; weird failure modes are the cause of the day.

Revision 1.42 / (download) - annotate - [select for diffs], Sat Feb 12 04:13:43 1994 UTC (18 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.41: +1 -1 lines
Diff to previous 1.41 (colored)

don't forget to deallocate vmcmds if exec fails bounds checks.
thanks to charles for pointing it out.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Feb 5 02:25:00 1994 UTC (18 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.40: +1 -1 lines
Diff to previous 1.40 (colored)

dtrt with exec header size

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jan 16 03:10:05 1994 UTC (18 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.39: +1 -1 lines
Diff to previous 1.39 (colored)

clean up, break script handling out of check_exec(), and comment a bit.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Jan 13 06:24:11 1994 UTC (18 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.38: +1 -1 lines
Diff to previous 1.38 (colored)

use exec_map

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jan 13 02:33:57 1994 UTC (18 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.37: +1 -1 lines
Diff to previous 1.37 (colored)

trim debugging code, for now, and kill dead code (unused options)

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jan 9 17:11:42 1994 UTC (18 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.36: +1 -1 lines
Diff to previous 1.36 (colored)

try until error != ENOEXEC, so that formats can report errros reasonably

Revision 1.36 / (download) - annotate - [select for diffs], Sat Jan 8 18:05:39 1994 UTC (18 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.35: +1 -1 lines
Diff to previous 1.35 (colored)

de-macroify kill_vmcmds()

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jan 8 07:15:09 1994 UTC (18 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.34: +1 -1 lines
Diff to previous 1.34 (colored)

far reaching but relatively minor cleanup and slight reorg of exec code

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jan 8 04:15:44 1994 UTC (18 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.33: +1 -1 lines
Diff to previous 1.33 (colored)

#include vm_user.h.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jan 4 11:29:55 1994 UTC (18 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.32: +1 -1 lines
Diff to previous 1.32 (colored)

field name change

Revision 1.32 / (download) - annotate - [select for diffs], Wed Dec 22 13:39:27 1993 UTC (18 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.31: +1 -1 lines
Diff to previous 1.31 (colored)

add support for p_vnode, from jsp

Revision 1.31 / (download) - annotate - [select for diffs], Sun Dec 12 19:38:37 1993 UTC (18 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +1 -1 lines
Diff to previous 1.30 (colored)

sparc must flush register windows before vm_deallocate or else fireworks
must deallocate shm's
set/reset emulation environment at the right times
keep arg buffer around for later use
canonicalize all #includes.
support STACKGAP for COMPAT_SUNOS code
support OMAGIC/NMAGIC-style memory loading
don't assume VM_MIN_ADDRESS is 0.
(changes come from magnum branch)

Revision 1.30 / (download) - annotate - [select for diffs], Mon Dec 6 14:18:58 1993 UTC (18 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.29: +1 -1 lines
Diff to previous 1.29 (colored)

If EXEC_DEBUG, display name of file we're trying to exec.

Revision 1.25.2.12 / (download) - annotate - [select for diffs], Mon Dec 6 14:15:21 1993 UTC (18 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.25.2.11: +1 -1 lines
Diff to previous 1.25.2.11 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

If EXEC_DEBUG, display name of file we're trying to exec.

Revision 1.25.2.11 / (download) - annotate - [select for diffs], Fri Nov 26 12:23:46 1993 UTC (18 years, 6 months ago) by deraadt
Branch: magnum
Changes since 1.25.2.10: +1 -1 lines
Diff to previous 1.25.2.10 (colored) to branchpoint 1.25 (colored)

STACKGAPLEN is the amount of space to leave between sigtramp and args.
this gap is used by emulation code. Normally it is 0 so you need not
worry about it.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Nov 15 10:21:08 1993 UTC (18 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.28: +1 -1 lines
Diff to previous 1.28 (colored)

drag changes down from magnum

Revision 1.25.2.10 / (download) - annotate - [select for diffs], Sun Nov 14 20:35:44 1993 UTC (18 years, 6 months ago) by mycroft
Branch: magnum
Changes since 1.25.2.9: +1 -1 lines
Diff to previous 1.25.2.9 (colored) to branchpoint 1.25 (colored)

Oops.  kinfo_proc.h has to be included after vm stuff.

Revision 1.25.2.9 / (download) - annotate - [select for diffs], Sun Nov 14 20:31:39 1993 UTC (18 years, 6 months ago) by mycroft
Branch: magnum
Changes since 1.25.2.8: +1 -1 lines
Diff to previous 1.25.2.8 (colored) to branchpoint 1.25 (colored)

Canonicalize all #includes.

Revision 1.25.2.8 / (download) - annotate - [select for diffs], Wed Nov 10 06:33:45 1993 UTC (18 years, 6 months ago) by deraadt
Branch: magnum
Changes since 1.25.2.7: +1 -1 lines
Diff to previous 1.25.2.7 (colored) to branchpoint 1.25 (colored)

set/reset emulation environment at the right times
keep arg buffer around for later use

Revision 1.25.2.7 / (download) - annotate - [select for diffs], Sun Nov 7 08:25:02 1993 UTC (18 years, 6 months ago) by deraadt
Branch: magnum
Changes since 1.25.2.6: +1 -1 lines
Diff to previous 1.25.2.6 (colored) to branchpoint 1.25 (colored)

at the moment vm_refcnt is always 1, but if it isn't then execve()
should build a new address space rather than blasting the old one.

Revision 1.25.2.6 / (download) - annotate - [select for diffs], Sun Nov 7 04:02:56 1993 UTC (18 years, 6 months ago) by deraadt
Branch: magnum
Changes since 1.25.2.5: +1 -1 lines
Diff to previous 1.25.2.5 (colored) to branchpoint 1.25 (colored)

must delete any shm's on an execve

Revision 1.25.2.5 / (download) - annotate - [select for diffs], Tue Oct 26 12:49:58 1993 UTC (18 years, 7 months ago) by mycroft
Branch: magnum
Changes since 1.25.2.4: +1 -1 lines
Diff to previous 1.25.2.4 (colored) to branchpoint 1.25 (colored)

Merge changes from trunk.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Oct 26 01:42:56 1993 UTC (18 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.27: +1 -1 lines
Diff to previous 1.27 (colored)

it's correct to return EACCES if FS is mounted MNT_NOEXEC.

Revision 1.25.2.4 / (download) - annotate - [select for diffs], Tue Oct 26 01:06:16 1993 UTC (18 years, 7 months ago) by deraadt
Branch: magnum
Changes since 1.25.2.3: +1 -1 lines
Diff to previous 1.25.2.3 (colored) to branchpoint 1.25 (colored)

upate to main tree.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Oct 26 00:32:29 1993 UTC (18 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.26: +1 -1 lines
Diff to previous 1.26 (colored)

use copyinstr rather than strcpy to copy in the saved shell-script
name from userland.  From Markus Wild, mw@lamp

Revision 1.25.2.3 / (download) - annotate - [select for diffs], Fri Oct 15 06:23:50 1993 UTC (18 years, 7 months ago) by deraadt
Branch: magnum
Changes since 1.25.2.2: +1 -1 lines
Diff to previous 1.25.2.2 (colored) to branchpoint 1.25 (colored)

Add NMAGIC support. OMAGIC should be trivial.

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Mon Oct 11 04:31:11 1993 UTC (18 years, 7 months ago) by deraadt
Branch: magnum
Changes since 1.25.2.1: +1 -1 lines
Diff to previous 1.25.2.1 (colored) to branchpoint 1.25 (colored)

Before we deallocate the old process's stack space, we should flush the
register windows. If we don't, they will flush over the new process's
stack.. this would not be good!

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Wed Oct 6 12:26:06 1993 UTC (18 years, 7 months ago) by mycroft
Branch: magnum
Changes since 1.25: +1 -1 lines
Diff to previous 1.25 (colored)

Merge changes from trunk.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Oct 6 07:27:58 1993 UTC (18 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.25: +1 -1 lines
Diff to previous 1.25 (colored)

use the ALIGN macro to align the stack, rather than rounding up
by a (char *).  the former is safe, even on strange machines
(read: sparc).

Revision 1.25 / (download) - annotate - [select for diffs], Sun Sep 5 01:33:37 1993 UTC (18 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.24: +1 -1 lines
Diff to previous 1.24 (colored)

there now exists an "exec switch".  break the a.out code into another
module, and tidy up the interface so that other object formats are
more easily supportable.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Sep 1 21:43:50 1993 UTC (18 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.23: +1 -1 lines
Diff to previous 1.23 (colored)

fix problem where exec would lose on shell scripts with symlinks in
their names.  fix from "James W. Dolter" <jdolter@sawtooth.eecs.umich.edu>.
test script:

#!/bin/csh
mkdir /tmp/foodir
cat > /tmp/foodir/testscript <<EOF
#!/bin/sh
echo "Executing script \$1"
EOF
chmod 755 /tmp/foodir/testscript
(cd /tmp ; ln -s foodir foosym)
echo "Trying full path (w/o symlink) to /tmp/foodir/testscript"
/tmp/foodir/testscript "with out symlink"
echo "Trying full path (w/ symlink) to /tmp/foosym/testscript"
/tmp/foosym/testscript "with symlink"
echo "End of Test"

Revision 1.23 / (download) - annotate - [select for diffs], Tue Aug 31 01:52:34 1993 UTC (18 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.22: +1 -1 lines
Diff to previous 1.22 (colored)

ok, initialize that errno, to make theo and gcc2 happy...

Revision 1.22 / (download) - annotate - [select for diffs], Tue Aug 31 01:46:36 1993 UTC (18 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.21: +1 -1 lines
Diff to previous 1.21 (colored)

a program being exec'd *must* cause *some* exec commands to be invoked;
if it doesn't there's a problem in the kernel, because a program
with no exec commands run will have no address space except the stack,
and i don't think it's valid to have a "run from stack only" exec type,
so panic.  if need for that case comes up later, it can be changed...

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jul 28 04:08:27 1993 UTC (18 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (colored)

general cleanup (get close to KNF), and remove a few fuzzies
in preparation for The Grand Re-rewriting.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jul 13 22:13:19 1993 UTC (18 years, 10 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.19: +1 -1 lines
Diff to previous 1.19 (colored)

break args structs out, into syscallname_args structs, so gcc2 doesn't
whine so much.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jul 10 02:07:48 1993 UTC (18 years, 10 months ago) by brezak
Branch: MAIN
Changes since 1.18: +1 -1 lines
Diff to previous 1.18 (colored)

Roundup stack len to naturally aligned address. This fixes emacs aborting due to an odd address in alloca'ed memory.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jul 8 16:48:18 1993 UTC (18 years, 10 months ago) by brezak
Branch: MAIN
Changes since 1.17: +1 -1 lines
Diff to previous 1.17 (colored)

Ignore the flags field in midmag.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 5 01:54:13 1993 UTC (18 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.16: +1 -1 lines
Diff to previous 1.16 (colored)

add support for checking entry against max user address

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jul 4 23:30:33 1993 UTC (18 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 (colored)

change exit() to kexit(), so prototypes are "safe" with stdio.h, etc.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jul 4 09:48:29 1993 UTC (18 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)

call setregs with a retval, too, so the hp300 & mac, and more works.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:33 1993 UTC (18 years, 11 months ago) by andrew
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored)

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

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 22 01:31:53 1993 UTC (18 years, 11 months ago) by glass
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored)

ansi-style function definitions

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jun 18 06:51:10 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11 (colored)

convert magic numbers to network byte order, and attendent changes

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jun 7 03:09:29 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored)

fixed bug where extra spaces at the end of a shell name would
cause shell scripts to be executed incorrectly.  shells would
receive an *empty* arg for name of script, open it, the kernel
would say "oh, that's ." or something similar, and the results
would be interesting...  found, diagnosed, and killed by me.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jun 6 02:36:22 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored)

fix stoopid location to label problem

Revision 1.9 / (download) - annotate - [select for diffs], Sat Jun 5 19:38:13 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

add fixes supplied by markus wild

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jun 3 01:31:43 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

call a cpu-dependent function to check executable's a_mid type.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 2 04:43:54 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

when copying out signal trampoline code, make sure that
the copyout actually succeeds.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jun 2 03:15:36 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

fixed minor typo in sigcode copying code

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 2 02:49:40 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

general cleanup including, but not limited to:
	better-integreate vmcmd building and exec hdr interpretation,
	get stack sigcode copying right
	etc.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 2 00:20:07 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

do address mapping in a new way...
it works, but the code needs to be cleaned some...

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jun 1 04:52:40 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

break before letting child run, if tracing, and do the right
thing with stack limits

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jun 1 01:31:39 1993 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

final patchups, also add support for finding argv/env via PS_STRINGS

Revision 1.1 / (download) - annotate - [select for diffs], Mon May 31 01:44:55 1993 UTC (19 years ago) by cgd
Branch: MAIN

replace exec.
new one based on one by Wolfgang Solfrank, but majorly hacked
(as it: it didn't have a chance in hell of working, before; didn't
even bother copying out argc, for one...)

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




CVSweb <webmaster@jp.NetBSD.org>