The NetBSD Project

CVS log for src/sys/uvm/uvm_mmap.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.184 / (download) - annotate - [select for diffs], Thu Jul 7 11:29:18 2022 UTC (6 months, 3 weeks ago) by rin
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.183: +4 -4 lines
Diff to previous 1.183 (colored)

Convert CTASSERT(9) for PAGE_{SIZE,MASK} into KASSERT(9).

They are not compile-time constants for sparc.

Revision 1.183 / (download) - annotate - [select for diffs], Wed Jul 6 01:12:46 2022 UTC (6 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.182: +4 -2 lines
Diff to previous 1.182 (colored)

uvm(9): fo_mmap caller guarantees positive size.

No functional change intended, just sprinkling assertions to make it
clearer.

Revision 1.182 / (download) - annotate - [select for diffs], Wed Jul 6 00:40:28 2022 UTC (6 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.181: +4 -2 lines
Diff to previous 1.181 (colored)

mmap(2): Assert size != 0 in non-anonymous case.

This is guaranteed by a test earlier; adding the assertion just makes
it clearer that it applies to the branch where we call fo_mmap -- no
functional change intended.

Revision 1.181 / (download) - annotate - [select for diffs], Wed Jul 6 00:40:16 2022 UTC (6 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.180: +16 -12 lines
Diff to previous 1.180 (colored)

mmap(2): Avoid overflow in rounding and checking size.

Revision 1.180 / (download) - annotate - [select for diffs], Sat Jun 4 20:54:03 2022 UTC (7 months, 4 weeks ago) by riastradh
Branch: MAIN
Changes since 1.179: +35 -6 lines
Diff to previous 1.179 (colored)

mmap(2): If we fail with a hint, try again without it.

`Hint' here means nonzero addr, but no MAP_FIXED or MAP_TRYFIXED.

This is suboptimal -- we could teach uvm_mmap to do a fancier search
using the address as a hint.  But this should do for now.

Candidate fix for PR kern/55533.

Revision 1.179 / (download) - annotate - [select for diffs], Tue Apr 19 22:53:34 2022 UTC (9 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.178: +4 -22 lines
Diff to previous 1.178 (colored)

Revert "mmap(2): If we fail with a hint, try again without it."

This doesn't work, because uvm_mmap releases the uobj when it fails.
Should factor this more coherently, but let's just revert for now.

Reported-by: syzbot+d347c8951821b236117a@syzkaller.appspotmail.com
Reported-by: syzbot+7643d1b769fdfa18c3b2@syzkaller.appspotmail.com
Reported-by: syzbot+44f4b39671dd580cba5c@syzkaller.appspotmail.com
Reported-by: syzbot+b5a422299ca4ffe8570c@syzkaller.appspotmail.com
Reported-by: syzbot+22681822db67b6e90cfb@syzkaller.appspotmail.com
Reported-by: syzbot+e59f493ceef72b925a17@syzkaller.appspotmail.com
Reported-by: syzbot+666f3fe8364f47e8641b@syzkaller.appspotmail.com
Reported-by: syzbot+511d4572f52f1fd9b5cc@syzkaller.appspotmail.com

Revision 1.178 / (download) - annotate - [select for diffs], Tue Apr 19 01:34:52 2022 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.177: +22 -4 lines
Diff to previous 1.177 (colored)

mmap(2): If we fail with a hint, try again without it.

`Hint' here means nonzero addr, but no MAP_FIXED or MAP_TRYFIXED.

This is suboptimal -- we could teach uvm_mmap to do a fancier search
using the address as a hint.  But this should do for now.

Candidate fix for PR kern/55533.

ok chs@

Revision 1.177 / (download) - annotate - [select for diffs], Sun Mar 27 20:18:05 2022 UTC (10 months ago) by hannken
Branch: MAIN
Changes since 1.176: +5 -2 lines
Diff to previous 1.176 (colored)

Make mmap() with "len == 0" an error if not MAP_ANON.  We should return
an error for MAP_ANON too but unfortunately our /libexec/ld.elf_so
sometimes creates an empty anon mapping for the bss of a shared library.

At least FreeBSD and Solaris return this error too and according to POSIX
"If len is zero, mmap() shall fail and no mapping shall be established".

Fixes PR pkg/56338 Installing qt5-qtdeclarative leaves a dangling reference

The dangling reference here originates from vn_mmap() taking a vnode
reference for this empty mapping that will never be released.

Revision 1.175.10.1 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:45 2021 UTC (18 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.175: +3 -2 lines
Diff to previous 1.175 (colored) next main 1.176 (colored)

Sync with HEAD.

Revision 1.176 / (download) - annotate - [select for diffs], Wed Jul 21 06:35:45 2021 UTC (18 months, 1 week ago) by skrll
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.175: +3 -2 lines
Diff to previous 1.175 (colored)

need <sys/param.h> for COHERENCY_UNIT

Minor KNF along the way.

Revision 1.169.4.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:21 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.169.4.2: +3 -2 lines
Diff to previous 1.169.4.2 (colored) to branchpoint 1.169 (colored) next main 1.170 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.169.4.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:09:04 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.169.4.1: +5 -5 lines
Diff to previous 1.169.4.1 (colored) to branchpoint 1.169 (colored)

Merge changes from current as of 20200406

Revision 1.174.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:11 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.174: +5 -5 lines
Diff to previous 1.174 (colored) next main 1.175 (colored)

Sync with head.

Revision 1.175 / (download) - annotate - [select for diffs], Sun Feb 23 15:46:43 2020 UTC (2 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Branch point for: thorpej-i2c-spi-conf
Changes since 1.174: +5 -5 lines
Diff to previous 1.174 (colored)

UVM locking changes, proposed on tech-kern:

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

Revision 1.172.4.1 / (download) - annotate - [select for diffs], Mon Oct 21 20:17:31 2019 UTC (3 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, netbsd-9-0-RC1
Changes since 1.172: +4 -3 lines
Diff to previous 1.172 (colored) next main 1.173 (colored)

Pull up following revision(s) (requested by maxv in ticket #355):

	sys/uvm/uvm_mmap.c: revision 1.173

Change 'npgs' from int to size_t. Otherwise the 64bit->32bit conversion
could lead to npgs=0, which is not expected. It later triggers a panic
in uvm_vsunlock().
Found by TriforceAFL (Akul Pillai).

Revision 1.174 / (download) - annotate - [select for diffs], Fri Oct 4 22:48:45 2019 UTC (3 years, 3 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.173: +3 -3 lines
Diff to previous 1.173 (colored)

Avoid left shift changing the signedness flag

Reviewed by <mrg>

Reported-by: syzbot+25ac03024cedf27f3368@syzkaller.appspotmail.com

Revision 1.166.2.2 / (download) - annotate - [select for diffs], Sun Aug 11 10:01:14 2019 UTC (3 years, 5 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.166.2.1: +4 -3 lines
Diff to previous 1.166.2.1 (colored) to branchpoint 1.166 (colored) next main 1.167 (colored)

Pull up following revision(s) (requested by maxv in ticket #1332):

	sys/uvm/uvm_mmap.c: revision 1.173

Change 'npgs' from int to size_t. Otherwise the 64bit->32bit conversion
could lead to npgs=0, which is not expected. It later triggers a panic
in uvm_vsunlock().

Found by TriforceAFL (Akul Pillai).

Revision 1.173 / (download) - annotate - [select for diffs], Tue Aug 6 08:10:27 2019 UTC (3 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.172: +4 -3 lines
Diff to previous 1.172 (colored)

Change 'npgs' from int to size_t. Otherwise the 64bit->32bit conversion
could lead to npgs=0, which is not expected. It later triggers a panic
in uvm_vsunlock().

Found by TriforceAFL (Akul Pillai).

Revision 1.169.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:58 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.169: +42 -97 lines
Diff to previous 1.169 (colored)

Sync with HEAD

Revision 1.172 / (download) - annotate - [select for diffs], Sat Apr 6 03:06:29 2019 UTC (3 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.171: +4 -4 lines
Diff to previous 1.171 (colored)

Overhaul the API used to fetch and store individual memory cells in
userspace.  The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms.  The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.

Revision 1.171 / (download) - annotate - [select for diffs], Thu Mar 14 21:09:03 2019 UTC (3 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.170: +40 -103 lines
Diff to previous 1.170 (colored)

unify rounding and range checking.

Revision 1.170 / (download) - annotate - [select for diffs], Thu Mar 14 19:10:04 2019 UTC (3 years, 10 months ago) by kre
Branch: MAIN
Changes since 1.169: +14 -6 lines
Diff to previous 1.169 (colored)

Avoid a panic from the sequence

	mlock(buf, 0);
	munlock(buf, 0);
	mlock(buf, page);
	munlock(buf, page);

where buf is page aligned, and page is actually anything > 0
(but not too big) which will get rounded up to the next multiple
of the page size.

In that sequence, it is possible that the 1st munlock() is optional.

Add a KASSERT() (or two) to detect the first effects of the problem
(without that, or in !DIAGNOSTIC kernels) the problem eventually
causes some kind of problem or other (most often still a panic.)

After this, mlock(anything, 0) (or munlock) validates "anything"
but is otherwise a no-op (regardless of the alignment of anything).

Also, don't treat mlock(buf, verybig) as equivalent to mlock(buf, 0)
which is (more or less) what we had been doing.

XXX pullup -8 (maybe -7 as well, need to check).

Revision 1.169 / (download) - annotate - [select for diffs], Tue Dec 19 18:34:47 2017 UTC (5 years, 1 month ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat
Branch point for: phil-wifi
Changes since 1.168: +2 -21 lines
Diff to previous 1.168 (colored)

Drop SYS_sbrk

sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>

Revision 1.168 / (download) - annotate - [select for diffs], Tue Dec 19 08:48:19 2017 UTC (5 years, 1 month ago) by kamil
Branch: MAIN
Changes since 1.167: +2 -17 lines
Diff to previous 1.167 (colored)

Drop the sstk(2) syscall stub

sstk - change stack section size

This functionality has never been implemented and is a remnant from 16-bit
UNIX. This stub appeared with the first NetBSD commit.

Sponsored by <The NetBSD Foundation>

Revision 1.144.6.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:22 2017 UTC (5 years, 1 month ago) by jdolecek
Branch: tls-maxphys
Changes since 1.144.6.1: +167 -336 lines
Diff to previous 1.144.6.1 (colored) to branchpoint 1.144 (colored) next main 1.145 (colored)

update from HEAD

Revision 1.166.2.1 / (download) - annotate - [select for diffs], Thu Nov 2 21:39:18 2017 UTC (5 years, 2 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.166: +7 -5 lines
Diff to previous 1.166 (colored)

Pull up following revision(s) (requested by christos in ticket #336):
	sys/uvm/uvm_mmap.c: revision 1.167
[syzkaller] Fix for PR #52658 as suggested by riastradh@
The bug was found by Dmitry Vyukov (dvyukov%google.com@localhost)
using syzkaller and was tested by me on a VM running
8.99.5

Revision 1.167 / (download) - annotate - [select for diffs], Fri Oct 27 12:01:08 2017 UTC (5 years, 3 months ago) by utkarsh009
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.166: +7 -5 lines
Diff to previous 1.166 (colored)

[syzkaller] Fix for PR #52658 as suggested by riastradh@

The bug was found by Dmitry Vyukov (dvyukov@google.com)
using syzkaller and was tested by me on a VM running
8.99.5

Revision 1.149.2.8 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:17 2017 UTC (5 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.149.2.7: +12 -24 lines
Diff to previous 1.149.2.7 (colored) to branchpoint 1.149 (colored) next main 1.150 (colored)

Sync with HEAD

Revision 1.166 / (download) - annotate - [select for diffs], Sat May 20 07:27:15 2017 UTC (5 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base
Branch point for: netbsd-8
Changes since 1.165: +3 -3 lines
Diff to previous 1.165 (colored)

MAP_FIXED means something different for mremap() than it does for mmap(),
so we cannot use UVM_FLAG_FIXED to specify both behaviors.
keep UVM_FLAG_FIXED with its earlier meaning (prior to my previous change)
of whether to use uvm_map_findspace() to locate space for the new mapping or
to use the hint address that the caller passed in, and add a new flag
UVM_FLAG_UNMAP to indicate that any existing entries in the range should be
unmapped as part of creating the new mapping.  the new UVM_FLAG_UNMAP flag
may only be used if UVM_FLAG_FIXED is also specified.

Revision 1.165 / (download) - annotate - [select for diffs], Fri May 19 15:30:19 2017 UTC (5 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.164: +3 -4 lines
Diff to previous 1.164 (colored)

make MAP_FIXED mapping operations atomic. fixes PR 52239.
previously, unmapping any entries being replaced was done separately
from entering the new mapping, which allowed another thread doing
a non-MAP_FIXED mapping to allocate the range out from under the
MAP_FIXED thread.

Revision 1.162.6.2 / (download) - annotate - [select for diffs], Thu May 11 02:58:42 2017 UTC (5 years, 8 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.162.6.1: +10 -6 lines
Diff to previous 1.162.6.1 (colored) to branchpoint 1.162 (colored) next main 1.163 (colored)

Sync with HEAD

Revision 1.164 / (download) - annotate - [select for diffs], Sat May 6 21:34:52 2017 UTC (5 years, 8 months ago) by joerg
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2
Changes since 1.163: +10 -6 lines
Diff to previous 1.163 (colored)

Extend the mmap(2) interface to allow requesting protections for later
use with mprotect(2), but without enabling them immediately.

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

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

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

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

Revision 1.162.6.1 / (download) - annotate - [select for diffs], Tue May 2 03:19:22 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.162: +2 -17 lines
Diff to previous 1.162 (colored)

Sync with HEAD - tag prg-localcount2-base1

Revision 1.163 / (download) - annotate - [select for diffs], Sat Apr 29 01:18:35 2017 UTC (5 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base1
Changes since 1.162: +2 -17 lines
Diff to previous 1.162 (colored)

MAP_COPY is handled in compat

Revision 1.149.2.7 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:12 2016 UTC (6 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.149.2.6: +62 -67 lines
Diff to previous 1.149.2.6 (colored) to branchpoint 1.149 (colored)

Sync with HEAD

Revision 1.162 / (download) - annotate - [select for diffs], Tue Aug 9 12:17:04 2016 UTC (6 years, 5 months ago) by kre
Branch: MAIN
CVS Tags: prg-localcount2-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: prg-localcount2
Changes since 1.161: +6 -5 lines
Diff to previous 1.161 (colored)


The only error that can occur from munlock() on NetBSD is ENOMEM.
Make it be that way.

Revision 1.161 / (download) - annotate - [select for diffs], Sun Aug 7 10:07:58 2016 UTC (6 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.160: +49 -55 lines
Diff to previous 1.160 (colored)

KNF a little.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Aug 7 09:55:18 2016 UTC (6 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.159: +9 -9 lines
Diff to previous 1.159 (colored)

Explicitly return syscall-specific error codes, instead of the ones given
by range_test. This fixes msync, mlock and munlock, which all return EINVAL
instead of ENOMEM if the address is not in the va space.

It should also fix the recent ATF failures.

Revision 1.149.2.6 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:25 2016 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.149.2.5: +4 -3 lines
Diff to previous 1.149.2.5 (colored) to branchpoint 1.149 (colored)

Sync with HEAD

Revision 1.159 / (download) - annotate - [select for diffs], Wed Jun 1 12:14:08 2016 UTC (6 years, 8 months ago) by pgoyette
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, nick-nhusb-base-20160907
Changes since 1.158: +4 -3 lines
Diff to previous 1.158 (colored)

Variable rv is always used as a true/false boolen, so set its type
correctly.

From PR kern/46369

Revision 1.149.2.5 / (download) - annotate - [select for diffs], Sun May 29 08:44:40 2016 UTC (6 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.149.2.4: +18 -20 lines
Diff to previous 1.149.2.4 (colored) to branchpoint 1.149 (colored)

Sync with HEAD

Revision 1.158 / (download) - annotate - [select for diffs], Tue May 24 20:20:57 2016 UTC (6 years, 8 months ago) by martin
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.157: +18 -18 lines
Diff to previous 1.157 (colored)

PR kern/50985: use the runtime limits of the vmspace in range_test()
instead of the compile time defaults for it.

Revision 1.157 / (download) - annotate - [select for diffs], Sun May 22 14:26:09 2016 UTC (6 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.156: +2 -4 lines
Diff to previous 1.156 (colored)

reduce #ifdef mess caused by PaX

Revision 1.149.2.4 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:19 2016 UTC (6 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.149.2.3: +3 -8 lines
Diff to previous 1.149.2.3 (colored) to branchpoint 1.149 (colored)

Sync with HEAD

Revision 1.156 / (download) - annotate - [select for diffs], Thu Apr 7 12:07:36 2016 UTC (6 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.155: +2 -5 lines
Diff to previous 1.155 (colored)

remove more ifdefs

Revision 1.155 / (download) - annotate - [select for diffs], Thu Apr 7 03:31:12 2016 UTC (6 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.154: +3 -5 lines
Diff to previous 1.154 (colored)

Add PAX_MPROTECT_DEBUG

Revision 1.149.2.3 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:19 2015 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.149.2.2: +10 -7 lines
Diff to previous 1.149.2.2 (colored) to branchpoint 1.149 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.154 / (download) - annotate - [select for diffs], Thu Nov 26 13:15:34 2015 UTC (7 years, 2 months ago) by martin
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.153: +10 -7 lines
Diff to previous 1.153 (colored)

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

Revision 1.149.2.2 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:17 2015 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.149.2.1: +3 -3 lines
Diff to previous 1.149.2.1 (colored) to branchpoint 1.149 (colored)

Sync with HEAD

Revision 1.153 / (download) - annotate - [select for diffs], Tue Aug 4 18:28:10 2015 UTC (7 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored)

Some changes, to reduce a bit my tech-kern@ patch:
 - move the P_PAX_ flags out of #ifdef PAX_ASLR in pax.h
 - add a generic pax_flags_active() function
 - fix a comment in exec_elf.c; interp is not static
 - KNF for return
 - rename pax_aslr() to pax_aslr_mmap()
 - rename pax_segvguard_cb() to pax_segvguard_cleanup_cb()

Revision 1.149.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:33 2015 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.149: +83 -234 lines
Diff to previous 1.149 (colored)

Sync with HEAD

Revision 1.152 / (download) - annotate - [select for diffs], Sun Mar 1 13:43:51 2015 UTC (7 years, 11 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.151: +10 -6 lines
Diff to previous 1.151 (colored)

Detect overflow when rounding length parameter and return ENOMEM.
Fixes PR kern/49692.

Revision 1.148.4.2 / (download) - annotate - [select for diffs], Sun Jan 11 06:27:40 2015 UTC (8 years ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, 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
Changes since 1.148.4.1: +4 -4 lines
Diff to previous 1.148.4.1 (colored) to branchpoint 1.148 (colored) next main 1.149 (colored)

Pull up following revision(s) (requested by chs in ticket #403):
	sys/uvm/uvm_mmap.c: revision 1.151
in uvm_mmap_dev(), use the passed-in offset instead of 0.
from Onno van der Linden in PR 49536.

Revision 1.151 / (download) - annotate - [select for diffs], Sat Jan 10 23:35:02 2015 UTC (8 years ago) by chs
Branch: MAIN
Changes since 1.150: +4 -4 lines
Diff to previous 1.150 (colored)

in uvm_mmap_dev(), use the passed-in offset instead of 0.
from Onno van der Linden in PR 49536.

Revision 1.148.4.1 / (download) - annotate - [select for diffs], Wed Dec 31 06:44:01 2014 UTC (8 years, 1 month ago) by snj
Branch: netbsd-7
Changes since 1.148: +75 -230 lines
Diff to previous 1.148 (colored)

Pull up following revision(s) (requested by chs in ticket #363):
	common/lib/libprop/prop_kern.c: revision 1.18
	sys/arch/mac68k/dev/grf_compat.c: revision 1.27
	sys/arch/x68k/dev/grf.c: revision 1.45
	sys/external/bsd/drm/dist/bsd-core/drm_bufs.c: revision 1.12
	sys/external/bsd/drm2/drm/drm_drv.c: revision 1.12
	sys/external/bsd/drm2/drm/drm_vm.c: revision 1.6
	sys/external/bsd/drm2/include/linux/mm.h: revision 1.4
	sys/kern/vfs_vnops.c: revision 1.192 via patch
	sys/rump/librump/rumpkern/vm.c: revision 1.160
	sys/sys/file.h: revision 1.78 via patch
	sys/uvm/uvm_device.c: revision 1.64
	sys/uvm/uvm_device.h: revision 1.13
	sys/uvm/uvm_extern.h: revision 1.192
	sys/uvm/uvm_mmap.c: revision 1.150 via patch
add a new "fo_mmap" fileops method to allow use of arbitrary uvm_objects for
mappings of file objects.  move vnode-specific details of mmap()ing a vnode
from uvm_mmap() to the new vnode-specific vn_mmap().  add new uvm_mmap_dev()
and uvm_mmap_anon() convenience functions for mapping character devices
and anonymous memory, and replace all other calls to uvm_mmap() with those.
use the new fileop in drm2 so that libdrm can use mmap() to map things
like on other platforms (instead of the ioctl that we have used so far).

Revision 1.150 / (download) - annotate - [select for diffs], Sun Dec 14 23:48:58 2014 UTC (8 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.149: +75 -230 lines
Diff to previous 1.149 (colored)

add a new "fo_mmap" fileops method to allow use of arbitrary uvm_objects for
mappings of file objects.  move vnode-specific details of mmap()ing a vnode
from uvm_mmap() to the new vnode-specific vn_mmap().  add new uvm_mmap_dev()
and uvm_mmap_anon() convenience functions for mapping character devices
and anonymous memory, and replace all other calls to uvm_mmap() with those.
use the new fileop in drm2 so that libdrm can use mmap() to map things
like on other platforms (instead of the ioctl that we have used so far).

Revision 1.149 / (download) - annotate - [select for diffs], Fri Sep 5 09:24:48 2014 UTC (8 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored)

Use f_vnode instead of f_data

Revision 1.144.6.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:45 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.144: +23 -5 lines
Diff to previous 1.144 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.139.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:41:19 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.139.2.1: +23 -5 lines
Diff to previous 1.139.2.1 (colored) to branchpoint 1.139 (colored) next main 1.140 (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.144.10.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:22 2014 UTC (8 years, 8 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.144: +23 -5 lines
Diff to previous 1.144 (colored) next main 1.145 (colored)

sync with head

Revision 1.148 / (download) - annotate - [select for diffs], Sat Jan 25 17:30:45 2014 UTC (9 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.147: +3 -3 lines
Diff to previous 1.147 (colored)

make this compile.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Jan 25 17:21:49 2014 UTC (9 years ago) by christos
Branch: MAIN
Changes since 1.146: +12 -3 lines
Diff to previous 1.146 (colored)

deal with COMPAT_10 issue.

Revision 1.146 / (download) - annotate - [select for diffs], Sat Jan 25 05:14:03 2014 UTC (9 years ago) by christos
Branch: MAIN
Changes since 1.145: +6 -3 lines
Diff to previous 1.145 (colored)

provide proper defaults for topdown and bottomup allocation.
XXX: Ports that provide their own VM_DEFAULT_ADDRESS() need to provide the
two new flavors, otherwise they get the default ones now.

Revision 1.145 / (download) - annotate - [select for diffs], Wed Sep 11 18:26:14 2013 UTC (9 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.144: +9 -3 lines
Diff to previous 1.144 (colored)

Allow MD code to add aditional checks for mmap(..., MAP_FIXED) address
ranges. This can be used, for example, to avoid not implemented VA-holes,
but we probably need to check in a few more places.

Revision 1.139.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:59 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored)

sync with head

Revision 1.139.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:36:00 2012 UTC (10 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored) next main 1.140 (colored)

merge to -current.

Revision 1.144 / (download) - annotate - [select for diffs], Fri Jan 27 19:48:41 2012 UTC (11 years ago) by para
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, khorben-n900, jmcneill-usbmp-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, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored)

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged

Revision 1.143 / (download) - annotate - [select for diffs], Thu Jan 5 15:19:53 2012 UTC (11 years ago) by reinoud
Branch: MAIN
Changes since 1.142: +2 -21 lines
Diff to previous 1.142 (colored)

Revert MAP_NOSYSCALLS patch.

Revision 1.142 / (download) - annotate - [select for diffs], Thu Dec 22 13:12:50 2011 UTC (11 years, 1 month ago) by reinoud
Branch: MAIN
Changes since 1.141: +4 -6 lines
Diff to previous 1.141 (colored)

Redo uvm_map_setattr() to never fail and remove the possible panic. The
possibility of failure was a C&P error.

Revision 1.141 / (download) - annotate - [select for diffs], Tue Dec 20 19:49:36 2011 UTC (11 years, 1 month ago) by reinoud
Branch: MAIN
Changes since 1.140: +7 -3 lines
Diff to previous 1.140 (colored)

If we need to set the PK_CHKNOSYSCALL flag in struct proc be so nice to first
take the mutex. Tnx for pointing it out to me.

Revision 1.140 / (download) - annotate - [select for diffs], Tue Dec 20 15:39:35 2011 UTC (11 years, 1 month ago) by reinoud
Branch: MAIN
Changes since 1.139: +19 -2 lines
Diff to previous 1.139 (colored)

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

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

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

Revision 1.139 / (download) - annotate - [select for diffs], Fri Oct 14 09:23:31 2011 UTC (11 years, 3 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.138: +6 -4 lines
Diff to previous 1.138 (colored)

Change the vnode locking protocol of VOP_GETATTR() to request at least
a shared lock.  Make all calls outside of file systems respect it.

The calls from file systems need review.

No objections from tech-kern.

Revision 1.138 / (download) - annotate - [select for diffs], Wed Oct 12 00:03:47 2011 UTC (11 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored)

fix an integer promotion bug on 64 bit ports.
(signed + unsigned = unsigned)

Revision 1.137 / (download) - annotate - [select for diffs], Thu Jun 23 23:42:44 2011 UTC (11 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.136: +4 -4 lines
Diff to previous 1.136 (colored)

Allow PAX_ASLR to be used by itself.

Revision 1.135.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:36 2011 UTC (11 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.135: +6 -6 lines
Diff to previous 1.135 (colored) next main 1.136 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.136 / (download) - annotate - [select for diffs], Sun Jun 12 03:36:03 2011 UTC (11 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.135: +6 -6 lines
Diff to previous 1.135 (colored)

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.

Revision 1.133.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:10:23 2011 UTC (11 years, 7 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.133: +3 -10 lines
Diff to previous 1.133 (colored) next main 1.134 (colored)

Sync with HEAD.

Revision 1.132.4.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:15 2011 UTC (11 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.132.4.3: +0 -2 lines
Diff to previous 1.132.4.3 (colored) to branchpoint 1.132 (colored) next main 1.133 (colored)

sync with head

Revision 1.135 / (download) - annotate - [select for diffs], Sat Apr 23 18:14:12 2011 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.134: +2 -4 lines
Diff to previous 1.134 (colored)

Replace "malloc" in comments, remove unnecessary header inclusions.

Revision 1.132.4.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:56:37 2011 UTC (11 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.132.4.2: +3 -8 lines
Diff to previous 1.132.4.2 (colored) to branchpoint 1.132 (colored)

sync with head

Revision 1.133.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:07 2011 UTC (11 years, 11 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.133: +3 -8 lines
Diff to previous 1.133 (colored) next main 1.134 (colored)

Sync with HEAD

Revision 1.134 / (download) - annotate - [select for diffs], Wed Feb 2 20:07:25 2011 UTC (12 years ago) by chuck
Branch: MAIN
CVS Tags: uebayasi-xip-base7, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.133: +3 -8 lines
Diff to previous 1.133 (colored)

udpate license clauses on my code to match the new-style BSD licenses.
verified with Mike Hibler it is ok to remove clause 3 on utah copyright,
as per UCB.
based on diff that rmind@ sent me.

no functional change with this commit.

Revision 1.132.2.1 / (download) - annotate - [select for diffs], Tue Aug 17 06:48:15 2010 UTC (12 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored) next main 1.133 (colored)

Sync with HEAD.

Revision 1.122.4.7 / (download) - annotate - [select for diffs], Wed Aug 11 22:55:16 2010 UTC (12 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.122.4.6: +3 -3 lines
Diff to previous 1.122.4.6 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

sync with head.

Revision 1.132.4.2 / (download) - annotate - [select for diffs], Sat Jul 3 01:20:06 2010 UTC (12 years, 7 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.132.4.1: +3 -3 lines
Diff to previous 1.132.4.1 (colored) to branchpoint 1.132 (colored)

sync with head

Revision 1.133 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:20 2010 UTC (12 years, 7 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored)

Clean up vnode lock operations pass 2:

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

Welcome to 5.99.32.

Discussed on tech-kern.

Revision 1.132.4.1 / (download) - annotate - [select for diffs], Tue Mar 16 15:38:18 2010 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.132: +6 -6 lines
Diff to previous 1.132 (colored)

Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc().  It allows us to share the locks among UVM objects.

Revision 1.122.4.6 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:47 2010 UTC (12 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.122.4.5: +6 -6 lines
Diff to previous 1.122.4.5 (colored) to branchpoint 1.122 (colored)

sync with head

Revision 1.132 / (download) - annotate - [select for diffs], Sun Nov 1 11:16:32 2009 UTC (13 years, 3 months ago) by uebayasi
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.131: +6 -6 lines
Diff to previous 1.131 (colored)

Consistently call amap / uobj layers as upper / lower, because UVM has only
those two layers by design.  Approved by Chuck Cranor some time ago.

Revision 1.122.4.5 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:36 2009 UTC (13 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.122.4.4: +4 -4 lines
Diff to previous 1.122.4.4 (colored) to branchpoint 1.122 (colored)

sync with head.

Revision 1.131 / (download) - annotate - [select for diffs], Tue Aug 18 02:41:31 2009 UTC (13 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.130: +4 -4 lines
Diff to previous 1.130 (colored)

uvm_mmap: remove a dead conditional.

Revision 1.126.12.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:33:04 2009 UTC (13 years, 6 months ago) by jym
Branch: jym-xensuspend
Changes since 1.126.12.1: +21 -17 lines
Diff to previous 1.126.12.1 (colored) to branchpoint 1.126 (colored) next main 1.127 (colored)

Sync with HEAD.

Revision 1.122.4.4 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:38 2009 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.122.4.3: +21 -17 lines
Diff to previous 1.122.4.3 (colored) to branchpoint 1.122 (colored)

sync with head

Revision 1.130 / (download) - annotate - [select for diffs], Wed Jun 10 01:55:33 2009 UTC (13 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.129: +5 -9 lines
Diff to previous 1.129 (colored)

on MADV_WILLNEED, start prefetching backing object's pages.

Revision 1.129 / (download) - annotate - [select for diffs], Sat May 30 04:26:16 2009 UTC (13 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.128: +18 -10 lines
Diff to previous 1.128 (colored)

wrap long lines.

Revision 1.122.4.3 / (download) - annotate - [select for diffs], Sat May 30 04:25:43 2009 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.122.4.2: +8 -16 lines
Diff to previous 1.122.4.2 (colored) to branchpoint 1.122 (colored)

revert the previous, which has been committed to the wrong branch.

Revision 1.122.4.2 / (download) - annotate - [select for diffs], Sat May 30 04:23:20 2009 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.122.4.1: +18 -10 lines
Diff to previous 1.122.4.1 (colored) to branchpoint 1.122 (colored)

wrap long lines.

Revision 1.126.12.1 / (download) - annotate - [select for diffs], Wed May 13 17:23:10 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.126: +12 -29 lines
Diff to previous 1.126 (colored)

Sync with HEAD.

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

Revision 1.122.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:39 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.122: +21 -42 lines
Diff to previous 1.122 (colored)

sync with head.

Revision 1.126.6.1 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:58 2009 UTC (13 years, 9 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.126: +12 -29 lines
Diff to previous 1.126 (colored) next main 1.127 (colored)

Sync with HEAD.

Revision 1.126.8.1 / (download) - annotate - [select for diffs], Wed Apr 1 00:25:23 2009 UTC (13 years, 10 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, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.126: +11 -20 lines
Diff to previous 1.126 (colored) next main 1.127 (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.128 / (download) - annotate - [select for diffs], Sun Mar 29 01:02:51 2009 UTC (13 years, 10 months 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.127: +11 -20 lines
Diff to previous 1.127 (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.127 / (download) - annotate - [select for diffs], Sat Mar 14 21:04:26 2009 UTC (13 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.126: +3 -11 lines
Diff to previous 1.126 (colored)

ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.

Revision 1.122.6.3 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:06 2008 UTC (14 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.122.6.2: +11 -15 lines
Diff to previous 1.122.6.2 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

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

Revision 1.122.2.2 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:17 2008 UTC (14 years, 7 months ago) by yamt
Branch: yamt-pf42
Changes since 1.122.2.1: +3 -4 lines
Diff to previous 1.122.2.1 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

sync with head.

Revision 1.121.6.2 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:38 2008 UTC (14 years, 7 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.121.6.1: +9 -13 lines
Diff to previous 1.121.6.1 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored)

Sync with HEAD.

Also fix build.

Revision 1.122.2.1 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:54 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.122: +10 -13 lines
Diff to previous 1.122 (colored)

sync with head

Revision 1.126 / (download) - annotate - [select for diffs], Tue Jun 3 21:48:27 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, nick-hppapmap-base2, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, mjf-devfs2-base, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, jym-xensuspend
Changes since 1.125: +3 -4 lines
Diff to previous 1.125 (colored)

uvm_mmap: don't lock the map unless we need to.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Jun 2 16:17:12 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Changes since 1.124: +4 -4 lines
Diff to previous 1.124 (colored)

One more.

Revision 1.124 / (download) - annotate - [select for diffs], Mon Jun 2 16:16:27 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.123: +8 -9 lines
Diff to previous 1.123 (colored)

Don't needlessly acquire v_interlock.

Revision 1.123 / (download) - annotate - [select for diffs], Mon Jun 2 16:08:41 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.122: +2 -4 lines
Diff to previous 1.122 (colored)

Don't needlessly acquire v_interlock.

Revision 1.122.6.2 / (download) - annotate - [select for diffs], Wed May 14 01:35:18 2008 UTC (14 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.122.6.1: +2 -3 lines
Diff to previous 1.122.6.1 (colored) to branchpoint 1.122 (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.122.6.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:09 2008 UTC (14 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.122: +3 -2 lines
Diff to previous 1.122 (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.121.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:15 2008 UTC (14 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.121: +16 -20 lines
Diff to previous 1.121 (colored)

Sync with HEAD.

Revision 1.91.2.8 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:14 2008 UTC (14 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.91.2.7: +16 -20 lines
Diff to previous 1.91.2.7 (colored) next main 1.92 (colored)

sync with head.

Revision 1.122 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:01 2008 UTC (14 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base2, yamt-pf42-base, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, hpcarm-cleanup-nbase, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, wrstuden-revivesa
Changes since 1.121: +16 -20 lines
Diff to previous 1.121 (colored)

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

Revision 1.117.4.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:33 2008 UTC (14 years, 11 months ago) by mjf
Branch: mjf-devfs
Changes since 1.117.4.2: +21 -10 lines
Diff to previous 1.117.4.2 (colored) to branchpoint 1.117 (colored) next main 1.118 (colored)

Sync with HEAD.

Revision 1.91.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:48:22 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.91.2.6: +58 -54 lines
Diff to previous 1.91.2.6 (colored)

sync with head

Revision 1.114.6.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:42 2008 UTC (15 years ago) by matt
Branch: matt-armv6
Changes since 1.114.6.1: +60 -56 lines
Diff to previous 1.114.6.1 (colored) to branchpoint 1.114 (colored) next main 1.115 (colored)

sync with HEAD

Revision 1.118.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:58:40 2008 UTC (15 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.118: +58 -54 lines
Diff to previous 1.118 (colored) next main 1.119 (colored)

Sync with HEAD

Revision 1.121 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:18 2008 UTC (15 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2
Changes since 1.120: +10 -10 lines
Diff to previous 1.120 (colored)

Merge vmlocking2 to head.

Revision 1.117.4.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:55 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.117.4.1: +39 -46 lines
Diff to previous 1.117.4.1 (colored) to branchpoint 1.117 (colored)

Sync with HEAD.

Revision 1.120 / (download) - annotate - [select for diffs], Wed Dec 26 22:11:53 2007 UTC (15 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.119: +13 -2 lines
Diff to previous 1.119 (colored)

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

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

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

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

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

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

Revision 1.118.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:40:05 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.118.2.1: +39 -46 lines
Diff to previous 1.118.2.1 (colored) to branchpoint 1.118 (colored) next main 1.119 (colored)

Sync with head.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:14 2007 UTC (15 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.118: +39 -46 lines
Diff to previous 1.118 (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.117.4.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:46 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored)

Sync with HEAD.

Revision 1.91.2.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:35:27 2007 UTC (15 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.91.2.5: +4 -4 lines
Diff to previous 1.91.2.5 (colored)

sync with head

Revision 1.118.2.1 / (download) - annotate - [select for diffs], Tue Dec 4 13:04:01 2007 UTC (15 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.118: +10 -10 lines
Diff to previous 1.118 (colored)

Pull the vmlocking changes into a new branch.

Revision 1.114.4.3 / (download) - annotate - [select for diffs], Tue Nov 27 19:39:32 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.114.4.2: +4 -4 lines
Diff to previous 1.114.4.2 (colored) to branchpoint 1.114 (colored) next main 1.115 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.118 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:35 2007 UTC (15 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored)

Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern

Revision 1.114.6.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:35:30 2007 UTC (15 years, 2 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.114: +92 -48 lines
Diff to previous 1.114 (colored)

sync with HEAD

Revision 1.91.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:54 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.91.2.4: +92 -48 lines
Diff to previous 1.91.2.4 (colored)

sync with head.

Revision 1.114.4.2 / (download) - annotate - [select for diffs], Fri Oct 26 15:49:42 2007 UTC (15 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.114.4.1: +52 -24 lines
Diff to previous 1.114.4.1 (colored) to branchpoint 1.114 (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.115.2.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:49:25 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.115: +52 -24 lines
Diff to previous 1.115 (colored) next main 1.116 (colored)

sync with head.

Revision 1.117 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:41 2007 UTC (15 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.116: +15 -9 lines
Diff to previous 1.116 (colored)

Merge from vmlocking:

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

Revision 1.108.2.8 / (download) - annotate - [select for diffs], Tue Oct 9 15:22:28 2007 UTC (15 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.108.2.7: +16 -11 lines
Diff to previous 1.108.2.7 (colored) to branchpoint 1.108 (colored) next main 1.109 (colored)

Sync with head.

Revision 1.108.2.7 / (download) - annotate - [select for diffs], Tue Oct 9 13:45:18 2007 UTC (15 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.108.2.6: +65 -32 lines
Diff to previous 1.108.2.6 (colored) to branchpoint 1.108 (colored)

Sync with head.

Revision 1.116 / (download) - annotate - [select for diffs], Mon Oct 8 15:12:11 2007 UTC (15 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.115: +39 -17 lines
Diff to previous 1.115 (colored)

Merge file descriptor locking, cwdi locking and cross-call changes
from the vmlocking branch.

Revision 1.114.4.1 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:34 2007 UTC (15 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.114: +42 -26 lines
Diff to previous 1.114 (colored)

Sync with HEAD.

Revision 1.115 / (download) - annotate - [select for diffs], Sun Sep 23 16:05:40 2007 UTC (15 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.114: +42 -26 lines
Diff to previous 1.114 (colored)

make RANGE_TEST a function.

Revision 1.91.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:47:09 2007 UTC (15 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.91.2.3: +66 -72 lines
Diff to previous 1.91.2.3 (colored)

sync with head.

Revision 1.108.2.6 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:32 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.108.2.5: +5 -9 lines
Diff to previous 1.108.2.5 (colored) to branchpoint 1.108 (colored)

Sync with HEAD.

Revision 1.112.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:51:22 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.112: +5 -9 lines
Diff to previous 1.112 (colored) next main 1.113 (colored)

Sync with HEAD.

Revision 1.114.8.2 / (download) - annotate - [select for diffs], Fri Jul 27 08:26:39 2007 UTC (15 years, 6 months ago) by pooka
Branch: matt-mips64
Changes since 1.114.8.1: +1229 -0 lines
Diff to previous 1.114.8.1 (colored) to branchpoint 1.114 (colored) next main 1.115 (colored)

Change unused fflags parameter in VOP_MMAP to prot and pass in
desired vm protection.

Revision 1.114.8.1, Fri Jul 27 08:26:38 2007 UTC (15 years, 6 months ago) by pooka
Branch: matt-mips64
Changes since 1.114: +0 -1229 lines
FILE REMOVED

file uvm_mmap.c was added on branch matt-mips64 on 2007-07-27 08:26:39 +0000

Revision 1.114 / (download) - annotate - [select for diffs], Fri Jul 27 08:26:38 2007 UTC (15 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored)

Change unused fflags parameter in VOP_MMAP to prot and pass in
desired vm protection.

Revision 1.113 / (download) - annotate - [select for diffs], Sun Jul 22 19:16:06 2007 UTC (15 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.112: +4 -8 lines
Diff to previous 1.112 (colored)

Retire uvn_attach() - it abuses VXLOCK and its functionality,
setting vnode sizes, is handled elsewhere: file system vnode creation
or spec_open() for regular files or block special files, respectively.

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

reviewed by tech-kern & wrstuden

Revision 1.108.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:12:56 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.108: +57 -59 lines
Diff to previous 1.108 (colored) next main 1.109 (colored)

Sync with head.

Revision 1.108.2.5 / (download) - annotate - [select for diffs], Sun Jun 17 21:32:21 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.108.2.4: +7 -6 lines
Diff to previous 1.108.2.4 (colored) to branchpoint 1.108 (colored)

- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.108.2.4 / (download) - annotate - [select for diffs], Fri Jun 8 14:18:21 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.108.2.3: +57 -59 lines
Diff to previous 1.108.2.3 (colored) to branchpoint 1.108 (colored)

Sync with head.

Revision 1.105.2.3 / (download) - annotate - [select for diffs], Thu May 17 13:42:02 2007 UTC (15 years, 8 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.105.2.2: +57 -59 lines
Diff to previous 1.105.2.2 (colored) to branchpoint 1.105 (colored) next main 1.106 (colored)

sync with head.

Revision 1.112 / (download) - annotate - [select for diffs], Tue May 15 19:47:46 2007 UTC (15 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.111: +29 -22 lines
Diff to previous 1.111 (colored)

Some Veriexec stuff that's been rotting in my tree for months.

Bug fixes:
  - Fix crash reported by Scott Ellis on current-users@.

  - Fix race conditions in enforcing the Veriexec rename and remove
    policies. These are NOT security issues.

  - Fix memory leak in rename handling when overwriting a monitored
    file.

  - Fix table deletion logic.

  - Don't prevent query requests if not in learning mode.


KPI updates:
  - fileassoc_table_run() now takes a cookie to pass to the callback.

  - veriexec_table_add() was removed, it is now done internally. As a
    result, there's no longer a need for VERIEXEC_TABLESIZE.

  - veriexec_report() was removed, it is now internal.

  - Perform sanity checks on the entry type, and enforce default type
    in veriexec_file_add() rather than in veriexecctl.

  - Add veriexec_flush(), used to delete all Veriexec tables, and
    veriexec_dump(), used to fill an array with all Veriexec entries.


New features:
  - Add a '-k' flag to veriexecctl, to keep the filenames in the kernel
    database. This allows Veriexec to produce slightly more accurate
    logs under certain circumstances. In the future, this can be either
    replaced by vnode->pathname translation, or combined with it.

  - Add a VERIEXEC_DUMP ioctl, to dump the entire Veriexec database.
    This can be used to recover a database if the file was lost.
    Example usage:

        # veriexecctl dump > /etc/signatures

    Note that only entries with the filename kept (that is, were loaded
    with the '-k' flag) will be dumped.

    Idea from Brett Lymn.

  - Add a VERIEXEC_FLUSH ioctl, to delete all Veriexec entries. Sample
    usage:

        # veriexecctl flush

  - Add a 'veriexec_flags' rc(8) variable, and make its default have
    the '-k' flag. On systems using the default signatures file
    (generaetd from running 'veriexecgen' with no arguments), this will
    use additional 32kb of kernel memory on average.

  - Add a '-e' flag to veriexecctl, to evaluate the fingerprint during
    load. This is done automatically for files marked as 'untrusted'.


Misc. stuff:
  - The code for veriexecctl was massively simplified as a result of
    eliminating the need for VERIEXEC_TABLESIZE, and now uses a single
    pass of the signatures file, making the loading somewhat faster.

  - Lots of minor fixes found using the (still under development)
    Veriexec regression testsuite.

  - Some of the messages Veriexec prints were improved.

  - Various documentation fixes.


All relevant man-pages were updated to reflect the above changes.

Binary compatibility with existing veriexecctl binaries is maintained.

Revision 1.111 / (download) - annotate - [select for diffs], Fri May 11 21:30:23 2007 UTC (15 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.110: +16 -14 lines
Diff to previous 1.110 (colored)

Make us standards compliant again. Return EINVAL in all cases (except for
mmap) so we cannot tell what went wrong.

Revision 1.110 / (download) - annotate - [select for diffs], Fri May 11 20:41:14 2007 UTC (15 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.109: +28 -39 lines
Diff to previous 1.109 (colored)

Improve on previous and write a RANGE_TEST macro and do it on all the
system calls instead of doing a half-assed job on some of them and none
on others.

Revision 1.109 / (download) - annotate - [select for diffs], Fri May 11 20:05:50 2007 UTC (15 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.108: +4 -4 lines
Diff to previous 1.108 (colored)

fix bogus wrap tests; ssize_t != int...

Revision 1.108.2.3 / (download) - annotate - [select for diffs], Fri Apr 13 15:49:51 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.108.2.2: +10 -5 lines
Diff to previous 1.108.2.2 (colored) to branchpoint 1.108 (colored)

- Fix a (new) bug where vget tries to acquire freed vnodes' interlocks.
- Minor locking fixes.

Revision 1.108.2.2 / (download) - annotate - [select for diffs], Wed Mar 21 20:12:00 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.108.2.1: +3 -3 lines
Diff to previous 1.108.2.1 (colored) to branchpoint 1.108 (colored)

- Replace more simple_locks, and fix up in a few places.
- Use condition variables.
- LOCK_ASSERT -> KASSERT.

Revision 1.108.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 17:51:56 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.108: +6 -6 lines
Diff to previous 1.108 (colored)

Pull in the initial set of changes for the vmlocking branch.

Revision 1.105.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 06:01:12 2007 UTC (15 years, 10 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.105.2.1: +8 -8 lines
Diff to previous 1.105.2.1 (colored) to branchpoint 1.105 (colored)

Sync with HEAD.

Revision 1.102.2.1 / (download) - annotate - [select for diffs], Sat Mar 10 12:17:58 2007 UTC (15 years, 10 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.102: +22 -15 lines
Diff to previous 1.102 (colored) next main 1.103 (colored)

Pull up following revision(s) (requested by elad in ticket #407):
	sys/kern/kern_verifiedexec.c: patch
	sys/uvm/uvm_mmap.c: revision 1.104 via patch
If Veriexec prevents indirect execution of the binary, in addition to just
blocking the mmap() if exec bit is requested, also strip exec bit from
maxprot for further mprotect() calls.  Okay joerg@.

Revision 1.108 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:48 2007 UTC (15 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.107: +8 -8 lines
Diff to previous 1.107 (colored)

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

Revision 1.105.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:55:27 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.105: +10 -10 lines
Diff to previous 1.105 (colored)

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

Revision 1.91.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:12:31 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.91.2.2: +30 -24 lines
Diff to previous 1.91.2.2 (colored)

sync with head.

Revision 1.107 / (download) - annotate - [select for diffs], Thu Feb 22 06:05:01 2007 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.106: +9 -9 lines
Diff to previous 1.106 (colored)

TRUE -> true, FALSE -> false

Revision 1.106 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:13 2007 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

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

Revision 1.105 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:43 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.104: +2 -3 lines
Diff to previous 1.104 (colored)

Merge newlock2 to head.

Revision 1.98.4.4 / (download) - annotate - [select for diffs], Fri Feb 9 21:03:54 2007 UTC (15 years, 11 months ago) by ad
Branch: newlock2
Changes since 1.98.4.3: +22 -15 lines
Diff to previous 1.98.4.3 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored)

Sync with HEAD.

Revision 1.104 / (download) - annotate - [select for diffs], Sat Feb 3 01:11:50 2007 UTC (16 years ago) by elad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.103: +22 -15 lines
Diff to previous 1.103 (colored)

If Veriexec prevents indirect execution of the binary, in addition to just
blocking the mmap() if exec bit is requested, also strip exec bit from
maxprot for further mprotect() calls.

Okay joerg@.

Revision 1.98.4.3 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:43 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.98.4.2: +2 -3 lines
Diff to previous 1.98.4.2 (colored) to branchpoint 1.98 (colored)

Remove support for SA. Ok core@.

Revision 1.98.4.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:25 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.98.4.1: +4 -4 lines
Diff to previous 1.98.4.1 (colored) to branchpoint 1.98 (colored)

Sync with head.

Revision 1.103 / (download) - annotate - [select for diffs], Thu Jan 11 14:26:07 2007 UTC (16 years ago) by elad
Branch: MAIN
Changes since 1.102: +4 -4 lines
Diff to previous 1.102 (colored)

Cosmetic nit in the 'filename' passed to veriexec_verify().

Revision 1.91.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:51:05 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.91.2.1: +56 -56 lines
Diff to previous 1.91.2.1 (colored)

sync with head.

Revision 1.98.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:34 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.98.6.1: +16 -15 lines
Diff to previous 1.98.6.1 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored)

sync with head.

Revision 1.98.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:50 2006 UTC (16 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.98: +54 -54 lines
Diff to previous 1.98 (colored)

Sync with head.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Nov 1 10:18:27 2006 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.101: +16 -15 lines
Diff to previous 1.101 (colored)

remove some __unused from function parameters.

Revision 1.98.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:52 2006 UTC (16 years, 3 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.98: +54 -55 lines
Diff to previous 1.98 (colored)

sync with head

Revision 1.101 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:53 2006 UTC (16 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.100: +15 -51 lines
Diff to previous 1.100 (colored)

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

Revision 1.100 / (download) - annotate - [select for diffs], Thu Oct 5 14:48:33 2006 UTC (16 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.99: +23 -6 lines
Diff to previous 1.99 (colored)

add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).

Revision 1.99 / (download) - annotate - [select for diffs], Sat Sep 30 10:56:31 2006 UTC (16 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.98: +20 -2 lines
Diff to previous 1.98 (colored)

If Veriexec enforces access type, don't allow mmap() to use PROT_EXEC on
files that don't have the "indirect" flag. Also change the "library" alias
in veriexecctl(8) to mean "file, indirect".

okay blymn@

Revision 1.94.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 03:00:13 2006 UTC (16 years, 4 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.94: +15 -4 lines
Diff to previous 1.94 (colored) next main 1.95 (colored)

sync with head

Revision 1.94.8.3 / (download) - annotate - [select for diffs], Fri Aug 11 15:47:46 2006 UTC (16 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.94.8.2: +4 -4 lines
Diff to previous 1.94.8.2 (colored) to branchpoint 1.94 (colored) next main 1.95 (colored)

sync with head

Revision 1.98 / (download) - annotate - [select for diffs], Fri Jul 21 16:48:53 2006 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (colored)

- Use the LWP cached credentials where sane.
- Minor cosmetic changes.

Revision 1.91.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:12:40 2006 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.91: +21 -7 lines
Diff to previous 1.91 (colored)

sync with head.

Revision 1.96.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:11:44 2006 UTC (16 years, 7 months ago) by chap
Branch: chap-midi
Changes since 1.96: +11 -2 lines
Diff to previous 1.96 (colored) next main 1.97 (colored)

Sync with head.

Revision 1.94.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:45 2006 UTC (16 years, 8 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.94.6.1: +13 -4 lines
Diff to previous 1.94.6.1 (colored) to branchpoint 1.94 (colored) next main 1.95 (colored)

Sync with head.

Revision 1.94.12.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:48 2006 UTC (16 years, 8 months ago) by tron
Branch: peter-altq
Changes since 1.94: +15 -4 lines
Diff to previous 1.94 (colored) next main 1.95 (colored)

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

Revision 1.94.8.2 / (download) - annotate - [select for diffs], Wed May 24 10:59:30 2006 UTC (16 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.94.8.1: +13 -4 lines
Diff to previous 1.94.8.1 (colored) to branchpoint 1.94 (colored)

sync with head.

Revision 1.97 / (download) - annotate - [select for diffs], Sat May 20 15:45:38 2006 UTC (16 years, 8 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
Changes since 1.96: +11 -2 lines
Diff to previous 1.96 (colored)

Better implementation of PaX MPROTECT, after looking some more into the
code and not trying to use temporary solutions.

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

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

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

Revision 1.96 / (download) - annotate - [select for diffs], Sun May 14 21:38:17 2006 UTC (16 years, 8 months ago) by elad
Branch: MAIN
Branch point for: chap-midi
Changes since 1.95: +4 -4 lines
Diff to previous 1.95 (colored)

integrate kauth.

Revision 1.94.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:29 2006 UTC (16 years, 9 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.94: +4 -2 lines
Diff to previous 1.94 (colored)

Sync with head.

Revision 1.94.10.2 / (download) - annotate - [select for diffs], Wed Apr 19 03:55:32 2006 UTC (16 years, 9 months ago) by elad
Branch: elad-kernelauth
Changes since 1.94.10.1: +4 -2 lines
Diff to previous 1.94.10.1 (colored) to branchpoint 1.94 (colored) next main 1.95 (colored)

sync with head.

Revision 1.94.8.1 / (download) - annotate - [select for diffs], Tue Apr 11 11:55:59 2006 UTC (16 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.94: +4 -2 lines
Diff to previous 1.94 (colored)

sync with head

Revision 1.95 / (download) - annotate - [select for diffs], Wed Apr 5 19:49:28 2006 UTC (16 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, elad-kernelauth-base
Changes since 1.94: +4 -2 lines
Diff to previous 1.94 (colored)

Coverity CID 2721: Avoid bitching for impossible cases, by adding KASSERT.

Revision 1.94.10.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:31:57 2006 UTC (16 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.94: +4 -4 lines
Diff to previous 1.94 (colored)

Adapt to kernel authorization changes.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:29 2005 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored)

merge ktrace-lwp.

Revision 1.74.2.10 / (download) - annotate - [select for diffs], Thu Nov 10 14:12:40 2005 UTC (17 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.74.2.9: +9 -6 lines
Diff to previous 1.74.2.9 (colored) next main 1.75 (colored)

Sync with HEAD. Here we go again...

Revision 1.88.4.3 / (download) - annotate - [select for diffs], Sat Oct 15 15:34:08 2005 UTC (17 years, 3 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.88.4.2: +2 -4 lines
Diff to previous 1.88.4.2 (colored) to branchpoint 1.88 (colored) next main 1.89 (colored)

Pull up following revision(s) (requested by chs in ticket #877):
	sys/uvm/uvm_mmap.c: revision 1.93
stop converting async msync() to sync.
this hasn't been needed for years (if it ever was).

Revision 1.93 / (download) - annotate - [select for diffs], Mon Oct 10 15:53:28 2005 UTC (17 years, 3 months ago) by chs
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
Changes since 1.92: +2 -4 lines
Diff to previous 1.92 (colored)

stop converting async msync() to sync.
this hasn't been needed for years (if it ever was).

Revision 1.88.4.2 / (download) - annotate - [select for diffs], Sun Sep 18 20:09:50 2005 UTC (17 years, 4 months ago) by tron
Branch: netbsd-3
Changes since 1.88.4.1: +14 -7 lines
Diff to previous 1.88.4.1 (colored) to branchpoint 1.88 (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.88.4.1 / (download) - annotate - [select for diffs], Wed Aug 24 18:43:38 2005 UTC (17 years, 5 months ago) by riz
Branch: netbsd-3
Changes since 1.88: +8 -3 lines
Diff to previous 1.88 (colored)

Pull up following revision(s) (requested by yamt in ticket #688):
	sys/miscfs/genfs/genfs_vnops.c: revision 1.98 via patch
	sys/ufs/ffs/ffs_vfsops.c: revision 1.165
	sys/ufs/lfs/lfs_extern.h: revision 1.69
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.20
	sys/nfs/nfs_node.c: revision 1.80
	sys/fs/smbfs/smbfs_node.c: revision 1.24
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.24
	sys/fs/msdosfs/msdosfs_denode.c: revision 1.8
	sys/miscfs/genfs/genfs_node.h: revision 1.6
	sys/ufs/lfs/lfs_vfsops.c: revision 1.183
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.86
	sys/fs/adosfs/advfsops.c: revision 1.23
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.31
- constify genfs_ops.
- use member designators.

        sys/miscfs/genfs/genfs_vnops.c: revision 1.99 via patch
genfs_getpages: don't forget to put the vnode onto the syncer's work que
ue
even in the case of PGO_LOCKED.

        sys/uvm/uvm_bio.c: revision 1.40
        sys/uvm/uvm_pager.h: revision 1.29
        sys/miscfs/genfs/genfs_vnops.c: revision 1.100 via patch
        sys/ufs/ufs/ufs_inode.c: revision 1.50
- introduce PGO_NOBLOCKALLOC and use it for ubc mapping
  to prevent unnecessary block allocations in the case that
  page size > block size.
- ufs_balloc_range: use VM_PROT_WRITE+PGO_NOBLOCKALLOC rather than
  VM_PROT_READ.

        sys/uvm/uvm_fault.c: revision 1.96
        sys/miscfs/genfs/genfs_vnops.c: revision 1.101 via patch
        sys/uvm/uvm_object.h: revision 1.19
        sys/miscfs/genfs/genfs_node.h: revision 1.7
ensure that vnodes with dirty pages are always on syncer's queue.
- genfs_putpages: wait for i/o completion of PG_RELEASED/PG_PAGEOUT pages by
  setting "wasclean" false when encountering them.
  suggested by Stephan Uphoff in PR/24596 (1).
- genfs_putpages: write protect pages when cleaning out, if
  we're going to take the vnode off the syncer's queue.
  uvm_fault: don't write-map pages unless its vnode is already on
  the syncer's queue.
  fix PR/24596 (3) but in the different way from the suggested fix.
  (to keep our current behaviour, ie. not to require explicit msync.
  discussed on tech-kern@.)
- genfs_putpages: don't mistakenly take a vnode off the queue
  by introducing a generation number in genfs_node.
  genfs_getpages: increment the generation number.
  suggested by Stephan Uphoff in PR/24596 (2).
- add some assertions.

        sys/miscfs/genfs/genfs_vnops.c: revision 1.102 via patch
genfs_putpages: don't bother to clean the vnode unless VONWORKLST.

        sys/ufs/ffs/ffs_vnops.c: revision 1.71
ffs_full_fsync: because VBLK/VCHR can be mmap'ed,
do VOP_PUTPAGES for them as well.

        sys/uvm/uvm_fault.c: revision 1.97
uvm_fault: check a correct object in the case of layered filesystems.
fix PR/30811 from Jukka Salmi.

        sys/uvm/uvm_object.h: revision 1.20
        sys/ufs/ffs/ffs_vfsops.c: revision 1.167
        sys/uvm/uvm_bio.c: revision 1.41
        sys/ufs/ufs/ufs_vnops.c: revision 1.129
        sys/uvm/uvm_mmap.c: revision 1.92
        sys/uvm/uvm_fault.c: revision 1.98
        sys/kern/vfs_subr.c: revision 1.252
        sys/fs/msdosfs/denode.h: revision 1.5
        sys/miscfs/genfs/genfs_vnops.c: revision 1.103 via patch
        sys/fs/msdosfs/msdosfs_denode.c: revision 1.9
        sys/sys/vnode.h: revision 1.141
        sys/ufs/ufs/ufs_inode.c: revision 1.51
        sys/ufs/ufs/ufs_extern.h: revision 1.45 via patch
        sys/miscfs/genfs/genfs_node.h: revision 1.8
        sys/ufs/lfs/lfs_vfsops.c: revision 1.184
        sys/uvm/uvm_pager.h: revision 1.30
        sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.87
update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.

        sys/miscfs/genfs/genfs_vnops.c: revision 1.104 via patch
don't write-protect wired pages.  pointed by Chuck Silvers.
for now, leave a vnode on the syncer's queue, as suggested by him.

        sys/ufs/ffs/ffs_vnops.c: revision 1.72
revert VCHR part of ffs_vnops.c 1.71.
as VCHR uses the device pager, no point to call VOP_PUTPAGES here.
pointed by Chuck Silvers.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Jul 23 12:18:41 2005 UTC (17 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.91: +8 -3 lines
Diff to previous 1.91 (colored)

update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.

Revision 1.91 / (download) - annotate - [select for diffs], Wed May 11 13:02:25 2005 UTC (17 years, 8 months ago) by yamt
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored)

allocate anons on-demand, rather than reserving static amount of
them on boot/swapon.

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:45 2005 UTC (17 years, 9 months ago) by kent
Branch: kent-audio2
Changes since 1.86: +20 -41 lines
Diff to previous 1.86 (colored) next main 1.87 (colored)

sync with -current

Revision 1.74.2.9 / (download) - annotate - [select for diffs], Fri Apr 1 14:32:12 2005 UTC (17 years, 10 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.74.2.8: +15 -8 lines
Diff to previous 1.74.2.8 (colored)

Sync with HEAD.

Revision 1.90 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:39 2005 UTC (17 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored)

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

Revision 1.87.2.3 / (download) - annotate - [select for diffs], Sat Mar 26 18:19:20 2005 UTC (17 years, 10 months ago) by yamt
Branch: yamt-km
Changes since 1.87.2.2: +12 -5 lines
Diff to previous 1.87.2.2 (colored) to branchpoint 1.87 (colored) next main 1.88 (colored)

sync with head.

Revision 1.89 / (download) - annotate - [select for diffs], Sat Mar 26 05:12:36 2005 UTC (17 years, 10 months ago) by fvdl
Branch: MAIN
CVS Tags: yamt-km-base4
Changes since 1.88: +14 -7 lines
Diff to previous 1.88 (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.74.2.8 / (download) - annotate - [select for diffs], Tue Feb 15 21:34:02 2005 UTC (17 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.74.2.7: +3 -3 lines
Diff to previous 1.74.2.7 (colored)

Sync with HEAD.

Revision 1.87.2.2 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:57 2005 UTC (17 years, 11 months ago) by yamt
Branch: yamt-km
Changes since 1.87.2.1: +3 -3 lines
Diff to previous 1.87.2.1 (colored) to branchpoint 1.87 (colored)

sync with head.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Feb 11 02:12:03 2005 UTC (17 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: yamt-km-base3, yamt-km-base2, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

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

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Tue Jan 25 12:58:29 2005 UTC (18 years ago) by yamt
Branch: yamt-km
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

- don't use uvm_object or managed mappings for wired allocations.
  (eg. malloc(9))
- simplify uvm_km_* apis.

Revision 1.74.2.7 / (download) - annotate - [select for diffs], Mon Jan 24 08:36:05 2005 UTC (18 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.74.2.6: +6 -34 lines
Diff to previous 1.74.2.6 (colored)

Sync with HEAD.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Jan 23 15:58:13 2005 UTC (18 years ago) by chs
Branch: MAIN
CVS Tags: yamt-km-base
Branch point for: yamt-km
Changes since 1.86: +6 -34 lines
Diff to previous 1.86 (colored)

pmap_wired_count() is now available on all platforms,
remove the code for the case where it's not defined.

Revision 1.74.2.6 / (download) - annotate - [select for diffs], Mon Jan 17 19:33:11 2005 UTC (18 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.74.2.5: +3 -3 lines
Diff to previous 1.74.2.5 (colored)

Sync with HEAD.

Revision 1.86 / (download) - annotate - [select for diffs], Sat Jan 1 21:00:06 2005 UTC (18 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: kent-audio1-beforemerge
Branch point for: kent-audio2
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored)

for in-kernel maps,
- allocate kva for vm_map_entry from the map itsself and
  remove the static limit, MAX_KMAPENT.
- keep merged entries for later splitting to fix allocate-to-free problem.
  PR/24039.

Revision 1.74.2.5 / (download) - annotate - [select for diffs], Sat Dec 18 09:33:32 2004 UTC (18 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.74.2.4: +6 -2 lines
Diff to previous 1.74.2.4 (colored)

Sync with HEAD.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Dec 2 15:23:47 2004 UTC (18 years, 2 months ago) by briggs
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.84: +6 -2 lines
Diff to previous 1.84 (colored)

mlock(2) and munlock(2) are defined by our man pages (which agree with
those on opengroup.org) to return ENOMEM if trying to lock a region that
is not accessible.  So if uvm_map_pageable() returns EFAULT, make it ENOMEM.

Revision 1.74.2.4 / (download) - annotate - [select for diffs], Tue Sep 21 13:39:28 2004 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.74.2.3: +4 -4 lines
Diff to previous 1.74.2.3 (colored)

Fix the sync with head I botched.

Revision 1.74.2.3 / (download) - annotate - [select for diffs], Sat Sep 18 14:57:12 2004 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.74.2.2: +4 -4 lines
Diff to previous 1.74.2.2 (colored)

Sync with HEAD.

Revision 1.74.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:57:07 2004 UTC (18 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.74.2.1: +42 -26 lines
Diff to previous 1.74.2.1 (colored)

Sync with HEAD

Revision 1.84 / (download) - annotate - [select for diffs], Tue May 25 14:55:46 2004 UTC (18 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.83: +4 -3 lines
Diff to previous 1.83 (colored)

Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>

Revision 1.83 / (download) - annotate - [select for diffs], Wed May 19 13:20:27 2004 UTC (18 years, 8 months ago) by darrenr
Branch: MAIN
Changes since 1.82: +12 -13 lines
Diff to previous 1.82 (colored)

rather than just try to get a mapping from a device as only PROT_EXEC, work
down the list of protections until either we run out or we find one that the
device is willing to work with.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Mar 24 07:47:33 2004 UTC (18 years, 10 months ago) by junyoung
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

Drop trailing spaces.

Revision 1.63.4.2 / (download) - annotate - [select for diffs], Mon Mar 15 04:59:10 2004 UTC (18 years, 10 months ago) by jmc
Branch: netbsd-1-6
Changes since 1.63.4.1: +4 -2 lines
Diff to previous 1.63.4.1 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored)

Pullup rev 1.66 (requested by skrll in ticket #1607)

#if 0 the call to uvm_map_checkprot() in sys_munmap() -- it's not documented,
and programs do not expect it.  Also fixes memory leaks in dlopen()/dlclose().

Revision 1.81 / (download) - annotate - [select for diffs], Sat Feb 14 16:40:22 2004 UTC (18 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

Fix prev. so it compiles

Revision 1.80 / (download) - annotate - [select for diffs], Sat Feb 14 12:20:14 2004 UTC (18 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.79: +9 -3 lines
Diff to previous 1.79 (colored)

add compat hook in check for zerodev; use this hook to recognize
the old ARM /dev/zero minor mapping #ifdef COMPAT_16
fixes second part of PR kern/23581 by Richard Earnshaw

Revision 1.79 / (download) - annotate - [select for diffs], Sat Nov 29 19:06:48 2003 UTC (19 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

mincore: don't treat an aobj as a device mapping.

Revision 1.78 / (download) - annotate - [select for diffs], Tue Oct 7 00:17:09 2003 UTC (19 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.77: +15 -3 lines
Diff to previous 1.77 (colored)

Add a MAP_WIRED flag to mmap(2), which causes the new mapping to be
wired as if by mlock(2).

Revision 1.77 / (download) - annotate - [select for diffs], Sun Aug 24 18:12:25 2003 UTC (19 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.76: +6 -6 lines
Diff to previous 1.76 (colored)

fix some indentation.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Aug 24 16:32:50 2003 UTC (19 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.75: +4 -6 lines
Diff to previous 1.75 (colored)

mprotect()'s "len" is really a size_t, and we can't do any useful
bounds-checking on it.

Revision 1.63.4.1 / (download) - annotate - [select for diffs], Sun Aug 17 10:14:52 2003 UTC (19 years, 5 months ago) by tron
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

Pull up revision 1.72 (requested by tv in ticket #1420):
PR/21948: Todd Vierling: Implement MAP_TRYFIXED for linux emulation.

Revision 1.75 / (download) - annotate - [select for diffs], Sun Jul 6 16:19:18 2003 UTC (19 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

PR/22062: Dheeraj S: Don't compare an integral type with NULL.

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:27:29 2003 UTC (19 years, 7 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored)

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

Revision 1.74 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:51 2003 UTC (19 years, 7 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

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

Revision 1.73 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:30 2003 UTC (19 years, 7 months ago) by darrenr
Branch: MAIN
Changes since 1.72: +4 -4 lines
Diff to previous 1.72 (colored)

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

Bump the kernel rev up to 1.6V

Revision 1.72 / (download) - annotate - [select for diffs], Mon Jun 23 21:32:34 2003 UTC (19 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

PR/21948: Todd Vierling: Implement MAP_TRYFIXED for linux emulation.

Revision 1.71 / (download) - annotate - [select for diffs], Sun May 4 01:54:26 2003 UTC (19 years, 9 months ago) by gmcgarry
Branch: MAIN
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

Don't use overloaded term "comm".  From Greg A. Woods in PR#17394.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Mar 6 00:41:52 2003 UTC (19 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.69: +28 -3 lines
Diff to previous 1.69 (colored)

Add support for mmap(2) to be able to return memory aligned on a 2^n
boundary.

Revision 1.69 / (download) - annotate - [select for diffs], Sun Feb 23 14:37:38 2003 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.68: +4 -2 lines
Diff to previous 1.68 (colored)

Make updating a file's reference and use count MP-safe.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Feb 20 22:16:08 2003 UTC (19 years, 11 months ago) by atatat
Branch: MAIN
Changes since 1.67: +13 -6 lines
Diff to previous 1.67 (colored)

Introduce "top down" memory management for mmap()ed allocations.  This
means that the dynamic linker gets mapped in at the top of available
user virtual memory (typically just below the stack), shared libraries
get mapped downwards from that point, and calls to mmap() that don't
specify a preferred address will get mapped in below those.

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

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

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

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

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jan 18 09:43:01 2003 UTC (20 years ago) by thorpej
Branch: MAIN
Changes since 1.66: +40 -28 lines
Diff to previous 1.66 (colored)

Merge the nathanw_sa branch.

Revision 1.49.2.16 / (download) - annotate - [select for diffs], Fri Oct 18 02:46:00 2002 UTC (20 years, 3 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.49.2.15: +2 -0 lines
Diff to previous 1.49.2.15 (colored) next main 1.50 (colored)

Catch up to -current.

Revision 1.54.2.4 / (download) - annotate - [select for diffs], Thu Oct 10 18:45:08 2002 UTC (20 years, 3 months ago) by jdolecek
Branch: kqueue
Changes since 1.54.2.3: +5 -3 lines
Diff to previous 1.54.2.3 (colored) next main 1.55 (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.66 / (download) - annotate - [select for diffs], Fri Sep 27 19:13:29 2002 UTC (20 years, 4 months ago) by mycroft
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.65: +4 -2 lines
Diff to previous 1.65 (colored)

#if 0 the call to uvm_map_checkprot() in sys_munmap() -- it's not documented,
and programs do not expect it.  Also fixes memory leaks in dlopen()/dlclose().

Revision 1.49.2.15 / (download) - annotate - [select for diffs], Tue Sep 17 21:24:10 2002 UTC (20 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.14: +3 -3 lines
Diff to previous 1.49.2.14 (colored)

Catch up to -current.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Sep 6 13:18:43 2002 UTC (20 years, 5 months ago) by gehenna
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.49.2.14 / (download) - annotate - [select for diffs], Tue Jul 16 14:09:06 2002 UTC (20 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.13: +3 -4 lines
Diff to previous 1.49.2.13 (colored)

Whitespace.

Revision 1.49.2.13 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:45 2002 UTC (20 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.12: +2 -3 lines
Diff to previous 1.49.2.12 (colored)

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

Revision 1.49.2.12 / (download) - annotate - [select for diffs], Mon Jun 24 22:12:54 2002 UTC (20 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.11: +4 -4 lines
Diff to previous 1.49.2.11 (colored)

Curproc->curlwp renaming.

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

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

Revision 1.54.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 17:52:17 2002 UTC (20 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.54.2.2: +5 -5 lines
Diff to previous 1.54.2.2 (colored)

catch up with -current on kqueue branch

Revision 1.63.2.2 / (download) - annotate - [select for diffs], Thu Jun 20 15:53:15 2002 UTC (20 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.63.2.1: +3 -3 lines
Diff to previous 1.63.2.1 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored)

catch up with -current.

Revision 1.49.2.11 / (download) - annotate - [select for diffs], Thu Jun 20 03:50:41 2002 UTC (20 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.10: +3 -3 lines
Diff to previous 1.49.2.10 (colored)

Catch up to -current.

Revision 1.64 / (download) - annotate - [select for diffs], Fri May 31 16:49:50 2002 UTC (20 years, 8 months ago) by atatat
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

"offest" -> "offset" in a comment

Revision 1.49.2.10 / (download) - annotate - [select for diffs], Wed May 29 21:33:24 2002 UTC (20 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.9: +3 -2 lines
Diff to previous 1.49.2.9 (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.63.2.1 / (download) - annotate - [select for diffs], Thu May 16 13:13:14 2002 UTC (20 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

Get rid of iszerodev. Use the 'zerodev' (dev_t for /dev/zero).

Revision 1.49.2.9 / (download) - annotate - [select for diffs], Mon Apr 1 07:49:23 2002 UTC (20 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.8: +4 -4 lines
Diff to previous 1.49.2.8 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.63 / (download) - annotate - [select for diffs], Fri Mar 22 11:06:33 2002 UTC (20 years, 10 months ago) by darrenr
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

Return EFBIG from mmap() if we try to map too much data and in the fixed
address allocation, return EOVERFLOW to match with the non-fixed error.

Revision 1.54.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:05:41 2002 UTC (21 years ago) by thorpej
Branch: kqueue
Changes since 1.54.2.1: +38 -19 lines
Diff to previous 1.54.2.1 (colored)

Sync kqueue branch with -current.

Revision 1.49.2.8 / (download) - annotate - [select for diffs], Tue Jan 8 00:35:04 2002 UTC (21 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.7: +11 -9 lines
Diff to previous 1.49.2.7 (colored)

Catch up to -current.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Dec 14 04:21:22 2001 UTC (21 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Changes since 1.61: +7 -8 lines
Diff to previous 1.61 (colored)

in sys_mincore(), check the return value of uvm_vslock() to determine
if the vec pointer is valid rather than using uvm_useracc().
uvm_useracc() just tells you if the permissions of a user mapping allow
the desired access, not whether faulting on that mapping will succeed.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Nov 25 06:42:47 2001 UTC (21 years, 2 months ago) by chs
Branch: MAIN
Changes since 1.60: +6 -3 lines
Diff to previous 1.60 (colored)

disallow mapping negative offsets for both regular files and block devices.

Revision 1.49.2.7 / (download) - annotate - [select for diffs], Wed Nov 14 19:19:07 2001 UTC (21 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.6: +21 -1 lines
Diff to previous 1.49.2.6 (colored)

Catch up to -current.

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:55 2001 UTC (21 years, 2 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.56: +21 -1 lines
Diff to previous 1.56 (colored) next main 1.57 (colored)

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

Revision 1.60 / (download) - annotate - [select for diffs], Sat Nov 10 07:37:00 2001 UTC (21 years, 2 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.59: +5 -1 lines
Diff to previous 1.59 (colored)

add RCSIDs, and in some cases, slightly cleanup #include order

Revision 1.59 / (download) - annotate - [select for diffs], Tue Oct 30 19:05:26 2001 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.58: +10 -1 lines
Diff to previous 1.58 (colored)

uvm_map_protect(): Don't allow VM_PROT_EXECUTE to be set on entries
(either the current protection or the max protection) that reference
vnodes associated with a file system mounted with the NOEXEC option.

uvm_mmap(): Don't allow PROT_EXEC mappings to be established of vnodes
which are associated with a file system mounted with the NOEXEC option.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Oct 30 15:32:04 2001 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

- Add a new vnode flag VEXECMAP, which indicates that a vnode has
  executable mappings.  Stop overloading VTEXT for this purpose (VTEXT
  also has another meaning).
- Rename vn_marktext() to vn_markexec(), and use it when executable
  mappings of a vnode are established.
- In places where we want to set VTEXT, set it in v_flag directly, rather
  than making a function call to do this (it no longer makes sense to
  use a function call, since we no longer overload VTEXT with VEXECMAP's
  meaning).

VEXECMAP suggested by Chuq Silvers.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Oct 29 23:06:03 2001 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.56: +8 -1 lines
Diff to previous 1.56 (colored)

uvm_mmap(): If a vnode mapping is established with PROT_EXEC, mark the
vnode as VTEXT.

uvm_map_protect(): When VM_PROT_EXECUTE is added to a VA range, mark
all the vnodes mapped by the range as VTEXT.

Revision 1.55.2.2 / (download) - annotate - [select for diffs], Mon Oct 1 12:48:43 2001 UTC (21 years, 4 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.55.2.1: +9 -12 lines
Diff to previous 1.55.2.1 (colored) to branchpoint 1.55 (colored) next main 1.56 (colored)

Catch up with -current.

Revision 1.49.2.6 / (download) - annotate - [select for diffs], Fri Sep 21 22:37:15 2001 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.5: +9 -12 lines
Diff to previous 1.49.2.5 (colored)

Catch up to -current.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:46 2001 UTC (21 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Changes since 1.55: +9 -12 lines
Diff to previous 1.55 (colored)

a whole bunch of changes to improve performance and robustness under load:

 - remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.

Revision 1.55.2.1 / (download) - annotate - [select for diffs], Fri Sep 7 04:45:46 2001 UTC (21 years, 4 months ago) by thorpej
Branch: thorpej-devvp
Changes since 1.55: +11 -3 lines
Diff to previous 1.55 (colored)

Commit my "devvp" changes to the thorpej-devvp branch.  This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Sat Aug 25 06:17:22 2001 UTC (21 years, 5 months ago) by thorpej
Branch: kqueue
Changes since 1.54: +6 -1 lines
Diff to previous 1.54 (colored)

Merge Aug 24 -current into the kqueue branch.

Revision 1.49.2.5 / (download) - annotate - [select for diffs], Fri Aug 24 04:20:11 2001 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.4: +3 -2 lines
Diff to previous 1.49.2.4 (colored)

A few files and lwp/proc conversions I missed in the last big update.
GENERIC runs again.

Revision 1.49.2.4 / (download) - annotate - [select for diffs], Fri Aug 24 00:13:41 2001 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.3: +6 -1 lines
Diff to previous 1.49.2.3 (colored)

Catch up with -current.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Aug 17 05:52:46 2001 UTC (21 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.54: +6 -1 lines
Diff to previous 1.54 (colored)

call VOP_MMAP() before allowing mappings of vnodes to allow
filesystems which do not support memory mapped access to cause
mmap() of their vnodes to fail.

Revision 1.49.2.3 / (download) - annotate - [select for diffs], Thu Jun 21 20:10:37 2001 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.2: +22 -25 lines
Diff to previous 1.49.2.2 (colored)

Catch up to -current.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Jun 14 20:32:49 2001 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
Branch point for: kqueue
Changes since 1.53: +3 -6 lines
Diff to previous 1.53 (colored)

Fix a partial construction problem that can cause race conditions
between creation of a file descriptor and close(2) when using kernel
assisted threads.  What we do is stick descriptors in the table, but
mark them as "larval".  This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again.  When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.

While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.

Revision 1.53 / (download) - annotate - [select for diffs], Sat Jun 2 18:09:27 2001 UTC (21 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.52: +7 -7 lines
Diff to previous 1.52 (colored)

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.

Revision 1.52 / (download) - annotate - [select for diffs], Sat May 26 21:27:21 2001 UTC (21 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

replace vm_page_t with struct vm_page *.

Revision 1.51 / (download) - annotate - [select for diffs], Fri May 25 04:06:15 2001 UTC (21 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.50: +13 -13 lines
Diff to previous 1.50 (colored)

remove trailing whitespace.

Revision 1.49.2.2 / (download) - annotate - [select for diffs], Mon Apr 9 01:59:19 2001 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49.2.1: +108 -198 lines
Diff to previous 1.49.2.1 (colored)

Catch up with -current.

Revision 1.35.2.5 / (download) - annotate - [select for diffs], Tue Mar 27 15:32:50 2001 UTC (21 years, 10 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35.2.4: +108 -198 lines
Diff to previous 1.35.2.4 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

Sync with HEAD.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Mar 15 06:10:57 2001 UTC (21 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.49: +108 -198 lines
Diff to previous 1.49 (colored)

eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

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

Revision 1.35.2.4 / (download) - annotate - [select for diffs], Mon Mar 12 13:32:12 2001 UTC (21 years, 10 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35.2.3: +5 -16 lines
Diff to previous 1.35.2.3 (colored) to branchpoint 1.35 (colored)

Sync with HEAD.

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:50:11 2001 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.49: +39 -27 lines
Diff to previous 1.49 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Feb 18 21:19:08 2001 UTC (21 years, 11 months ago) by chs
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.48: +5 -16 lines
Diff to previous 1.48 (colored)

clean up DIAGNOSTIC checks, use KASSERT().

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Thu Jan 25 21:05:04 2001 UTC (22 years ago) by jhawk
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.41: +14 -3 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

Pull up revisions 1.47-1.48 via patch (requested by thorpej):
  Change PROT_EXEC handling. Clear it from the maxprot if the protection
  lacks it, after a failed udv_attach() and retry the udv_attach().

Revision 1.35.2.3 / (download) - annotate - [select for diffs], Thu Jan 18 09:24:06 2001 UTC (22 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35.2.2: +13 -2 lines
Diff to previous 1.35.2.2 (colored) to branchpoint 1.35 (colored)

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

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jan 8 01:35:03 2001 UTC (22 years ago) by thorpej
Branch: MAIN
Changes since 1.47: +15 -4 lines
Diff to previous 1.47 (colored)

Nevermind that it's silly to include PROT_EXEC even if a vnode
doesn't have the exec bit set, we need to have PROT_EXEC set
in order for some expected mmap/mprotect behavior to work, so
do the last bit slightly differently: if udv_attach() fails, and
the protection (NOT maxprot) doens't include PROT_EXEC, then clear
PROT_EXEC from maxprot and try udv_attach() again.

Sigh, mmap really needs to be rototilled.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Jan 7 06:16:46 2001 UTC (22 years ago) by thorpej
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

Only include PROT_EXEC in maxprot if the user specified PROT_EXEC
in the mmap() call.  maxprot is used to create device mappings,
and always including PROT_EXEC causes the mapping to fail on the Alpha
when mapping a non-RAM offset of /dev/mem (which may be sparse, so
instruction fetch from there is disallowed).

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Fri Dec 8 09:20:56 2000 UTC (22 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35.2.1: +7 -53 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored)

Sync with HEAD.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Nov 27 08:40:04 2000 UTC (22 years, 2 months ago) by chs
Branch: MAIN
Changes since 1.45: +6 -52 lines
Diff to previous 1.45 (colored)

Initial integration of the Unified Buffer Cache project.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Nov 24 23:30:01 2000 UTC (22 years, 2 months ago) by soren
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Typo in comment.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:12:03 2000 UTC (22 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35: +21 -33 lines
Diff to previous 1.35 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.44 / (download) - annotate - [select for diffs], Wed Sep 13 15:00:25 2000 UTC (22 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Jun 27 17:29:28 2000 UTC (22 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.42: +1 -3 lines
Diff to previous 1.42 (colored)

remove include of <vm/vm.h>

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jun 26 14:21:18 2000 UTC (22 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.41: +1 -3 lines
Diff to previous 1.41 (colored)

remove/move more mach vm header files:

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

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

Revision 1.41 / (download) - annotate - [select for diffs], Tue May 23 02:19:20 2000 UTC (22 years, 8 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.40: +6 -5 lines
Diff to previous 1.40 (colored)

- Move the comment, which describes that calling the function
  uvm_map_pageable(map, ...) implies unlocking passed map, just before the
  function call.
- If we bail out before calling the uvm_map_pageable, unlock the map
  by ourself to prevent a panic ``locking against myself''.  The panic is,
  for example, caused when cdrecord is invoked with too large fifo size.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Mar 30 12:31:50 2000 UTC (22 years, 10 months ago) by augustss
Branch: MAIN
Changes since 1.39: +7 -7 lines
Diff to previous 1.39 (colored)

Remove more register declarations.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Mar 28 18:45:20 2000 UTC (22 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.38: +4 -1 lines
Diff to previous 1.38 (colored)

In mmap(), bail out with EOVERFLOW when mapping a regular file and the file
offset plus mapping length cannot be represented in an off_t.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Mar 26 20:54:47 2000 UTC (22 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.37: +5 -16 lines
Diff to previous 1.37 (colored)

Merge parts of chs-ubc2 into the trunk:
Add a new type voff_t (defined as a synonym for off_t) to describe offsets
into uvm objects, and update the appropriate interfaces to use it, the
most visible effect being the ability to mmap() file offsets beyond
the range of a vaddr_t.

Originally by Chuck Silvers; blame me for problems caused by merging this
into non-UBC.

Revision 1.35.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:43 1999 UTC (23 years, 1 month ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.35: +2 -3 lines
Diff to previous 1.35 (colored) next main 1.36 (colored)

Pull up to last week's -current.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Dec 11 05:38:41 1999 UTC (23 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, chs-ubc2-newbase
Changes since 1.36: +1 -13 lines
Diff to previous 1.36 (colored)

Remove a piece of code introduced in rev 1.36 that I didn't intend to
commit.

Revision 1.19.6.1 / (download) - annotate - [select for diffs], Tue Nov 30 13:36:27 1999 UTC (23 years, 2 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.19: +16 -1 lines
Diff to previous 1.19 (colored) next main 1.20 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.35.4.1 / (download) - annotate - [select for diffs], Mon Nov 15 00:42:30 1999 UTC (23 years, 2 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.35: +14 -3 lines
Diff to previous 1.35 (colored) next main 1.36 (colored)

Sync with -current

Revision 1.36 / (download) - annotate - [select for diffs], Sat Nov 13 00:24:38 1999 UTC (23 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: fvdl-softdep-base
Changes since 1.35: +14 -3 lines
Diff to previous 1.35 (colored)

Change the pmap_enter() API slightly; pmap_enter() now returns an error
value (KERN_SUCCESS or KERN_RESOURCE_SHORTAGE) indicating if it succeeded
or failed.  Change the `wired' and `access_type' arguments to a single
`flags' argument, which includes the access type, and flags:

	PMAP_WIRED	the old `wired' boolean
	PMAP_CANFAIL	pmap_enter() is allowed to fail

If PMAP_CANFAIL is not specified, the pmap should behave as it always
has in the face of a drastic resource shortage: fall over dead.

Change the fault handler to deal with failure (which indicates resource
shortage) by unlocking everything, waiting for the pagedaemon to free
more memory, then retrying the fault.

Revision 1.19.4.7 / (download) - annotate - [select for diffs], Wed Aug 11 05:47:06 1999 UTC (23 years, 5 months ago) by chs
Branch: chs-ubc2
Changes since 1.19.4.6: +6 -3 lines
Diff to previous 1.19.4.6 (colored) to branchpoint 1.19 (colored) next main 1.20 (colored)

add casts for trunc_page() and round_page() args.

Revision 1.19.4.6 / (download) - annotate - [select for diffs], Mon Aug 9 00:05:56 1999 UTC (23 years, 5 months ago) by chs
Branch: chs-ubc2
Changes since 1.19.4.5: +2 -14 lines
Diff to previous 1.19.4.5 (colored) to branchpoint 1.19 (colored)

create a new type "voff_t" for uvm_object offsets
and define it to be "off_t".  also, remove pgo_asyncget().

Revision 1.19.4.5 / (download) - annotate - [select for diffs], Mon Aug 2 23:16:15 1999 UTC (23 years, 6 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.19.4.4: +97 -19 lines
Diff to previous 1.19.4.4 (colored) to branchpoint 1.19 (colored)

Update from trunk.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jul 17 21:35:50 1999 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

Add a set of "lockflags", which can control the locking behavior
of some functions.  Use these flags in uvm_map_pageable() to determine
if the map is locked on entry (replaces an already present boolean_t
argument `islocked'), and if the function should return with the map
still locked.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Jul 14 21:06:30 1999 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.33: +4 -2 lines
Diff to previous 1.33 (colored)

Fix an operator precedence error which caused msync(2) to fail to pass
the PGO_CLEANIT flag to the object pagers.  Fixes PR #7978, from
Matthias Pfaller.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Jul 12 21:55:21 1999 UTC (23 years, 6 months ago) by kleink
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

XSH5: change function signature to `void *sbrk(intptr_t)'.

Revision 1.19.4.4 / (download) - annotate - [select for diffs], Sun Jul 11 05:44:01 1999 UTC (23 years, 6 months ago) by chs
Branch: chs-ubc2
Changes since 1.19.4.3: +3 -34 lines
Diff to previous 1.19.4.3 (colored) to branchpoint 1.19 (colored)

remove uvm_vnp_uncache(), it's no longer needed.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Jul 10 20:40:23 1999 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

Make a comment reflect reality.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Jul 10 20:29:24 1999 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (colored)

Slightly better test for "object with no real pages".  Test for NULL
pgo_releasepg rather than if the pager is the device pager.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jul 8 00:52:45 1999 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

Correct a comment.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jul 7 06:02:22 1999 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.28: +71 -9 lines
Diff to previous 1.28 (colored)

Add some more meat to madvise(2):
* Implement MADV_DONTNEED: deactivate pages in the specified range,
  semantics similar to Solaris's MADV_DONTNEED.
* Add MADV_FREE: free pages and swap resources associated with the
  specified range, causing the range to be reloaded from backing
  store (vnodes) or zero-fill (anonymous), semantics like FreeBSD's
  MADV_FREE and like Digital UNIX's MADV_DONTNEED (isn't it SO GREAT
  that madvise(2) isn't standardized!?)

As part of this, move the non-map-modifying advice handling out of
uvm_map_advise(), and into sys_madvise().

As another part, implement general amap cleaning in uvm_map_clean(), and
change uvm_map_clean() to only push dirty pages to disk if PGO_CLEANIT
is set in its flags (and update sys___msync13() accordingly).  XXX Add
a patchable global "amap_clean_works", defaulting to 1, which can disable
the amap cleaning code, just in case problems are unearthed; this gives
a developer/user a quick way to recover and send a bug report (e.g. boot
into DDB and change the value).

XXX Still need to implement a real uao_flush().

XXX Need to update the manual page.

With these changes, rebuilding libc will automatically cause the new
malloc(3) to use MADV_FREE to actually release pages and swap resources
when it decides that can be done.

Revision 1.19.2.1 / (download) - annotate - [select for diffs], Wed Jul 7 00:08:57 1999 UTC (23 years, 7 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Changes since 1.19: +16 -1 lines
Diff to previous 1.19 (colored) next main 1.20 (colored)

pullup 1.27->1.28 (cgd)

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jul 6 02:31:05 1999 UTC (23 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.27: +16 -1 lines
Diff to previous 1.27 (colored)

from the comment added to the code:
> XXX (in)sanity check.  We don't do proper datasize checking
> XXX for anonymous (or private writable) mmap().  However,
> XXX know that if we're trying to allocate more than the amount
> XXX remaining under our current data size limit, _that_ should
> XXX be disallowed.
This is one link on the chain of lossage known as PR#7897.  It's
definitely not the right fix, but it's better than nothing.

Revision 1.19.4.3 / (download) - annotate - [select for diffs], Thu Jul 1 23:55:17 1999 UTC (23 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.19.4.2: +2 -2 lines
Diff to previous 1.19.4.2 (colored) to branchpoint 1.19 (colored)

Sync w/ -current.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jul 1 18:40:39 1999 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

Fix tyop.  From Bill Studenmund.

Revision 1.19.4.2 / (download) - annotate - [select for diffs], Mon Jun 21 01:47:21 1999 UTC (23 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.19.4.1: +313 -42 lines
Diff to previous 1.19.4.1 (colored) to branchpoint 1.19 (colored)

Sync w/ -current.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jun 19 00:11:17 1999 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Fix a typo.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jun 18 05:13:47 1999 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.24: +59 -14 lines
Diff to previous 1.24 (colored)

Add the guts of mlockall(MCL_FUTURE).  This requires that a process's
"memlock" resource limit to uvm_mmap().  Update all calls accordingly.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jun 17 21:05:19 1999 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.23: +15 -4 lines
Diff to previous 1.23 (colored)

In sys_mmap():
- rather than treating MAP_COPY like MAP_PRIVATE by sheer virtue of it not
  being MAP_SHARED, actually convert the MAP_COPY flag into MAP_PRIVATE.
- return EINVAL if MAP_SHARED and MAP_PRIVATE are both included in flags.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jun 16 17:25:39 1999 UTC (23 years, 7 months ago) by minoura
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Remove extra ].

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jun 15 23:27:47 1999 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.21: +196 -4 lines
Diff to previous 1.21 (colored)

Several changes, developed and tested concurrently:
* Provide POSIX 1003.1b mlockall(2) and munlockall(2) system calls.
  MCL_CURRENT is presently implemented.  MCL_FUTURE is not fully
  implemented.  Also, the same one-unlock-for-every-lock caveat
  currently applies here as it does to mlock(2).  This will be
  addressed in a future commit.
* Provide the mincore(2) system call, with the same semantics as
  Solaris.
* Clean up the error recovery in uvm_map_pageable().
* Fix a bug where a process would hang if attempting to mlock a
  zero-fill region where none of the pages in that region are resident.
  [ This fix has been submitted for inclusion in 1.4.1 ]

Revision 1.19.4.1 / (download) - annotate - [select for diffs], Mon Jun 7 04:25:37 1999 UTC (23 years, 8 months ago) by chs
Branch: chs-ubc2
Changes since 1.19: +4 -1 lines
Diff to previous 1.19 (colored)

merge everything from chs-ubc branch.

Revision 1.21 / (download) - annotate - [select for diffs], Sun May 23 06:27:13 1999 UTC (23 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.20: +46 -23 lines
Diff to previous 1.20 (colored)

implement madvice() for MADV_{NORMAL,RANDOM,SEQUENTIAL}, others are not yet done.

Revision 1.20 / (download) - annotate - [select for diffs], Mon May 3 09:08:28 1999 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.19: +13 -13 lines
Diff to previous 1.19 (colored)

fix some formatting foo.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Mar 25 18:48:53 1999 UTC (23 years, 10 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: netbsd-1-4, kame, chs-ubc2
Changes since 1.18: +1 -5 lines
Diff to previous 1.18 (colored)

remove now >1 year old pre-release message.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Mar 24 03:52:41 1999 UTC (23 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

modify udv_attach() and its caller (uvm_mmap()) so that it's passed the
offset and size of the requested region to be mapped, so that the
udv_attach() can use the device d_mmap() entry to check mappability
of the requested region.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Mar 9 12:18:23 1999 UTC (23 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored)

Have unimplemented/unsupported system calls (madvise(), mincore(), sbrk(),
sstk()) fail with ENOSYS.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Mar 4 06:48:15 1999 UTC (23 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

fix printf format types.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Mon Nov 9 06:06:38 1998 UTC (24 years, 2 months ago) by chs
Branch: chs-ubc
Changes since 1.15: +4 -1 lines
Diff to previous 1.15 (colored) next main 1.16 (colored)

initial snapshot.  lots left to do.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Oct 11 23:18:20 1998 UTC (24 years, 3 months ago) by chuck
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base
Branch point for: chs-ubc
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

remove unused share map code from UVM:
 - update calls to uvm_unmap_remove/uvm_unmap (mainonly boolean arg
	has been removed)
 - replace UVM_ET_ISMAP checks with UVM_ET_ISSUBMAP checks

Revision 1.14 / (download) - annotate - [select for diffs], Wed Sep 30 15:44:10 1998 UTC (24 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.13: +2 -6 lines
Diff to previous 1.13 (colored)

back out previous.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Sep 30 12:07:51 1998 UTC (24 years, 4 months ago) by tv
Branch: MAIN
Changes since 1.12: +6 -2 lines
Diff to previous 1.12 (colored)

Declare silent success on madvise().  As an advisory call, it is harmless
to pretend success even though it's not supported, and some emulations
rely on its success.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Aug 13 02:11:02 1998 UTC (24 years, 5 months ago) by eeh
Branch: MAIN
Changes since 1.11: +43 -43 lines
Diff to previous 1.11 (colored)

Merge paddr_t changes into the main branch.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Thu Jul 30 14:04:13 1998 UTC (24 years, 6 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.11: +43 -43 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jul 7 23:22:13 1998 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.10: +5 -4 lines
Diff to previous 1.10 (colored)

Add support for mmap'ing disk block devices.

Revision 1.10 / (download) - annotate - [select for diffs], Sat May 30 22:21:03 1998 UTC (24 years, 8 months ago) by kleink
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Per XSH98, const'ify the `addr' arguments to mlock() and munlock().

Revision 1.9 / (download) - annotate - [select for diffs], Sun May 10 12:35:59 1998 UTC (24 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.8: +19 -4 lines
Diff to previous 1.8 (colored)

reject attempts to map an immutable or append-only file, shared with
write protection.  this stops data corruption where it was possible
to change the in-memory copy of an append-only file (but not the on-disk
copy).  this is documented in NetBSD security advisory 1998-003.  thanks
to darrenr, lukem, cgd, mycroft and mrg for this.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Apr 1 21:43:52 1998 UTC (24 years, 10 months ago) by tv
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

mmap() default MAP_SHARED/MAP_PRIVATE is ``DEBUG'', not ``DIAGNOSTIC''

Revision 1.7 / (download) - annotate - [select for diffs], Sat Mar 28 16:58:04 1998 UTC (24 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Per XPG, if the file descriptor argument to mmap() refers to a file whose
type is not supported (neither VREG nor VCHR, or not a vnode at all), fail
with ENODEV instead of EINVAL.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Mar 9 00:58:58 1998 UTC (24 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.5: +692 -687 lines
Diff to previous 1.5 (colored)

KNF.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Mar 3 14:34:10 1998 UTC (24 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +11 -22 lines
Diff to previous 1.4 (colored)

Convert MAP_PRIVATE device mappings to MAP_SHARED on *all* platforms, not just
the SPARC.
Remove the #ifdef COMPAT_13 for automatically adding a sharing type, since the
interface is *supposed* to support this.
Also modify the DIAGNOSTIC messages here a bit.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Feb 10 14:12:21 1998 UTC (24 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.3: +9 -9 lines
Diff to previous 1.3 (colored)

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

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 7 11:09:14 1998 UTC (24 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

restore rcsids

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 6 22:32:08 1998 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

RCS ID police.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Thu Feb 5 06:25:09 1998 UTC (25 years ago) by mrg
Branch: CDC
CVS Tags: uvm980205
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (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 UVM kernel code portion.


this will be KNF'd shortly.  :-)

Revision 1.1 / (download) - annotate - [select for diffs], Thu Feb 5 06:25:09 1998 UTC (25 years ago) by mrg
Branch: MAIN

Initial revision

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




CVSweb <webmaster@jp.NetBSD.org>