The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.235 / (download) - annotate - [select for diffs], Sat Aug 6 21:21:10 2022 UTC (5 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.234: +10 -4 lines
Diff to previous 1.234 (colored)

vnodeops(9): Take exclusive lock in read/seek for f_offset update.

Otherwise concurrent readers/seekers might clobber it.

Revision 1.234 / (download) - annotate - [select for diffs], Mon Jul 18 04:30:30 2022 UTC (6 months, 2 weeks ago) by thorpej
Branch: MAIN
Changes since 1.233: +26 -13 lines
Diff to previous 1.233 (colored)

Make kqueue event status for vnodes shareable, and for stacked file systems
like nullfs, make the upper vnode share that status with the lower vnode.

And, lo, NetBSD 9.99.99.

Fixes PR kern/56713.

Revision 1.233 / (download) - annotate - [select for diffs], Wed Jul 6 13:52:24 2022 UTC (6 months, 4 weeks ago) by riastradh
Branch: MAIN
Changes since 1.232: +8 -4 lines
Diff to previous 1.232 (colored)

kern: Work around spurious -Wtype-limits warnings.

This useless garbage warning is apparently designed to make it
painful to write portable safe arithmetic and I think we ought to
just disable it.

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

kern/vfs_vnops.c: Fix missing semicolon in previous.

Neglected to build and amend commit, oops.

Revision 1.231 / (download) - annotate - [select for diffs], Wed Jul 6 01:13:17 2022 UTC (6 months, 4 weeks ago) by riastradh
Branch: MAIN
Changes since 1.230: +36 -36 lines
Diff to previous 1.230 (colored)

kern/vfs_vnops.c: Sprinkle KNF.

No functional change intended.

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

mmap(2): Avoid overflow in overflow check in vn_mmap.

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

uvm(9): fo_mmap caller guarantees positive size.

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

Revision 1.228 / (download) - annotate - [select for diffs], Sun May 22 11:27:36 2022 UTC (8 months, 1 week ago) by andvar
Branch: MAIN
Changes since 1.227: +3 -3 lines
Diff to previous 1.227 (colored)

fix various small typos, mainly in comments.

Revision 1.227 / (download) - annotate - [select for diffs], Fri Mar 25 08:57:15 2022 UTC (10 months, 1 week ago) by hannken
Branch: MAIN
Changes since 1.226: +17 -9 lines
Diff to previous 1.226 (colored)

It is impossible for VOP_LOCK() to return ENOENT with LK_RETRY flag.
Remove the second call to VOP_LOCK().

Enable assertion "vrefcnt(vp) > 0" and assert all possible errors
for all LK_RETRY/LK_NOWAIT combinations.

Revision 1.226 / (download) - annotate - [select for diffs], Sat Mar 19 13:50:02 2022 UTC (10 months, 2 weeks ago) by hannken
Branch: MAIN
Changes since 1.225: +5 -3 lines
Diff to previous 1.225 (colored)

Lock vnode across VOP_OPEN.

Revision 1.225 / (download) - annotate - [select for diffs], Sun Mar 13 13:52:53 2022 UTC (10 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.224: +22 -4 lines
Diff to previous 1.224 (colored)

vfs(9): Avoid arithmetic overflow in vn_seek.

Reported-by: syzbot+b9f9a02148a40675c38a@syzkaller.appspotmail.com

Revision 1.224 / (download) - annotate - [select for diffs], Wed Oct 20 03:08:18 2021 UTC (15 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.223: +90 -2 lines
Diff to previous 1.223 (colored)

Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.

Revision 1.223 / (download) - annotate - [select for diffs], Sat Sep 11 10:09:13 2021 UTC (16 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.222: +4 -3 lines
Diff to previous 1.222 (colored)

sys/kern: Avoid fp->f_offset without the object (here, vnode) lock.

Revision 1.222 / (download) - annotate - [select for diffs], Sat Sep 11 10:08:55 2021 UTC (16 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.221: +53 -2 lines
Diff to previous 1.221 (colored)

sys/kern: Allow custom fileops to specify fo_seek method.

Previously only vnodes allowed lseek/pread[v]/pwrite[v], which meant
converting a regular device to a cloning device doesn't always work.

Semantics is:

(*fp->f_ops->fo_seek)(fp, delta, whence, newoffp, flags)

1. Compute a new offset according to whence + delta -- that is, if
   whence is SEEK_CUR, add delta to fp->f_offset; if whence is
   SEEK_END, add delta to end of file; if whence is SEEK_CUR, use delta
   as is.

2. If newoffp is nonnull, return the new offset in *newoffp.

3. If flags & FOF_UPDATE_OFFSET, set fp->f_offset to the new offset.

Access to fp->f_offset, and *newoffp if newoffp = &fp->f_offset, must
happen under the object lock (e.g., vnode lock), in order to
synchronize fp->f_offset reads and writes.

This change has the side effect that every call to VOP_SEEK happens
under the vnode lock now, when previously it didn't.  However, from a
review of all the VOP_SEEK implementations, it does not appear that
any file system even examines the vnode, let alone locks it.  So I
think this is safe -- and essentially the only reasonable way to do
things, given that it is used to validate a change from oldoff to
newoff, and oldoff becomes stale the moment we unlock the vnode.

No kernel bump because this reuses a spare entry in struct fileops,
and it is safe for the entry to be null, so all existing fileops will
continue to work as before (rejecting seek).

Revision 1.214.4.2 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:39 2021 UTC (18 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.214.4.1: +101 -45 lines
Diff to previous 1.214.4.1 (colored) to branchpoint 1.214 (colored) next main 1.215 (colored)

Sync with HEAD.

Revision 1.221 / (download) - annotate - [select for diffs], Sun Jul 18 09:30:36 2021 UTC (18 months, 2 weeks ago) by dholland
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.220: +6 -5 lines
Diff to previous 1.220 (colored)

Fix confusion arising from whether FOLLOW or NOFOLLOW is 0.

In vn_open, don't set and then throw away FOLLOW, and clarify the
comment about requesting FOLLOW/NOFOLLOW behavior.

Related to PR 56316.

Revision 1.220 / (download) - annotate - [select for diffs], Thu Jul 1 15:53:20 2021 UTC (19 months ago) by martin
Branch: MAIN
Changes since 1.219: +3 -3 lines
Diff to previous 1.219 (colored)

gcc (with some options) eroneously claims we would use "vp" uninitialized,
so initialize it as NULL.

Revision 1.219 / (download) - annotate - [select for diffs], Thu Jul 1 04:25:51 2021 UTC (19 months ago) by christos
Branch: MAIN
Changes since 1.218: +3 -3 lines
Diff to previous 1.218 (colored)

don't clear the error before we use it to determine if we are moving or duping.

Revision 1.218 / (download) - annotate - [select for diffs], Wed Jun 30 17:51:49 2021 UTC (19 months ago) by dholland
Branch: MAIN
Changes since 1.217: +10 -5 lines
Diff to previous 1.217 (colored)

Improve Christos's vn_open fix.

- assert about api misuse up front (suggested by riastradh)
- restore the behavior of returning EOPNOTSUPP if ret_fd is NULL and we
  get a fd back (otherwise things like ktruss -o /dev/stderr panic)
- clear error to 0 for the EDUPFD and EMOVEFD cases so opening a
  cloner succeeds

Revision 1.217 / (download) - annotate - [select for diffs], Wed Jun 30 11:20:32 2021 UTC (19 months ago) by christos
Branch: MAIN
Changes since 1.216: +13 -28 lines
Diff to previous 1.216 (colored)

PR/56286: Martin Husemann: Fix NULL deref on kmod load.
- No need to set ret_domove and ret_fd in the regular case, they are meaningless
- KASSERT instead of setting errno and then doing the NULL deref.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Jun 29 22:40:53 2021 UTC (19 months ago) by dholland
Branch: MAIN
Changes since 1.215: +109 -44 lines
Diff to previous 1.215 (colored)

Add containment for the cloning devices hack in vn_open.

Cloning devices (and also things like /dev/stderr) work by allocating
a struct file, stuffing it in the file table (which is a layer
violation), stuffing the file descriptor number for it in a magic
field of struct lwp (which is gross), and then "failing" with one of
two magic errnos, EDUPFD or EMOVEFD.

Before this commit, all callers of vn_open in the kernel (there are
quite a few) were expected to check for these errors and handle the
situation. Needless to say, none of them except for open() itself did,
resulting in internal negative errnos being returned to userspace.

This hack is fairly deeply rooted and cannot be eliminated all at
once. This commit adds logic to handle the magic errnos inside
vn_open; now on success vn_open returns either a vnode or an integer
file descriptor, along with a flag that says whether the underlying
code requested EDUPFD or EMOVEFD. Callers not prepared to cope with
file descriptors can pass NULL for the extra return values, in which
case if a file descriptor would be produced vn_open fails with
EOPNOTSUPP.

Since I'm rearranging vn_open's signature anyway, stop exposing struct
nameidata. Instead, take three arguments: an optional vnode to use as
the starting point (like openat()), the path, and additional namei
flags to use, restricted to NOCHROOT and TRYEMULROOT. (Other namei
behavior, e.g. NOFOLLOW, can be requested via the open flags.)

This change requires a kernel bump. Ride the one an hour ago.
(That was supposed to be coordinated; did not intend to let an hour
slip by. My fault.)

Revision 1.195.6.2 / (download) - annotate - [select for diffs], Mon Jun 21 14:55:15 2021 UTC (19 months, 1 week ago) by martin
Branch: netbsd-8
Changes since 1.195.6.1: +25 -4 lines
Diff to previous 1.195.6.1 (colored) to branchpoint 1.195 (colored) next main 1.196 (colored)

Pull up following revision(s) (requested by dholland in ticket #1685):

	sys/sys/namei.src: revision 1.59	(via patch)
	sys/kern/vfs_vnops.c: revision 1.215
	sys/kern/vfs_lookup.c: revision 1.226

Add a new namei flag NONEXCLHACK for open with O_CREAT and not O_EXCL.
This case needs to be distinguished from the other CREATE operations
because it is supposed to successfully return (and open) the target if
it exists. In the case where that target is the root, or a mount
point, such that there's no parent dir, "real" CREATE operations fail,
but O_CREAT without O_EXCL needs to succeed.

So (a) add the flag, (b) test for it in namei in the situation
described above, (c) set it in open under the appropriate
circumstances, and (d) because this can result in namei returning
ni_dvp of NULL, cope with that case.

Should get into -9 and maybe even -8, because it was prompted by
issues with 3rd-party code. The use of a flag (vs. adding an
additional nameiop, which would be more appropriate) was deliberate to
make the patch small and noninvasive.

Revision 1.200.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 14:50:57 2021 UTC (19 months, 1 week ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE
Changes since 1.200: +25 -4 lines
Diff to previous 1.200 (colored) next main 1.201 (colored)

Pull up following revision(s) (requested by dholland in ticket #1296):

	sys/sys/namei.src: revision 1.59	(via patch)
	sys/kern/vfs_vnops.c: revision 1.215
	sys/kern/vfs_lookup.c: revision 1.226

Add a new namei flag NONEXCLHACK for open with O_CREAT and not O_EXCL.
This case needs to be distinguished from the other CREATE operations
because it is supposed to successfully return (and open) the target if
it exists. In the case where that target is the root, or a mount
point, such that there's no parent dir, "real" CREATE operations fail,
but O_CREAT without O_EXCL needs to succeed.

So (a) add the flag, (b) test for it in namei in the situation
described above, (c) set it in open under the appropriate
circumstances, and (d) because this can result in namei returning
ni_dvp of NULL, cope with that case.

Should get into -9 and maybe even -8, because it was prompted by
issues with 3rd-party code. The use of a flag (vs. adding an
additional nameiop, which would be more appropriate) was deliberate to
make the patch small and noninvasive.

Revision 1.214.4.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:33 2021 UTC (19 months, 2 weeks ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.214: +25 -4 lines
Diff to previous 1.214 (colored)

Sync w/ HEAD.

Revision 1.215 / (download) - annotate - [select for diffs], Wed Jun 16 01:51:57 2021 UTC (19 months, 2 weeks ago) by dholland
Branch: MAIN
Changes since 1.214: +25 -4 lines
Diff to previous 1.214 (colored)

Add a new namei flag NONEXCLHACK for open with O_CREAT and not O_EXCL.

This case needs to be distinguished from the other CREATE operations
because it is supposed to successfully return (and open) the target if
it exists. In the case where that target is the root, or a mount
point, such that there's no parent dir, "real" CREATE operations fail,
but O_CREAT without O_EXCL needs to succeed.

So (a) add the flag, (b) test for it in namei in the situation
described above, (c) set it in open under the appropriate
circumstances, and (d) because this can result in namei returning
ni_dvp of NULL, cope with that case.

Should get into -9 and maybe even -8, because it was prompted by
issues with 3rd-party code. The use of a flag (vs. adding an
additional nameiop, which would be more appropriate) was deliberate to
make the patch small and noninvasive.

Revision 1.213.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:14 2020 UTC (2 years, 1 month ago) by thorpej
Branch: thorpej-futex
Changes since 1.213: +8 -3 lines
Diff to previous 1.213 (colored) next main 1.214 (colored)

Sync w/ HEAD.

Revision 1.214 / (download) - annotate - [select for diffs], Mon Nov 9 18:09:02 2020 UTC (2 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.213: +8 -3 lines
Diff to previous 1.213 (colored)

Lock the vnode while calling VOP_BMAP() for FIOGETBMAP.

Reported-by: syzbot+cfa1b773be7337250428@syzkaller.appspotmail.com

Revision 1.213 / (download) - annotate - [select for diffs], Thu Jun 11 22:21:05 2020 UTC (2 years, 7 months ago) by ad
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.212: +2 -4 lines
Diff to previous 1.212 (colored)

Counter tweaks:

- Don't need to count anonpages+filepages any more; clean+unknown+dirty for
  each kind of page can be summed to get the totals.

- Track the number of free pages with a counter so that it's one less thing
  for the allocator to do, which opens up further options there.

- Remove cpu_count_sync_one().  It has no users and doesn't save a whole lot.
  For the cheap option, give cpu_count_sync() a boolean parameter indicating
  that a cached value is okay, and rate limit the updates for cached values
  to hz.

Revision 1.212 / (download) - annotate - [select for diffs], Sat May 23 23:42:43 2020 UTC (2 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.211: +6 -6 lines
Diff to previous 1.211 (colored)

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

Revision 1.197.4.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:42 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.197.4.3: +9 -7 lines
Diff to previous 1.197.4.3 (colored) to branchpoint 1.197 (colored) next main 1.198 (colored)

Sync with HEAD

Revision 1.207.4.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:10 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.207: +9 -7 lines
Diff to previous 1.207 (colored) next main 1.208 (colored)

Sync with HEAD

Revision 1.211 / (download) - annotate - [select for diffs], Mon Apr 13 19:23:18 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.210: +3 -3 lines
Diff to previous 1.210 (colored)

Replace most uses of vp->v_usecount with a call to vrefcnt(vp), a function
that hides the details and does atomic_load_relaxed().  Signature matches
FreeBSD.

Revision 1.197.4.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:04 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.197.4.2: +58 -2 lines
Diff to previous 1.197.4.2 (colored) to branchpoint 1.197 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.210 / (download) - annotate - [select for diffs], Sun Apr 12 19:56:14 2020 UTC (2 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.209: +3 -3 lines
Diff to previous 1.209 (colored)

Oops missed one more NULL -> NOCRED

Revision 1.209 / (download) - annotate - [select for diffs], Sun Apr 12 15:55:53 2020 UTC (2 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.208: +2 -3 lines
Diff to previous 1.208 (colored)

delete debugging printf.

Revision 1.208 / (download) - annotate - [select for diffs], Sun Apr 12 13:12:42 2020 UTC (2 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.207: +8 -5 lines
Diff to previous 1.207 (colored)

Pass NOCRED instead of NULL for credentials. These routines are supposed
to be accessing system ACL's on behalf of the kernel. This code appears
to be copied from FreeBSD, but there it works because in FreeBSD NOCRED
is 0, ours is -1. I guess nobody has used system extended attributes on
NetBSD yet :-)

Revision 1.197.4.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:52 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.197.4.1: +24 -35 lines
Diff to previous 1.197.4.1 (colored) to branchpoint 1.197 (colored)

Merge changes from current as of 20200406

Revision 1.204.2.4 / (download) - annotate - [select for diffs], Sat Feb 29 22:00:03 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.204.2.3: +3 -6 lines
Diff to previous 1.204.2.3 (colored) to branchpoint 1.204 (colored) next main 1.205 (colored)

Back out experimental change - not ready for LK_SHARED on VOP_OPEN() just yet.

Revision 1.204.2.3 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:03 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.204.2.2: +9 -29 lines
Diff to previous 1.204.2.2 (colored) to branchpoint 1.204 (colored)

Sync with head.

Revision 1.207 / (download) - annotate - [select for diffs], Thu Feb 27 22:12:54 2020 UTC (2 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Changes since 1.206: +9 -2 lines
Diff to previous 1.206 (colored)

Tighten up the locking around vp->v_iflag a little more after the recent
split of vmobjlock & v_interlock.

Revision 1.206 / (download) - annotate - [select for diffs], Sun Feb 23 15:46:41 2020 UTC (2 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.205: +2 -29 lines
Diff to previous 1.205 (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.204.2.2 / (download) - annotate - [select for diffs], Sun Jan 19 21:23:36 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.204.2.1: +6 -3 lines
Diff to previous 1.204.2.1 (colored) to branchpoint 1.204 (colored)

Use LOCKLEAF in the few cases it's useful for ffs/tmpfs/nullfs.  Others need
to be checked.

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

Sync with head.

Revision 1.205 / (download) - annotate - [select for diffs], Sun Jan 12 18:37:10 2020 UTC (3 years ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.204: +10 -2 lines
Diff to previous 1.204 (colored)

- Shuffle some items around in struct lwp to save space.  Remove an unused
  item or two.

- For lockstat, get a useful callsite for vnode locks (caller to vn_lock()).

Revision 1.204 / (download) - annotate - [select for diffs], Mon Dec 16 22:47:54 2019 UTC (3 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.203: +6 -6 lines
Diff to previous 1.203 (colored)

- Extend the per-CPU counters matt@ did to include all of the hot counters
  in UVM, excluding uvmexp.free, which needs special treatment and will be
  done with a separate commit.  Cuts system time for a build by 20-25% on
  a 48 CPU machine w/DIAGNOSTIC.

- Avoid 64-bit integer divide on every fault (for rnd_add_uint32).

Revision 1.203 / (download) - annotate - [select for diffs], Sun Dec 1 13:56:29 2019 UTC (3 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.202: +5 -4 lines
Diff to previous 1.202 (colored)

Minor vnode locking changes:

- Stop using atomics to maniupulate v_usecount.  It was a mistake to begin
  with.  It doesn't work as intended unless the XLOCK bit is incorporated in
  v_usecount and we don't have that any more.  When I introduced this 10+
  years ago it was to reduce pressure on v_interlock but it doesn't do that,
  it just makes stuff disappear from lockstat output and introduces problems
  elsewhere.  We could do atomic usecounts on vnodes but there has to be a
  well thought out scheme.

- Resurrect LK_UPGRADE/LK_DOWNGRADE which will be needed to work effectively
  when there is increased use of shared locks on vnodes.

- Allocate the vnode lock using rw_obj_alloc() to reduce false sharing of
  struct vnode.

- Put all of the LRU lists into a single cache line, and do not requeue a
  vnode if it's already on the correct list and was requeued recently (less
  than a second ago).

Kernel build before and after:

119.63s real  1453.16s user  2742.57s system
115.29s real  1401.52s user  2690.94s system

Revision 1.202 / (download) - annotate - [select for diffs], Sun Nov 10 06:47:30 2019 UTC (3 years, 2 months ago) by mlelstv
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.201: +55 -2 lines
Diff to previous 1.201 (colored)

Add functions to open devices by device number or path.

Revision 1.201 / (download) - annotate - [select for diffs], Sun Sep 15 20:24:25 2019 UTC (3 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.200: +5 -2 lines
Diff to previous 1.200 (colored)

set VEXEC if FEXEC is set.

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

Sync with HEAD

Revision 1.200 / (download) - annotate - [select for diffs], Thu Mar 7 11:09:48 2019 UTC (3 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.199: +5 -2 lines
Diff to previous 1.199 (colored)

Change vn_openchk() to fail VNON and VBAD with error ENXIO.

Reported-by: syzbot+d66b1be08516a4d2d2b2@syzkaller.appspotmail.com
Reported-by: syzbot+c5eaef5a8af535c3b217@syzkaller.appspotmail.com

Revision 1.199 / (download) - annotate - [select for diffs], Mon Feb 4 04:18:59 2019 UTC (3 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.198: +3 -3 lines
Diff to previous 1.198 (colored)

s/fall into .../FALLTHROUGH/

Revision 1.197.2.1 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:42 2018 UTC (4 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored) next main 1.198 (colored)

Sync with HEAD

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

Revision 1.198 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (4 years, 5 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.195.6.1 / (download) - annotate - [select for diffs], Thu Apr 12 01:45:57 2018 UTC (4 years, 9 months ago) by msaitoh
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.195: +5 -2 lines
Diff to previous 1.195 (colored)

Pull up following revision(s) (requested by christos in ticket #741):
	lib/libc/stdio/flags.c: revision 1.19
	lib/libc/stdio/fdopen.c: revision 1.18
	sys/kern/vfs_vnops.c: revision 1.196
	lib/libc/stdio/freopen.c: revision 1.20
	lib/libc/stdio/fopen.c: revision 1.17
	external/bsd/nvi/dist/common/recover.c: revision 1.10
	external/bsd/nvi/dist/common/recover.c: revision 1.11
	lib/libc/sys/open.2: revision 1.58
	sys/sys/fcntl.h: revision 1.49
make the checkok test stricter to avoid races, and use O_REGULAR.
Instead of opening the file and using popen(3), pass the file descriptor
to sendmail directory. Idea and code from Todd Miller.
Add O_REGULAR to enforce opening of only regular files
(like we have O_DIRECTORY for directories).
This is better than open(, O_NONBLOCK), fstat()+S_ISREG() because opening
devices can have side effects.

Revision 1.185.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (5 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.185.2.3: +242 -14 lines
Diff to previous 1.185.2.3 (colored) to branchpoint 1.185 (colored) next main 1.186 (colored)

update from HEAD

Revision 1.197 / (download) - annotate - [select for diffs], Thu Nov 30 20:25:55 2017 UTC (5 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, 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
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.196: +3 -2 lines
Diff to previous 1.196 (colored)

add fo_name so we can identify the fileops in a simple way.

Revision 1.196 / (download) - annotate - [select for diffs], Thu Nov 9 20:30:01 2017 UTC (5 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.195: +5 -2 lines
Diff to previous 1.195 (colored)

Add O_REGULAR to enforce opening of only regular files
(like we have O_DIRECTORY for directories).
This is better than open(, O_NONBLOCK), fstat()+S_ISREG() because opening
devices can have side effects.

Revision 1.191.2.2 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:08 2017 UTC (5 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.191.2.1: +7 -5 lines
Diff to previous 1.191.2.1 (colored) to branchpoint 1.191 (colored) next main 1.192 (colored)

Sync with HEAD

Revision 1.193.2.2 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:27 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.193.2.1: +3 -3 lines
Diff to previous 1.193.2.1 (colored) to branchpoint 1.193 (colored) next main 1.194 (colored)

Sync with HEAD

Revision 1.193.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:03 2017 UTC (5 years, 9 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.193: +7 -5 lines
Diff to previous 1.193 (colored) next main 1.194 (colored)

Sync with HEAD

Revision 1.195 / (download) - annotate - [select for diffs], Thu Mar 30 09:13:37 2017 UTC (5 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored)

Lock the vnode before changing its writecount.

Revision 1.193.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:48 2017 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.193: +6 -4 lines
Diff to previous 1.193 (colored)

Sync with HEAD

Revision 1.194 / (download) - annotate - [select for diffs], Wed Mar 1 10:43:37 2017 UTC (5 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.193: +6 -4 lines
Diff to previous 1.193 (colored)

Must always lock the parent -> lock the child -> unlock the parent.

Revision 1.191.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:20 2015 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.191: +225 -3 lines
Diff to previous 1.191 (colored)

Sync with HEAD

Revision 1.193 / (download) - annotate - [select for diffs], Wed Feb 4 07:09:37 2015 UTC (8 years ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

 Remove useless semicolon reported by Henning Petersen in PR#49634.

Revision 1.190.2.1 / (download) - annotate - [select for diffs], Wed Dec 31 06:44:00 2014 UTC (8 years, 1 month 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.190: +224 -2 lines
Diff to previous 1.190 (colored) next main 1.191 (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.192 / (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.191: +224 -2 lines
Diff to previous 1.191 (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.191 / (download) - annotate - [select for diffs], Fri Sep 5 09:20:59 2014 UTC (8 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.190: +12 -12 lines
Diff to previous 1.190 (colored)

Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.

Revision 1.185.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.185.2.2: +31 -26 lines
Diff to previous 1.185.2.2 (colored) to branchpoint 1.185 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.189.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.189: +21 -4 lines
Diff to previous 1.189 (colored) next main 1.190 (colored)

Rebase.

Revision 1.190 / (download) - annotate - [select for diffs], Sun Jun 22 18:32:27 2014 UTC (8 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.189: +21 -4 lines
Diff to previous 1.189 (colored)

Fix a NULL pointer dereference after a loooong discussion with dholland@,
hannken@, blymn@ and martin@.

This bug would panic the system when veriexec is set to the VERIEXEC_LOCKDOWN
mode (only settable from root).

Revision 1.183.2.4 / (download) - annotate - [select for diffs], Thu May 22 11:41:04 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.183.2.3: +12 -24 lines
Diff to previous 1.183.2.3 (colored) to branchpoint 1.183 (colored) next main 1.184 (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.186.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:08 2014 UTC (8 years, 8 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.186: +12 -24 lines
Diff to previous 1.186 (colored) next main 1.187 (colored)

sync with head

Revision 1.189 / (download) - annotate - [select for diffs], Thu Feb 27 16:51:38 2014 UTC (8 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.188: +10 -24 lines
Diff to previous 1.188 (colored)

The current implementation of vn_lock() is racy.  Modification of
the vnode operations vector for active vnodes is unsafe because it
is not known whether deadfs or the original file system will be
called.

- Pass down LK_RETRY to the lock operation (hint for deadfs only).

- Change deadfs lock operation to return ENOENT if LK_RETRY is unset.

- Change all other lock operations to check for dead vnode once
  the vnode is locked and unlock and return ENOENT in this case.

With these changes in place vnode lock operations will never succeed
after vclean() has marked the vnode as VI_XLOCK and before vclean()
has changed the operations vector.

Adresses PR kern/37706 (Forced unmount of file systems is unsafe)

Discussed on tech-kern.

Welcome to 6.99.33

Revision 1.188 / (download) - annotate - [select for diffs], Thu Jan 23 10:13:57 2014 UTC (9 years ago) by hannken
Branch: MAIN
Changes since 1.187: +3 -2 lines
Diff to previous 1.187 (colored)

Change vnode operations create, mknod, mkdir and symlink to return
the resulting vnode *vpp unlocked.

Discussed on tech-kern@

Welcome to 6.99.30

Revision 1.187 / (download) - annotate - [select for diffs], Fri Jan 17 10:55:02 2014 UTC (9 years ago) by hannken
Branch: MAIN
Changes since 1.186: +3 -2 lines
Diff to previous 1.186 (colored)

Change vnode operations create, mknod, mkdir and symlink to keep the
directory node dvp locked on return.

Discussed on tech-kern@

Welcome to 6.99.29

Revision 1.183.2.3 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:45 2013 UTC (10 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.183.2.2: +2 -11 lines
Diff to previous 1.183.2.2 (colored) to branchpoint 1.183 (colored)

sync with (a bit old) head

Revision 1.183.8.1.4.1 / (download) - annotate - [select for diffs], Thu Nov 22 18:51:14 2012 UTC (10 years, 2 months ago) by riz
Branch: netbsd-6-0
CVS Tags: 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
Changes since 1.183.8.1: +2 -11 lines
Diff to previous 1.183.8.1 (colored) next main 1.183.8.2 (colored)

Pull up following revision(s) (requested by hannken in ticket #692):
	sys/kern/vfs_vnode.c: revision 1.17
	sys/kern/vfs_vnops.c: revision 1.186
Bring back Manuel Bouyers patch to resolve races between vget() and vrelel()
resulting in vget() returning dead vnodes.
It is impossible to resolve these races in vn_lock().
Needs pullup to NetBSD-6.

Revision 1.183.8.2 / (download) - annotate - [select for diffs], Thu Nov 22 18:50:23 2012 UTC (10 years, 2 months ago) by riz
Branch: netbsd-6
CVS Tags: 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
Changes since 1.183.8.1: +0 -9 lines
Diff to previous 1.183.8.1 (colored) to branchpoint 1.183 (colored) next main 1.184 (colored)

Pull up following revision(s) (requested by hannken in ticket #692):
	sys/kern/vfs_vnode.c: revision 1.17
	sys/kern/vfs_vnops.c: revision 1.186
Bring back Manuel Bouyers patch to resolve races between vget() and vrelel()
resulting in vget() returning dead vnodes.
It is impossible to resolve these races in vn_lock().
Needs pullup to NetBSD-6.

Revision 1.185.2.2 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:45 2012 UTC (10 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.185.2.1: +2 -11 lines
Diff to previous 1.185.2.1 (colored) to branchpoint 1.185 (colored)

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

Revision 1.186 / (download) - annotate - [select for diffs], Mon Nov 12 11:00:07 2012 UTC (10 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.185: +2 -11 lines
Diff to previous 1.185 (colored)

Bring back Manuel Bouyers patch to resolve races between vget() and vrelel()
resulting in vget() returning dead vnodes.
It is impossible to resolve these races in vn_lock().

Needs pullup to NetBSD-6.

Revision 1.183.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:39 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.183.2.1: +6 -4 lines
Diff to previous 1.183.2.1 (colored) to branchpoint 1.183 (colored)

sync with head

Revision 1.185.2.1 / (download) - annotate - [select for diffs], Wed Sep 12 06:15:34 2012 UTC (10 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.185: +18 -4 lines
Diff to previous 1.185 (colored)

Initial snapshot of work to eliminate 64K MAXPHYS.  Basically works for
physio (I/O to raw devices); needs more doing to get it going with the
filesystems, but it shouldn't damage data.

All work's been done on amd64 so far.  Not hard to add support to other
ports.  If others want to pitch in, one very helpful thing would be to
sort out when and how IDE disks can do 128K or larger transfers, and
adjust the various PCI IDE (or at least ahcisata) drivers and wd.c
accordingly -- it would make testing much easier.  Another very helpful
thing would be to implement a smart minphys() for RAIDframe along the
lines detailed in the MAXPHYS-NOTES file.

Revision 1.185 / (download) - annotate - [select for diffs], Fri Aug 24 05:52:17 2012 UTC (10 years, 5 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.184: +6 -4 lines
Diff to previous 1.184 (colored)

don't truncate size_t to int

Revision 1.183.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:32 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.183: +11 -2 lines
Diff to previous 1.183 (colored)

sync with head

Revision 1.183.8.1 / (download) - annotate - [select for diffs], Thu Apr 12 17:15:23 2012 UTC (10 years, 9 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: netbsd-6-0
Changes since 1.183: +11 -2 lines
Diff to previous 1.183 (colored)

Pull up following revision(s) (requested by hannken in ticket #179):
	sys/kern/vfs_vnops.c: revision 1.184
Fix vn_lock() to return an invalid (dead, clean) vnode
only if the caller requested it by setting LK_RETRY.
Should fix PR #46221: Kernel panic in NFS server code

Revision 1.183.6.1 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:41 2012 UTC (10 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.183: +11 -2 lines
Diff to previous 1.183 (colored) next main 1.184 (colored)

sync to latest -current.

Revision 1.184 / (download) - annotate - [select for diffs], Thu Apr 5 07:26:36 2012 UTC (10 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Changes since 1.183: +11 -2 lines
Diff to previous 1.183 (colored)

Fix vn_lock() to return an invalid (dead, clean) vnode
only if the caller requested it by setting LK_RETRY.

Should fix PR #46221: Kernel panic in NFS server code

Revision 1.183 / (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, netbsd-6-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, netbsd-6, jmcneill-usbmp
Changes since 1.182: +5 -4 lines
Diff to previous 1.182 (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.182 / (download) - annotate - [select for diffs], Tue Aug 16 22:33:38 2011 UTC (11 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.181: +3 -2 lines
Diff to previous 1.181 (colored)

vn_close: add an assertion

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

Catchup with rmind-uvmplock merge.

Revision 1.181 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:57 2011 UTC (11 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.180: +19 -19 lines
Diff to previous 1.180 (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.169.4.4 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:27 2011 UTC (11 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.169.4.3: +22 -22 lines
Diff to previous 1.169.4.3 (colored) to branchpoint 1.169 (colored) next main 1.170 (colored)

sync with head

Revision 1.180 / (download) - annotate - [select for diffs], Fri Nov 19 06:44:45 2010 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: cherry-xenmp
Changes since 1.179: +9 -6 lines
Diff to previous 1.179 (colored)

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

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

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

Revision 1.169.2.4 / (download) - annotate - [select for diffs], Sat Nov 6 08:08:44 2010 UTC (12 years, 2 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.169.2.3: +3 -3 lines
Diff to previous 1.169.2.3 (colored) to branchpoint 1.169 (colored) next main 1.170 (colored)

Sync with HEAD.

Revision 1.179 / (download) - annotate - [select for diffs], Thu Oct 28 20:32:45 2010 UTC (12 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base4
Changes since 1.178: +3 -3 lines
Diff to previous 1.178 (colored)

Zero entire stat structure before filling in contents to avoid
leaking kernel memory -- the elements are no longer packed now that
dev_t is 64bit.

from pgoyette

Revision 1.169.2.3 / (download) - annotate - [select for diffs], Fri Oct 22 07:22:32 2010 UTC (12 years, 3 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.169.2.2: +6 -3 lines
Diff to previous 1.169.2.2 (colored) to branchpoint 1.169 (colored)

Sync with HEAD (-D20101022).

Revision 1.156.2.5 / (download) - annotate - [select for diffs], Sat Oct 9 03:32:33 2010 UTC (12 years, 3 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.156.2.4: +8 -5 lines
Diff to previous 1.156.2.4 (colored) to branchpoint 1.156 (colored) next main 1.157 (colored)

sync with head

Revision 1.178 / (download) - annotate - [select for diffs], Tue Sep 21 19:26:19 2010 UTC (12 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base3
Changes since 1.177: +8 -2 lines
Diff to previous 1.177 (colored)

implement O_DIRECTORY as standardized in POSIX-2008,
for both native and linux emulations.
this fixes the rest of PR 43695.

Revision 1.177 / (download) - annotate - [select for diffs], Wed Aug 25 13:51:50 2010 UTC (12 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.176: +2 -5 lines
Diff to previous 1.176 (colored)

I'm not even going to describe this change.  I'll just say that
churn creates interesting code.

Fixes open(O_CREAT|O_TRUNC) on at least tmpfs and nfs to not fail
with ENOENT due to a racy removal of the newly created file.

Caught, as most bugs these days are, by a test run.

Revision 1.169.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:34 2010 UTC (12 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.169.2.1: +16 -49 lines
Diff to previous 1.169.2.1 (colored) to branchpoint 1.169 (colored)

Sync with HEAD.

Revision 1.156.2.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:44 2010 UTC (12 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.156.2.3: +67 -51 lines
Diff to previous 1.156.2.3 (colored) to branchpoint 1.156 (colored)

sync with head.

Revision 1.176 / (download) - annotate - [select for diffs], Wed Jul 28 09:30:21 2010 UTC (12 years, 6 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.175: +7 -15 lines
Diff to previous 1.175 (colored)

Modify vn_lock():
- Take v_interlock before examining v_iflag
- Must always be called without v_interlock taken,
  LK_INTERLOCK flag is no longer allowed.

Revision 1.175 / (download) - annotate - [select for diffs], Tue Jul 13 15:38:15 2010 UTC (12 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.174: +4 -2 lines
Diff to previous 1.174 (colored)

Don't leak kernel stack into userspace.

Revision 1.169.4.3 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:56 2010 UTC (12 years, 7 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.169.4.2: +12 -39 lines
Diff to previous 1.169.4.2 (colored) to branchpoint 1.169 (colored)

sync with head

Revision 1.174 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:12 2010 UTC (12 years, 7 months ago) by hannken
Branch: MAIN
Changes since 1.173: +11 -11 lines
Diff to previous 1.173 (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.173 / (download) - annotate - [select for diffs], Fri Jun 18 16:29:02 2010 UTC (12 years, 7 months ago) by hannken
Branch: MAIN
Changes since 1.172: +3 -26 lines
Diff to previous 1.172 (colored)

Remove the concept of recursive vnode locks by eliminating
vn_setrecurse(), vn_restorerecurse() and LK_CANRECURSE.
Welcome to 5.99.31

Discussed on tech-kern.

Revision 1.172 / (download) - annotate - [select for diffs], Sun Jun 6 08:01:31 2010 UTC (12 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.171: +4 -8 lines
Diff to previous 1.171 (colored)

Change layered file systems to always pass the locking VOP's down to the
leaf file system.  Remove now unused member v_vnlock from struct vnode.
Welcome to 5.99.30

Discussed on tech-kern.

Revision 1.169.4.2 / (download) - annotate - [select for diffs], Sun May 30 05:17:58 2010 UTC (12 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.169.4.1: +51 -2 lines
Diff to previous 1.169.4.1 (colored) to branchpoint 1.169 (colored)

sync with head

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:14 2010 UTC (12 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.169: +51 -2 lines
Diff to previous 1.169 (colored)

Sync with HEAD.

Revision 1.171 / (download) - annotate - [select for diffs], Fri Apr 23 15:38:46 2010 UTC (12 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.170: +42 -2 lines
Diff to previous 1.170 (colored)

Enforce RLIMIT_FSIZE before VOP_WRITE.  This adds support to file
system drivers where it was missing from and fixes one buggy
implementation.  The arguably weird semantics of the check are
maintained (v_size vs. va_bytes, overwrite).

Revision 1.170 / (download) - annotate - [select for diffs], Mon Mar 29 13:11:32 2010 UTC (12 years, 10 months ago) by pooka
Branch: MAIN
Changes since 1.169: +11 -2 lines
Diff to previous 1.169 (colored)

Stop exposing fifofs internals and leave only fifo_vnodeop_p visible.

Revision 1.169.4.1 / (download) - annotate - [select for diffs], Tue Mar 16 15:38:10 2010 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.169: +18 -18 lines
Diff to previous 1.169 (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.156.2.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:21 2010 UTC (12 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.156.2.2: +7 -7 lines
Diff to previous 1.156.2.2 (colored) to branchpoint 1.156 (colored)

sync with head

Revision 1.169 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:10 2010 UTC (13 years ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.168: +6 -6 lines
Diff to previous 1.168 (colored)

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

no functional change

Revision 1.168 / (download) - annotate - [select for diffs], Sun Dec 20 09:36:06 2009 UTC (13 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored)

If a multithreaded app closes an fd while another thread is blocked in
read/write/accept, then the expectation is that the blocked thread will
exit and the close complete.
Since only one fd is affected, but many fd can refer to the same file,
the close code can only request the fs code unblock with ERESTART.
Fixed for pipes and sockets, ERESTART will only be generated after such
a close - so there should be no change for other programs.
Also rename fo_abort() to fo_restart() (this used to be fo_drain()).
Fixes PR/26567

Revision 1.167 / (download) - annotate - [select for diffs], Wed Dec 9 21:32:59 2009 UTC (13 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (colored)

Rename fo_drain() to fo_abort(), 'drain' is used to mean 'wait for output
do drain' in many places, whereas fo_drain() was called in order to force
blocking read()/write() etc calls to return to userspace so that a close()
call from a different thread can complete.
In the sockets code comment out the broken code in the inner function,
it was being called from compat code.

Revision 1.162.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:36 2009 UTC (13 years, 6 months ago) by jym
Branch: jym-xensuspend
Changes since 1.162.2.1: +6 -6 lines
Diff to previous 1.162.2.1 (colored) to branchpoint 1.162 (colored) next main 1.163 (colored)

Sync with HEAD.

Revision 1.156.2.2 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:32 2009 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.156.2.1: +6 -6 lines
Diff to previous 1.156.2.1 (colored) to branchpoint 1.156 (colored)

sync with head

Revision 1.166 / (download) - annotate - [select for diffs], Sun May 17 05:54:42 2009 UTC (13 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base, jym-xensuspend-nbase
Changes since 1.165: +6 -6 lines
Diff to previous 1.165 (colored)

remove FILE_LOCK and FILE_UNLOCK.

Revision 1.162.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:58 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.162: +47 -7 lines
Diff to previous 1.162 (colored)

Sync with HEAD.

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

Revision 1.156.2.1 / (download) - annotate - [select for diffs], Mon May 4 08:13:49 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.156: +99 -28 lines
Diff to previous 1.156 (colored)

sync with head.

Revision 1.160.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:01 2009 UTC (13 years, 9 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.160.2.2: +46 -6 lines
Diff to previous 1.160.2.2 (colored) to branchpoint 1.160 (colored) next main 1.161 (colored)

Sync with HEAD.

Revision 1.165 / (download) - annotate - [select for diffs], Sat Apr 11 23:05:26 2009 UTC (13 years, 9 months ago) by christos
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.164: +8 -4 lines
Diff to previous 1.164 (colored)

Fix locking as Andy explained. Also fill in uid and gid like sys_pipe did.

Revision 1.160.4.1 / (download) - annotate - [select for diffs], Sat Apr 4 23:36:28 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.160: +40 -4 lines
Diff to previous 1.160 (colored) next main 1.161 (colored)

Pull up following revision(s) (requested by ad in ticket #661):
	sys/arch/xen/xen/xenevt.c: revision 1.32
	sys/compat/svr4/svr4_net.c: revision 1.56
	sys/compat/svr4_32/svr4_32_net.c: revision 1.19
	sys/dev/dmover/dmover_io.c: revision 1.32
	sys/dev/putter/putter.c: revision 1.21
	sys/kern/kern_descrip.c: revision 1.190
	sys/kern/kern_drvctl.c: revision 1.23
	sys/kern/kern_event.c: revision 1.64
	sys/kern/sys_mqueue.c: revision 1.14
	sys/kern/sys_pipe.c: revision 1.109
	sys/kern/sys_socket.c: revision 1.59
	sys/kern/uipc_syscalls.c: revision 1.136
	sys/kern/vfs_vnops.c: revision 1.164
	sys/kern/uipc_socket.c: revision 1.188
	sys/net/bpf.c: revision 1.144
	sys/net/if_tap.c: revision 1.55
	sys/opencrypto/cryptodev.c: revision 1.47
	sys/sys/file.h: revision 1.67
	sys/sys/param.h: patch
	sys/sys/socketvar.h: revision 1.119
Add fileops::fo_drain(), to be called from fd_close() when there is more
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.
Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.
thr0	accept(fd, ...)
thr1	close(fd)

Revision 1.164 / (download) - annotate - [select for diffs], Sat Apr 4 10:12:51 2009 UTC (13 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.163: +40 -4 lines
Diff to previous 1.163 (colored)

Add fileops::fo_drain(), to be called from fd_close() when there is more
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.

Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.

thr0	accept(fd, ...)
thr1	close(fd)

Revision 1.160.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:57 2009 UTC (13 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.160.2.1: +3 -3 lines
Diff to previous 1.160.2.1 (colored) to branchpoint 1.160 (colored)

Sync with HEAD.

Revision 1.163 / (download) - annotate - [select for diffs], Wed Feb 11 00:19:11 2009 UTC (13 years, 11 months ago) by enami
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

Make module (auto)loading under chroot envrionment actually work:
- NOCHROOT flag must be assigned to different bit from TRYEMULROOT
  since the code expected to be executed is in the else clase of
  if (flags & TRYEMULROOT).
- Necessary variables aren't set.

Revision 1.160.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:40 2009 UTC (14 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.160: +2 -8 lines
Diff to previous 1.160 (colored)

Sync with HEAD.

Revision 1.154.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:21 2009 UTC (14 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.154.6.4: +0 -6 lines
Diff to previous 1.154.6.4 (colored) to branchpoint 1.154 (colored) next main 1.155 (colored)

Sync with HEAD.

Revision 1.162 / (download) - annotate - [select for diffs], Sat Jan 17 07:02:35 2009 UTC (14 years ago) by yamt
Branch: MAIN
CVS Tags: mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.161: +2 -3 lines
Diff to previous 1.161 (colored)

malloc -> kmem_alloc.

Revision 1.158.4.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:10 2008 UTC (14 years, 1 month ago) by haad
Branch: haad-dm
Changes since 1.158.4.1: +2 -7 lines
Diff to previous 1.158.4.1 (colored) to branchpoint 1.158 (colored) next main 1.159 (colored)

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

Revision 1.161 / (download) - annotate - [select for diffs], Wed Nov 12 12:36:16 2008 UTC (14 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.160: +2 -7 lines
Diff to previous 1.160 (colored)

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

Proposed on tech-kern@.

Revision 1.158.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:29 2008 UTC (14 years, 3 months ago) by haad
Branch: haad-dm
Changes since 1.158: +19 -5 lines
Diff to previous 1.158 (colored)

Sync with HEAD.

Revision 1.154.6.4 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:54 2008 UTC (14 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.154.6.3: +17 -3 lines
Diff to previous 1.154.6.3 (colored) to branchpoint 1.154 (colored)

Sync with HEAD.

Revision 1.156.4.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:45 2008 UTC (14 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.156.4.1: +19 -5 lines
Diff to previous 1.156.4.1 (colored) to branchpoint 1.156 (colored) next main 1.157 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.160 / (download) - annotate - [select for diffs], Wed Aug 27 06:28:09 2008 UTC (14 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.159: +13 -5 lines
Diff to previous 1.159 (colored)

Writing 0 bytes on an O_APPEND file should not affect the offset

Revision 1.159 / (download) - annotate - [select for diffs], Thu Jul 31 05:38:05 2008 UTC (14 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.158: +8 -2 lines
Diff to previous 1.158 (colored)

Merge the simonb-wapbl branch.  From the original branch commit:

   Add Wasabi System's WAPBL (Write Ahead Physical Block Logging)
   journaling code.  Originally written by Darrin B. Jewell while
   at Wasabi and updated to -current by Antti Kantee, Andy Doran,
   Greg Oster and Simon Burge.

OK'd by core@, releng@.

Revision 1.156.4.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:52 2008 UTC (14 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.156: +37 -14 lines
Diff to previous 1.156 (colored)

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

Revision 1.158.2.1 / (download) - annotate - [select for diffs], Tue Jun 10 14:51:22 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.158: +8 -2 lines
Diff to previous 1.158 (colored) next main 1.159 (colored)

Initial commit of Wasabi System's WAPBL (Write Ahead Physical Block
Logging) journaling code.  Originally written by Darrin B. Jewell
while at Wasabi and updated to -current by Antti Kantee, Andy Doran,
Greg Oster and Simon Burge.

Still a number of issues - look in doc/BRANCHES for "simonb-wapbl"
for more info.

Revision 1.154.6.3 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:36 2008 UTC (14 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.154.6.2: +35 -12 lines
Diff to previous 1.154.6.2 (colored) to branchpoint 1.154 (colored)

Sync with HEAD.

Also fix build.

Revision 1.155.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:40 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.155.2.1: +37 -14 lines
Diff to previous 1.155.2.1 (colored) to branchpoint 1.155 (colored) next main 1.156 (colored)

sync with head

Revision 1.158 / (download) - annotate - [select for diffs], Mon Jun 2 16:08:41 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: simonb-wapbl, haad-dm
Changes since 1.157: +20 -9 lines
Diff to previous 1.157 (colored)

Don't needlessly acquire v_interlock.

Revision 1.157 / (download) - annotate - [select for diffs], Mon Jun 2 15:29:18 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.156: +19 -7 lines
Diff to previous 1.156 (colored)

vn_marktext, vn_lock: don't needlessly acquire v_interlock.

Revision 1.154.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:15 2008 UTC (14 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.154.6.1: +2 -2 lines
Diff to previous 1.154.6.1 (colored) to branchpoint 1.154 (colored)

Sync with HEAD.

Revision 1.155.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:12 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.155: +4 -4 lines
Diff to previous 1.155 (colored)

sync with head.

Revision 1.156 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:30 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa
Changes since 1.155: +4 -4 lines
Diff to previous 1.155 (colored)

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

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

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

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

Revision 1.154.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:05 2008 UTC (14 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.154: +48 -50 lines
Diff to previous 1.154 (colored)

Sync with HEAD.

Revision 1.92.2.9 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:03 2008 UTC (14 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.92.2.8: +48 -50 lines
Diff to previous 1.92.2.8 (colored) next main 1.93 (colored)

sync with head.

Revision 1.140.6.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:02 2008 UTC (14 years, 10 months ago) by matt
Branch: matt-armv6
Changes since 1.140.6.2: +12 -19 lines
Diff to previous 1.140.6.2 (colored) to branchpoint 1.140 (colored) next main 1.141 (colored)

sync with HEAD

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

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

Revision 1.143.4.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:48 2008 UTC (14 years, 11 months ago) by mjf
Branch: mjf-devfs
Changes since 1.143.4.2: +37 -45 lines
Diff to previous 1.143.4.2 (colored) to branchpoint 1.143 (colored) next main 1.144 (colored)

Sync with HEAD.

Revision 1.92.2.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:25 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.92.2.7: +12 -19 lines
Diff to previous 1.92.2.7 (colored)

sync with head.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Jan 30 09:50:22 2008 UTC (15 years ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: mjf-devfs2
Changes since 1.153: +7 -16 lines
Diff to previous 1.153 (colored)

Replace struct lock on vnodes with a simpler lock object built on
krwlock_t. This is a step towards removing lockmgr and simplifying
vnode locking. Discussed on tech-kern.

Revision 1.153 / (download) - annotate - [select for diffs], Fri Jan 25 14:37:33 2008 UTC (15 years ago) by ad
Branch: MAIN
Changes since 1.152: +8 -4 lines
Diff to previous 1.152 (colored)

vn_setrecurse: if no lock is exported, use v_lock. Works around issue
described in PR kern/37808. The ideal solution here is to kill vnode
lock recursion, which should not be hard once it is understood what
the two remaining callers of vn_setrecurse() are doing.

Revision 1.152 / (download) - annotate - [select for diffs], Fri Jan 25 14:32:15 2008 UTC (15 years ago) by ad
Branch: MAIN
Changes since 1.151: +2 -6 lines
Diff to previous 1.151 (colored)

Remove VOP_LEASE. Discussed on tech-kern.

Revision 1.151 / (download) - annotate - [select for diffs], Fri Jan 25 06:32:20 2008 UTC (15 years ago) by pooka
Branch: MAIN
Changes since 1.150: +5 -3 lines
Diff to previous 1.150 (colored)

vn_write: include f_advice in VOP_WRITE

Revision 1.92.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:34 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.92.2.6: +34 -35 lines
Diff to previous 1.92.2.6 (colored)

sync with head

Revision 1.140.6.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:32 2008 UTC (15 years ago) by matt
Branch: matt-armv6
Changes since 1.140.6.1: +80 -107 lines
Diff to previous 1.140.6.1 (colored) to branchpoint 1.140 (colored)

sync with HEAD

Revision 1.148.4.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:47 2008 UTC (15 years ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.148.4.1: +8 -8 lines
Diff to previous 1.148.4.1 (colored) to branchpoint 1.148 (colored) next main 1.149 (colored)

Sync with HEAD

Revision 1.150 / (download) - annotate - [select for diffs], Sat Jan 5 19:08:49 2008 UTC (15 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.149: +10 -10 lines
Diff to previous 1.149 (colored)

Use FILE_LOCK() and FILE_UNLOCK()

Revision 1.148.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:56:26 2008 UTC (15 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.148: +25 -26 lines
Diff to previous 1.148 (colored)

Sync with HEAD

Revision 1.149 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:57 2008 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.148: +25 -26 lines
Diff to previous 1.148 (colored)

Merge vmlocking2 to head.

Revision 1.143.4.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:20 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.143.4.1: +3 -3 lines
Diff to previous 1.143.4.1 (colored) to branchpoint 1.143 (colored)

Sync with HEAD.

Revision 1.147.2.5 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:49 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.147.2.4: +3 -3 lines
Diff to previous 1.147.2.4 (colored) to branchpoint 1.147 (colored) next main 1.148 (colored)

Sync with head.

Revision 1.147.2.4 / (download) - annotate - [select for diffs], Tue Dec 18 15:24:25 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.147.2.3: +4 -4 lines
Diff to previous 1.147.2.3 (colored) to branchpoint 1.147 (colored)

Lock readahead context using the associated object's lock.

Revision 1.147.2.3 / (download) - annotate - [select for diffs], Mon Dec 10 19:28:06 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.147.2.2: +4 -4 lines
Diff to previous 1.147.2.2 (colored) to branchpoint 1.147 (colored)

- Don't drain the vnode lock in vclean(); reference counting and XLOCK
  should be enough.
- LK_SETRECURSE is gone.

Revision 1.147.2.2 / (download) - annotate - [select for diffs], Sun Dec 9 22:24:49 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.147.2.1: +4 -4 lines
Diff to previous 1.147.2.1 (colored) to branchpoint 1.147 (colored)

do_sys_mount: use vn_setrecurse(), not LK_SETRECURSE.

Revision 1.140.4.4 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:29 2007 UTC (15 years, 1 month ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.140.4.3: +3 -3 lines
Diff to previous 1.140.4.3 (colored) to branchpoint 1.140 (colored) next main 1.141 (colored)

Sync with HEAD.

Revision 1.148 / (download) - annotate - [select for diffs], Sat Dec 8 19:29:50 2007 UTC (15 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.147: +3 -3 lines
Diff to previous 1.147 (colored)

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

Revision 1.143.4.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:46 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.143: +48 -74 lines
Diff to previous 1.143 (colored)

Sync with HEAD.

Revision 1.92.2.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:33:25 2007 UTC (15 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.92.2.5: +48 -74 lines
Diff to previous 1.92.2.5 (colored)

sync with head

Revision 1.147.2.1 / (download) - annotate - [select for diffs], Tue Dec 4 13:03:22 2007 UTC (15 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.147: +21 -22 lines
Diff to previous 1.147 (colored)

Pull the vmlocking changes into a new branch.

Revision 1.140.4.3 / (download) - annotate - [select for diffs], Mon Dec 3 16:15:00 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.140.4.2: +32 -53 lines
Diff to previous 1.140.4.2 (colored) to branchpoint 1.140 (colored)

Sync with HEAD.

Revision 1.147 / (download) - annotate - [select for diffs], Sun Dec 2 13:56:17 2007 UTC (15 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Branch point for: vmlocking2
Changes since 1.146: +2 -36 lines
Diff to previous 1.146 (colored)

Fscow_run(): add a flag "bool data_valid" to note still valid data.
Buffers run through copy-on-write are marked B_COWDONE.  This condition
is valid until the buffer has run through bwrite() and gets cleared from
biodone().

Welcome to 4.99.39.

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.146 / (download) - annotate - [select for diffs], Fri Nov 30 16:52:21 2007 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.145: +29 -16 lines
Diff to previous 1.145 (colored)

- reduce the number of VOP_ACCESS calls for O_RDWR.  for nfs, it reduces
  the number of rpcs.
- reduce code duplication.

Revision 1.145 / (download) - annotate - [select for diffs], Thu Nov 29 18:07:11 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.144: +5 -5 lines
Diff to previous 1.144 (colored)

Use atomics to maintain uvmexp.{anon,exec,file}pages.

Revision 1.140.4.2 / (download) - annotate - [select for diffs], Tue Nov 27 19:38:19 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.140.4.1: +20 -25 lines
Diff to previous 1.140.4.1 (colored) to branchpoint 1.140 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.144 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:10 2007 UTC (15 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.143: +20 -25 lines
Diff to previous 1.143 (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.140.6.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:32:51 2007 UTC (15 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.140: +61 -58 lines
Diff to previous 1.140 (colored)

sync with HEAD

Revision 1.92.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:43 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.92.2.4: +61 -58 lines
Diff to previous 1.92.2.4 (colored)

sync with head.

Revision 1.140.4.1 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:48 2007 UTC (15 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.140: +61 -58 lines
Diff to previous 1.140 (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.140.8.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:51 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.140: +61 -58 lines
Diff to previous 1.140 (colored) next main 1.141 (colored)

sync with head.

Revision 1.143 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:27 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.142: +31 -14 lines
Diff to previous 1.142 (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.135.2.9 / (download) - annotate - [select for diffs], Tue Oct 9 15:22:23 2007 UTC (15 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.135.2.8: +23 -44 lines
Diff to previous 1.135.2.8 (colored) to branchpoint 1.135 (colored) next main 1.136 (colored)

Sync with head.

Revision 1.135.2.8 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:34 2007 UTC (15 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.135.2.7: +3 -2 lines
Diff to previous 1.135.2.7 (colored) to branchpoint 1.135 (colored)

Sync with head.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Oct 8 15:12:09 2007 UTC (15 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.141: +10 -2 lines
Diff to previous 1.141 (colored)

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

Revision 1.141 / (download) - annotate - [select for diffs], Sun Oct 7 13:39:04 2007 UTC (15 years, 4 months ago) by hannken
Branch: MAIN
Changes since 1.140: +24 -46 lines
Diff to previous 1.140 (colored)

Update the file system copy-on-write handler.

- Instead of hooking the handler on the specdev of a mounted file system
  hook directly on the `struct mount'.

- Rename from `vn_cow_*' to `fscow_*' and move to `kern/vfs_trans.c'.  Use
  `mount_*specific' instead of clobbering `struct mount' or `struct specinfo'.

- Replace the hand-made reader/writer lock with a krwlock.

- Keep `vn_cow_*' functions and mark as obsolete.

- Welcome to NetBSD 4.99.32 - `struct specinfo' changed size.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>

Revision 1.92.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:41:24 2007 UTC (15 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.92.2.3: +17 -105 lines
Diff to previous 1.92.2.3 (colored)

sync with head.

Revision 1.135.2.7 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:45 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.135.2.6: +2 -7 lines
Diff to previous 1.135.2.6 (colored) to branchpoint 1.135 (colored)

Sync with HEAD.

Revision 1.139.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:25 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.139: +2 -7 lines
Diff to previous 1.139 (colored) next main 1.140 (colored)

Sync with HEAD.

Revision 1.140.10.2 / (download) - annotate - [select for diffs], Sun Jul 22 19:16:06 2007 UTC (15 years, 6 months ago) by pooka
Branch: matt-mips64
Changes since 1.140.10.1: +888 -0 lines
Diff to previous 1.140.10.1 (colored) to branchpoint 1.140 (colored) next main 1.141 (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.140.10.1, Sun Jul 22 19:16:05 2007 UTC (15 years, 6 months ago) by pooka
Branch: matt-mips64
Changes since 1.140: +0 -888 lines
FILE REMOVED

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

Revision 1.140 / (download) - annotate - [select for diffs], Sun Jul 22 19:16:05 2007 UTC (15 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.139: +2 -7 lines
Diff to previous 1.139 (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.135.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:10:25 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.135: +14 -97 lines
Diff to previous 1.135 (colored) next main 1.136 (colored)

Sync with head.

Revision 1.135.2.6 / (download) - annotate - [select for diffs], Sun Jun 17 21:31:35 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.135.2.5: +11 -11 lines
Diff to previous 1.135.2.5 (colored) to branchpoint 1.135 (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.135.2.5 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:30 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.135.2.4: +14 -20 lines
Diff to previous 1.135.2.4 (colored) to branchpoint 1.135 (colored)

Sync with head.

Revision 1.139 / (download) - annotate - [select for diffs], Sat May 19 22:11:24 2007 UTC (15 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.138: +10 -18 lines
Diff to previous 1.138 (colored)

- remove pathname_ interface.
- use macros to deal with pathnames in userspace, when veriexec is used.
- reorder the veriexec_ call arguments for consistency.
With help from elad@ finding the last bug.

Revision 1.133.2.3 / (download) - annotate - [select for diffs], Mon May 7 10:55:51 2007 UTC (15 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.133.2.2: +6 -4 lines
Diff to previous 1.133.2.2 (colored) to branchpoint 1.133 (colored) next main 1.134 (colored)

sync with head.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Apr 22 08:30:01 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.137: +6 -4 lines
Diff to previous 1.137 (colored)

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

Revision 1.133.2.2 / (download) - annotate - [select for diffs], Sun Apr 15 16:03:54 2007 UTC (15 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.133.2.1: +2 -79 lines
Diff to previous 1.133.2.1 (colored) to branchpoint 1.133 (colored)

sync with head.

Revision 1.135.2.4 / (download) - annotate - [select for diffs], Fri Apr 13 15:49:49 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.135.2.3: +28 -8 lines
Diff to previous 1.135.2.3 (colored) to branchpoint 1.135 (colored)

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

Revision 1.135.2.3 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:43 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.135.2.2: +2 -79 lines
Diff to previous 1.135.2.2 (colored) to branchpoint 1.135 (colored)

Sync with head.

Revision 1.137 / (download) - annotate - [select for diffs], Sun Apr 8 11:20:44 2007 UTC (15 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.136: +2 -42 lines
Diff to previous 1.136 (colored)

Remove now obsolete vn_start_write() and vn_finished_write() and
corresponding flags.

Revert softdep_trackbufs() to its state before vn_start_write() was added.

Remove from struct mount now unneeded flags IMNT_SUSPEND* and
members mnt_writeopcountupper, mnt_writeopcountlower and mnt_leaf.

Welcome to 4.99.17

Revision 1.136 / (download) - annotate - [select for diffs], Tue Apr 3 16:11:31 2007 UTC (15 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.135: +2 -39 lines
Diff to previous 1.135 (colored)

Remove calls to now obsolete vn_start_write() and vn_finished_write().

Revision 1.135.2.2 / (download) - annotate - [select for diffs], Wed Mar 21 20:11:54 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.135.2.1: +8 -4 lines
Diff to previous 1.135.2.1 (colored) to branchpoint 1.135 (colored)

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

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

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

Revision 1.133.2.1 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:47 2007 UTC (15 years, 10 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.133: +5 -5 lines
Diff to previous 1.133 (colored)

Sync with HEAD.

Revision 1.135 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:27 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.134: +4 -4 lines
Diff to previous 1.134 (colored)

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

Revision 1.134 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:12 2007 UTC (15 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored)

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

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

sync with head.

Revision 1.133 / (download) - annotate - [select for diffs], Fri Feb 16 17:24:00 2007 UTC (15 years, 11 months ago) by hannken
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.132: +7 -61 lines
Diff to previous 1.132 (colored)

Make fstrans(9) the default helper for file system suspension.
Replaces the now obsolete vn_start_write()/vn_finished_write().

Revision 1.132 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:32 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.131: +9 -6 lines
Diff to previous 1.131 (colored)

Merge newlock2 to head.

Revision 1.122.4.4 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:41 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.122.4.3: +6 -2 lines
Diff to previous 1.122.4.3 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

Sync with head.

Revision 1.131 / (download) - annotate - [select for diffs], Fri Jan 19 14:49:10 2007 UTC (16 years ago) by hannken
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.130: +6 -2 lines
Diff to previous 1.130 (colored)

New file system suspension API to replace vn_start_write and vn_finished_write.
The suspension helpers are now put into file system specific operations.
This means every file system not supporting these helpers cannot be suspended
and therefore snapshots are no longer possible.

Implemented for file systems of type ffs.

The new API is enabled on a kernel option NEWVNGATE.  This option is
not enabled by default in any kernel config.

Presented and discussed on tech-kern with much input from
Bill Studenmund <wrstuden@netbsd.org> and YAMAMOTO Takashi <yamt@netbsd.org>.

Welcome to 4.99.9 (new vfs op vfs_suspendctl).

Revision 1.122.4.3 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:08 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.122.4.2: +26 -89 lines
Diff to previous 1.122.4.2 (colored) to branchpoint 1.122 (colored)

Sync with head.

Revision 1.129.2.1 / (download) - annotate - [select for diffs], Sat Jan 6 13:22:04 2007 UTC (16 years, 1 month 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.129: +26 -88 lines
Diff to previous 1.129 (colored) next main 1.130 (colored)

Pull up following revision(s) (requested by elad in ticket #318):
	sys/kern/kern_verifiedexec.c: revision 1.88
	sys/kern/vfs_vnops.c: revision 1.130
	sys/sys/verified_exec.h: revision 1.48
Avoid TOCTOU in Veriexec by introducing veriexec_openchk() to enforce
the policy and using a single namei() call in vn_open().

Revision 1.92.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:07 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.92.2.1: +50 -83 lines
Diff to previous 1.92.2.1 (colored)

sync with head.

Revision 1.130 / (download) - annotate - [select for diffs], Sat Dec 30 15:26:55 2006 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.129: +26 -88 lines
Diff to previous 1.129 (colored)

Avoid TOCTOU in Veriexec by introducing veriexec_openchk() to enforce
the policy and using a single namei() call in vn_open().

Revision 1.124.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:46 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.124.2.1: +44 -33 lines
Diff to previous 1.124.2.1 (colored) to branchpoint 1.124 (colored) next main 1.125 (colored)

sync with head.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Nov 30 01:09:47 2006 UTC (16 years, 2 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.128: +11 -12 lines
Diff to previous 1.128 (colored)

Massive restructuring and cleanup of Veriexec, mainly in preparation
for work on some future functionality.

  - Veriexec data-structures are no longer exposed.

  - Thanks to using proplib for data passing now, the interface
    changes further to accomodate that.

    Introduce four new functions. First, veriexec_file_add(), to add
    a new file to be monitored by Veriexec, to replace both
    veriexec_load() and veriexec_hashadd(). veriexec_table_add(), to
    replace veriexec_newtable(), will be used to optimize hash table
    size (during preload), and finally, veriexec_convert(), to convert
    an internal entry to one userland can read.

  - Introduce veriexec_unmountchk(), to enforce Veriexec unmount
    policy. This cleans up a bit of code in kern/vfs_syscalls.c.

  - Rename veriexec_tblfind() with veriexec_table_lookup(), and make
    it static. More functions that became static: veriexec_fp_cmp(),
    veriexec_fp_calc().

  - veriexec_verify() no longer returns the entry as well, but just
    sets a boolean indicating whether an entry was found or not.

  - veriexec_purge() now takes a struct vnode *.

  - veriexec_add_fp_name() was merged into veriexec_add_fp_ops(), that
    changed its name to veriexec_fpops_add(). veriexec_find_ops() was
    also renamed to veriexec_fpops_lookup().

    Also on the fp-ops front, the three function types used to initialize,
    update, and finalize a hash context were renamed to
    veriexec_fpop_init_t, veriexec_fpop_update_t, and veriexec_fpop_final_t
    respectively.

  - Introduce a new malloc(9) type, M_VERIEXEC, and use it instead of
    M_TEMP, so we can tell exactly how much memory is used by Veriexec.

  - And, most importantly, whitespace and indentation nits.

Built successfuly for amd64, i386, sparc, and sparc64. Tested on amd64.

Revision 1.122.4.2 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:23 2006 UTC (16 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.122.4.1: +64 -25 lines
Diff to previous 1.122.4.1 (colored) to branchpoint 1.122 (colored)

Sync with head.

Revision 1.128 / (download) - annotate - [select for diffs], Wed Nov 1 22:45:14 2006 UTC (16 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.127: +7 -7 lines
Diff to previous 1.127 (colored)

printf() -> log().

Revision 1.127 / (download) - annotate - [select for diffs], Sat Oct 28 11:43:45 2006 UTC (16 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.126: +14 -9 lines
Diff to previous 1.126 (colored)

Adapt to changes suggested by yamt@ to get rid of __UNCONST() stuff.

While here, don't leak pathbuf on success.

Revision 1.126 / (download) - annotate - [select for diffs], Fri Oct 27 20:16:10 2006 UTC (16 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.125: +26 -19 lines
Diff to previous 1.125 (colored)

Don't allocate MAXPATHLEN on the stack.

Prompted by and initial diff okay yamt@

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

sync with head

Revision 1.125 / (download) - annotate - [select for diffs], Thu Oct 5 14:48:32 2006 UTC (16 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.124: +6 -2 lines
Diff to previous 1.124 (colored)

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

Revision 1.106.2.6 / (download) - annotate - [select for diffs], Thu Sep 14 12:31:49 2006 UTC (16 years, 4 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.106.2.5: +27 -4 lines
Diff to previous 1.106.2.5 (colored) to branchpoint 1.106 (colored) next main 1.107 (colored)

sync with head.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Sep 12 08:23:51 2006 UTC (16 years, 4 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Changes since 1.123: +4 -4 lines
Diff to previous 1.123 (colored)

Fix typo.

Revision 1.122.4.1 / (download) - annotate - [select for diffs], Mon Sep 11 00:20:01 2006 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.122: +9 -6 lines
Diff to previous 1.122 (colored)

- Convert some locks to mutexes and RW locks.
- Use the proclist_lock to protect pgrps and sessions in some places.

Revision 1.123 / (download) - annotate - [select for diffs], Sun Sep 10 10:59:44 2006 UTC (16 years, 4 months ago) by blymn
Branch: MAIN
Changes since 1.122: +27 -4 lines
Diff to previous 1.122 (colored)

Prevent a veriexec file from being truncated.

Revision 1.104.2.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:17 2006 UTC (16 years, 4 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.104: +59 -60 lines
Diff to previous 1.104 (colored) next main 1.105 (colored)

sync with head

Revision 1.106.2.5 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:47 2006 UTC (16 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.106.2.4: +28 -37 lines
Diff to previous 1.106.2.4 (colored) to branchpoint 1.106 (colored)

sync with head

Revision 1.122 / (download) - annotate - [select for diffs], Wed Jul 26 09:33:57 2006 UTC (16 years, 6 months ago) by dogcow
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: newlock2
Changes since 1.121: +1 -1 lines
Diff to previous 1.121 (colored)

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

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

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

Revision 1.120 / (download) - annotate - [select for diffs], Mon Jul 24 21:32:39 2006 UTC (16 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.119: +4 -4 lines
Diff to previous 1.119 (colored)

replace magic numbers for strict levels (0-3) with defines.

Revision 1.119 / (download) - annotate - [select for diffs], Mon Jul 24 21:15:05 2006 UTC (16 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.118: +3 -4 lines
Diff to previous 1.118 (colored)

finally do things properly. veriexec_report() takes flags, not three ints.

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

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

Revision 1.117 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:12 2006 UTC (16 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.116: +7 -7 lines
Diff to previous 1.116 (colored)

Use the LWP cached credentials where sane.

Revision 1.116 / (download) - annotate - [select for diffs], Sat Jul 22 10:40:49 2006 UTC (16 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.115: +4 -9 lines
Diff to previous 1.115 (colored)

kill a VOP_GETATTR() we don't need for veriexec.

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

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

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

Revision 1.114 / (download) - annotate - [select for diffs], Sun Jul 16 18:49:29 2006 UTC (16 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.113: +4 -6 lines
Diff to previous 1.113 (colored)

oops, forgot to commit that one. thanks Arnaud Lacombe.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Jul 14 18:41:40 2006 UTC (16 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.112: +7 -7 lines
Diff to previous 1.112 (colored)

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

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

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

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

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

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

Revision 1.106.2.4 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:57 2006 UTC (16 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.106.2.3: +5 -2 lines
Diff to previous 1.106.2.3 (colored) to branchpoint 1.106 (colored)

sync with head.

Revision 1.92.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:39 2006 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.92: +221 -70 lines
Diff to previous 1.92 (colored)

sync with head.

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

Sync with head.

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

Sync with head.

Revision 1.54.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 05:57:19 2006 UTC (16 years, 8 months ago) by simonb
Branch: netbsd-1-6
Changes since 1.54.6.1: +5 -2 lines
Diff to previous 1.54.6.1 (colored) to branchpoint 1.54 (colored) next main 1.55 (colored)

Pull up rev 1.112 from trunk:
  Limit the size of any kernel buffers allocated by the VOP_READDIR
  routines to MAXBSIZE.

OK'd by tron@

Revision 1.77.2.2 / (download) - annotate - [select for diffs], Wed May 31 21:28:08 2006 UTC (16 years, 8 months ago) by tron
Branch: netbsd-2-0
Changes since 1.77.2.1: +5 -2 lines
Diff to previous 1.77.2.1 (colored) to branchpoint 1.77 (colored) next main 1.78 (colored)

Pull up following revision(s) (requested by simonb in ticket #10633):
	sys/kern/vfs_vnops.c: revision 1.112
Limit the size of any kernel buffers allocated by the VOP_READDIR
routines to MAXBSIZE.

Revision 1.77.6.2 / (download) - annotate - [select for diffs], Wed May 31 21:28:04 2006 UTC (16 years, 8 months ago) by tron
Branch: netbsd-2-1
Changes since 1.77.6.1: +5 -2 lines
Diff to previous 1.77.6.1 (colored) to branchpoint 1.77 (colored) next main 1.78 (colored)

Pull up following revision(s) (requested by simonb in ticket #10633):
	sys/kern/vfs_vnops.c: revision 1.112
Limit the size of any kernel buffers allocated by the VOP_READDIR
routines to MAXBSIZE.

Revision 1.77.4.2 / (download) - annotate - [select for diffs], Wed May 31 21:27:59 2006 UTC (16 years, 8 months ago) by tron
Branch: netbsd-2
Changes since 1.77.4.1: +5 -2 lines
Diff to previous 1.77.4.1 (colored) to branchpoint 1.77 (colored) next main 1.78 (colored)

Pull up following revision(s) (requested by simonb in ticket #10633):
	sys/kern/vfs_vnops.c: revision 1.112
Limit the size of any kernel buffers allocated by the VOP_READDIR
routines to MAXBSIZE.

Revision 1.86.2.10.2.1 / (download) - annotate - [select for diffs], Wed May 31 21:20:42 2006 UTC (16 years, 8 months ago) by tron
Branch: netbsd-3-0
CVS Tags: netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE
Changes since 1.86.2.10: +3 -0 lines
Diff to previous 1.86.2.10 (colored) next main 1.86.2.11 (colored)

Pull up following revision(s) (requested by simonb in ticket #1347):
	sys/kern/vfs_vnops.c: revision 1.112
Limit the size of any kernel buffers allocated by the VOP_READDIR
routines to MAXBSIZE.

Revision 1.86.2.11 / (download) - annotate - [select for diffs], Wed May 31 21:18:59 2006 UTC (16 years, 8 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.86.2.10: +3 -0 lines
Diff to previous 1.86.2.10 (colored) to branchpoint 1.86 (colored) next main 1.87 (colored)

Pull up following revision(s) (requested by simonb in ticket #1347):
	sys/kern/vfs_vnops.c: revision 1.112
Limit the size of any kernel buffers allocated by the VOP_READDIR
routines to MAXBSIZE.

Revision 1.112 / (download) - annotate - [select for diffs], Sat May 27 23:46:49 2006 UTC (16 years, 8 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Changes since 1.111: +5 -2 lines
Diff to previous 1.111 (colored)

Limit the size of any kernel buffers allocated by the VOP_READDIR
routines to MAXBSIZE.

Revision 1.107.2.2 / (download) - annotate - [select for diffs], Wed May 24 15:50:42 2006 UTC (16 years, 8 months ago) by tron
Branch: peter-altq
Changes since 1.107.2.1: +17 -18 lines
Diff to previous 1.107.2.1 (colored) to branchpoint 1.107 (colored) next main 1.108 (colored)

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

Revision 1.106.2.3 / (download) - annotate - [select for diffs], Wed May 24 10:58:42 2006 UTC (16 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.106.2.2: +17 -18 lines
Diff to previous 1.106.2.2 (colored) to branchpoint 1.106 (colored)

sync with head.

Revision 1.111 / (download) - annotate - [select for diffs], Sun May 14 21:15:12 2006 UTC (16 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5
Branch point for: chap-midi
Changes since 1.110: +14 -13 lines
Diff to previous 1.110 (colored)

integrate kauth.

Revision 1.110 / (download) - annotate - [select for diffs], Sun May 14 05:30:31 2006 UTC (16 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.109: +5 -5 lines
Diff to previous 1.109 (colored)

XXX: GCC uninitialized.

Revision 1.106.4.4 / (download) - annotate - [select for diffs], Thu May 11 23:30:15 2006 UTC (16 years, 8 months ago) by elad
Branch: elad-kernelauth
Changes since 1.106.4.3: +2 -4 lines
Diff to previous 1.106.4.3 (colored) to branchpoint 1.106 (colored) next main 1.107 (colored)

sync with head

Revision 1.106.4.3 / (download) - annotate - [select for diffs], Sat May 6 23:31:31 2006 UTC (16 years, 9 months ago) by christos
Branch: elad-kernelauth
Changes since 1.106.4.2: +3 -2 lines
Diff to previous 1.106.4.2 (colored) to branchpoint 1.106 (colored)

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

Approved by core.

Revision 1.109 / (download) - annotate - [select for diffs], Thu May 4 16:48:16 2006 UTC (16 years, 9 months ago) by perseant
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.108: +2 -4 lines
Diff to previous 1.108 (colored)

Change VOP_FCNTL to take an unlocked vnode.  Approved by wrstuden@.

Revision 1.104.4.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:00 2006 UTC (16 years, 9 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.104: +20 -14 lines
Diff to previous 1.104 (colored)

Sync with head.

Revision 1.106.4.2 / (download) - annotate - [select for diffs], Wed Apr 19 05:14:00 2006 UTC (16 years, 9 months ago) by elad
Branch: elad-kernelauth
Changes since 1.106.4.1: +3 -4 lines
Diff to previous 1.106.4.1 (colored) to branchpoint 1.106 (colored)

sync with head.

Revision 1.106.2.2 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:42 2006 UTC (16 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.106.2.1: +3 -3 lines
Diff to previous 1.106.2.1 (colored) to branchpoint 1.106 (colored)

sync with head.

Revision 1.107.2.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:27 2006 UTC (16 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored)

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

Revision 1.108 / (download) - annotate - [select for diffs], Fri Mar 24 17:16:10 2006 UTC (16 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored)

vn_rdwr(): Initialize `mp' to NULL. vn_finished_write() would be called
with uninitialized `mp' if `vp->v_type == VCHR'.

From Coverity CID 2475.

Revision 1.106.2.1 / (download) - annotate - [select for diffs], Mon Mar 13 09:07:33 2006 UTC (16 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.106: +2 -3 lines
Diff to previous 1.106 (colored)

sync with head.

Revision 1.107 / (download) - annotate - [select for diffs], Fri Mar 10 11:07:01 2006 UTC (16 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq
Changes since 1.106: +2 -3 lines
Diff to previous 1.106 (colored)

remove a wrong assertion.

Revision 1.106.4.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:41 2006 UTC (16 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.106: +13 -13 lines
Diff to previous 1.106 (colored)

Adapt to kernel authorization KPI.

Revision 1.106 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:21 2006 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, elad-kernelauth
Changes since 1.105: +20 -12 lines
Diff to previous 1.105 (colored)

merge yamt-uio_vmspace branch.

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

Revision 1.102.2.3 / (download) - annotate - [select for diffs], Sat Feb 18 15:39:18 2006 UTC (16 years, 11 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.102.2.2: +2 -3 lines
Diff to previous 1.102.2.2 (colored) next main 1.103 (colored)

sync with head.

Revision 1.105 / (download) - annotate - [select for diffs], Sat Feb 4 11:58:08 2006 UTC (17 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Changes since 1.104: +2 -3 lines
Diff to previous 1.104 (colored)

vn_read: don't bother to allocate read-ahead context here.
it will be done in uvn_get if necessary.

Revision 1.102.2.2 / (download) - annotate - [select for diffs], Sun Jan 15 10:02:56 2006 UTC (17 years ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.102.2.1: +6 -2 lines
Diff to previous 1.102.2.1 (colored)

sync with head.

Revision 1.104 / (download) - annotate - [select for diffs], Sun Jan 1 16:45:42 2006 UTC (17 years, 1 month ago) by yamt
Branch: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

vn_lock: LK_CANRECURSE is used by layered filesystems.  pointed by cube@.

Revision 1.103 / (download) - annotate - [select for diffs], Sat Dec 31 14:33:13 2005 UTC (17 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.102: +6 -2 lines
Diff to previous 1.102 (colored)

vn_lock: assert that only a limited set of LK_* flags is used.

Revision 1.102.2.1 / (download) - annotate - [select for diffs], Sat Dec 31 11:14:01 2005 UTC (17 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.102: +20 -12 lines
Diff to previous 1.102 (colored)

uio_segflg/uio_lwp -> uio_vmspace.

Revision 1.102 / (download) - annotate - [select for diffs], Mon Dec 12 16:26:33 2005 UTC (17 years, 1 month ago) by elad
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored)

Catch up with ktrace-lwp merge.

While I'm here, stop using cur{lwp,proc}.

Revision 1.101 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:30 2005 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.100: +51 -49 lines
Diff to previous 1.100 (colored)

merge ktrace-lwp.

Revision 1.72.2.12 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:12 2005 UTC (17 years, 1 month ago) by christos
Branch: ktrace-lwp
Changes since 1.72.2.11: +33 -3 lines
Diff to previous 1.72.2.11 (colored) next main 1.73 (colored)

Sync with head.

Revision 1.100 / (download) - annotate - [select for diffs], Tue Nov 29 22:52:02 2005 UTC (17 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.99: +33 -3 lines
Diff to previous 1.99 (colored)

merge yamt-readahead branch.

Revision 1.99.2.3 / (download) - annotate - [select for diffs], Fri Nov 18 08:44:54 2005 UTC (17 years, 2 months ago) by yamt
Branch: yamt-readahead
CVS Tags: yamt-readahead-pervnode
Changes since 1.99.2.2: +34 -26 lines
Diff to previous 1.99.2.2 (colored) to branchpoint 1.99 (colored) next main 1.100 (colored)

- associate read-ahead context to vnode, rather than file.
- revert VOP_READ prototype.

Revision 1.99.2.2 / (download) - annotate - [select for diffs], Tue Nov 15 05:24:48 2005 UTC (17 years, 2 months ago) by yamt
Branch: yamt-readahead
CVS Tags: yamt-readahead-perfile
Changes since 1.99.2.1: +3 -3 lines
Diff to previous 1.99.2.1 (colored) to branchpoint 1.99 (colored)

add posix_fadvise.

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Tue Nov 15 03:46:15 2005 UTC (17 years, 2 months ago) by yamt
Branch: yamt-readahead
Changes since 1.99: +26 -4 lines
Diff to previous 1.99 (colored)

- setup/cleanup readahead context.
- adapt to the new VOP_READ prototype.

Revision 1.77.2.1 / (download) - annotate - [select for diffs], Mon Nov 14 22:16:32 2005 UTC (17 years, 2 months ago) by riz
Branch: netbsd-2-0
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)

Pull up following revision(s) (requested by hannken in ticket #5983):
	sys/kern/vfs_vnops.c: revision 1.99
vput() -> vrele(). Vnode is already unlocked.
With much help from Pavel Cahyna.
Fixes PR 32005.

Revision 1.77.6.1 / (download) - annotate - [select for diffs], Mon Nov 14 22:16:30 2005 UTC (17 years, 2 months ago) by riz
Branch: netbsd-2-1
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)

Pull up following revision(s) (requested by hannken in ticket #5983):
	sys/kern/vfs_vnops.c: revision 1.99
vput() -> vrele(). Vnode is already unlocked.
With much help from Pavel Cahyna.
Fixes PR 32005.

Revision 1.77.4.1 / (download) - annotate - [select for diffs], Mon Nov 14 22:16:26 2005 UTC (17 years, 2 months ago) by riz
Branch: netbsd-2
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)

Pull up following revision(s) (requested by hannken in ticket #5983):
	sys/kern/vfs_vnops.c: revision 1.99
vput() -> vrele(). Vnode is already unlocked.
With much help from Pavel Cahyna.
Fixes PR 32005.

Revision 1.72.2.11 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:46 2005 UTC (17 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.72.2.10: +171 -165 lines
Diff to previous 1.72.2.10 (colored)

Sync with HEAD. Here we go again...

Revision 1.86.2.10 / (download) - annotate - [select for diffs], Wed Nov 9 12:25:15 2005 UTC (17 years, 2 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1
Branch point for: netbsd-3-0
Changes since 1.86.2.9: +3 -3 lines
Diff to previous 1.86.2.9 (colored) to branchpoint 1.86 (colored)

Pull up following revision(s) (requested by hannken in ticket #944):
	sys/kern/vfs_vnops.c: revision 1.99
vput() -> vrele(). Vnode is already unlocked.
With much help from Pavel Cahyna.
Fixes PR 32005.

Revision 1.99 / (download) - annotate - [select for diffs], Tue Nov 8 11:35:51 2005 UTC (17 years, 2 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base
Branch point for: yamt-readahead
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored)

vput() -> vrele(). Vnode is already unlocked.
With much help from Pavel Cahyna.

Fixes PR 32005.

Revision 1.86.2.9 / (download) - annotate - [select for diffs], Sat Oct 15 21:32:34 2005 UTC (17 years, 3 months ago) by riz
Branch: netbsd-3
Changes since 1.86.2.8: +20 -6 lines
Diff to previous 1.86.2.8 (colored) to branchpoint 1.86 (colored)

Apply patch (requested by elad in ticket #891):
Fix a crash whenever the nameidata has the pathname in userspace.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Oct 15 21:18:54 2005 UTC (17 years, 3 months ago) by elad
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, thorpej-vnode-attr-base, thorpej-vnode-attr
Changes since 1.97: +3 -3 lines
Diff to previous 1.97 (colored)

copystr and copyinstr return int, not void.

Revision 1.97 / (download) - annotate - [select for diffs], Fri Oct 14 17:18:59 2005 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.96: +6 -9 lines
Diff to previous 1.96 (colored)

No need for __UNCONST in previous commit; factor out the function call.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Oct 14 12:47:04 2005 UTC (17 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.95: +23 -6 lines
Diff to previous 1.95 (colored)

Copy the path to a kernel buffer before using it from ndp, as it may be a
pointer to userspace.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Sep 20 09:49:01 2005 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.94: +92 -2 lines
Diff to previous 1.94 (colored)

uninline vn_start_write and vn_finished_write as they are big enough.

Revision 1.86.2.8 / (download) - annotate - [select for diffs], Thu Sep 8 21:06:31 2005 UTC (17 years, 4 months ago) by tron
Branch: netbsd-3
Changes since 1.86.2.7: +4 -2 lines
Diff to previous 1.86.2.7 (colored) to branchpoint 1.86 (colored)

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

Revision 1.86.2.7 / (download) - annotate - [select for diffs], Tue Aug 23 14:45:21 2005 UTC (17 years, 5 months ago) by tron
Branch: netbsd-3
Changes since 1.86.2.6: +2 -4 lines
Diff to previous 1.86.2.6 (colored) to branchpoint 1.86 (colored)

Backout ticket 685. It causes build failures.

Revision 1.86.2.6 / (download) - annotate - [select for diffs], Tue Aug 23 13:43:43 2005 UTC (17 years, 5 months ago) by tron
Branch: netbsd-3
Changes since 1.86.2.5: +2 -0 lines
Diff to previous 1.86.2.5 (colored) to branchpoint 1.86 (colored)

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

Revision 1.86.2.5 / (download) - annotate - [select for diffs], Sun Jul 24 11:06:27 2005 UTC (17 years, 6 months ago) by tron
Branch: netbsd-3
Changes since 1.86.2.4: +4 -3 lines
Diff to previous 1.86.2.4 (colored) to branchpoint 1.86 (colored)

Pull up revision 1.94 (requested by elad in ticket #613):
Fix a null vp panic when creating a file at veriexec strict level 3.

Revision 1.94 / (download) - annotate - [select for diffs], Sat Jul 23 18:19:51 2005 UTC (17 years, 6 months ago) by erh
Branch: MAIN
Changes since 1.93: +4 -3 lines
Diff to previous 1.93 (colored)

Fix a null vp panic when creating a file at veriexec strict level 3.

Revision 1.93 / (download) - annotate - [select for diffs], Sat Jul 16 22:47:18 2005 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.92: +4 -2 lines
Diff to previous 1.92 (colored)

defopt verified_exec.

Revision 1.86.2.4 / (download) - annotate - [select for diffs], Sat Jul 2 15:53:33 2005 UTC (17 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.86.2.3: +8 -14 lines
Diff to previous 1.86.2.3 (colored) to branchpoint 1.86 (colored)

Pull up revision 1.92 (requested by elad in ticket #487):
- Avoid pollution of struct vnode. Save the fingerprint evaluation status
in the veriexec table entry; the lookups are very cheap now. Suggested
by Chuq.
- Handle non-regular (!VREG) files correctly).
- Remove (no longer needed) FINGERPRINT_NOENTRY.

Revision 1.86.2.3 / (download) - annotate - [select for diffs], Sat Jul 2 15:51:06 2005 UTC (17 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.86.2.2: +22 -16 lines
Diff to previous 1.86.2.2 (colored) to branchpoint 1.86 (colored)

Pull up revision 1.91 (requested by elad in ticket #487):
More veriexec changes:
- Better organize strict level. Now we have 4 levels:
- Level 0, learning mode: Warnings only about anything that might've
resulted in 'access denied' or similar in a higher strict level.
- Level 1, IDS mode:
- Deny access on fingerprint mismatch.
- Deny modification of veriexec tables.
- Level 2, IPS mode:
- All implications of strict level 1.
- Deny write access to monitored files.
- Prevent removal of monitored files.
- Enforce access type - 'direct', 'indirect', or 'file'.
- Level 3, lockdown mode:
- All implications of strict level 2.
- Prevent creation of new files.
- Deny access to non-monitored files.
- Update sysctl(3) man-page with above. (date bumped too :)
- Remove FINGERPRINT_INDIRECT from possible fp_status values; it's no
longer needed.
- Simplify veriexec_removechk() in light of new strict level policies.
- Eliminate use of 'securelevel'; veriexec now behaves according to
its strict level only.

Revision 1.92 / (download) - annotate - [select for diffs], Sun Jun 19 18:22:36 2005 UTC (17 years, 7 months ago) by elad
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.91: +8 -14 lines
Diff to previous 1.91 (colored)

- Avoid pollution of struct vnode. Save the fingerprint evaluation status
  in the veriexec table entry; the lookups are very cheap now. Suggested
  by Chuq.

- Handle non-regular (!VREG) files correctly).

- Remove (no longer needed) FINGERPRINT_NOENTRY.

Revision 1.91 / (download) - annotate - [select for diffs], Fri Jun 17 17:46:18 2005 UTC (17 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.90: +24 -18 lines
Diff to previous 1.90 (colored)

More veriexec changes:

- Better organize strict level. Now we have 4 levels:
  - Level 0, learning mode: Warnings only about anything that might've
      resulted in 'access denied' or similar in a higher strict level.

  - Level 1, IDS mode:
    - Deny access on fingerprint mismatch.
    - Deny modification of veriexec tables.

  - Level 2, IPS mode:
    - All implications of strict level 1.
    - Deny write access to monitored files.
    - Prevent removal of monitored files.
    - Enforce access type - 'direct', 'indirect', or 'file'.

  - Level 3, lockdown mode:
    - All implications of strict level 2.
    - Prevent creation of new files.
    - Deny access to non-monitored files.

- Update sysctl(3) man-page with above. (date bumped too :)

- Remove FINGERPRINT_INDIRECT from possible fp_status values; it's no
  longer needed.

- Simplify veriexec_removechk() in light of new strict level policies.

- Eliminate use of 'securelevel'; veriexec now behaves according to
  its strict level only.

Revision 1.86.2.2 / (download) - annotate - [select for diffs], Mon Jun 13 22:09:09 2005 UTC (17 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.86.2.1: +8 -5 lines
Diff to previous 1.86.2.1 (colored) to branchpoint 1.86 (colored)

Pull up revision 1.90 (requested by elad in ticket #447):
Work according to veriexec strict level, not securelevel. Also, use the
veriexec_report() routine when possible; and when opening a file for
writing,
only invalidate the fingerprint - not always the data will be changed.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Jun 11 16:04:59 2005 UTC (17 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.89: +10 -7 lines
Diff to previous 1.89 (colored)

Work according to veriexec strict level, not securelevel. Also, use the
veriexec_report() routine when possible; and when opening a file for writing,
only invalidate the fingerprint - not always the data will be changed.

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Fri Jun 10 14:48:21 2005 UTC (17 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.86: +21 -69 lines
Diff to previous 1.86 (colored)

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

Revision 1.89 / (download) - annotate - [select for diffs], Sun Jun 5 23:47:48 2005 UTC (17 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.88: +26 -82 lines
Diff to previous 1.88 (colored)

Use ANSI function decls.

Revision 1.88 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.87: +9 -9 lines
Diff to previous 1.87 (colored)

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

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

sync with -current

Revision 1.87 / (download) - annotate - [select for diffs], Wed Apr 20 13:44:46 2005 UTC (17 years, 9 months ago) by blymn
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.86: +21 -69 lines
Diff to previous 1.86 (colored)

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

Revision 1.85.4.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:12 2005 UTC (17 years, 10 months ago) by yamt
Branch: yamt-km
Changes since 1.85: +8 -8 lines
Diff to previous 1.85 (colored) next main 1.86 (colored)

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

Revision 1.72.2.10 / (download) - annotate - [select for diffs], Fri Mar 4 16:52:03 2005 UTC (17 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.72.2.9: +8 -8 lines
Diff to previous 1.72.2.9 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.86 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:56 2005 UTC (17 years, 11 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.85: +8 -8 lines
Diff to previous 1.85 (colored)

nuke trailing whitespace

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

Adapt to branch.

Revision 1.72.2.8 / (download) - annotate - [select for diffs], Mon Jan 17 19:32:26 2005 UTC (18 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.72.2.7: +106 -2 lines
Diff to previous 1.72.2.7 (colored)

Sync with HEAD.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Jan 2 16:08:29 2005 UTC (18 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Changes since 1.84: +106 -2 lines
Diff to previous 1.84 (colored)

Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.

Revision 1.72.2.7 / (download) - annotate - [select for diffs], Sat Dec 18 09:32:35 2004 UTC (18 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.72.2.6: +5 -3 lines
Diff to previous 1.72.2.6 (colored)

Sync with HEAD.

Revision 1.84 / (download) - annotate - [select for diffs], Sun Dec 12 04:46:46 2004 UTC (18 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.83: +4 -2 lines
Diff to previous 1.83 (colored)

vn_lock: #if 0 out an assertion for now.  (until PR/27021 is fixed)

Revision 1.83 / (download) - annotate - [select for diffs], Tue Nov 30 04:25:44 2004 UTC (18 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

Cloning cleanup:
1. make fileops const
2. add 2 new negative errno's to `officially' support the cloning hack:
    - EDUPFD (used to overload ENODEV)
    - EMOVEFD (used to overload ENXIO)
3. Created an fdclone() function to encapsulate the operations needed for
   EMOVEFD, and made all cloners use it.
4. Centralize the local noop/badop fileops functions to:
   fnullop_fcntl, fnullop_poll, fnullop_kqfilter, fbadop_stat

Revision 1.72.2.6 / (download) - annotate - [select for diffs], Sun Nov 14 08:15:57 2004 UTC (18 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.72.2.5: +11 -2 lines
Diff to previous 1.72.2.5 (colored)

Sync with HEAD.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Nov 6 07:34:53 2004 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

Fix another stupid typo.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Nov 6 02:03:20 2004 UTC (18 years, 3 months ago) by wrstuden
Branch: MAIN
Changes since 1.80: +11 -2 lines
Diff to previous 1.80 (colored)

Add support for FIONWRITE and FIONSPACE ioctls. FIONWRITE reports
the number of bytes in the send queue, and FIONSPACE reports the
number of free bytes in the send queue. These ioctls permit applications
to monitor file descriptor transmission dynamics.

In examining prior art, FIONWRITE exists with the semantics given
here. FIONSPACE is provided so that programs may easily determine how
much space is left in the send queue; they do not need to know the
send queue size.

The fact that a write may block even if there is enough space in the
send queue for it is noted in the documentation.

FIONWRITE functionality may be used to implement TIOCOUTQ for Linux
emulation - Linux extended this ioctl to sockets, even though they are
not ttys.

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

Fix the sync with head I botched.

Revision 1.72.2.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:04 2004 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.72.2.3: +49 -51 lines
Diff to previous 1.72.2.3 (colored)

Sync with HEAD.

Revision 1.72.2.3 / (download) - annotate - [select for diffs], Tue Aug 3 10:53:02 2004 UTC (18 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.72.2.2: +110 -18 lines
Diff to previous 1.72.2.2 (colored)

Sync with HEAD

Revision 1.80 / (download) - annotate - [select for diffs], Mon May 31 09:02:51 2004 UTC (18 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.79: +5 -2 lines
Diff to previous 1.79 (colored)

vn_lock: add an assertion about usecount.

Revision 1.79 / (download) - annotate - [select for diffs], Sun May 30 20:48:04 2004 UTC (18 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.78: +4 -3 lines
Diff to previous 1.78 (colored)

vn_lock: don't pass LK_RETRY to VOP_LOCK.

Revision 1.78 / (download) - annotate - [select for diffs], Tue May 25 14:54:57 2004 UTC (18 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (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.77 / (download) - annotate - [select for diffs], Sat Feb 14 00:00:56 2004 UTC (18 years, 11 months ago) by hannken
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-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
Branch point for: netbsd-2-1, netbsd-2-0, netbsd-2
Changes since 1.76: +62 -2 lines
Diff to previous 1.76 (colored)

Add a generic copy-on-write hook to add/remove functions that will be
called with every buffer written through spec_strategy().

Used by fss(4). Future file-system-internal snapshots will need them too.

Welcome to 1.6ZK

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

Revision 1.76 / (download) - annotate - [select for diffs], Sat Jan 10 17:16:38 2004 UTC (19 years ago) by hannken
Branch: MAIN
Changes since 1.75: +2 -40 lines
Diff to previous 1.75 (colored)

Allow vfs_write_suspend() to wait if the file system is already
suspending.

Move vfs_write_suspend() and vfs_write_resume() from kern/vfs_vnops.c
to kern/vfs_subr.c.

Change vnode write gating in ufs/ffs/ffs_softdep.c (from FreeBSD).

When vnodes are throttled in softdep_trackbufs() check for
file system suspension every 10 msecs to avoid a deadlock.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Oct 15 11:29:01 2003 UTC (19 years, 3 months ago) by hannken
Branch: MAIN
Changes since 1.74: +75 -7 lines
Diff to previous 1.74 (colored)

Add the gating of system calls that cause modifications to the underlying
file system.
The function vfs_write_suspend stops all new write operations to a file
system, allows any file system modifying system calls already in progress
to complete, then sync's the file system to disk and returns. The
function vfs_write_resume allows the suspended write operations to
complete.

From FreeBSD with slight modifications.

Approved by: Frank van der Linden <fvdl@netbsd.org>

Revision 1.54.6.1 / (download) - annotate - [select for diffs], Thu Oct 2 09:51:51 2003 UTC (19 years, 4 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.54: +20 -2 lines
Diff to previous 1.54 (colored)

Pull up revision 1.55 (requested by junyoung in ticket #1488):
count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).

Revision 1.74 / (download) - annotate - [select for diffs], Mon Sep 29 10:04:03 2003 UTC (19 years, 4 months ago) by cb
Branch: MAIN
Changes since 1.73: +9 -7 lines
Diff to previous 1.73 (colored)

fix O_NOFOLLOW for non-O_CREAT case.

Reviewed by: christos@ (some time ago)

Revision 1.73 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:04 2003 UTC (19 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.72: +3 -7 lines
Diff to previous 1.72 (colored)

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

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

Revision 1.72.2.2 / (download) - annotate - [select for diffs], Thu Jul 3 01:32:56 2003 UTC (19 years, 7 months ago) by wrstuden
Branch: ktrace-lwp
Changes since 1.72.2.1: +4 -4 lines
Diff to previous 1.72.2.1 (colored)

LWP-ify union fs.

Note: These changes suffer from the same cnp->cn_lwp issue noted for
ufs. They will need to get fixed at the same time as ufs. The fix is to
add struct lwp * as a parameter to some VOPs.

Note also that most of the cn_lwp references used to be cn_proc references,
so if cnp->cn_lwp is bad to use, unionfs's been naughty for quite some
time.

Revision 1.72.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:47 2003 UTC (19 years, 7 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.72: +50 -48 lines
Diff to previous 1.72 (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.72 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:35 2003 UTC (19 years, 7 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.71: +49 -51 lines
Diff to previous 1.71 (colored)

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

Revision 1.71 / (download) - annotate - [select for diffs], Sun Jun 29 02:56:24 2003 UTC (19 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.70: +4 -4 lines
Diff to previous 1.70 (colored)

Adjust to ktrace/lwp changes.

Revision 1.70 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:00 2003 UTC (19 years, 7 months ago) by darrenr
Branch: MAIN
Changes since 1.69: +50 -48 lines
Diff to previous 1.69 (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.69 / (download) - annotate - [select for diffs], Thu Apr 3 14:53:38 2003 UTC (19 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.68: +3 -2 lines
Diff to previous 1.68 (colored)

Copy birthtime in vn_stat.

Revision 1.68 / (download) - annotate - [select for diffs], Fri Mar 21 23:11:27 2003 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTL
and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).

Revision 1.67 / (download) - annotate - [select for diffs], Fri Mar 21 21:13:52 2003 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.66: +6 -6 lines
Diff to previous 1.66 (colored)

Change 'data' argument to fo_ioctl and fo_fcntl from 'caddr_t' to 'void *'.
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)

Revision 1.66 / (download) - annotate - [select for diffs], Mon Mar 17 09:11:30 2003 UTC (19 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.65: +14 -39 lines
Diff to previous 1.65 (colored)

make it possible for UNION fs to be loaded via LKM - instead of
having some #ifdef UNION code in vfs_vnops.c, introduce variable
'vn_union_readdir_hook' which is set to address of appropriate
vn_readdir() hook by union filesystem when it's loaded & mounted

Revision 1.65 / (download) - annotate - [select for diffs], Sun Mar 16 08:26:48 2003 UTC (19 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

move union filesystem code from sys/miscfs/union to sys/fs/union

Revision 1.64 / (download) - annotate - [select for diffs], Mon Mar 3 21:25:09 2003 UTC (19 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.63: +5 -2 lines
Diff to previous 1.63 (colored)

only pull in/declare veriexec related stuff with VERIFIED_EXEC

Revision 1.63 / (download) - annotate - [select for diffs], Mon Feb 24 08:34:30 2003 UTC (19 years, 11 months ago) by perseant
Branch: MAIN
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored)

Allow filesystems' VOP_IOCTL to catch ioctl calls on directories and
regular files.  Approved thorpej, fvdl.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Feb 1 07:23:56 2003 UTC (20 years ago) by atatat
Branch: MAIN
Changes since 1.61: +6 -2 lines
Diff to previous 1.61 (colored)

Check for (and deny) negative values passed to FIOGETBMAP.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Jan 24 21:55:17 2003 UTC (20 years ago) by fvdl
Branch: MAIN
Changes since 1.60: +10 -2 lines
Diff to previous 1.60 (colored)

Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.

Revision 1.45.2.10 / (download) - annotate - [select for diffs], Thu Dec 19 00:50:43 2002 UTC (20 years, 1 month ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.45.2.9: +8 -2 lines
Diff to previous 1.45.2.9 (colored) next main 1.46 (colored)

Sync with HEAD.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Dec 11 18:25:04 2002 UTC (20 years, 1 month ago) by atatat
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.59: +8 -2 lines
Diff to previous 1.59 (colored)

Provide a ioctl called FIOGETBMAP (there are some who call
it...FIBMAP) that translates a logical block number to a physical
block number from the underlying device.  Via VOP_BMAP().

Revision 1.45.2.9 / (download) - annotate - [select for diffs], Wed Dec 11 06:43:11 2002 UTC (20 years, 1 month ago) by thorpej
Branch: nathanw_sa
Changes since 1.45.2.8: +1 -1 lines
Diff to previous 1.45.2.8 (colored)

Sync with HEAD.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Dec 6 22:44:50 2002 UTC (20 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

s/NOSYMLINK/O_NOFOLLOW/

Revision 1.45.2.8 / (download) - annotate - [select for diffs], Mon Nov 11 22:14:15 2002 UTC (20 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.7: +109 -2 lines
Diff to previous 1.45.2.7 (colored)

Catch up to -current

Revision 1.58 / (download) - annotate - [select for diffs], Tue Oct 29 12:31:24 2002 UTC (20 years, 3 months ago) by blymn
Branch: MAIN
Changes since 1.57: +98 -3 lines
Diff to previous 1.57 (colored)

Added support for fingerprinted executables aka verified exec

Revision 1.57 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:32 2002 UTC (20 years, 3 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.56: +15 -3 lines
Diff to previous 1.56 (colored)

merge kqueue branch into -current

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

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

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

Revision 1.45.2.7 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:58 2002 UTC (20 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.6: +35 -10 lines
Diff to previous 1.45.2.6 (colored)

Catch up to -current.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Oct 14 04:18:57 2002 UTC (20 years, 3 months ago) by gmcgarry
Branch: MAIN
CVS Tags: kqueue-beforemerge
Changes since 1.55: +19 -12 lines
Diff to previous 1.55 (colored)

vn_stat() can now take a struct vnode * for consistency.  Hide away
the opaque file descriptor operations.

Revision 1.48.2.4 / (download) - annotate - [select for diffs], Fri Oct 11 21:27:29 2002 UTC (20 years, 3 months ago) by jdolecek
Branch: kqueue
Changes since 1.48.2.3: +3 -5 lines
Diff to previous 1.48.2.3 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored)

vn_kqfilter(): g/c local variable vp

Revision 1.55 / (download) - annotate - [select for diffs], Sat Oct 5 22:34:05 2002 UTC (20 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.54: +20 -2 lines
Diff to previous 1.54 (colored)

count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).

Revision 1.48.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 17:49:44 2002 UTC (20 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.48.2.2: +3 -3 lines
Diff to previous 1.48.2.2 (colored) to branchpoint 1.48 (colored)

catch up with -current on kqueue branch

Revision 1.45.2.6 / (download) - annotate - [select for diffs], Mon Apr 1 07:48:04 2002 UTC (20 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.5: +3 -3 lines
Diff to previous 1.45.2.5 (colored)

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

Revision 1.54 / (download) - annotate - [select for diffs], Sun Mar 17 19:41:08 2002 UTC (20 years, 10 months ago) by atatat
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, kqueue-base, gehenna-devsw-base, gehenna-devsw, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.

Revision 1.48.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:00:23 2002 UTC (21 years ago) by thorpej
Branch: kqueue
Changes since 1.48.2.1: +25 -13 lines
Diff to previous 1.48.2.1 (colored) to branchpoint 1.48 (colored)

Sync kqueue branch with -current.

Revision 1.45.2.5 / (download) - annotate - [select for diffs], Tue Jan 8 00:32:45 2002 UTC (21 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.4: +4 -4 lines
Diff to previous 1.45.2.4 (colored)

Catch up to -current.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Dec 9 03:07:44 2001 UTC (21 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored)

replace "vnode" and "vtext" with "file" and "exec" in uvmexp field names.

Revision 1.45.2.4 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:49 2001 UTC (21 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.3: +8 -5 lines
Diff to previous 1.45.2.3 (colored)

Catch up to -current.

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:03 2001 UTC (21 years, 2 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.50: +8 -5 lines
Diff to previous 1.50 (colored) next main 1.51 (colored)

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

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

add RCSIDs

Revision 1.51 / (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.50: +5 -5 lines
Diff to previous 1.50 (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.48.4.2 / (download) - annotate - [select for diffs], Mon Oct 1 12:47:02 2001 UTC (21 years, 4 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.48.4.1: +18 -9 lines
Diff to previous 1.48.4.1 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored)

Catch up with -current.

Revision 1.45.2.3 / (download) - annotate - [select for diffs], Fri Sep 21 22:36:29 2001 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.2: +18 -9 lines
Diff to previous 1.45.2.2 (colored)

Catch up to -current.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Sep 21 08:02:55 2001 UTC (21 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.49: +10 -5 lines
Diff to previous 1.49 (colored)

use shared locks instead of exclusive for VOP_READ() and VOP_READDIR().

Revision 1.48.4.1 / (download) - annotate - [select for diffs], Tue Sep 18 19:13:55 2001 UTC (21 years, 4 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.48: +10 -4 lines
Diff to previous 1.48 (colored)

Various changes to make cloning devices possible:

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

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

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


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

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

Revision 1.49 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:37 2001 UTC (21 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: post-chs-ubcperf
Changes since 1.48: +9 -5 lines
Diff to previous 1.48 (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.48.2.1 / (download) - annotate - [select for diffs], Tue Jul 10 13:49:34 2001 UTC (21 years, 6 months ago) by lukem
Branch: kqueue
Changes since 1.48: +16 -2 lines
Diff to previous 1.48 (colored)

add method vn_kqfilter

Revision 1.45.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:07:13 2001 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.1: +18 -3 lines
Diff to previous 1.45.2.1 (colored)

Catch up to -current.

Revision 1.38.2.4 / (download) - annotate - [select for diffs], Sat Apr 21 17:46:33 2001 UTC (21 years, 9 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.38.2.3: +21 -5 lines
Diff to previous 1.38.2.3 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored)

Sync with HEAD

Revision 1.48 / (download) - annotate - [select for diffs], Mon Apr 9 10:22:02 2001 UTC (21 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base, pre-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.47: +18 -3 lines
Diff to previous 1.47 (colored)

Change the first arg to fileops fo_stat routine to struct file *, adjust
callers and appropriate routines to cope. This makes fo_stat more
consistent with rest of fileops routines and also makes the fo_stat
match FreeBSD as an added bonus.
Discussed with Luke Mewburn on tech-kern@.

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Mon Apr 9 01:58:01 2001 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45: +9 -4 lines
Diff to previous 1.45 (colored)

Catch up with -current.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Apr 7 09:00:57 2001 UTC (21 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.46: +5 -4 lines
Diff to previous 1.46 (colored)

Add new 'stat' fileop and call the stat function via f_ops rather
than directly.
For compat syscalls, also add necessary FILE_USE()/FILE_UNUSE().
Now that soo_stat() gets a proc arg, pass it on to usrreq function.

Revision 1.38.2.3 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:39 2001 UTC (21 years, 10 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.38.2.2: +5 -1 lines
Diff to previous 1.38.2.2 (colored) to branchpoint 1.38 (colored)

Sync with HEAD.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Mar 9 01:02:11 2001 UTC (21 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.45: +5 -1 lines
Diff to previous 1.45 (colored)

add UBC memory-usage balancing.  we track the number of pages in use for
each of the basic types (anonymous data, executable image, cached files)
and prevent the pagedaemon from reusing a given page if that would reduce
the count of that type of page below a sysctl-setable minimum threshold.
the thresholds are controlled via three new sysctl tunables:
vm.anonmin, vm.vnodemin, and vm.vtextmin.  these tunables are the
percentages of pageable memory reserved for each usage, and we do not allow
the sum of the minimums to be more than 95% so that there's always some
memory that can be reused.

Revision 1.38.2.2 / (download) - annotate - [select for diffs], Fri Dec 8 09:14:03 2000 UTC (22 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.38.2.1: +10 -5 lines
Diff to previous 1.38.2.1 (colored) to branchpoint 1.38 (colored)

Sync with HEAD.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Nov 27 08:39:44 2000 UTC (22 years, 2 months ago) by chs
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.44: +10 -5 lines
Diff to previous 1.44 (colored)

Initial integration of the Unified Buffer Cache project.

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:18 2000 UTC (22 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.38: +50 -15 lines
Diff to previous 1.38 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.44 / (download) - annotate - [select for diffs], Sat Aug 12 16:43:00 2000 UTC (22 years, 5 months ago) by sommerfeld
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

Use ltsleep(...,PNORELOCK..) instead of simple_unlock()/tsleep()

Revision 1.43 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:54 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], Tue Apr 11 04:37:51 2000 UTC (22 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.41: +11 -1 lines
Diff to previous 1.41 (colored)

add a new function vn_marktext() for exec code to let others know
that the vnode is now being used as process text.

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

Get rid of register declarations.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Mar 30 02:15:09 2000 UTC (22 years, 10 months ago) by simonb
Branch: MAIN
Changes since 1.39: +1 -2 lines
Diff to previous 1.39 (colored)

Delete redundant decl of union_vnodeop_p, it's in <miscfs/union/union.h>.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Feb 14 22:00:21 2000 UTC (22 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.38: +29 -1 lines
Diff to previous 1.38 (colored)

Fixes to the softdep code from Ethan Solomita <ethan@geocast.com>.
* Fix buffer ordering when it has dependencies.
* Alleviate memory problems.
* Deal with some recursive vnode locks (sigh).
* Fix other bugs.

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Fri Sep 3 08:48:54 1999 UTC (23 years, 5 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002
Changes since 1.36: +7 -2 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

Pull up revision 1.38:
  Don't allow coredump to follow symlinks, this has security
  implications.  (bouyer)

Revision 1.38 / (download) - annotate - [select for diffs], Tue Aug 31 12:30:36 1999 UTC (23 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Changes since 1.37: +7 -2 lines
Diff to previous 1.37 (colored)

Add a new flag, used by vn_open() which prevent symlinks from being followed
at open time. Use this to prevent coredump to follow symlinks when the
kernel opens/creates the file.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Aug 3 20:19:17 1999 UTC (23 years, 6 months ago) by wrstuden
Branch: MAIN
Changes since 1.36: +25 -2 lines
Diff to previous 1.36 (colored)

Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden

Revision 1.36.4.2 / (download) - annotate - [select for diffs], Sun Jul 11 05:43:56 1999 UTC (23 years, 6 months ago) by chs
Branch: chs-ubc2
Changes since 1.36.4.1: +3 -4 lines
Diff to previous 1.36.4.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

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

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

merge everything from chs-ubc branch.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Mar 31 18:30:13 1999 UTC (23 years, 10 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, chs-ubc2-base
Branch point for: netbsd-1-4, chs-ubc2
Changes since 1.35: +3 -11 lines
Diff to previous 1.35 (colored)

Previous change to vn_lock() was bogus.  If we got EDEADLK, it was from
lockmgr(), and it already unlocked v_interlock.  So, just return in this case.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Mar 30 00:16:44 1999 UTC (23 years, 10 months ago) by wrstuden
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

The mode for a node is a mode_t in both struct stat and struct vattr -
don't use a u_short for intermediate storage in vn_stat.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Mar 25 00:20:35 1999 UTC (23 years, 10 months ago) by sommerfe
Branch: MAIN
Changes since 1.33: +11 -3 lines
Diff to previous 1.33 (colored)

Prevent deadlock cited in PR4629 from crashing the system.  (copyout
and system call now just return EFAULT).  A complete fix will
presumably have to wait for UBC and/or for vnode locking protocols to
be revamped to allow use of shared locks.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:26 1999 UTC (23 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.32: +1 -9 lines
Diff to previous 1.32 (colored)

completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Feb 26 23:38:55 1999 UTC (23 years, 11 months ago) by wrstuden
Branch: MAIN
Changes since 1.31: +5 -2 lines
Diff to previous 1.31 (colored)

Modify VOP_CLOSE vnode op to always take a locked vnode. Change vn_close
to pass down a locked node. Modify union_copyup() to call VOP_CLOSE
locked nodes.

Also fix a bug in union_copyup() where a lock on the lower vnode would
only be released if VOP_OPEN didn't fail.

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

initial snapshot.  lots left to do.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Aug 2 18:39:14 1998 UTC (24 years, 6 months ago) by kleink
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base
Branch point for: chs-ubc
Changes since 1.30: +9 -4 lines
Diff to previous 1.30 (colored)

Implement support for IEEE Std 1003.1b-1993 syncronous I/O:
* if synchronized I/O file integrity completion of read operations was
  requested, set IO_SYNC in the ioflag passed to the read vnode operator.
* if synchronized I/O data integrity completion of write operations was
  requested, set IO_DSYNC in the ioflag passed to the write vnode operator.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jul 28 18:37:48 1998 UTC (24 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Change the "aresid" argument of vn_rdwr() from an int * to a size_t *,
to match the new uio_resid type.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jun 30 05:33:12 1998 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.28: +17 -10 lines
Diff to previous 1.28 (colored)

Add two additional arguments to the fileops read and write calls, a
pointer to the offset to use, and a flags word.  Define a flag that
specifies whether or not to update the offset passed by reference.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:36 1998 UTC (24 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.27: +55 -36 lines
Diff to previous 1.27 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:11 1998 UTC (24 years, 11 months ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +58 -31 lines
Diff to previous 1.1.1.2 (colored)

Import 4.4BSD-Lite2

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

Import 4.4BSD-Lite for reference

Revision 1.27 / (download) - annotate - [select for diffs], Thu Feb 19 00:53:46 1998 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.26: +2 -1 lines
Diff to previous 1.26 (colored)

Include the UNION option header.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Feb 10 14:09:57 1998 UTC (24 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored)

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

Revision 1.25 / (download) - annotate - [select for diffs], Thu Feb 5 08:00:07 1998 UTC (25 years ago) by mrg
Branch: MAIN
Changes since 1.24: +10 -1 lines
Diff to previous 1.24 (colored)

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Thu Jan 29 10:17:17 1998 UTC (25 years ago) by mellon
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001
Changes since 1.23: +4 -1 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

Pull up 1.24 (thorpej)

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 14 22:08:44 1998 UTC (25 years ago) by thorpej
Branch: MAIN
Changes since 1.23: +4 -1 lines
Diff to previous 1.23 (colored)

Grab a fix from 4.4BSD-Lite2: open(2) with O_FSYNC and MNT_SYNCHRONOUS
had not effect.  Fix: check for either of these flags in vn_write(),
and pass IO_SYNC down if they're set.

Revision 1.22.4.1 / (download) - annotate - [select for diffs], Tue Oct 14 10:26:30 1997 UTC (25 years, 3 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.22: +92 -1 lines
Diff to previous 1.22 (colored) next main 1.23 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Oct 10 02:09:34 1997 UTC (25 years, 3 months ago) by fvdl
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-BETA, marc-pcmcia-base
Branch point for: netbsd-1-3
Changes since 1.22: +92 -1 lines
Diff to previous 1.22 (colored)

Add vn_readdir function for use in both the old getdirentries and
the new getdents(). Add getdents().

Revision 1.22 / (download) - annotate - [select for diffs], Mon Mar 24 21:44:53 1997 UTC (25 years, 10 months ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Do not return generation counts to the user.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Sep 7 12:41:05 1996 UTC (26 years, 5 months ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.20: +7 -7 lines
Diff to previous 1.20 (colored)

Implement poll(2).

Revision 1.20 / (download) - annotate - [select for diffs], Sun Feb 4 02:18:41 1996 UTC (27 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.19: +27 -12 lines
Diff to previous 1.19 (colored)

First pass at prototyping

Revision 1.19 / (download) - annotate - [select for diffs], Tue May 23 06:11:29 1995 UTC (27 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.18: +26 -29 lines
Diff to previous 1.18 (colored)

Remove gratuitous extra indirections.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Dec 14 19:07:14 1994 UTC (28 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.17: +3 -4 lines
Diff to previous 1.17 (colored)

Remove extra arg to vn_open().

Revision 1.17 / (download) - annotate - [select for diffs], Tue Dec 13 21:52:45 1994 UTC (28 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.16: +7 -7 lines
Diff to previous 1.16 (colored)

LEASE_CHECK -> VOP_LEASE

Revision 1.16 / (download) - annotate - [select for diffs], Mon Nov 14 06:01:24 1994 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.15: +4 -3 lines
Diff to previous 1.15 (colored)

added extra argument in vn_open and VOP_OPEN to allow cloning devices

Revision 1.15 / (download) - annotate - [select for diffs], Sun Oct 30 21:48:16 1994 UTC (28 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

be more careful with types, also pull in headers where necessary.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Sep 18 04:40:47 1994 UTC (28 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Fix space change in last commit.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Wed Sep 14 00:37:12 1994 UTC (28 years, 4 months ago) by cgd
Branch: netbsd-1-0
CVS Tags: netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

from trunk

Revision 1.13 / (download) - annotate - [select for diffs], Wed Sep 14 00:35:29 1994 UTC (28 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

from Kirk McKusick: release old ctty if acquiring a new one.
also: prettiness police!

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 29 06:34:04 1994 UTC (28 years, 7 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 8 11:29:00 1994 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +27 -38 lines
Diff to previous 1.10 (colored)

Update to 4.4-Lite fs code.

Revision 1.10 / (download) - annotate - [select for diffs], Tue May 17 04:22:06 1994 UTC (28 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.9: +434 -1 lines
Diff to previous 1.9 (colored)

copyright foo

Revision 1.9 / (download) - annotate - [select for diffs], Mon Apr 25 03:49:48 1994 UTC (28 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

some prototype cleanup, eliminate/replace bogus types (e.g. quad and
u_quad) -> use better types (e.g. quad_t & u_quad_t in inodes),
some cleanup.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Apr 12 19:18:33 1994 UTC (28 years, 9 months ago) by chopps
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

FIONREAD returns int not off_t.  (ssize_t prefered, but standards may
dictate otherwise)

Revision 1.7 / (download) - annotate - [select for diffs], Tue Dec 21 07:19:14 1993 UTC (29 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

kill two wrong 'case's

Revision 1.6 / (download) - annotate - [select for diffs], Sat Dec 18 04:22:54 1993 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

Canonicalize all #includes.

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Sun Nov 14 21:24:28 1993 UTC (29 years, 2 months ago) by mycroft
Branch: magnum
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored) next main 1.6 (colored)

Canonicalize all #includes.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Sep 7 15:41:14 1993 UTC (29 years, 5 months ago) by ws
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

Changes to VFS readdir semantics
NFS changes for better cookie support
ISOFS changes for better Rockridge support and support for generation numbers

Revision 1.4 / (download) - annotate - [select for diffs], Tue Aug 24 12:56:22 1993 UTC (29 years, 5 months ago) by pk
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

Support added for proc filesystem.

Revision 1.3 / (download) - annotate - [select for diffs], Sat May 22 11:41:59 1993 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

add include of select.h if necessary for protos, or delete if extraneous

Revision 1.2 / (download) - annotate - [select for diffs], Tue May 18 18:19:44 1993 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

make kernel select interface be one-stop shopping & clean it all up.

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

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (29 years, 10 months ago) by cgd
Branch: MAIN

Initial revision

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




CVSweb <webmaster@jp.NetBSD.org>