The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.195 / (download) - annotate - [select for diffs], Wed Oct 4 20:28:06 2023 UTC (5 months, 3 weeks ago) by ad
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.194: +2 -4 lines
Diff to previous 1.194 (colored) to selected 1.33 (colored)

Eliminate l->l_ncsw and l->l_nivcsw.  From memory think they were added
before we had per-LWP struct rusage; the same is now tracked there.

Revision 1.194 / (download) - annotate - [select for diffs], Sat Sep 23 18:21:11 2023 UTC (6 months ago) by ad
Branch: MAIN
Changes since 1.193: +6 -14 lines
Diff to previous 1.193 (colored) to selected 1.33 (colored)

Repply this change with a couple of bugs fixed:

- Do away with separate pool_cache for some kernel objects that have no special
  requirements and use the general purpose allocator instead. On one of my
  test systems this makes for a small (~1%) but repeatable reduction in system
  time during builds presumably because it decreases the kernel's cache /
  memory bandwidth footprint a little.
- vfs_lockf: cache a pointer to the uidinfo and put mutex in the data segment.

Revision 1.193 / (download) - annotate - [select for diffs], Tue Sep 12 16:17:21 2023 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.192: +14 -6 lines
Diff to previous 1.192 (colored) to selected 1.33 (colored)

Back out recent change to replace pool_cache with then general allocator.
Will return to this when I have time again.

Revision 1.192 / (download) - annotate - [select for diffs], Sun Sep 10 14:45:52 2023 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.191: +6 -14 lines
Diff to previous 1.191 (colored) to selected 1.33 (colored)

- Do away with separate pool_cache for some kernel objects that have no special
  requirements and use the general purpose allocator instead.  On one of my
  test systems this makes for a small (~1%) but repeatable reduction in system
  time during builds presumably because it decreases the kernel's cache /
  memory bandwidth footprint a little.
- vfs_lockf: cache a pointer to the uidinfo and put mutex in the data segment.

Revision 1.191 / (download) - annotate - [select for diffs], Sat Jul 8 20:02:10 2023 UTC (8 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.190: +27 -20 lines
Diff to previous 1.190 (colored) to selected 1.33 (colored)

clock_gettime(2): Fix CLOCK_PROCESS/THREAD_CPUTIME_ID.

Use same calculation as getrusage, not some ad-hoc arithmetic of
internal scheduler parameters that are periodically rewound.

PR kern/57512

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

Revision 1.190 / (download) - annotate - [select for diffs], Sat Jul 8 11:42:03 2023 UTC (8 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.189: +4 -3 lines
Diff to previous 1.189 (colored) to selected 1.33 (colored)

kern_resource.c: Fix brace placement.

No functional change intended.

Revision 1.189 / (download) - annotate - [select for diffs], Sat Apr 9 23:38:33 2022 UTC (23 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.188: +4 -4 lines
Diff to previous 1.188 (colored) to selected 1.33 (colored)

sys: Use membar_release/acquire around reference drop.

This just goes through my recent reference count membar audit and
changes membar_exit to membar_release and membar_enter to
membar_acquire -- this should make everything cheaper on most CPUs
without hurting correctness, because membar_acquire is generally
cheaper than membar_enter.

Revision 1.188 / (download) - annotate - [select for diffs], Sat Mar 12 15:32:32 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.187: +4 -2 lines
Diff to previous 1.187 (colored) to selected 1.33 (colored)

sys: Membar audit around reference count releases.

If two threads are using an object that is freed when the reference
count goes to zero, we need to ensure that all memory operations
related to the object happen before freeing the object.

Using an atomic_dec_uint_nv(&refcnt) == 0 ensures that only one
thread takes responsibility for freeing, but it's not enough to
ensure that the other thread's memory operations happen before the
freeing.

Consider:

	  Thread A			  Thread B
	obj->foo = 42;			obj->baz = 73;
	mumble(&obj->bar);		grumble(&obj->quux);
	/* membar_exit(); */		/* membar_exit(); */
	atomic_dec -- not last		atomic_dec -- last
					/* membar_enter(); */
					KASSERT(invariant(obj->foo,
					    obj->bar));
					free_stuff(obj);

The memory barriers ensure that

	obj->foo = 42;
	mumble(&obj->bar);

in thread A happens before

	KASSERT(invariant(obj->foo, obj->bar));
	free_stuff(obj);

in thread B.  Without them, this ordering is not guaranteed.

So in general it is necessary to do

	membar_exit();
	if (atomic_dec_uint_nv(&obj->refcnt) != 0)
		return;
	membar_enter();

to release a reference, for the `last one out hit the lights' style
of reference counting.  (This is in contrast to the style where one
thread blocks new references and then waits under a lock for existing
ones to drain with a condvar -- no membar needed thanks to mutex(9).)

I searched for atomic_dec to find all these.  Obviously we ought to
have a better abstraction for this because there's so much copypasta.
This is a stop-gap measure to fix actual bugs until we have that.  It
would be nice if an abstraction could gracefully handle the different
styles of reference counting in use -- some years ago I drafted an
API for this, but making it cover everything got a little out of hand
(particularly with struct vnode::v_usecount) and I ended up setting
it aside to work on psref/localcount instead for better scalability.

I got bored of adding #ifdef __HAVE_ATOMIC_AS_MEMBAR everywhere, so I
only put it on things that look performance-critical on 5sec review.
We should really adopt membar_enter_preatomic/membar_exit_postatomic
or something (except they are applicable only to atomic r/m/w, not to
atomic_load/store_*, making the naming annoying) and get rid of all
the ifdefs.

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

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

Revision 1.181.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:51 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.181.2.1: +6 -4 lines
Diff to previous 1.181.2.1 (colored) to branchpoint 1.181 (colored) next main 1.182 (colored) to selected 1.33 (colored)

Merge changes from current as of 20200406

Revision 1.183.2.2 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:03 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.183.2.1: +4 -4 lines
Diff to previous 1.183.2.1 (colored) to branchpoint 1.183 (colored) next main 1.184 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.186 / (download) - annotate - [select for diffs], Fri Feb 21 00:26:22 2020 UTC (4 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Changes since 1.185: +3 -3 lines
Diff to previous 1.185 (colored) to selected 1.33 (colored)

Explicitly cast pointers to uintptr_t before casting to enums. They are
not necessarily the same size. Don't cast pointers to bool, check for
NULL instead.

Revision 1.185 / (download) - annotate - [select for diffs], Sat Feb 15 18:12:15 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored) to selected 1.33 (colored)

- Move the LW_RUNNING flag back into l_pflag: updating l_flag without lock
  in softint_dispatch() is risky.  May help with the "softint screwup"
  panic.

- Correct the memory barriers around zombies switching into oblivion.

Revision 1.183.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:35 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.183: +3 -3 lines
Diff to previous 1.183 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.184 / (download) - annotate - [select for diffs], Wed Jan 8 17:38:42 2020 UTC (4 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.183: +3 -3 lines
Diff to previous 1.183 (colored) to selected 1.33 (colored)

Hopefully fix some problems seen with MP support on non-x86, in particular
where curcpu() is defined as curlwp->l_cpu:

- mi_switch(): undo the ~2007ish optimisation to unlock curlwp before
  calling cpu_switchto().  It's not safe to let other actors mess with the
  LWP (in particular l->l_cpu) while it's still context switching.  This
  removes l->l_ctxswtch.

- Move the LP_RUNNING flag into l->l_flag and rename to LW_RUNNING since
  it's now covered by the LWP's lock.

- Ditch lwp_exit_switchaway() and just call mi_switch() instead.  Everything
  is in cache anyway so it wasn't buying much by trying to avoid saving old
  state.  This means cpu_switchto() will never be called with prevlwp ==
  NULL.

- Remove some KERNEL_LOCK handling which hasn't been needed for years.

Revision 1.182.4.1 / (download) - annotate - [select for diffs], Thu Dec 12 20:43:08 2019 UTC (4 years, 3 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.182: +5 -3 lines
Diff to previous 1.182 (colored) next main 1.183 (colored) to selected 1.33 (colored)

Pull up following revision(s) (requested by ad in ticket #546):

	sys/kern/kern_resource.c: revision 1.183
	sys/kern/kern_softint.c: revision 1.49

calcru: ignore running softints, unless softint_timing is on.
Fixes crazy times reported for proc0.

Revision 1.183 / (download) - annotate - [select for diffs], Thu Nov 21 17:50:49 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.182: +5 -3 lines
Diff to previous 1.182 (colored) to selected 1.33 (colored)

calcru: ignore running softints, unless softint_timing is on.
Fixes crazy times reported for proc0.

Revision 1.181.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.181: +7 -5 lines
Diff to previous 1.181 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.182 / (download) - annotate - [select for diffs], Fri Apr 5 00:33:21 2019 UTC (4 years, 11 months ago) by mlelstv
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.181: +7 -5 lines
Diff to previous 1.181 (colored) to selected 1.33 (colored)

avoid underflow in user/system time.

Revision 1.176.12.2 / (download) - annotate - [select for diffs], Mon May 21 04:36:15 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.176.12.1: +46 -3 lines
Diff to previous 1.176.12.1 (colored) to branchpoint 1.176 (colored) next main 1.177 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.181 / (download) - annotate - [select for diffs], Sun May 13 14:45:23 2018 UTC (5 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.180: +3 -3 lines
Diff to previous 1.180 (colored) to selected 1.33 (colored)

correct the function name.

Revision 1.180 / (download) - annotate - [select for diffs], Wed May 9 19:55:35 2018 UTC (5 years, 10 months ago) by kre
Branch: MAIN
Changes since 1.179: +28 -3 lines
Diff to previous 1.179 (colored) to selected 1.33 (colored)


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

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

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

Revision 1.179 / (download) - annotate - [select for diffs], Tue May 8 19:34:54 2018 UTC (5 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.178: +8 -2 lines
Diff to previous 1.178 (colored) to selected 1.33 (colored)

get the maxrss from the vmspace field, and handle platforms that don't
have pmap statistics here.

Revision 1.178 / (download) - annotate - [select for diffs], Mon May 7 21:03:45 2018 UTC (5 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.177: +14 -2 lines
Diff to previous 1.177 (colored) to selected 1.33 (colored)

Load the struct rusage text, data, and stack fields from the vmspace struct.
Before they were all 0. We update them when we call getrusage() or on
process exit() so that the children rusage is accounted for.

Revision 1.176.12.1 / (download) - annotate - [select for diffs], Mon Apr 16 02:00:07 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.176: +4 -4 lines
Diff to previous 1.176 (colored) to selected 1.33 (colored)

Sync with HEAD, resolve some conflicts

Revision 1.177 / (download) - annotate - [select for diffs], Sun Apr 8 11:43:01 2018 UTC (5 years, 11 months ago) by mlelstv
Branch: MAIN
CVS Tags: pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415
Changes since 1.176: +4 -4 lines
Diff to previous 1.176 (colored) to selected 1.33 (colored)

limits are bytes, vm sizes are clicks.

Revision 1.169.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.169.2.3: +52 -1 lines
Diff to previous 1.169.2.3 (colored) to branchpoint 1.169 (colored) next main 1.170 (colored) to selected 1.33 (colored)

update from HEAD

Revision 1.174.2.2 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:07 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.174.2.1: +52 -2 lines
Diff to previous 1.174.2.1 (colored) to branchpoint 1.174 (colored) next main 1.175 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.175.2.1 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:26 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.175: +52 -2 lines
Diff to previous 1.175 (colored) next main 1.176 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.175.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:02 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.175: +52 -2 lines
Diff to previous 1.175 (colored) next main 1.176 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.176 / (download) - annotate - [select for diffs], Fri Mar 24 21:43:20 2017 UTC (7 years ago) by pgoyette
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-compat-base, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: pgoyette-compat
Changes since 1.175: +52 -2 lines
Diff to previous 1.175 (colored) to selected 1.33 (colored)

Add new sysctl variable proc.curproc.paxflags so a process can determine
which flags were set for it.  Define some values for the variable:

	CTL_PROC_PAXFLAGS_{ASLR,MPROTECT,GUARD}

Revision 1.174.2.1 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:03 2016 UTC (7 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.174: +3 -2 lines
Diff to previous 1.174 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.175 / (download) - annotate - [select for diffs], Wed Jul 13 09:52:00 2016 UTC (7 years, 8 months ago) by njoly
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.174: +3 -2 lines
Diff to previous 1.174 (colored) to selected 1.33 (colored)

In dosetrlimit() round stack hard limit just like soft one.
Avoid cases where hard limit becomes smaller than soft limit.

Revision 1.174 / (download) - annotate - [select for diffs], Sat Oct 18 08:33:29 2014 UTC (9 years, 5 months ago) by snj
Branch: MAIN
CVS Tags: nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.173: +3 -3 lines
Diff to previous 1.173 (colored) to selected 1.33 (colored)

src is too big these days to tolerate superfluous apostrophes.  It's
"its", people!

Revision 1.169.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.169.2.2: +2 -7 lines
Diff to previous 1.169.2.2 (colored) to branchpoint 1.169 (colored) to selected 1.33 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.167.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.167.2.4: +2 -7 lines
Diff to previous 1.167.2.4 (colored) to branchpoint 1.167 (colored) next main 1.168 (colored) to selected 1.33 (colored)

sync with head.

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

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

Revision 1.172.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:07 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.172: +2 -7 lines
Diff to previous 1.172 (colored) next main 1.173 (colored) to selected 1.33 (colored)

sync with head

Revision 1.173 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:11 2014 UTC (10 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.172: +2 -7 lines
Diff to previous 1.172 (colored) to selected 1.33 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.169.2.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:51 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.169.2.1: +9 -8 lines
Diff to previous 1.169.2.1 (colored) to branchpoint 1.169 (colored) to selected 1.33 (colored)

resync with head

Revision 1.167.2.4 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:21 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.167.2.3: +9 -8 lines
Diff to previous 1.167.2.3 (colored) to branchpoint 1.167 (colored) to selected 1.33 (colored)

sync with head

Revision 1.167.2.3 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:43 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.167.2.2: +19 -10 lines
Diff to previous 1.167.2.2 (colored) to branchpoint 1.167 (colored) to selected 1.33 (colored)

sync with (a bit old) head

Revision 1.172 / (download) - annotate - [select for diffs], Mon Jan 7 16:54:54 2013 UTC (11 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base8, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.171: +8 -7 lines
Diff to previous 1.171 (colored) to selected 1.33 (colored)

fix setrlimit(RLIMIT_STACK) for __MACHINE_STACK_GROWS_UP platforms.

Revision 1.171 / (download) - annotate - [select for diffs], Fri Dec 21 19:39:48 2012 UTC (11 years, 3 months ago) by njoly
Branch: MAIN
Changes since 1.170: +3 -3 lines
Diff to previous 1.170 (colored) to selected 1.33 (colored)

One semi-column is enough.

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:42 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.169: +19 -10 lines
Diff to previous 1.169 (colored) to selected 1.33 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.170 / (download) - annotate - [select for diffs], Sat Nov 3 23:22:22 2012 UTC (11 years, 4 months ago) by njoly
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.169: +19 -10 lines
Diff to previous 1.169 (colored) to selected 1.33 (colored)

Move rusage computation to a new getrusage1() function. Adjust all
compat/emulations to make use of it.

Revision 1.167.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:30 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.167.2.1: +10 -2 lines
Diff to previous 1.167.2.1 (colored) to branchpoint 1.167 (colored) to selected 1.33 (colored)

sync with head

Revision 1.169 / (download) - annotate - [select for diffs], Sat Jun 9 02:31:15 2012 UTC (11 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.168: +10 -2 lines
Diff to previous 1.168 (colored) to selected 1.33 (colored)

Add a new resource to limit the number of lwps per user, RLIMIT_NTHR. There
is a global sysctl kern.maxlwp to control this, which is by default 2048.
The first lwp of each process or kernel threads are not counted against the
limit. To show the current resource usage per user, I added a new sysctl
that dumps the uidinfo structure fields.

Revision 1.167.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:25 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.167: +4 -2 lines
Diff to previous 1.167 (colored) to selected 1.33 (colored)

sync with head

Revision 1.168 / (download) - annotate - [select for diffs], Fri Dec 2 12:33:12 2011 UTC (12 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp
Changes since 1.167: +4 -2 lines
Diff to previous 1.167 (colored) to selected 1.33 (colored)

assertion

Revision 1.166.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:19 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.166: +4 -4 lines
Diff to previous 1.166 (colored) next main 1.167 (colored) to selected 1.33 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.155.2.4 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:29 2011 UTC (12 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.155.2.3: +2 -2 lines
Diff to previous 1.155.2.3 (colored) to branchpoint 1.155 (colored) next main 1.156 (colored) to selected 1.33 (colored)

sync with head

Revision 1.157.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:31 2011 UTC (12 years, 9 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.157: +213 -222 lines
Diff to previous 1.157 (colored) next main 1.158 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.167 / (download) - annotate - [select for diffs], Fri Jun 3 17:58:18 2011 UTC (12 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.166: +4 -4 lines
Diff to previous 1.166 (colored) to selected 1.33 (colored)

Revert maxdmap/maxsmap constification, as it causes problems on some
sparc models.  Reported by tsutsui@.

Revision 1.155.2.3 / (download) - annotate - [select for diffs], Tue May 31 03:05:01 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.155.2.2: +213 -222 lines
Diff to previous 1.155.2.2 (colored) to branchpoint 1.155 (colored) to selected 1.33 (colored)

sync with head

Revision 1.166 / (download) - annotate - [select for diffs], Tue May 31 00:15:28 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.165: +9 -13 lines
Diff to previous 1.165 (colored) to selected 1.33 (colored)

sysctl_proc_corename: perform KAUTH_PROCESS_CORENAME check (for set case)
after the new name is copied into cnbuf.  Spotted by enami@.

Revision 1.165 / (download) - annotate - [select for diffs], Tue May 24 01:19:48 2011 UTC (12 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.164: +5 -4 lines
Diff to previous 1.164 (colored) to selected 1.33 (colored)

fix proc.pid.corename:
- "oldp is not NULL" means the get case
- "newp is not NULL" means the set case
which may both happen at the same time.

Revision 1.164 / (download) - annotate - [select for diffs], Sat May 14 17:57:05 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.163: +58 -59 lines
Diff to previous 1.163 (colored) to selected 1.33 (colored)

- Sprinkle __read_mostly, consitify maxdmap and maxsmap.
- Prevent sys/resourcevar.h from inclusion in userland.
- sys_{set,get}priority: use id_t for 'who', not int.
- Make donice() routine static.
- Remove trailing spaces, KNF.

Revision 1.163 / (download) - annotate - [select for diffs], Sat May 14 17:12:28 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.162: +52 -49 lines
Diff to previous 1.162 (colored) to selected 1.33 (colored)

Improve/fix comments, give more meaningful names for variables.

Revision 1.162 / (download) - annotate - [select for diffs], Sun May 1 02:46:19 2011 UTC (12 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.161: +11 -7 lines
Diff to previous 1.161 (colored) to selected 1.33 (colored)

if donice fails, don't keep going with the next process.

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

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

Revision 1.160 / (download) - annotate - [select for diffs], Sun May 1 00:22:36 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.159: +22 -13 lines
Diff to previous 1.159 (colored) to selected 1.33 (colored)

Merge duplicate code fragments into a new lim_setcorename() routine.

Revision 1.159 / (download) - annotate - [select for diffs], Sun May 1 00:11:52 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.158: +8 -6 lines
Diff to previous 1.158 (colored) to selected 1.33 (colored)

Rename limfree() to lim_free(), misc clean up.  No functional change.

Revision 1.158 / (download) - annotate - [select for diffs], Sat Apr 30 23:41:17 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.157: +52 -72 lines
Diff to previous 1.157 (colored) to selected 1.33 (colored)

sysctl_proc_corename: improve comments, clean up, move a check for
KAUTH_REQ_PROCESS_CORENAME_SET earlier, do not bother to strcmp().

Revision 1.154.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:28 2010 UTC (13 years, 7 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.154.2.1: +84 -64 lines
Diff to previous 1.154.2.1 (colored) to branchpoint 1.154 (colored) next main 1.155 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.139.2.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:40 2010 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.4: +86 -66 lines
Diff to previous 1.139.2.4 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.155.2.2 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:54 2010 UTC (13 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.155.2.1: +68 -55 lines
Diff to previous 1.155.2.1 (colored) to branchpoint 1.155 (colored) to selected 1.33 (colored)

sync with head

Revision 1.157 / (download) - annotate - [select for diffs], Thu Jul 1 02:38:30 2010 UTC (13 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.156: +68 -55 lines
Diff to previous 1.156 (colored) to selected 1.33 (colored)

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

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

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

Fixes PR/43176.

Revision 1.155.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:57 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.155: +20 -13 lines
Diff to previous 1.155 (colored) to selected 1.33 (colored)

sync with head

Revision 1.156 / (download) - annotate - [select for diffs], Wed May 26 23:53:21 2010 UTC (13 years, 10 months ago) by pooka
Branch: MAIN
Changes since 1.155: +20 -13 lines
Diff to previous 1.155 (colored) to selected 1.33 (colored)

Feed dust to a few linkset uses and explicitly call the constructor.

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

Sync with HEAD.

Revision 1.147.4.1.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:16 2010 UTC (13 years, 11 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.147.4.1: +7 -2 lines
Diff to previous 1.147.4.1 (colored) next main 1.147.4.2 (colored) to selected 1.33 (colored)

sync to netbsd-5

Revision 1.139.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:17 2010 UTC (14 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.3: +70 -6 lines
Diff to previous 1.139.2.3 (colored) to branchpoint 1.139 (colored) to selected 1.33 (colored)

sync with head

Revision 1.155 / (download) - annotate - [select for diffs], Wed Mar 3 00:47:30 2010 UTC (14 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.154: +2 -6 lines
Diff to previous 1.154 (colored) to selected 1.33 (colored)

remove redundant checks of PK_MARKER.

Revision 1.154 / (download) - annotate - [select for diffs], Fri Oct 2 22:46:18 2009 UTC (14 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip
Changes since 1.153: +49 -21 lines
Diff to previous 1.153 (colored) to selected 1.33 (colored)

Stick nice policy in its own subsystem and call the listener "resource"
rather than "rlimit"...

Revision 1.153 / (download) - annotate - [select for diffs], Fri Oct 2 22:38:45 2009 UTC (14 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.152: +42 -2 lines
Diff to previous 1.152 (colored) to selected 1.33 (colored)

Move rlimit policy back to the subsystem.

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

Revision 1.147.4.1.2.1 / (download) - annotate - [select for diffs], Fri Aug 14 21:16:14 2009 UTC (14 years, 7 months ago) by snj
Branch: netbsd-5-0
CVS Tags: netbsd-5-0-2-RELEASE
Changes since 1.147.4.1: +7 -2 lines
Diff to previous 1.147.4.1 (colored) next main 1.147.4.2 (colored) to selected 1.33 (colored)

Pull up following revision(s) (requested by dsl in ticket #893):
	sys/kern/kern_resource.c: revision 1.152
PR/41489: Stathis Kamperis: setpriority(2) returns EACCES instead of EPERM
Per discussion on the PR's audit trail, put back original checks for now.

Revision 1.147.4.2 / (download) - annotate - [select for diffs], Fri Aug 14 21:15:16 2009 UTC (14 years, 7 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.147.4.1: +7 -2 lines
Diff to previous 1.147.4.1 (colored) to branchpoint 1.147 (colored) next main 1.148 (colored) to selected 1.33 (colored)

Pull up following revision(s) (requested by dsl in ticket #893):
	sys/kern/kern_resource.c: revision 1.152
PR/41489: Stathis Kamperis: setpriority(2) returns EACCES instead of EPERM
Per discussion on the PR's audit trail, put back original checks for now.

Revision 1.149.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:34 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.149.2.1: +7 -2 lines
Diff to previous 1.149.2.1 (colored) next main 1.150 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.139.2.3 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:31 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.2: +7 -2 lines
Diff to previous 1.139.2.2 (colored) to branchpoint 1.139 (colored) to selected 1.33 (colored)

sync with head

Revision 1.152 / (download) - annotate - [select for diffs], Tue May 26 06:57:38 2009 UTC (14 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.151: +7 -2 lines
Diff to previous 1.151 (colored) to selected 1.33 (colored)

PR/41489: Stathis Kamperis: etpriority(2) returns EACCES instead of EPERM

Per discussion on the PR's audit trail, put back original checks for now.

Revision 1.149.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.149: +3 -5 lines
Diff to previous 1.149 (colored) to selected 1.33 (colored)

Sync with HEAD.

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

Revision 1.139.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:47 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.1: +16 -112 lines
Diff to previous 1.139.2.1 (colored) to branchpoint 1.139 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.147.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.147.2.1: +3 -2 lines
Diff to previous 1.147.2.1 (colored) to branchpoint 1.147 (colored) next main 1.148 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.147.4.1 / (download) - annotate - [select for diffs], Wed Apr 1 00:25:22 2009 UTC (15 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-1-RELEASE, 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: netbsd-5-0, matt-nb5-mips64
Changes since 1.147: +3 -2 lines
Diff to previous 1.147 (colored) to selected 1.33 (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.151 / (download) - annotate - [select for diffs], Sun Mar 29 01:02:50 2009 UTC (15 years 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.150: +3 -2 lines
Diff to previous 1.150 (colored) to selected 1.33 (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.150 / (download) - annotate - [select for diffs], Mon Feb 9 11:13:20 2009 UTC (15 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.149: +2 -5 lines
Diff to previous 1.149 (colored) to selected 1.33 (colored)

dosetrlimit: remove the checks which are no longer needed since rlim_t
is unsigned again.  Hi <christos>!

Revision 1.149 / (download) - annotate - [select for diffs], Thu Jan 29 22:27:23 2009 UTC (15 years, 2 months ago) by drochner
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.148: +5 -2 lines
Diff to previous 1.148 (colored) to selected 1.33 (colored)

put back a range check in setrlimit() for now
(thanks to Andrew Doran for remembering)
rlim_t _should_ be unsigned, but this needs more work

Revision 1.147.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.147: +3 -6 lines
Diff to previous 1.147 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.132.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:19 2009 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.132.6.4: +1 -99 lines
Diff to previous 1.132.6.4 (colored) to branchpoint 1.132 (colored) next main 1.133 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.148 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:52 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.147: +3 -6 lines
Diff to previous 1.147 (colored) to selected 1.33 (colored)

merge christos-time_t

Revision 1.137.2.3 / (download) - annotate - [select for diffs], Sat Nov 1 21:22:27 2008 UTC (15 years, 4 months ago) by christos
Branch: christos-time_t
Changes since 1.137.2.2: +45 -146 lines
Diff to previous 1.137.2.2 (colored) to branchpoint 1.137 (colored) next main 1.138 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.143.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:27 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.143: +5 -100 lines
Diff to previous 1.143 (colored) next main 1.144 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Oct 11 13:40:57 2008 UTC (15 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.146: +2 -104 lines
Diff to previous 1.146 (colored) to selected 1.33 (colored)

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

Revision 1.146 / (download) - annotate - [select for diffs], Sat Oct 11 13:04:39 2008 UTC (15 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.145: +16 -9 lines
Diff to previous 1.145 (colored) to selected 1.33 (colored)

Put ui_lock back and use it to modify the socket buffer size.
Typecasting quad_t * to long * and using atomic_add_long can't
possibly be expected to work!

Another fine error caught by the gcc type-punning warning.  That
really really should be on by default in the kernel.

Revision 1.141.2.5 / (download) - annotate - [select for diffs], Fri Oct 10 22:34:14 2008 UTC (15 years, 5 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.141.2.4: +5 -5 lines
Diff to previous 1.141.2.4 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.132.6.4 / (download) - annotate - [select for diffs], Sun Oct 5 20:11:32 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.132.6.3: +3 -3 lines
Diff to previous 1.132.6.3 (colored) to branchpoint 1.132 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.145 / (download) - annotate - [select for diffs], Tue Sep 30 17:28:47 2008 UTC (15 years, 6 months ago) by njoly
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored) to selected 1.33 (colored)

Small fix to make setpriority(2) with PRIO_PROCESS return ESRCH when
no valid process can be found.

Revision 1.144 / (download) - annotate - [select for diffs], Mon Sep 29 21:30:12 2008 UTC (15 years, 6 months ago) by njoly
Branch: MAIN
Changes since 1.143: +4 -4 lines
Diff to previous 1.143 (colored) to selected 1.33 (colored)

Make setpriority(2) return EINVAL for incorrect which values.

Revision 1.141.2.4 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:42 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.141.2.3: +10 -9 lines
Diff to previous 1.141.2.3 (colored) to branchpoint 1.141 (colored) to selected 1.33 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.132.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.132.6.2: +8 -7 lines
Diff to previous 1.132.6.2 (colored) to branchpoint 1.132 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.142.2.1 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:39 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.142: +10 -9 lines
Diff to previous 1.142 (colored) next main 1.143 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.143 / (download) - annotate - [select for diffs], Mon Jun 23 20:04:36 2008 UTC (15 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.142: +10 -9 lines
Diff to previous 1.142 (colored) to selected 1.33 (colored)

sysctl_proc_stop: fix a lock-leak when kauth returns an error.
From <kefren>.

Revision 1.141.2.3 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:51 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.141.2.2: +3 -3 lines
Diff to previous 1.141.2.2 (colored) to branchpoint 1.141 (colored) to selected 1.33 (colored)

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

Revision 1.137.4.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.137.4.1: +3 -3 lines
Diff to previous 1.137.4.1 (colored) to branchpoint 1.137 (colored) next main 1.138 (colored) to selected 1.33 (colored)

sync with head

Revision 1.132.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:09 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.132.6.1: +33 -40 lines
Diff to previous 1.132.6.1 (colored) to branchpoint 1.132 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.142 / (download) - annotate - [select for diffs], Sat May 31 21:26:01 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Changes since 1.141: +3 -3 lines
Diff to previous 1.141 (colored) to selected 1.33 (colored)

PR kern/38812 race between lwp_exit_switchaway and exit1/coredump

Move the LWP RUNNING and TIMEINTR flags into the thread-private flag word.

Revision 1.137.4.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:08 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.137: +34 -41 lines
Diff to previous 1.137 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.139.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:25 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139: +7 -3 lines
Diff to previous 1.139 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.141.2.2 / (download) - annotate - [select for diffs], Wed May 14 01:35:13 2008 UTC (15 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.141.2.1: +2 -3 lines
Diff to previous 1.141.2.1 (colored) to branchpoint 1.141 (colored) to selected 1.33 (colored)

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

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

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

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

I think this reduction is very good thing.

Revision 1.141.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:04 2008 UTC (15 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.141: +3 -2 lines
Diff to previous 1.141 (colored) to selected 1.33 (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.141 / (download) - annotate - [select for diffs], Mon May 5 17:11:17 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored) to selected 1.33 (colored)

- Convert hashinit() to use kmem_alloc(). The hash tables can be large
  and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.

Revision 1.140 / (download) - annotate - [select for diffs], Tue Apr 29 15:51:23 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.139: +6 -2 lines
Diff to previous 1.139 (colored) to selected 1.33 (colored)

Ignore processes with PK_MARKER set.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:24 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.138: +24 -35 lines
Diff to previous 1.138 (colored) to selected 1.33 (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.138 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.137: +7 -7 lines
Diff to previous 1.137 (colored) to selected 1.33 (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.137.2.2 / (download) - annotate - [select for diffs], Thu Apr 3 13:05:14 2008 UTC (15 years, 11 months ago) by christos
Branch: christos-time_t
Changes since 1.137.2.1: +2 -5 lines
Diff to previous 1.137.2.1 (colored) to branchpoint 1.137 (colored) to selected 1.33 (colored)

rlim_t cannot be negative.

Revision 1.132.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:02 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.132: +77 -57 lines
Diff to previous 1.132 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.137.2.1 / (download) - annotate - [select for diffs], Sat Mar 29 20:47:00 2008 UTC (16 years ago) by christos
Branch: christos-time_t
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored) to selected 1.33 (colored)

Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.137 / (download) - annotate - [select for diffs], Thu Mar 27 19:06:52 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42, christos-time_t
Changes since 1.136: +17 -2 lines
Diff to previous 1.136 (colored) to selected 1.33 (colored)

Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.

Revision 1.98.2.12 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:01 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.11: +47 -48 lines
Diff to previous 1.98.2.11 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.132.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:13 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.132: +62 -57 lines
Diff to previous 1.132 (colored) next main 1.133 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.119.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:59 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.119.2.2: +92 -69 lines
Diff to previous 1.119.2.2 (colored) next main 1.120 (colored) to selected 1.33 (colored)

sync with HEAD

Revision 1.136 / (download) - annotate - [select for diffs], Tue Mar 18 02:35:29 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.135: +18 -14 lines
Diff to previous 1.135 (colored) to selected 1.33 (colored)

uid_find:

- Issue membar_producer() before inserting the new uidinfo.
- Optimize slightly and fix a couple of KNF nits.
- Need sys/atomic.h.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Mar 17 21:16:03 2008 UTC (16 years ago) by rmind
Branch: MAIN
Changes since 1.134: +39 -44 lines
Diff to previous 1.134 (colored) to selected 1.33 (colored)

- Replace uihashtbl_lock and struct uidinfo::ui_lock with atomic operations.
  This make uid_find(), chgproccnt(), chgsbsize() and lf_alloc(), lf_free()
  functions lock-less.
- Increase the size of uihashtbl in case of MP system, as suggested by <ad>.
- Add HASH_SLIST type for hashinit().

Reviewed by <ad>.

Revision 1.98.2.11 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:33 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.10: +21 -12 lines
Diff to previous 1.98.2.10 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.134 / (download) - annotate - [select for diffs], Mon Mar 17 00:18:24 2008 UTC (16 years ago) by rmind
Branch: MAIN
Changes since 1.133: +21 -12 lines
Diff to previous 1.133 (colored) to selected 1.33 (colored)

- Initialize uihashtbl in resource_init();
- Make some variables static, remove the externs from header;
- Wrap few long lines, misc;

No functional changes are intended.

Revision 1.98.2.10 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:55 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.9: +2 -5 lines
Diff to previous 1.98.2.9 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.133 / (download) - annotate - [select for diffs], Sun Feb 24 21:44:51 2008 UTC (16 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: hpcarm-cleanup-base
Changes since 1.132: +2 -5 lines
Diff to previous 1.132 (colored) to selected 1.33 (colored)

Don't return 0 if the count is not changed in chgproccnt()!

Revision 1.123.4.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:46 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.123.4.3: +50 -19 lines
Diff to previous 1.123.4.3 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.98.2.9 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:13 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.8: +33 -15 lines
Diff to previous 1.98.2.8 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.132 / (download) - annotate - [select for diffs], Tue Jan 29 12:41:59 2008 UTC (16 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.131: +5 -4 lines
Diff to previous 1.131 (colored) to selected 1.33 (colored)

uid_find: use kmem_alloc rather than malloc.

Revision 1.127.4.2 / (download) - annotate - [select for diffs], Wed Jan 23 19:27:40 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.127.4.1: +28 -11 lines
Diff to previous 1.127.4.1 (colored) to branchpoint 1.127 (colored) next main 1.128 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.131 / (download) - annotate - [select for diffs], Wed Jan 23 15:04:39 2008 UTC (16 years, 2 months ago) by elad
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase
Changes since 1.130: +30 -13 lines
Diff to previous 1.130 (colored) to selected 1.33 (colored)

Tons of process scope changes.

  - Add a KAUTH_PROCESS_SCHEDULER action, to handle scheduler related
    requests, and add specific requests for set/get scheduler policy and
    set/get scheduler parameters.

  - Add a KAUTH_PROCESS_KEVENT_FILTER action, to handle kevent(2) related
    requests.

  - Add a KAUTH_DEVICE_TTY_STI action to handle requests to TIOCSTI.

  - Add requests for the KAUTH_PROCESS_CANSEE action, indicating what
    process information is being looked at (entry itself, args, env,
    open files).

  - Add requests for the KAUTH_PROCESS_RLIMIT action indicating set/get.

  - Add requests for the KAUTH_PROCESS_CORENAME action indicating set/get.

  - Make bsd44 secmodel code handle the newly added rqeuests appropriately.

All of the above make it possible to issue finer-grained kauth(9) calls in
many places, removing some KAUTH_GENERIC_ISSUSER requests.

  - Remove the "CAN" from KAUTH_PROCESS_CAN{KTRACE,PROCFS,PTRACE,SIGNAL}.

Discussed with christos@ and yamt@.

Revision 1.98.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:11 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.7: +47 -42 lines
Diff to previous 1.98.2.7 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head

Revision 1.119.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:07 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.119.2.1: +52 -57 lines
Diff to previous 1.119.2.1 (colored) to selected 1.33 (colored)

sync with HEAD

Revision 1.127.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:57 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.127: +47 -42 lines
Diff to previous 1.127 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.123.4.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:01 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.123.4.2: +30 -38 lines
Diff to previous 1.123.4.2 (colored) to branchpoint 1.123 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.126.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:40 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.126.2.2: +30 -38 lines
Diff to previous 1.126.2.2 (colored) to branchpoint 1.126 (colored) next main 1.127 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.130 / (download) - annotate - [select for diffs], Wed Dec 26 16:01:36 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base, bouyer-xeni386-base
Changes since 1.129: +19 -6 lines
Diff to previous 1.129 (colored) to selected 1.33 (colored)

Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.129 / (download) - annotate - [select for diffs], Sat Dec 22 01:14:54 2007 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.128: +15 -23 lines
Diff to previous 1.128 (colored) to selected 1.33 (colored)

use binuptime for l_stime/l_rtime.

Revision 1.128 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:09 2007 UTC (16 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.127: +17 -17 lines
Diff to previous 1.127 (colored) to selected 1.33 (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.126.2.2 / (download) - annotate - [select for diffs], Sat Dec 15 03:16:57 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.126.2.1: +19 -6 lines
Diff to previous 1.126.2.1 (colored) to branchpoint 1.126 (colored) to selected 1.33 (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.118.6.6 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:18 2007 UTC (16 years, 3 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.118.6.5: +4 -4 lines
Diff to previous 1.118.6.5 (colored) to branchpoint 1.118 (colored) next main 1.119 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.123.4.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:30 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.123.4.1: +7 -17 lines
Diff to previous 1.123.4.1 (colored) to branchpoint 1.123 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.126.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:42 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.126: +4 -4 lines
Diff to previous 1.126 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.98.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:47 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.6: +7 -17 lines
Diff to previous 1.98.2.6 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head

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

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

Revision 1.118.6.5 / (download) - annotate - [select for diffs], Mon Dec 3 16:14:51 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.6.4: +5 -15 lines
Diff to previous 1.118.6.4 (colored) to branchpoint 1.118 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.126 / (download) - annotate - [select for diffs], Thu Nov 29 18:33:29 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase
Branch point for: vmlocking2
Changes since 1.125: +2 -6 lines
Diff to previous 1.125 (colored) to selected 1.33 (colored)

Fix DIAGNOSTIC build.

Revision 1.125 / (download) - annotate - [select for diffs], Thu Nov 29 18:21:03 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.124: +5 -11 lines
Diff to previous 1.124 (colored) to selected 1.33 (colored)

Use atomics to adjust lim->pl_refcnt.

Revision 1.123.4.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:42 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.123: +5 -5 lines
Diff to previous 1.123 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.98.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:44 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.5: +5 -5 lines
Diff to previous 1.98.2.5 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.123.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:10 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.123: +5 -5 lines
Diff to previous 1.123 (colored) next main 1.124 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.119.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:52 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.119: +147 -98 lines
Diff to previous 1.119 (colored) to selected 1.33 (colored)

sync with HEAD

Revision 1.118.6.4 / (download) - annotate - [select for diffs], Tue Nov 6 19:25:30 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.6.3: +5 -5 lines
Diff to previous 1.118.6.3 (colored) to branchpoint 1.118 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Nov 6 00:42:42 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.123: +5 -5 lines
Diff to previous 1.123 (colored) to selected 1.33 (colored)

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

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

Revision 1.116.2.8 / (download) - annotate - [select for diffs], Mon Nov 5 15:04:43 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.116.2.7: +4 -4 lines
Diff to previous 1.116.2.7 (colored) to branchpoint 1.116 (colored) next main 1.117 (colored) to selected 1.33 (colored)

- Locking tweaks for estcpu/nice. XXX The schedclock musn't run above
  IPL_SCHED.
- Hide most references to l_estcpu.
- l_policy was here first, but l_class is referenced in more places now.

Revision 1.98.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:26 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.4: +144 -95 lines
Diff to previous 1.98.2.4 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.118.6.3 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:34 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.6.2: +7 -11 lines
Diff to previous 1.118.6.2 (colored) to branchpoint 1.118 (colored) to selected 1.33 (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.121.2.2 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:42 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.121.2.1: +7 -11 lines
Diff to previous 1.121.2.1 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.116.2.7 / (download) - annotate - [select for diffs], Tue Oct 9 15:22:19 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.116.2.6: +139 -86 lines
Diff to previous 1.116.2.6 (colored) to branchpoint 1.116 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.123 / (download) - annotate - [select for diffs], Mon Oct 8 20:06:19 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.122: +7 -11 lines
Diff to previous 1.122 (colored) to selected 1.33 (colored)

Merge run time accounting changes from the vmlocking branch. These make
the LWP "start time" per-thread instead of per-CPU.

Revision 1.121.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:28:43 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.121: +134 -81 lines
Diff to previous 1.121 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.118.6.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:01 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.118.6.1: +139 -86 lines
Diff to previous 1.118.6.1 (colored) to branchpoint 1.118 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Sep 29 12:22:31 2007 UTC (16 years, 6 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-x86pmap-base2
Changes since 1.121: +134 -81 lines
Diff to previous 1.121 (colored) to selected 1.33 (colored)

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

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

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

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

Revision 1.118.2.2 / (download) - annotate - [select for diffs], Mon Sep 10 10:55:59 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.118.2.1: +3 -3 lines
Diff to previous 1.118.2.1 (colored) to branchpoint 1.118 (colored) next main 1.119 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.120 / (download) - annotate - [select for diffs], Thu Sep 6 02:03:06 2007 UTC (16 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored) to selected 1.33 (colored)

uid_find: Destroy mutex before free.
From CID: 4555

Revision 1.98.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:53 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.3: +71 -49 lines
Diff to previous 1.98.2.3 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.116.2.6 / (download) - annotate - [select for diffs], Tue Aug 28 12:32:03 2007 UTC (16 years, 7 months ago) by yamt
Branch: vmlocking
Changes since 1.116.2.5: +4 -3 lines
Diff to previous 1.116.2.5 (colored) to branchpoint 1.116 (colored) to selected 1.33 (colored)

uid_find: IPL_SOFTNET -> IPL_VM for ui_lock for now and add an XXX comment,
to avoid locking order problems with kernel_lock.

Revision 1.116.2.5 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:32 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.116.2.4: +18 -11 lines
Diff to previous 1.116.2.4 (colored) to branchpoint 1.116 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.118.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:09 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.118: +18 -11 lines
Diff to previous 1.118 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.118.6.1 / (download) - annotate - [select for diffs], Thu Aug 9 02:37:19 2007 UTC (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.118: +18 -11 lines
Diff to previous 1.118 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.119 / (download) - annotate - [select for diffs], Wed Aug 8 14:07:11 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.118: +18 -11 lines
Diff to previous 1.118 (colored) to selected 1.33 (colored)

Grab locks in getrusage/getrlimit.

Revision 1.116.2.4 / (download) - annotate - [select for diffs], Sat Jul 14 22:09:43 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.116.2.3: +5 -10 lines
Diff to previous 1.116.2.3 (colored) to branchpoint 1.116 (colored) to selected 1.33 (colored)

Make it possible to track time spent by soft interrupts as is done for
normal LWPs, and provide a sysctl to switch it on/off. Not enabled by
default because microtime() is not free. XXX Not happy with this but
I want it get it out of my local tree for the time being.

Revision 1.116.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:54 2007 UTC (16 years, 8 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.116: +46 -31 lines
Diff to previous 1.116 (colored) next main 1.117 (colored) to selected 1.33 (colored)

Sync with head.

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

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

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

Revision 1.116.2.3 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:21 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.116.2.2: +3 -4 lines
Diff to previous 1.116.2.2 (colored) to branchpoint 1.116 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.117 / (download) - annotate - [select for diffs], Thu May 17 14:51:40 2007 UTC (16 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.116: +3 -4 lines
Diff to previous 1.116 (colored) to selected 1.33 (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.116.2.2 / (download) - annotate - [select for diffs], Sun May 13 17:36:35 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.116.2.1: +34 -19 lines
Diff to previous 1.116.2.1 (colored) to branchpoint 1.116 (colored) to selected 1.33 (colored)

- Pass the error number and residual count to biodone(), and let it handle
  setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
  of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
  create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.

Revision 1.116.2.1 / (download) - annotate - [select for diffs], Wed Mar 21 20:16:31 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.116: +13 -12 lines
Diff to previous 1.116 (colored) to selected 1.33 (colored)

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

Revision 1.113.2.3 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:36 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.113.2.2: +11 -11 lines
Diff to previous 1.113.2.2 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:25 2007 UTC (17 years ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.115: +7 -7 lines
Diff to previous 1.115 (colored) to selected 1.33 (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.115 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:06 2007 UTC (17 years ago) by christos
Branch: MAIN
Changes since 1.114: +6 -6 lines
Diff to previous 1.114 (colored) to selected 1.33 (colored)

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

Revision 1.113.2.2 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:24 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.113.2.1: +3 -3 lines
Diff to previous 1.113.2.1 (colored) to branchpoint 1.113 (colored) to selected 1.33 (colored)

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

Revision 1.98.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:09 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.2: +152 -75 lines
Diff to previous 1.98.2.2 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head.

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

TRUE -> true, FALSE -> false

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

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

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

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

Note: further work will go soon.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:31 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.112: +147 -69 lines
Diff to previous 1.112 (colored) to selected 1.33 (colored)

Merge newlock2 to head.

Revision 1.103.4.12 / (download) - annotate - [select for diffs], Mon Feb 5 16:44:40 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.103.4.11: +7 -7 lines
Diff to previous 1.103.4.11 (colored) to branchpoint 1.103 (colored) next main 1.104 (colored) to selected 1.33 (colored)

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

Revision 1.103.4.11 / (download) - annotate - [select for diffs], Mon Feb 5 13:16:49 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.103.4.10: +63 -41 lines
Diff to previous 1.103.4.10 (colored) to branchpoint 1.103 (colored) to selected 1.33 (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.103.4.10 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:38 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.103.4.9: +7 -7 lines
Diff to previous 1.103.4.9 (colored) to branchpoint 1.103 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.103.4.9 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:41 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.103.4.8: +2 -3 lines
Diff to previous 1.103.4.8 (colored) to branchpoint 1.103 (colored) to selected 1.33 (colored)

Remove support for SA. Ok core@.

Revision 1.103.4.8 / (download) - annotate - [select for diffs], Sat Jan 27 01:14:54 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.103.4.7: +6 -6 lines
Diff to previous 1.103.4.7 (colored) to branchpoint 1.103 (colored) to selected 1.33 (colored)

Drop proclist_mutex and proc::p_smutex back to IPL_VM.

Revision 1.108.2.2 / (download) - annotate - [select for diffs], Sun Jan 21 19:12:10 2007 UTC (17 years, 2 months ago) by bouyer
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.108.2.1: +5 -7 lines
Diff to previous 1.108.2.1 (colored) to branchpoint 1.108 (colored) next main 1.109 (colored) to selected 1.33 (colored)

Pull up following revision(s) (requested by elad in ticket #379):
	sys/secmodel/bsd44/secmodel_bsd44_suser.c: revision 1.33 via patch
	share/examples/secmodel/secmodel_example.c: revision 1.14 via patch
	sys/sys/kauth.h: revision 1.35 via patch
	sys/kern/kern_resource.c: revision 1.112 via patch
	share/man/man9/kauth.9: revision 1.48 via patch
Kill KAUTH_PROCESS_RESOURCE and just replace it with two actions for
nice and rlimit.

Revision 1.112 / (download) - annotate - [select for diffs], Sat Jan 20 16:47:38 2007 UTC (17 years, 2 months ago) by elad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.111: +6 -7 lines
Diff to previous 1.111 (colored) to selected 1.33 (colored)

Kill KAUTH_PROCESS_RESOURCE and just replace it with two actions for
nice and rlimit.

Revision 1.103.4.7 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:06 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.103.4.6: +35 -49 lines
Diff to previous 1.103.4.6 (colored) to branchpoint 1.103 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.98.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:05 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98.2.1: +60 -69 lines
Diff to previous 1.98.2.1 (colored) to branchpoint 1.98 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.103.4.6 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:44 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.103.4.5: +19 -22 lines
Diff to previous 1.103.4.5 (colored) to branchpoint 1.103 (colored) to selected 1.33 (colored)

Checkpoint work in progress.

Revision 1.105.2.3 / (download) - annotate - [select for diffs], Mon Dec 18 11:42:15 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.105.2.2: +35 -49 lines
Diff to previous 1.105.2.2 (colored) to branchpoint 1.105 (colored) next main 1.106 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Dec 14 11:45:08 2006 UTC (17 years, 3 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Changes since 1.110: +35 -49 lines
Diff to previous 1.110 (colored) to selected 1.33 (colored)

- moves 'nice' access semantics to secmodel code,
- makes sysctl_proc_find() just lookup the process,
- use KAUTH_PROCESS_CANSEE requests to determine if the caller is
  allowed to view the target process' corename, stop flags, and
  rlimits,
- use explicit kauth(9) calls with KAUTH_PROCESS_CORENAME,
  KAUTH_REQ_PROCESS_RESOURCE_NICE, KAUTH_REQ_PROCESS_RESOURCE_RLIMIT,
  and KAUTH_PROCESS_STOPFLAG when modifying the aforementioned.
- sync man-page and example skeleton secmodel with reality.

okay yamt@

this is a pullup candidate.

Revision 1.105.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:44 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.105.2.1: +8 -8 lines
Diff to previous 1.105.2.1 (colored) to branchpoint 1.105 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.108.2.1 / (download) - annotate - [select for diffs], Sat Dec 9 11:47:32 2006 UTC (17 years, 3 months ago) by bouyer
Branch: netbsd-4
Changes since 1.108: +1 -1 lines
Diff to previous 1.108 (colored) to selected 1.33 (colored)

Pull up following revision(s) (requested by elad in ticket #257):
	sys/kern/kern_resource.c: revision 1.109
PR/35021: Brian de Alwis: root cannot get/set rlimit information of user
processes through sysctl
Fix inverted logic in boolean assignment. This is why these tests should
not be done outside the secmodel code.
Thanks for the report.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Dec 7 20:04:31 2006 UTC (17 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored) to selected 1.33 (colored)

sysctl_proc_corename(): do the second auth check against the correct
process.

Revision 1.109 / (download) - annotate - [select for diffs], Tue Dec 5 21:30:50 2006 UTC (17 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored) to selected 1.33 (colored)

PR/35021: Brian de Alwis: root cannot get/set rlimit information of user
processes through sysctl

Fix inverted logic in boolean assignment. This is why these tests should
not be done outside the secmodel code.

Thanks for the report.

Revision 1.103.4.5 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:22 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.103.4.4: +15 -13 lines
Diff to previous 1.103.4.4 (colored) to branchpoint 1.103 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.103.4.4 / (download) - annotate - [select for diffs], Fri Nov 17 16:34:36 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.103.4.3: +18 -16 lines
Diff to previous 1.103.4.3 (colored) to branchpoint 1.103 (colored) to selected 1.33 (colored)

Checkpoint work in progress.

Revision 1.108 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (17 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.107: +6 -6 lines
Diff to previous 1.107 (colored) to selected 1.33 (colored)

remove some __unused from function parameters.

Revision 1.103.4.3 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:21 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.103.4.2: +6 -4 lines
Diff to previous 1.103.4.2 (colored) to branchpoint 1.103 (colored) to selected 1.33 (colored)

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

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

sync with head

Revision 1.103.4.2 / (download) - annotate - [select for diffs], Fri Oct 20 21:32:46 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.103.4.1: +44 -14 lines
Diff to previous 1.103.4.1 (colored) to branchpoint 1.103 (colored) to selected 1.33 (colored)

- Update for need_proftick() change.
- Make run time per-LWP and have calcru() compute the whole-process value.
- Minor locking changes.

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

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

Revision 1.106 / (download) - annotate - [select for diffs], Tue Oct 10 10:02:34 2006 UTC (17 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.105: +4 -3 lines
Diff to previous 1.105 (colored) to selected 1.33 (colored)

Use KAUTH_PROCESS_CORENAME instead of checking securelevel.

Revision 1.100.2.3 / (download) - annotate - [select for diffs], Thu Sep 14 12:31:48 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.100.2.2: +13 -12 lines
Diff to previous 1.100.2.2 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Sep 13 10:07:42 2006 UTC (17 years, 6 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Changes since 1.104: +3 -3 lines
Diff to previous 1.104 (colored) to selected 1.33 (colored)

Don't use KAUTH_RESULT_* where it's not applicable.
Prompted by yamt@.

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

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

Revision 1.99.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:16 2006 UTC (17 years, 6 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.99: +81 -61 lines
Diff to previous 1.99 (colored) next main 1.100 (colored) to selected 1.33 (colored)

sync with head

Revision 1.104 / (download) - annotate - [select for diffs], Fri Sep 8 20:58:57 2006 UTC (17 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.103: +13 -12 lines
Diff to previous 1.103 (colored) to selected 1.33 (colored)

First take at security model abstraction.

- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
  opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
  security model, called "bsd44". This is the default (and only) model we
  have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

  * There's a sample overlay model, sitting on-top of "bsd44", for
    fast experimenting with tweaking just a subset of an existing model.

    This is pretty cool because it's *really* straightforward to do stuff
    you had to use ugly hacks for until now...

  * And of course, documentation describing how to do the above for quick
    reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

	http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

  - Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
  - Checks 'securelevel' directly,
  - Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)

Revision 1.100.2.2 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:46 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.100.2.1: +47 -44 lines
Diff to previous 1.100.2.1 (colored) to branchpoint 1.100 (colored) to selected 1.33 (colored)

sync with head

Revision 1.103 / (download) - annotate - [select for diffs], Sun Jul 30 17:38:19 2006 UTC (17 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: newlock2
Changes since 1.102: +6 -3 lines
Diff to previous 1.102 (colored) to selected 1.33 (colored)

ugh.. more stuff that's overdue and should not be in 4.0: remove the
sysctl(9) flags CTLFLAG_READONLY[12]. luckily they're not documented
so it's only half regression.

only two knobs used them; proc.curproc.corename (check added in the
existing handler; its CTLFLAG_ANYWRITE, yay) and net.inet.ip.forwsrcrt,
that got its own handler now too.

Revision 1.102 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:11 2006 UTC (17 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.101: +43 -43 lines
Diff to previous 1.101 (colored) to selected 1.33 (colored)

Use the LWP cached credentials where sane.

Revision 1.98.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:38 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.98: +56 -39 lines
Diff to previous 1.98 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.99.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:08 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.99.6.1: +31 -25 lines
Diff to previous 1.99.6.1 (colored) next main 1.100 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.100.6.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:41 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.100: +29 -23 lines
Diff to previous 1.100 (colored) next main 1.101 (colored) to selected 1.33 (colored)

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

Revision 1.100.2.1 / (download) - annotate - [select for diffs], Wed May 24 10:58:41 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.100: +31 -25 lines
Diff to previous 1.100 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.101 / (download) - annotate - [select for diffs], Sun May 14 21:15:11 2006 UTC (17 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.100: +29 -23 lines
Diff to previous 1.100 (colored) to selected 1.33 (colored)

integrate kauth.

Revision 1.100.4.4 / (download) - annotate - [select for diffs], Sat May 6 23:31:30 2006 UTC (17 years, 10 months ago) by christos
Branch: elad-kernelauth
Changes since 1.100.4.3: +3 -2 lines
Diff to previous 1.100.4.3 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored) to selected 1.33 (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.99.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:59 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.99: +27 -16 lines
Diff to previous 1.99 (colored) to selected 1.33 (colored)

Sync with head.

Revision 1.100.4.3 / (download) - annotate - [select for diffs], Sun Mar 12 23:33:56 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.100.4.2: +9 -13 lines
Diff to previous 1.100.4.2 (colored) to branchpoint 1.100 (colored) to selected 1.33 (colored)

Use kauth_cred_ismember_gid() instead of rolling our own.

Revision 1.100.4.2 / (download) - annotate - [select for diffs], Fri Mar 10 13:53:24 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.100.4.1: +7 -7 lines
Diff to previous 1.100.4.1 (colored) to branchpoint 1.100 (colored) to selected 1.33 (colored)

generic_authorize() -> kauth_authorize_generic().

Revision 1.100.4.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:40 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.100: +32 -23 lines
Diff to previous 1.100 (colored) to selected 1.33 (colored)

Adapt to kernel authorization KPI.

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 15:39:18 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.99: +27 -16 lines
Diff to previous 1.99 (colored) next main 1.100 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.100 / (download) - annotate - [select for diffs], Sat Feb 4 12:09:50 2006 UTC (18 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.99: +27 -16 lines
Diff to previous 1.99 (colored) to selected 1.33 (colored)

for some random places, use PNBUF_GET/PUT rather than
	- on-stack buffer
	- malloc(MAXPATHLEN)

Revision 1.99 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:29 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.98: +2 -2 lines
Diff to previous 1.98 (colored) to selected 1.33 (colored)

merge ktrace-lwp.

Revision 1.71.2.7 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:45 2005 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.6: +28 -49 lines
Diff to previous 1.71.2.6 (colored) next main 1.72 (colored) to selected 1.33 (colored)

Sync with HEAD. Here we go again...

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Sun Sep 18 20:09:50 2005 UTC (18 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.87: +6 -4 lines
Diff to previous 1.87 (colored) next main 1.88 (colored) to selected 1.33 (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.98 / (download) - annotate - [select for diffs], Thu Jun 23 23:15:12 2005 UTC (18 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.97: +16 -45 lines
Diff to previous 1.97 (colored) to selected 1.33 (colored)

Use ANSI function decls.  Apply some static.

Revision 1.97 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.96: +4 -4 lines
Diff to previous 1.96 (colored) to selected 1.33 (colored)

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

Revision 1.96 / (download) - annotate - [select for diffs], Mon May 9 11:10:07 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.95: +9 -9 lines
Diff to previous 1.95 (colored) to selected 1.33 (colored)

lock all uses of uidhash. provide macros to lock and unlock. based on more
discussions with yamt.

Revision 1.95 / (download) - annotate - [select for diffs], Mon May 9 03:27:21 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.94: +5 -2 lines
Diff to previous 1.94 (colored) to selected 1.33 (colored)

Protect chgsbsize() with splsoftnet(). As discussed with yamt.

Revision 1.94 / (download) - annotate - [select for diffs], Sat May 7 17:42:09 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.93: +11 -6 lines
Diff to previous 1.93 (colored) to selected 1.33 (colored)

PR/30154: YAMAMOTO Takashi: tcp_close locking botch
chgsbsize() as mentioned in the PR can be called from an interrupt context
via tcp_close(). Avoid calling uid_find() in chgsbsize().
- Instead of storing so_uid in struct socketvar, store *so_uidinfo
- Add a simple lock to struct uidinfo.

Revision 1.86.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:23 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.86: +37 -63 lines
Diff to previous 1.86 (colored) next main 1.87 (colored) to selected 1.33 (colored)

sync with -current

Revision 1.71.2.6 / (download) - annotate - [select for diffs], Fri Apr 1 14:30:56 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.5: +32 -58 lines
Diff to previous 1.71.2.5 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Mar 29 18:18:06 2005 UTC (19 years ago) by christos
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.92: +2 -6 lines
Diff to previous 1.92 (colored) to selected 1.33 (colored)

Re-enable chgsbsize. It should work now.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Mar 29 15:57:17 2005 UTC (19 years ago) by he
Branch: MAIN
Changes since 1.91: +4 -2 lines
Diff to previous 1.91 (colored) to selected 1.33 (colored)

Properly disable the bulk of chgsbsize(), completing revision 1.84.
This does an #if 0 / #endif, so that no code (or declarations!) are
left after the first "return 1", making this compilable for vax and
playsation2 again, both of which use gcc 2.95.3 or similar.

Revision 1.86.6.2 / (download) - annotate - [select for diffs], Sat Mar 26 18:19:20 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.86.6.1: +32 -56 lines
Diff to previous 1.86.6.1 (colored) to branchpoint 1.86 (colored) next main 1.87 (colored) to selected 1.33 (colored)

sync with head.

Revision 1.91 / (download) - annotate - [select for diffs], Sat Mar 26 05:12:36 2005 UTC (19 years ago) by fvdl
Branch: MAIN
CVS Tags: yamt-km-base4
Changes since 1.90: +6 -4 lines
Diff to previous 1.90 (colored) to selected 1.33 (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.90 / (download) - annotate - [select for diffs], Wed Mar 23 04:01:04 2005 UTC (19 years ago) by christos
Branch: MAIN
Changes since 1.89: +12 -5 lines
Diff to previous 1.89 (colored) to selected 1.33 (colored)

Avoid a possible race during the time we give up our lock in order to
allocate memory. (From yamt)

Revision 1.89 / (download) - annotate - [select for diffs], Wed Mar 23 01:16:44 2005 UTC (19 years ago) by christos
Branch: MAIN
Changes since 1.88: +7 -3 lines
Diff to previous 1.88 (colored) to selected 1.33 (colored)

Don't call malloc with a simple_lock held. Thanks to Greg Oster for pointing
my stupid mistake.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Mar 20 19:15:48 2005 UTC (19 years ago) by christos
Branch: MAIN
Changes since 1.87: +18 -55 lines
Diff to previous 1.87 (colored) to selected 1.33 (colored)

It does not make sense to free the uidinfo struct since it is used now
for multiple things (proccnt,lockcnt,sbsize) and it adds too much code
complexity. Instead add a uid_find() routine that returns the existing
struct or allocates a new one.

Re-enable the sbsize limit code.

Revision 1.86.6.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:11 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.86: +7 -7 lines
Diff to previous 1.86 (colored) to selected 1.33 (colored)

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

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

Sync with HEAD.

Hi Perry!

Revision 1.87 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.86: +7 -7 lines
Diff to previous 1.86 (colored) to selected 1.33 (colored)

nuke trailing whitespace

Revision 1.71.2.4 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:04 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.3: +4 -4 lines
Diff to previous 1.71.2.3 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.86 / (download) - annotate - [select for diffs], Fri Oct 1 16:30:54 2004 UTC (19 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.85: +4 -4 lines
Diff to previous 1.85 (colored) to selected 1.33 (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.71.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:07 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.2: +2 -2 lines
Diff to previous 1.71.2.2 (colored) to selected 1.33 (colored)

Fix the sync with head I botched.

Revision 1.71.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:03 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71.2.1: +0 -0 lines
Diff to previous 1.71.2.1 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.71.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:51 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.71: +447 -27 lines
Diff to previous 1.71 (colored) to selected 1.33 (colored)

Sync with HEAD

Revision 1.85 / (download) - annotate - [select for diffs], Thu May 13 17:56:14 2004 UTC (19 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.84: +3 -2 lines
Diff to previous 1.84 (colored) to selected 1.33 (colored)

KNF previous.

Revision 1.84 / (download) - annotate - [select for diffs], Thu May 13 17:43:11 2004 UTC (19 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.83: +8 -4 lines
Diff to previous 1.83 (colored) to selected 1.33 (colored)

Disable chgsbsize. It is not MPSAFE

Revision 1.83 / (download) - annotate - [select for diffs], Thu May 6 22:20:30 2004 UTC (19 years, 10 months ago) by pk
Branch: MAIN
Changes since 1.82: +38 -27 lines
Diff to previous 1.82 (colored) to selected 1.33 (colored)

Provide a mutex for the process limits data structure.

Revision 1.82 / (download) - annotate - [select for diffs], Sat May 1 06:17:26 2004 UTC (19 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.81: +5 -2 lines
Diff to previous 1.81 (colored) to selected 1.33 (colored)

Commons are not allowed in header files.  extern them and declare them in
the appropriate .c file.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Apr 25 22:18:08 2004 UTC (19 years, 11 months ago) by kleink
Branch: MAIN
Changes since 1.80: +4 -4 lines
Diff to previous 1.80 (colored) to selected 1.33 (colored)

POSIX-2001: Change the `who' argument to [gs]etpriority(2) from int
to id_t.  Partially addressing PR standards/25216 from Murray Armfield.

Revision 1.80 / (download) - annotate - [select for diffs], Fri Apr 23 02:13:29 2004 UTC (19 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.79: +4 -4 lines
Diff to previous 1.79 (colored) to selected 1.33 (colored)

chgsbsize: correct limit check and ui_sbsize calculation.
ok'ed by Christos Zoulas.

Revision 1.76.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 04:27:38 2004 UTC (19 years, 11 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Changes since 1.76: +20 -11 lines
Diff to previous 1.76 (colored) next main 1.77 (colored) to selected 1.33 (colored)

Pullup rev 1.78 (requested by atatat in ticket #93)

Lots of sysctl descriptions mostly copied from sysctl(3).

Revision 1.79 / (download) - annotate - [select for diffs], Sat Apr 17 15:15:29 2004 UTC (19 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.78: +96 -2 lines
Diff to previous 1.78 (colored) to selected 1.33 (colored)

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

Revision 1.78 / (download) - annotate - [select for diffs], Thu Apr 8 06:20:30 2004 UTC (19 years, 11 months ago) by atatat
Branch: MAIN
Changes since 1.77: +20 -11 lines
Diff to previous 1.77 (colored) to selected 1.33 (colored)

Lots of sysctl descriptions (if someone wants to help out here, that
would be good) mostly copied from sysctl(3).  This takes care of the
top-level, most of kern.* and hw.* (modulo the ath and bge stuff), and
all of proc.*.

If you don't want the added rodata in your kernel, use "options
SYSCTL_NO_DESCR" in your kernel config.

Revision 1.77 / (download) - annotate - [select for diffs], Sun Apr 4 18:22:44 2004 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.76: +2 -4 lines
Diff to previous 1.76 (colored) to selected 1.33 (colored)

We use maxdmap and maxsmap, so remove comment questioning that.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:53 2004 UTC (20 years ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.75: +22 -12 lines
Diff to previous 1.75 (colored) to selected 1.33 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.75 / (download) - annotate - [select for diffs], Sat Dec 6 04:25:57 2003 UTC (20 years, 3 months ago) by atatat
Branch: MAIN
Changes since 1.74: +2 -6 lines
Diff to previous 1.74 (colored) to selected 1.33 (colored)

Don't need those any more

Revision 1.74 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:23 2003 UTC (20 years, 3 months ago) by atatat
Branch: MAIN
Changes since 1.73: +300 -2 lines
Diff to previous 1.73 (colored) to selected 1.33 (colored)

Dynamic sysctl.

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

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

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

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

Revision 1.73 / (download) - annotate - [select for diffs], Sun Aug 24 17:52:47 2003 UTC (20 years, 7 months ago) by chs
Branch: MAIN
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored) to selected 1.33 (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.72 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:48 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.71: +3 -7 lines
Diff to previous 1.71 (colored) to selected 1.33 (colored)

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

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

Revision 1.71 / (download) - annotate - [select for diffs], Fri May 16 14:25:03 2003 UTC (20 years, 10 months ago) by itojun
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.70: +6 -5 lines
Diff to previous 1.70 (colored) to selected 1.33 (colored)

use strlcpy.  [fixed off-by-one in subr_prop.c]

Revision 1.70 / (download) - annotate - [select for diffs], Fri Mar 14 21:38:26 2003 UTC (21 years ago) by dsl
Branch: MAIN
Changes since 1.69: +13 -24 lines
Diff to previous 1.69 (colored) to selected 1.33 (colored)

cpu times were miscalculated because 'usecs' could go -ve...
There is still a problem that 'st = (u * st) / tot;' can overflow,
but that is harder to fix, and requires cpu times of ~5days.
(approved by christos)

Revision 1.69 / (download) - annotate - [select for diffs], Wed Mar 5 11:44:01 2003 UTC (21 years ago) by dsl
Branch: MAIN
Changes since 1.68: +23 -14 lines
Diff to previous 1.68 (colored) to selected 1.33 (colored)

Apportion execution time evenly between stime and utime when the process
hasn't been interrupted by any profiling interrupts.
Collect time from all active LWPs.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:29 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.67: +69 -29 lines
Diff to previous 1.67 (colored) to selected 1.33 (colored)

Merge the nathanw_sa branch.

Revision 1.67.2.1 / (download) - annotate - [select for diffs], Wed Dec 18 01:06:11 2002 UTC (21 years, 3 months ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.67: +11 -11 lines
Diff to previous 1.67 (colored) next main 1.68 (colored) to selected 1.33 (colored)

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

Revision 1.60.4.3 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:09 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.60.4.2: +8 -8 lines
Diff to previous 1.60.4.2 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored) to selected 1.33 (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.57.2.2 / (download) - annotate - [select for diffs], Thu Oct 3 05:19:43 2002 UTC (21 years, 5 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.57.2.1: +3 -3 lines
Diff to previous 1.57.2.1 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored) to selected 1.33 (colored)

backout previous.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Oct 3 05:18:59 2002 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: gmcgarry_ucred
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored) to selected 1.33 (colored)

backout previous; (u_int) cast makes checks negative case too

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Thu Oct 3 05:01:16 2002 UTC (21 years, 5 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored) to selected 1.33 (colored)

sys/kern/kern_resource.c			1.65-1.66

  Check negative args to set/getrlimit.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Oct 3 04:57:39 2002 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored) to selected 1.33 (colored)

check negative arg.  from openbsd

Revision 1.65 / (download) - annotate - [select for diffs], Thu Oct 3 04:52:51 2002 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored) to selected 1.33 (colored)

check negative arg.  from openbsd

Revision 1.60.2.7 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:09 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.60.2.6: +6 -6 lines
Diff to previous 1.60.2.6 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored) to selected 1.33 (colored)

Catch up to -current.

Revision 1.60.4.2 / (download) - annotate - [select for diffs], Fri Sep 6 08:47:55 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.60.4.1: +4 -4 lines
Diff to previous 1.60.4.1 (colored) to branchpoint 1.60 (colored) to selected 1.33 (colored)

sync kqueue branch with HEAD

Revision 1.64 / (download) - annotate - [select for diffs], Wed Sep 4 01:32:34 2002 UTC (21 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.63: +8 -8 lines
Diff to previous 1.63 (colored) to selected 1.33 (colored)

Use the queue macros from <sys/queue.h> instead of referring to the queue
members directly.  Use *_FOREACH whenever possible.

Revision 1.62.8.1 / (download) - annotate - [select for diffs], Thu Aug 29 05:23:08 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored) next main 1.63 (colored) to selected 1.33 (colored)

catch up with -current.

Revision 1.60.2.6 / (download) - annotate - [select for diffs], Tue Aug 27 23:47:25 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.5: +4 -4 lines
Diff to previous 1.60.2.5 (colored) to branchpoint 1.60 (colored) to selected 1.33 (colored)

Catch up to -current.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Aug 25 21:44:13 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored) to selected 1.33 (colored)

Fix signed/unsigned comparison warning from GCC 3.3.

Revision 1.60.2.5 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:18 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.4: +2 -3 lines
Diff to previous 1.60.2.4 (colored) to branchpoint 1.60 (colored) to selected 1.33 (colored)

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

Revision 1.60.2.4 / (download) - annotate - [select for diffs], Wed May 29 21:33:12 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.3: +3 -2 lines
Diff to previous 1.60.2.3 (colored) to branchpoint 1.60 (colored) to selected 1.33 (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.60.4.1 / (download) - annotate - [select for diffs], Thu Jan 10 19:59:54 2002 UTC (22 years, 2 months ago) by thorpej
Branch: kqueue
Changes since 1.60: +24 -6 lines
Diff to previous 1.60 (colored) to selected 1.33 (colored)

Sync kqueue branch with -current.

Revision 1.60.2.3 / (download) - annotate - [select for diffs], Tue Jan 8 00:32:34 2002 UTC (22 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.2: +22 -7 lines
Diff to previous 1.60.2.2 (colored) to branchpoint 1.60 (colored) to selected 1.33 (colored)

Catch up to -current.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Nov 23 18:56:33 2001 UTC (22 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.61: +22 -7 lines
Diff to previous 1.61 (colored) to selected 1.33 (colored)

Two changes to setrlimit(2):
* return EINVAL if specified current limit exceeds specified hard limit.
  This behaviour is required by SUSv2 (noted by Giles Lean on tech-kern)
* return EINVAL if an attempt is made to lower stack size limit below
  current usage; this addresses bin/3045 by Jason Thorpe, and conforms to SUSv2

Revision 1.60.2.2 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:37 2001 UTC (22 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.1: +4 -1 lines
Diff to previous 1.60.2.1 (colored) to branchpoint 1.60 (colored) to selected 1.33 (colored)

Catch up to -current.

Revision 1.60.8.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:49 2001 UTC (22 years, 4 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.60: +4 -1 lines
Diff to previous 1.60 (colored) next main 1.61 (colored) to selected 1.33 (colored)

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

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

add RCSIDs

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:41 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.60: +68 -28 lines
Diff to previous 1.60 (colored) to selected 1.33 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.53.2.2 / (download) - annotate - [select for diffs], Sun Feb 11 19:16:47 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.53.2.1: +10 -2 lines
Diff to previous 1.53.2.1 (colored) to branchpoint 1.53 (colored) next main 1.54 (colored) to selected 1.33 (colored)

Sync with HEAD.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Feb 6 19:54:43 2001 UTC (23 years, 1 month ago) by eeh
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache, nathanw_sa, kqueue
Changes since 1.59: +10 -2 lines
Diff to previous 1.59 (colored) to selected 1.33 (colored)

Move maxdmap and maxsmap where they belong and make them big enough.

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:03 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.53: +39 -33 lines
Diff to previous 1.53 (colored) to selected 1.33 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.59 / (download) - annotate - [select for diffs], Sun Aug 20 21:50:11 2000 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.58: +4 -1 lines
Diff to previous 1.58 (colored) to selected 1.33 (colored)

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it).  Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:25 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.57: +1 -3 lines
Diff to previous 1.57 (colored) to selected 1.33 (colored)

remove include of <vm/vm.h>

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:09:09 2000 UTC (23 years, 9 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.56: +5 -6 lines
Diff to previous 1.56 (colored) next main 1.57 (colored) to selected 1.33 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.57 / (download) - annotate - [select for diffs], Wed May 31 05:02:32 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.56: +5 -6 lines
Diff to previous 1.56 (colored) to selected 1.33 (colored)

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

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

Revision 1.56 / (download) - annotate - [select for diffs], Fri May 26 21:20:30 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.55: +9 -3 lines
Diff to previous 1.55 (colored) to selected 1.33 (colored)

First sweep at scheduler state cleanup.  Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.

Revision 1.55 / (download) - annotate - [select for diffs], Fri May 26 00:36:52 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored) to selected 1.33 (colored)

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor.  Test against SONPROC as appropriate rather than
combinations of SRUN and curproc.  Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:12 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.53: +28 -28 lines
Diff to previous 1.53 (colored) to selected 1.33 (colored)

Get rid of register declarations.

Revision 1.53 / (download) - annotate - [select for diffs], Tue Sep 28 14:47:03 1999 UTC (24 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Changes since 1.52: +27 -7 lines
Diff to previous 1.52 (colored) to selected 1.33 (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.50.4.1 / (download) - annotate - [select for diffs], Mon Aug 2 22:19:13 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.50: +5 -1 lines
Diff to previous 1.50 (colored) next main 1.51 (colored) to selected 1.33 (colored)

Update from trunk.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Jul 25 06:30:34 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored) to selected 1.33 (colored)

Turn the proclist lock into a read/write spinlock.  Update proclist locking
calls to reflect this.  Also, block statclock rather than softclock during
in the proclist locking functions, to address a problem reported on
current-users by Sean Doran.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Jul 22 21:08:31 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.50: +5 -1 lines
Diff to previous 1.50 (colored) to selected 1.33 (colored)

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

PID allocation is now MP-safe.

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

Revision 1.50 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:23 1999 UTC (25 years ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.49: +1 -10 lines
Diff to previous 1.49 (colored) to selected 1.33 (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.49 / (download) - annotate - [select for diffs], Mon Aug 31 23:53:19 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored) to selected 1.33 (colored)

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

Revision 1.48 / (download) - annotate - [select for diffs], Thu Aug 13 02:10:57 1998 UTC (25 years, 7 months ago) by eeh
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored) to selected 1.33 (colored)

Merge paddr_t changes into the main branch.

Revision 1.45.2.2 / (download) - annotate - [select for diffs], Sat Aug 8 03:06:55 1998 UTC (25 years, 7 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.45.2.1: +4 -4 lines
Diff to previous 1.45.2.1 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored) to selected 1.33 (colored)

Revert cdevsw mmap routines to return int.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:13 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored) to selected 1.33 (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.46 / (download) - annotate - [select for diffs], Fri Jul 31 22:50:50 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.45: +4 -4 lines
Diff to previous 1.45 (colored) to selected 1.33 (colored)

fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Thu Jul 30 14:04:04 1998 UTC (25 years, 8 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored) to selected 1.33 (colored)

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

Revision 1.45 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:29 1998 UTC (26 years, 1 month ago) by fvdl
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.44: +4 -3 lines
Diff to previous 1.44 (colored) to selected 1.33 (colored)

Merge with Lite2 + local changes

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

Import 4.4BSD-Lite2

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

Import 4.4BSD-Lite for reference

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

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

Revision 1.43 / (download) - annotate - [select for diffs], Thu Feb 5 07:59:53 1998 UTC (26 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.42: +12 -3 lines
Diff to previous 1.42 (colored) to selected 1.33 (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.42 / (download) - annotate - [select for diffs], Wed Oct 15 17:04:02 1997 UTC (26 years, 5 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
Changes since 1.41: +10 -8 lines
Diff to previous 1.41 (colored) to selected 1.33 (colored)

Adjust u_int arguments of some system calls to int, to match user-level
prototypes.

Revision 1.39.10.1 / (download) - annotate - [select for diffs], Tue Oct 14 10:26:01 1997 UTC (26 years, 5 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.39: +14 -8 lines
Diff to previous 1.39 (colored) next main 1.40 (colored) to selected 1.33 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Oct 9 01:07:46 1997 UTC (26 years, 5 months ago) by enami
Branch: MAIN
CVS Tags: marc-pcmcia-base
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored) to selected 1.33 (colored)

Cosmetic changes;

- indent continuation line by four columns.
- delete whitespace after cast.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Oct 9 01:04:13 1997 UTC (26 years, 5 months ago) by enami
Branch: MAIN
Changes since 1.39: +12 -6 lines
Diff to previous 1.39 (colored) to selected 1.33 (colored)

- round up requested soft stack limit by vm page size.
- don't round up size and truncate addr.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Dec 22 10:21:09 1996 UTC (27 years, 3 months ago) by cgd
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, thorpej-setroot, mrg-vm-swap, marc-pcmcia-bp, is-newarp-before-merge, is-newarp-base, is-newarp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.38: +6 -8 lines
Diff to previous 1.38 (colored) to selected 1.33 (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.34.4.3 / (download) - annotate - [select for diffs], Wed Dec 11 09:24:09 1996 UTC (27 years, 3 months ago) by mycroft
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.34.4.2: +5 -1 lines
Diff to previous 1.34.4.2 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored) to selected 1.33 (colored)

From trunk:
Don't allow negative limits

Revision 1.38 / (download) - annotate - [select for diffs], Wed Oct 23 07:19:38 1996 UTC (27 years, 5 months ago) by matthias
Branch: MAIN
Changes since 1.37: +5 -1 lines
Diff to previous 1.37 (colored) to selected 1.33 (colored)

* In dosetrlimit ensure that rlim_cur and rlim_max are >0. Otherwise
the kernel might crash due to invalid values passed to setrlimit.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Oct 2 18:05:03 1996 UTC (27 years, 6 months ago) by ws
Branch: MAIN
Changes since 1.36: +5 -4 lines
Diff to previous 1.36 (colored) to selected 1.33 (colored)

Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.

Revision 1.34.4.2 / (download) - annotate - [select for diffs], Thu Jul 11 00:46:04 1996 UTC (27 years, 8 months ago) by jtc
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-RELEASE
Changes since 1.34.4.1: +2 -2 lines
Diff to previous 1.34.4.1 (colored) to branchpoint 1.34 (colored) to selected 1.33 (colored)

Pulled up from rev 1.36

Revision 1.36 / (download) - annotate - [select for diffs], Thu Jul 11 00:09:29 1996 UTC (27 years, 8 months ago) by jtc
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored) to selected 1.33 (colored)

Used signed instead of unsigned longs for sec and usec variables to
handle cases which would otherwise yeild wildly wrong results.

Revision 1.34.4.1 / (download) - annotate - [select for diffs], Thu Jun 13 23:31:14 1996 UTC (27 years, 9 months ago) by jtc
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-BETA
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored) to selected 1.33 (colored)

Pulled up from revision 1.35.
Cast `sec' to a u_quad_t in `sec * 1000000 + usec' so the expression
is computed with quad integer arithmetic (so it won't overflow after
4294 seconds).

Revision 1.35 / (download) - annotate - [select for diffs], Thu Jun 13 23:22:22 1996 UTC (27 years, 9 months ago) by jtc
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored) to selected 1.33 (colored)

Cast `sec' to a u_quad_t in `sec * 1000000 + usec' so the expression
is computed with quad integer arithmetic (so it won't overflow after
4294 seconds).

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

More proto fixes

Revision 1.33 / (download) - annotate - [selected], Sun Feb 4 02:16:02 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.32: +5 -7 lines
Diff to previous 1.32 (colored)

First pass at prototyping

Revision 1.32 / (download) - annotate - [select for diffs], Sat Dec 9 04:09:34 1995 UTC (28 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.31: +17 -7 lines
Diff to previous 1.31 (colored) to selected 1.33 (colored)

Add a limfree(), and use it.

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

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

Revision 1.30 / (download) - annotate - [select for diffs], Tue Sep 19 21:45:04 1995 UTC (28 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +26 -21 lines
Diff to previous 1.29 (colored) to selected 1.33 (colored)

Make system calls conform to a standard prototype and bring those
prototypes into scope.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jun 24 20:34:03 1995 UTC (28 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.28: +1 -51 lines
Diff to previous 1.28 (colored) to selected 1.33 (colored)

Extracted all of the compat_xxx routines, and created a library [libcompat]
for them. There are a few #ifdef COMPAT_XX remaining, but they are not easy
or worth eliminating (yet).

Revision 1.28 / (download) - annotate - [select for diffs], Wed May 10 16:52:57 1995 UTC (28 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.27: +4 -3 lines
Diff to previous 1.27 (colored) to selected 1.33 (colored)

tty_tb.c:   need to include ioctl_compat.h in order to compile.
sysv_shm.c: make shm_find_segment_by_shmid global so it can be used by
	    COMPAT_HPUX. There should be a better way...
rest: Add #ifdef COMPAT_HPUX where needed

Revision 1.27 / (download) - annotate - [select for diffs], Tue Mar 21 13:33:51 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored) to selected 1.33 (colored)

Update to use timer{add,sub}().

Revision 1.26 / (download) - annotate - [select for diffs], Sun Mar 5 20:48:15 1995 UTC (29 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.25: +4 -3 lines
Diff to previous 1.25 (colored) to selected 1.33 (colored)

Two more "|| defined(COMPAT_LINUX)" that I somehow missed first time around.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Dec 24 15:07:29 1994 UTC (29 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.24: +14 -1 lines
Diff to previous 1.24 (colored) to selected 1.33 (colored)

various cleanups for -Wall.  some inspired by James Jegers.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Dec 11 18:06:09 1994 UTC (29 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored) to selected 1.33 (colored)

Use __timer{add,sub}(), not timeval{add,sub}().  Remove the latter completely.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Nov 17 20:27:10 1994 UTC (29 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored) to selected 1.33 (colored)

Added ifdef COMPAT_SVR4 to the kernel compat code needed.

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

update for new syscall args description mechanism

Revision 1.21 / (download) - annotate - [select for diffs], Tue Aug 30 03:05:40 1994 UTC (29 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +6 -8 lines
Diff to previous 1.20 (colored) to selected 1.33 (colored)

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

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jun 29 06:32:39 1994 UTC (29 years, 9 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.19: +3 -2 lines
Diff to previous 1.19 (colored) to selected 1.33 (colored)

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

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 19 08:13:22 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.18: +39 -46 lines
Diff to previous 1.18 (colored) to selected 1.33 (colored)

update to 4.4-Lite, with some local changes

Revision 1.18 / (download) - annotate - [select for diffs], Wed May 18 05:12:39 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.17: +1 -3 lines
Diff to previous 1.17 (colored) to selected 1.33 (colored)

mostly-machine-indepedent switch, and changes to match.  also, hack init_main

Revision 1.17 / (download) - annotate - [select for diffs], Tue May 17 04:21:59 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.16: +487 -1 lines
Diff to previous 1.16 (colored) to selected 1.33 (colored)

copyright foo

Revision 1.16 / (download) - annotate - [select for diffs], Thu May 5 09:07:18 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 (colored) to selected 1.33 (colored)

Now setpri() is really toast.

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

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

Revision 1.14 / (download) - annotate - [select for diffs], Wed May 4 01:38:44 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.13: +1 -1 lines
Diff to previous 1.13 (colored) to selected 1.33 (colored)

expand the rlimit struct, kill last vestiges of off_t bogosity.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Apr 25 09:51:56 1994 UTC (29 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12 (colored) to selected 1.33 (colored)

minor cleanup

Revision 1.12 / (download) - annotate - [select for diffs], Sat Dec 18 04:21:05 1993 UTC (30 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +1 -1 lines
Diff to previous 1.11 (colored) to selected 1.33 (colored)

Canonicalize all #includes.

Revision 1.9.2.4 / (download) - annotate - [select for diffs], Fri Dec 10 07:22:35 1993 UTC (30 years, 3 months ago) by cgd
Branch: magnum
Changes since 1.9.2.3: +1 -1 lines
Diff to previous 1.9.2.3 (colored) next main 1.10 (colored) to selected 1.33 (colored)

update from trunk

Revision 1.11 / (download) - annotate - [select for diffs], Fri Dec 10 07:19:16 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.10: +1 -1 lines
Diff to previous 1.10 (colored) to selected 1.33 (colored)

dtrt with 'error' in setpriority()

Revision 1.9.2.3 / (download) - annotate - [select for diffs], Sun Nov 14 20:32:06 1993 UTC (30 years, 4 months ago) by mycroft
Branch: magnum
Changes since 1.9.2.2: +1 -1 lines
Diff to previous 1.9.2.2 (colored) to selected 1.33 (colored)

Canonicalize all #includes.

Revision 1.9.2.2 / (download) - annotate - [select for diffs], Thu Sep 30 17:04:01 1993 UTC (30 years, 6 months ago) by deraadt
Branch: magnum
Changes since 1.9.2.1: +1 -1 lines
Diff to previous 1.9.2.1 (colored) to selected 1.33 (colored)

calcru() calculates times from ticks.

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Fri Sep 24 08:51:15 1993 UTC (30 years, 6 months ago) by mycroft
Branch: magnum
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored) to selected 1.33 (colored)

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

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

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

Revision 1.9 / (download) - annotate - [select for diffs], Sat Sep 4 00:37:54 1993 UTC (30 years, 7 months ago) by cgd
Branch: MAIN
Branch point for: magnum
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored) to selected 1.33 (colored)

get rid of maxdmap, and seperate MAXDSIZ and MAXSSIZ in rlimit checking.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Aug 23 16:04:09 1993 UTC (30 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored) to selected 1.33 (colored)

RLIMIT_OFILE --> RLIMIT_NOFILE

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 13 22:13:25 1993 UTC (30 years, 8 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.6: +1 -1 lines
Diff to previous 1.6 (colored) to selected 1.33 (colored)

break args structs out, into syscallname_args structs, so gcc2 doesn't
whine so much.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:42 1993 UTC (30 years, 9 months ago) by andrew
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored) to selected 1.33 (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.5 / (download) - annotate - [select for diffs], Wed Jun 2 23:46:28 1993 UTC (30 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored) to selected 1.33 (colored)

two fixes from ws:
	if resource cur/max limits hosed, fix
	copy the correct amount from the rusage struct

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jun 1 04:52:42 1993 UTC (30 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored) to selected 1.33 (colored)

break before letting child run, if tracing, and do the right
thing with stack limits

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

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

Revision 1.2 / (download) - annotate - [select for diffs], Sun Apr 4 04:32:16 1993 UTC (31 years ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored) to selected 1.33 (colored)

now uses `maxfdescs' to bound `openfiles' resource limit.

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

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: MAIN
Diff to selected 1.33 (colored)

Initial revision

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




CVSweb <webmaster@jp.NetBSD.org>