The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.556 / (download) - annotate - [select for diffs], Wed Nov 2 20:38:22 2022 UTC (2 months, 4 weeks ago) by andvar
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.555: +3 -3 lines
Diff to previous 1.555 (colored)

fix various typos in comments and messages.

Revision 1.555 / (download) - annotate - [select for diffs], Sat Feb 12 15:51:29 2022 UTC (11 months, 2 weeks ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.554: +13 -6 lines
Diff to previous 1.554 (colored)

Add inline functions to manipulate the klists that link up knotes
via kn_selnext:

- klist_init()
- klist_fini()
- klist_insert()
- klist_remove()

These provide some API insulation from the implementation details of these
lists (but not completely; see vn_knote_attach() and vn_knote_detach()).
Currently just a wrapper around SLIST(9).

This will make it significantly easier to switch kn_selnext linkage
to a different kind of list.

Revision 1.554 / (download) - annotate - [select for diffs], Sun Nov 7 13:47:50 2021 UTC (14 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.553: +39 -22 lines
Diff to previous 1.553 (colored)

Merge the kernel portion of the posix-spawn-chdir project by Piyush Sachdeva.

Revision 1.553 / (download) - annotate - [select for diffs], Sun Sep 26 21:29:38 2021 UTC (16 months ago) by thorpej
Branch: MAIN
Changes since 1.552: +69 -6 lines
Diff to previous 1.552 (colored)

Fix the locking around EVFILT_FS.  Previously, the code would walk the
fs_klist and take the kqueue_misc_lock inside the event callback.
However, that list can be modified by the attach and detach callbacks,
which could result in the walker stepping right off a cliff.

Instead, we give the fs_klist it's own lock, and hold it while we
call knote(), using the NOTE_SUBMIT protocol.  Also, fs_filtops
into vfs_syscalls.c so all of the locking logic is contained in one
file (there is precedence with sig_filtops).  fs_filtops is now marked
MPSAFE.

Revision 1.552 / (download) - annotate - [select for diffs], Sat Sep 11 10:08:55 2021 UTC (16 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.551: +20 -52 lines
Diff to previous 1.551 (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.549.4.1 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:39 2021 UTC (17 months, 4 weeks ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.549: +25 -23 lines
Diff to previous 1.549 (colored) next main 1.550 (colored)

Sync with HEAD.

Revision 1.551 / (download) - annotate - [select for diffs], Sat Jul 3 09:39:26 2021 UTC (18 months, 4 weeks ago) by mlelstv
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.550: +5 -6 lines
Diff to previous 1.550 (colored)

Return error from fd_dupopen.

Revision 1.550 / (download) - annotate - [select for diffs], Tue Jun 29 22:40:53 2021 UTC (19 months ago) by dholland
Branch: MAIN
Changes since 1.549: +26 -23 lines
Diff to previous 1.549 (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.548.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:29:00 2021 UTC (21 months, 4 weeks ago) by thorpej
Branch: thorpej-futex
Changes since 1.548: +5 -4 lines
Diff to previous 1.548 (colored) next main 1.549 (colored)

Sync with HEAD.

Revision 1.549 / (download) - annotate - [select for diffs], Wed Feb 17 17:39:08 2021 UTC (23 months, 1 week ago) by dholland
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.548: +5 -4 lines
Diff to previous 1.548 (colored)

Don't allow callers of fsync_range() to trigger UB in the kernel.

(also prohibit syncing ranges at start offsets less than zero)

Revision 1.548 / (download) - annotate - [select for diffs], Sat May 16 18:31:50 2020 UTC (2 years, 8 months ago) by christos
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.547: +41 -17 lines
Diff to previous 1.547 (colored)

Add ACL support for FFS. From FreeBSD.

Revision 1.545.2.1 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:06 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.545: +100 -27 lines
Diff to previous 1.545 (colored) next main 1.546 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.516.2.1 / (download) - annotate - [select for diffs], Wed Apr 22 18:18:26 2020 UTC (2 years, 9 months ago) by martin
Branch: netbsd-8
Changes since 1.516: +3 -8 lines
Diff to previous 1.516 (colored) next main 1.517 (colored)

Pull up following revision(s) (requested by gdt in ticket #1534):

	sys/kern/vfs_syscalls.c: revision 1.544
	lib/libc/sys/fdatasync.2: revision 1.17

Relax fdatasync restriction that fd be writable

The restriction that a fd passed to fdatasync(2) must be writable was
added in 2003 in order to comply with POSIX.  Since then, POSIX has
removed that requirement, and POSIX-valid programs have been therefore
encountering errors on NetBSD.

Patch by Paul Ripke after discussion on netbsd-users.  Issue
discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.

Revision 1.533.2.1 / (download) - annotate - [select for diffs], Wed Apr 22 18:07:37 2020 UTC (2 years, 9 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.533: +3 -8 lines
Diff to previous 1.533 (colored) next main 1.534 (colored)

Pull up following revision(s) (requested by gdt in ticket #840):

	sys/kern/vfs_syscalls.c: revision 1.544
	lib/libc/sys/fdatasync.2: revision 1.17

Relax fdatasync restriction that fd be writable

The restriction that a fd passed to fdatasync(2) must be writable was
added in 2003 in order to comply with POSIX.  Since then, POSIX has
removed that requirement, and POSIX-valid programs have been therefore
encountering errors on NetBSD.

Patch by Paul Ripke after discussion on netbsd-users.  Issue
discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.

Revision 1.547 / (download) - annotate - [select for diffs], Tue Apr 21 21:42:47 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.546: +34 -27 lines
Diff to previous 1.546 (colored)

Revert the changes made in February to make cwdinfo use mostly lockless,
which relied on taking extra vnode refs.

Having benchmarked various experimental changes over the past few months it
seems that it's better to avoid vnode refs as much as possible.  cwdi_lock
as a RW lock already did that to some extent for getcwd() and will permit
the same for namei() too.

Revision 1.518.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.518.4.3: +66 -0 lines
Diff to previous 1.518.4.3 (colored) to branchpoint 1.518 (colored) next main 1.519 (colored)

Sync with HEAD

Revision 1.546 / (download) - annotate - [select for diffs], Mon Apr 20 21:39:05 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421
Changes since 1.545: +68 -2 lines
Diff to previous 1.545 (colored)

Rename buf_syncwait() to vfs_syncwait(), and have it wait on v_numoutput
rather than BC_BUSY.  Removes the dependency on bufhash.

Revision 1.518.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.518.4.2: +56 -21 lines
Diff to previous 1.518.4.2 (colored) to branchpoint 1.518 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.518.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.518.4.1: +68 -80 lines
Diff to previous 1.518.4.1 (colored) to branchpoint 1.518 (colored)

Merge changes from current as of 20200406

Revision 1.545 / (download) - annotate - [select for diffs], Sat Apr 4 20:49:30 2020 UTC (2 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base1, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.544: +6 -6 lines
Diff to previous 1.544 (colored)

Merge the remaining changes from the ad-namecache branch, affecting namei()
and getcwd():

- push vnode locking back as far as possible.
- do most lookups directly in the namecache, avoiding vnode locks & refs.
- don't block new refs to vnodes across VOP_INACTIVE().
- get shared locks for VOP_LOOKUP() if the file system supports it.
- correct lock types for VOP_ACCESS() / VOP_GETATTR() in a few places.

Possible future enhancements:

- make the lookups lockless.
- support dotdot lookups by being lockless and inferring absence of chroot.
- maybe make it work for layered file systems.
- avoid vnode references at the root & cwd.

Revision 1.544 / (download) - annotate - [select for diffs], Wed Mar 25 18:08:34 2020 UTC (2 years, 10 months ago) by gdt
Branch: MAIN
Changes since 1.543: +3 -8 lines
Diff to previous 1.543 (colored)

Relax fdatasync restriction that fd be writable

The restriction that a fd passed to fdatasync(2) must be writable was
added in 2003 in order to comply with POSIX.  Since then, POSIX has
removed that requirement, and POSIX-valid programs have been therefore
encountering errors on NetBSD.

Patch by Paul Ripke after discussion on netbsd-users.  Issue
discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.

Revision 1.543 / (download) - annotate - [select for diffs], Tue Mar 3 19:55:16 2020 UTC (2 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.542: +6 -5 lines
Diff to previous 1.542 (colored)

don't skip the rdir check for the lazy case; breaks chroot df(1) hiding.

Revision 1.539.2.4 / (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.539.2.3: +10 -8 lines
Diff to previous 1.539.2.3 (colored) to branchpoint 1.539 (colored) next main 1.540 (colored)

Sync with head.

Revision 1.542 / (download) - annotate - [select for diffs], Sun Feb 23 22:14:04 2020 UTC (2 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.541: +47 -57 lines
Diff to previous 1.541 (colored)

Merge from ad-namecache:

- Have a stab at clustering the members of vnode_t and vnode_impl_t in a
  more cache-conscious way.  With that done, go back to adjusting v_usecount
  with atomics and keep vi_lock directly in vnode_impl_t (saves KVA).

- Allow VOP_LOCK(LK_NONE) for the benefit of VFS_VGET() and VFS_ROOT().
  Make sure LK_UPGRADE always comes with LK_NOWAIT.

- Make cwdinfo use mostly lockless.

Revision 1.541 / (download) - annotate - [select for diffs], Sat Feb 22 08:58:39 2020 UTC (2 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.540: +7 -5 lines
Diff to previous 1.540 (colored)

Inline the block in the parent block, for clarity, and also to prevent a
false positive with kMSan.

Here, LLVM reorders the conditions and checks 'vattr' before 'error'. But
if 'error' is non-zero then 'vattr' is not initialized, and kMSan notices
the uninitialized memory read.

Revision 1.539.2.3 / (download) - annotate - [select for diffs], Sat Jan 25 15:54:03 2020 UTC (3 years ago) by ad
Branch: ad-namecache
Changes since 1.539.2.2: +48 -58 lines
Diff to previous 1.539.2.2 (colored) to branchpoint 1.539 (colored)

Make cwdinfo use mostly lockless, and largely hide the details in vfs_cwd.c.

Revision 1.539.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.539.2.1: +5 -5 lines
Diff to previous 1.539.2.1 (colored) to branchpoint 1.539 (colored)

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

Revision 1.539.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.539: +5 -5 lines
Diff to previous 1.539 (colored)

Sync with head.

Revision 1.540 / (download) - annotate - [select for diffs], Fri Jan 17 20:08:09 2020 UTC (3 years ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.539: +5 -5 lines
Diff to previous 1.539 (colored)

VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode.  Matches
FreeBSD.

Revision 1.539 / (download) - annotate - [select for diffs], Tue Dec 31 11:49:08 2019 UTC (3 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.538: +3 -3 lines
Diff to previous 1.538 (colored)

sys_fchdir: use LK_SHARED.

Revision 1.538 / (download) - annotate - [select for diffs], Sun Dec 22 19:47:34 2019 UTC (3 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.537: +9 -9 lines
Diff to previous 1.537 (colored)

Make mntvnode_lock per-mount, and address false sharing of struct mount.

Revision 1.537 / (download) - annotate - [select for diffs], Thu Sep 26 01:34:16 2019 UTC (3 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.536: +3 -3 lines
Diff to previous 1.536 (colored)

make nmountcompatnames unsigned (assigned from __arraycount, compared with
unsigned in compat code)

Revision 1.536 / (download) - annotate - [select for diffs], Sun Sep 22 22:59:39 2019 UTC (3 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.535: +7 -6 lines
Diff to previous 1.535 (colored)

Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=

Revision 1.535 / (download) - annotate - [select for diffs], Fri Sep 20 13:29:31 2019 UTC (3 years, 4 months ago) by kamil
Branch: MAIN
Changes since 1.534: +12 -4 lines
Diff to previous 1.534 (colored)

Validate usec ranges in do_sys_utimes()

sys/kern/vfs_syscalls.c:3939:4, signed integer overflow: 503923632 * 1000 cannot be represented in type 'int'

Reported-by: syzbot+4cfc86ffd30e8678f68d@syzkaller.appspotmail.com

Revision 1.534 / (download) - annotate - [select for diffs], Sun Sep 15 20:51:03 2019 UTC (3 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.533: +9 -2 lines
Diff to previous 1.533 (colored)

Prevent O_EXEC for mq_open(2), and O_EXEC with a writable fd for open(2).

Revision 1.533 / (download) - annotate - [select for diffs], Sat Jul 6 14:37:24 2019 UTC (3 years, 6 months ago) by maxv
Branch: MAIN
CVS Tags: netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Changes since 1.532: +9 -9 lines
Diff to previous 1.532 (colored)

Fix bug: if seg == UIO_SYSSPACE, tv[] is not initialized. The branches
should depend on tptr[] instead.

Revision 1.532 / (download) - annotate - [select for diffs], Fri Jun 21 14:58:32 2019 UTC (3 years, 7 months ago) by kamil
Branch: MAIN
Changes since 1.531: +10 -5 lines
Diff to previous 1.531 (colored)

Restore ability to create regular files with mknod(2)

This behavior is requested in ATF tests.

Revision 1.531 / (download) - annotate - [select for diffs], Thu Jun 20 03:31:54 2019 UTC (3 years, 7 months ago) by kamil
Branch: MAIN
Changes since 1.530: +20 -6 lines
Diff to previous 1.530 (colored)

Add mkfifo{,at}(2) mode in mknod{,at}(2) as requested by POSIX

mknod with mode & S_IFIFO and dev=0 shall behave like mkfifo.

Update the documentation to reflect this state.

Add ATF tests.

This is an in-kernel implementation as typically user-space programs use
mkfifo(2) directly, however whenever there is need to bypass libc (like in
valgrind) then portable POSIX software calls the mknod syscall.

Noted on tech-kern@ by Greg Troxel.

Revision 1.530 / (download) - annotate - [select for diffs], Wed Jun 19 14:16:06 2019 UTC (3 years, 7 months ago) by kamil
Branch: MAIN
Changes since 1.529: +4 -4 lines
Diff to previous 1.529 (colored)

Correct wrong type of uio_seg passed to do_sys_mknodat()

It was introduced by an accident in previous commit to this file.

Detected by syzbot:
https://syzkaller.appspot.com/text?tag=CrashLog&x=16635d9ea00000

Revision 1.529 / (download) - annotate - [select for diffs], Tue Jun 18 22:34:25 2019 UTC (3 years, 7 months ago) by kamil
Branch: MAIN
Changes since 1.528: +9 -9 lines
Diff to previous 1.528 (colored)

Drop unused retval pointer from do_sys_mknod{,at}()

No functional change intended.

Revision 1.518.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.518: +48 -45 lines
Diff to previous 1.518 (colored)

Sync with HEAD

Revision 1.528 / (download) - annotate - [select for diffs], Mon May 13 08:17:30 2019 UTC (3 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.527: +3 -3 lines
Diff to previous 1.527 (colored)

do_sys_mkdir(): pass the requested segment down to do_sys_mkdirat().

Revision 1.527 / (download) - annotate - [select for diffs], Fri Mar 1 11:06:57 2019 UTC (3 years, 11 months ago) by pgoyette
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.526: +3 -3 lines
Diff to previous 1.526 (colored)

Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

NFCI intended.

Ride the earlier kernel bump - it;s getting crowded.

Revision 1.526 / (download) - annotate - [select for diffs], Wed Feb 20 10:05:20 2019 UTC (3 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.525: +20 -31 lines
Diff to previous 1.525 (colored)

Bracket do_sys_renameat() and nfsrv_rename() with fstrans.

The v_mount field for vnodes on the same file system as "from"
is now stable for referenced vnodes.

VFS_RENAMELOCK no longer may use lock from an unreferenced and
freed "struct mount".

Revision 1.525 / (download) - annotate - [select for diffs], Tue Feb 19 06:55:28 2019 UTC (3 years, 11 months ago) by mlelstv
Branch: MAIN
Changes since 1.524: +11 -2 lines
Diff to previous 1.524 (colored)

Don't allow MNT_UNION on the root, there is no covered filesystem.

Fixes PR 53850

Revision 1.524 / (download) - annotate - [select for diffs], Tue Feb 5 13:50:10 2019 UTC (3 years, 11 months ago) by kamil
Branch: MAIN
Changes since 1.523: +6 -3 lines
Diff to previous 1.523 (colored)

The panic for fopen(NULL, ... is back, fix it

Restore the original behavior before merging the compat refactoring branch.

Now:
 - no compat_10 -> perform pathbuf_copyin() and report EFAULT
 - compat_10 and error -> report error
 - compat_10 and success -> return file descriptor for "."

PR kern/53948

Revision 1.523 / (download) - annotate - [select for diffs], Tue Feb 5 09:34:38 2019 UTC (3 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.522: +7 -6 lines
Diff to previous 1.522 (colored)

If the openat_10 hook is present and it returns success, continue with
the rest of the syscall; don't return prematurely, as we'll report
success (return value 0) but won't have set up the fd.

Revision 1.522 / (download) - annotate - [select for diffs], Tue Feb 5 08:53:18 2019 UTC (3 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.521: +7 -8 lines
Diff to previous 1.521 (colored)

Correctly handle the NULL path when no compat_10 code is available.

This should address kern/53948 (thanks, kamil@, for the PR and for
testing the fix)

Revision 1.521 / (download) - annotate - [select for diffs], Thu Jan 31 02:27:06 2019 UTC (4 years ago) by manu
Branch: MAIN
Changes since 1.520: +12 -3 lines
Diff to previous 1.520 (colored)

Do not resolve fdat for openat(2) if path is absolute

Opengroup says "The openat() function shall be equivalent to the open() function except in the case where path specifies a relative path", but
says nothing about fdat usage when path is absolute;
https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html

 We used to always reslove fdat, leading to error if it was invalid (e.g.: -1). That caused portability problem with other systems that
 just ignore it. See discussion in a pull request to work around that
 problem with MariaDB: https://github.com/MariaDB/server/pull/838

 We fix the problem by ignoring fdat when path is absolute.

Revision 1.520 / (download) - annotate - [select for diffs], Tue Jan 29 09:28:50 2019 UTC (4 years ago) by pgoyette
Branch: MAIN
Changes since 1.519: +3 -4 lines
Diff to previous 1.519 (colored)

Normalize all the compat hooks' names to the form

	<subsystem>_<function>_<version>_hook

NFCI

XXX Note that although this introduces a change in the kernel-to-
XXX module interface, we are NOT bumping the kernel version number.
XXX We will bump the version number once the interface stabilizes.

Revision 1.519 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:43 2019 UTC (4 years ago) by pgoyette
Branch: MAIN
Changes since 1.518: +8 -14 lines
Diff to previous 1.518 (colored)

Merge the [pgoyette-compat] branch

Revision 1.518.2.6 / (download) - annotate - [select for diffs], Tue Jan 22 07:42:41 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.518.2.5: +4 -18 lines
Diff to previous 1.518.2.5 (colored) to branchpoint 1.518 (colored) next main 1.519 (colored)

Convert the MODULE_{,VOID_}HOOK_CALL macros to do everything in-line
rather than defining an intermediate hook##call function.  Almost
all of the hooks are called only once, and although we lose the
ability of doing things like

	if (MODULE_HOOK_CALL(...) == 0) ...

we simplify things quite a bit.  With this change, we no longer need
to have both declaration and definition macros, and the definition
no longer needs to have both prototype argument list and a "real"
argument list.

FWIW, the above if now needs to written as

	int ret;

	MODULE_HOOK_CALL(..., ret);
	if (ret == 0) ...

with appropriate use of braces {}.

Revision 1.518.2.5 / (download) - annotate - [select for diffs], Fri Jan 18 00:01:01 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.518.2.4: +4 -4 lines
Diff to previous 1.518.2.4 (colored) to branchpoint 1.518 (colored)

Don't restrict hooks to having only int or void types.  Pass the hook's
type to the various macros, as needed.

Allows us to reduce diffs to original in at least one or two places (we
no longer have to provide an additional parameter to the hook routine
for returning a non-int return value).

Revision 1.518.2.4 / (download) - annotate - [select for diffs], Mon Jan 14 13:34:28 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.518.2.3: +4 -4 lines
Diff to previous 1.518.2.3 (colored) to branchpoint 1.518 (colored)

Create a variant of the HOOK macros that handles hook routines of
type void, and use them where appropriate.

Revision 1.518.2.3 / (download) - annotate - [select for diffs], Sun Jan 13 10:49:50 2019 UTC (4 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.518.2.2: +5 -5 lines
Diff to previous 1.518.2.2 (colored) to branchpoint 1.518 (colored)

Remove the HOOK2 versions of the MODULE_HOOK macros.  There were
only a few uses, and using them led to some lack of clarity in the
code.  Instead, we now use two separate hooks, with names that
make it clear(er) what we're doing.

This also positions us to start unraveling some of the rtsock_50
mess, which will need (at least) five hooks.

Revision 1.518.2.2 / (download) - annotate - [select for diffs], Mon Oct 15 10:44:27 2018 UTC (4 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.518.2.1: +8 -8 lines
Diff to previous 1.518.2.1 (colored) to branchpoint 1.518 (colored)

Convert the openat_10 hook to use the MP-safe mechanism

XXX Still to do: compat70_unp_addsockcred and sysvipc50_sysctl

Revision 1.518.2.1 / (download) - annotate - [select for diffs], Wed Mar 14 02:24:56 2018 UTC (4 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.518: +17 -9 lines
Diff to previous 1.518 (colored)

Make do_openat()'s handling of path=NULL modular

Revision 1.518 / (download) - annotate - [select for diffs], Tue Jan 9 03:31:13 2018 UTC (5 years ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.517: +7 -2 lines
Diff to previous 1.517 (colored)

Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet

Revision 1.457.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (5 years, 1 month ago) by jdolecek
Branch: tls-maxphys
Changes since 1.457.2.3: +117 -113 lines
Diff to previous 1.457.2.3 (colored) next main 1.458 (colored)

update from HEAD

Revision 1.517 / (download) - annotate - [select for diffs], Tue Nov 7 15:57:38 2017 UTC (5 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.516: +8 -6 lines
Diff to previous 1.516 (colored)

We computed the length of the string already, so use it...

Revision 1.492.2.6 / (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.492.2.5: +40 -49 lines
Diff to previous 1.492.2.5 (colored) to branchpoint 1.492 (colored) next main 1.493 (colored)

Sync with HEAD

Revision 1.516 / (download) - annotate - [select for diffs], Thu Jun 1 02:45:13 2017 UTC (5 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Changes since 1.515: +2 -9 lines
Diff to previous 1.515 (colored)

remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.513.2.1 / (download) - annotate - [select for diffs], Thu May 11 02:58:40 2017 UTC (5 years, 8 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.513: +2 -10 lines
Diff to previous 1.513 (colored) next main 1.514 (colored)

Sync with HEAD

Revision 1.515 / (download) - annotate - [select for diffs], Sun May 7 08:26:58 2017 UTC (5 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2
Changes since 1.514: +2 -4 lines
Diff to previous 1.514 (colored)

Enter fstrans from _vfs_busy() and leave from vfs_unbusy().

Adapt sched_sync() and do_sys_sync().

Revision 1.514 / (download) - annotate - [select for diffs], Sun May 7 08:25:54 2017 UTC (5 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.513: +2 -8 lines
Diff to previous 1.513 (colored)

Return ENOENT if trying to suspend an unmounted file system.

Revision 1.513 / (download) - annotate - [select for diffs], Wed Apr 26 03:02:49 2017 UTC (5 years, 9 months ago) by riastradh
Branch: MAIN
CVS Tags: prg-localcount2-base1, prg-localcount2-base
Branch point for: prg-localcount2
Changes since 1.512: +4 -2 lines
Diff to previous 1.512 (colored)

Change VOP_REMOVE and VOP_RMDIR to preserve lock/ref on dvp.

No change to vp -- the plan is to replace the node by the
componentname in the vop parameters, and let all directory vops do
lookups internally.

Proposed on tech-kern with no objections:
https://mail-index.netbsd.org/tech-kern/2017/04/17/msg021825.html

Revision 1.504.2.3 / (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.504.2.2: +24 -33 lines
Diff to previous 1.504.2.2 (colored) to branchpoint 1.504 (colored) next main 1.505 (colored)

Sync with HEAD

Revision 1.505.2.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.505: +44 -40 lines
Diff to previous 1.505 (colored) next main 1.506 (colored)

Sync with HEAD

Revision 1.512 / (download) - annotate - [select for diffs], Mon Apr 17 08:32:01 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170426, bouyer-socketcan-base1
Changes since 1.511: +8 -8 lines
Diff to previous 1.511 (colored)

Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.

Revision 1.511 / (download) - annotate - [select for diffs], Mon Apr 17 08:31:02 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.510: +7 -7 lines
Diff to previous 1.510 (colored)

Add vfs_ref(mp) and vfs_rele(mp) to add or remove a reference to
struct mount.  Rename vfs_destroy(mp) to vfs_rele(mp) and replace
incrementing mp->mnt_refcnt with vfs_ref(mp).

Revision 1.510 / (download) - annotate - [select for diffs], Wed Apr 12 10:28:39 2017 UTC (5 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.509: +13 -22 lines
Diff to previous 1.509 (colored)

Switch do_sys_sync() and do_sys_getvfsstat() to mountlist iterator.

Revision 1.504.2.2 / (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.504.2.1: +22 -9 lines
Diff to previous 1.504.2.1 (colored) to branchpoint 1.504 (colored)

Sync with HEAD

Revision 1.509 / (download) - annotate - [select for diffs], Tue Mar 7 11:54:16 2017 UTC (5 years, 10 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq
Changes since 1.508: +6 -5 lines
Diff to previous 1.508 (colored)

Fix a logic error introduced with Rev. 1.507: defer setting MNT_RDONLY
only if going from read-write to read-only.

Should fix PR kern/52045 (panic: ffs_sync: rofs mod, fs=/ after fsck)

Revision 1.508 / (download) - annotate - [select for diffs], Wed Mar 1 10:45:24 2017 UTC (5 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.507: +7 -2 lines
Diff to previous 1.507 (colored)

Suspend the mounted file system while updating.

Revision 1.507 / (download) - annotate - [select for diffs], Wed Mar 1 10:44:47 2017 UTC (5 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.506: +13 -9 lines
Diff to previous 1.506 (colored)

Change the protocol to update a mounted file system from read-write
to read-only and vice versa:

- Add an internal flag IMNT_WANTRDONLY.
- Set either IMNT_WANTRDWR or IMNT_WANTRDONLY if going from or to read-only.
- After successfull call to VFS_MOUNT() set or clear MNT_RDONLY.

Adapt tmpfs and rumpfs to the new protocol.  Other file systems will be
updated when they get the IMNT_CAN_RWTORO property.

Welcome to 7.99.64

Revision 1.506 / (download) - annotate - [select for diffs], Fri Feb 17 08:26:07 2017 UTC (5 years, 11 months ago) by hannken
Branch: MAIN
Changes since 1.505: +5 -2 lines
Diff to previous 1.505 (colored)

Take fstrans_start before syncing a file system.

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

Sync with HEAD

Revision 1.504.2.1 / (download) - annotate - [select for diffs], Sat Aug 6 00:19:09 2016 UTC (6 years, 5 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.504: +3 -3 lines
Diff to previous 1.504 (colored)

Sync with HEAD

Revision 1.505 / (download) - annotate - [select for diffs], Sun Jul 31 20:34:04 2016 UTC (6 years, 6 months ago) by dholland
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.504: +3 -3 lines
Diff to previous 1.504 (colored)

typo in comment

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

Sync with HEAD (as of 26th Dec)

Revision 1.504 / (download) - annotate - [select for diffs], Sat Nov 28 15:26:29 2015 UTC (7 years, 2 months ago) by dholland
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Branch point for: pgoyette-localcount
Changes since 1.503: +7 -4 lines
Diff to previous 1.503 (colored)

Fix kern/50841: races in sys_lseek.

Revision 1.503 / (download) - annotate - [select for diffs], Wed Oct 28 14:05:04 2015 UTC (7 years, 3 months ago) by martin
Branch: MAIN
Changes since 1.502: +3 -3 lines
Diff to previous 1.502 (colored)

Fix inverted KASSERT

Revision 1.502 / (download) - annotate - [select for diffs], Sun Oct 25 09:27:14 2015 UTC (7 years, 3 months ago) by martin
Branch: MAIN
Changes since 1.501: +3 -3 lines
Diff to previous 1.501 (colored)

Apease bogus gcc warning.

Revision 1.501 / (download) - annotate - [select for diffs], Fri Oct 23 19:40:10 2015 UTC (7 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.500: +23 -21 lines
Diff to previous 1.500 (colored)

Change do_sys_mount() so that it only takes as argument the type of the
drive instead of its associated vfsops. Makes it more friendly, and allows
compat binaries to autoload VFS modules if needed.

sent on tech-kern@, ok christos@

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

Sync with HEAD

Revision 1.500 / (download) - annotate - [select for diffs], Fri Jul 24 13:02:52 2015 UTC (7 years, 6 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.499: +3 -3 lines
Diff to previous 1.499 (colored)

Unused inits (harmless).

Found by Brainy.

Revision 1.499 / (download) - annotate - [select for diffs], Fri Jun 12 19:06:32 2015 UTC (7 years, 7 months ago) by dholland
Branch: MAIN
Changes since 1.498: +3 -3 lines
Diff to previous 1.498 (colored)

Use NOFOLLOW intead of <empty>. Purely cosmetic as NOFOLLOW is 0, but
it's supposed to be there for clarity.

Revision 1.492.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:22 2015 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.492.2.1: +49 -46 lines
Diff to previous 1.492.2.1 (colored) to branchpoint 1.492 (colored)

Sync with HEAD

Revision 1.498 / (download) - annotate - [select for diffs], Wed May 6 15:57:08 2015 UTC (7 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.497: +6 -7 lines
Diff to previous 1.497 (colored)

Remove miscfs/syncfs and

- move the syncer into kern/vfs_subr.c.

- change the syncer to process the mountlist and VFS_SYNC as appropriate.

- use an API for mount points similiar to the API for vnodes:
  - vfs_syncer_add_to_worklist(struct mount *mp) to add
  - vfs_syncer_remove_from_worklist(struct mount *mp) to remove a mount.

No objections on tech-kern@

Revision 1.497 / (download) - annotate - [select for diffs], Tue Apr 21 03:19:03 2015 UTC (7 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.496: +4 -4 lines
Diff to previous 1.496 (colored)

Cull unused INRENAME and INRELOOKUP from callers.

Revision 1.496 / (download) - annotate - [select for diffs], Mon Apr 20 23:03:08 2015 UTC (7 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.495: +4 -2 lines
Diff to previous 1.495 (colored)

Make VOP_LINK return directory still locked and referenced.

Ride 7.99.10 bump.

Revision 1.495 / (download) - annotate - [select for diffs], Thu Apr 9 05:08:15 2015 UTC (7 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.494: +9 -7 lines
Diff to previous 1.494 (colored)

But rename(..., "x/..") is still supposed to yield EINVAL.  Go figure.

Revision 1.494 / (download) - annotate - [select for diffs], Thu Apr 9 05:03:58 2015 UTC (7 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.493: +3 -3 lines
Diff to previous 1.493 (colored)

Tests claim rename(..., "x/.") yields EISDIR, so do that.  Fixes zfs.

Revision 1.492.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.492: +8 -5 lines
Diff to previous 1.492 (colored)

Sync with HEAD

Revision 1.490.2.2 / (download) - annotate - [select for diffs], Wed Feb 18 06:35:58 2015 UTC (7 years, 11 months 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.490.2.1: +8 -5 lines
Diff to previous 1.490.2.1 (colored) to branchpoint 1.490 (colored) next main 1.491 (colored)

Pull up following revision(s) (requested by martin in ticket #523):
	sys/kern/vfs_syscalls.c: revision 1.493
A syscall like posix_fallocate() that is not supposed to set errno in
userland needs to always return 0 and store the error code *retval.

Revision 1.493 / (download) - annotate - [select for diffs], Sun Feb 15 10:48:21 2015 UTC (7 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.492: +8 -5 lines
Diff to previous 1.492 (colored)

A syscall like posix_fallocate() that is not supposed to set errno in
userland needs to always return 0 and store the error code *retval.

Revision 1.490.2.1 / (download) - annotate - [select for diffs], Mon Dec 1 09:54:50 2014 UTC (8 years, 2 months ago) by martin
Branch: netbsd-7
Changes since 1.490: +3 -3 lines
Diff to previous 1.490 (colored)

Pull up following revision(s) (requested by manu in ticket #276):
	sys/kern/vfs_syscalls.c: revision 1.492
Do not follow symlinks in sys_unmount()
There are situations where the underlying filesystem is unreachable
(e.g: NFS) causing symlink resolution to hang. Such a situation
should be avoided by using umount -f -R (force and raw), but while -R
causes the symlink resolution to be skipped in umount(8), the kernel was
still doing it in sys_unmount(). This changes fixes that.
When the -R flag is not given, umount(8) does symlinks resolution
through
realpath(3) before calling unmount(2), hence not doing it in the kernel
would not change behavior.

Revision 1.492 / (download) - annotate - [select for diffs], Wed Nov 26 10:50:36 2014 UTC (8 years, 2 months ago) by manu
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.491: +3 -3 lines
Diff to previous 1.491 (colored)

Do not follow symlinks in sys_unmount()

There are situations where the underlying filesystem is unreachable
(e.g: NFS) causing symlink resolution to hang. Such a situation
should be avoided by using umount -f -R (force and raw), but while -R
causes the symlink resolution to be skipped in umount(8), the kernel was
still doing it in sys_unmount(). This changes fixes that.

When the -R flag is not given, umount(8) does symlinks resolution through
realpath(3) before calling unmount(2), hence not doing it in the kernel
would not change behavior.

Revision 1.449.2.4 / (download) - annotate - [select for diffs], Mon Nov 3 19:48:14 2014 UTC (8 years, 2 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.449.2.3: +8 -2 lines
Diff to previous 1.449.2.3 (colored) to branchpoint 1.449 (colored) next main 1.450 (colored)

Pull up following revision(s) (requested by manu in ticket #1150):
	lib/libc/sys/truncate.2: revision 1.27
	sys/kern/vfs_syscalls.c: revision 1.484
Follow OpenGroup online documents for truncate[1] and ftruncate[2].
Fail with EINVAL for length argument negative values.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html

Revision 1.491 / (download) - annotate - [select for diffs], Fri Sep 5 09:20:59 2014 UTC (8 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.490: +24 -24 lines
Diff to previous 1.490 (colored)

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

Revision 1.457.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.457.2.2: +171 -65 lines
Diff to previous 1.457.2.2 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.478.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.478: +131 -25 lines
Diff to previous 1.478 (colored) next main 1.479 (colored)

Rebase.

Revision 1.490 / (download) - annotate - [select for diffs], Fri Jul 25 16:28:12 2014 UTC (8 years, 6 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.489: +18 -18 lines
Diff to previous 1.489 (colored)

'result' -> 'error'

Revision 1.489 / (download) - annotate - [select for diffs], Fri Jul 25 08:30:10 2014 UTC (8 years, 6 months ago) by dholland
Branch: MAIN
Changes since 1.488: +3 -3 lines
Diff to previous 1.488 (colored)

typo in comment

Revision 1.488 / (download) - annotate - [select for diffs], Fri Jul 25 08:25:47 2014 UTC (8 years, 6 months ago) by dholland
Branch: MAIN
Changes since 1.487: +109 -2 lines
Diff to previous 1.487 (colored)

Add fdiscard and posix_fallocate syscalls.

Revision 1.487 / (download) - annotate - [select for diffs], Mon Jun 30 17:51:31 2014 UTC (8 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.486: +3 -10 lines
Diff to previous 1.486 (colored)

This is weird; 'abort' already does all this, so simply use goto abort.

Revision 1.486 / (download) - annotate - [select for diffs], Sat Jun 28 22:27:50 2014 UTC (8 years, 7 months ago) by dholland
Branch: MAIN
Changes since 1.485: +6 -6 lines
Diff to previous 1.485 (colored)

Revert the following changes:

   src/sys/sys/quotactl.h 1.37
   src/sys/compat/netbsd32/netbsd32.h 1.101
   src/sys/compat/netbsd32/netbsd32_netbsd.c 1.188, 1.189
   src/sys/kern/vfs_quotactl.c 1.39
   src/sys/kern/vfs_syscalls.c 1.483
   src/sys/ufs/lfs/ulfs_quota.c 1.11
   src/sys/ufs/ufs/ufs_quota.c 1.116
   src/lib/libquota/quota_kernel.c 1.5

and do them correctly.

If you're going to change the name of something, you need to change
the name of *all* the things with the same name, not just a handful,
and you should change it to something similar so it still matches the
rest of the system rather than just picking an arbitrarily different
name.

Hi, Joerg.

To wit, rename the quotactl "delete" operation to "del", because
"delete" is a reserved word in C++ and for some reason Joerg wants to
run internal interfaces used only by C code through his C++ compiler.
Do not rename it to "remove" instead, because this doesn't match
libquota or the rest of the usage throughout the system; and rename
all the related identifiers, not just the ones that blew the mind of
Joerg's C++ compiler.

Because this is not a user-facing API (the only userland consumer
sys/quotactl.h is libquota) it is sort of ok to make arbitrary
source-incompatible changes; however, by the same token it's completely
unnecessary. If it *were* a user-facing API that someone might have a
semi-rational reason to want to run a C++ compiler on, it would be
incorrect to change it at this point.

Revision 1.485 / (download) - annotate - [select for diffs], Thu Jun 26 01:46:03 2014 UTC (8 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.484: +3 -8 lines
Diff to previous 1.484 (colored)

Don't initialize the fh pointer to NULL when the allocation functions fail
and allow NULL in the free functions. It just leads to writing sloppy code
for no good reason.

Revision 1.484 / (download) - annotate - [select for diffs], Sat Jun 14 11:37:35 2014 UTC (8 years, 7 months ago) by njoly
Branch: MAIN
Changes since 1.483: +8 -2 lines
Diff to previous 1.483 (colored)

Follow OpenGroup online documents for truncate[1] and ftruncate[2].
Fail with EINVAL for length argument negative values.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html

Revision 1.483 / (download) - annotate - [select for diffs], Thu Jun 12 21:39:45 2014 UTC (8 years, 7 months ago) by joerg
Branch: MAIN
Changes since 1.482: +3 -3 lines
Diff to previous 1.482 (colored)

Don't t use a C++ keyword as field name.

Revision 1.440.2.6 / (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.440.2.5: +52 -47 lines
Diff to previous 1.440.2.5 (colored) to branchpoint 1.440 (colored) next main 1.441 (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.464.2.2 / (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.464.2.1: +48 -37 lines
Diff to previous 1.464.2.1 (colored) to branchpoint 1.464 (colored) next main 1.465 (colored)

sync with head

Revision 1.376.4.7.2.1 / (download) - annotate - [select for diffs], Mon Apr 28 16:05:36 2014 UTC (8 years, 9 months ago) by sborrill
Branch: netbsd-5-2
CVS Tags: netbsd-5-2-3-RELEASE
Changes since 1.376.4.7: +12 -7 lines
Diff to previous 1.376.4.7 (colored) next main 1.376.4.8 (colored)

Pull up the following revisions(s) (requested by maxv in ticket #1901):
	sys/kern/vfs_syscalls.c:	revision 1.478, 1.480 via patch
	sys/coda/coda_vfsops.c:		revision 1.81
	sys/fs/adosfs/advfsops.c:	revision 1.70
	sys/fs/cd9660/cd9660_vfsops.c:	revision 1.84
	sys/fs/efs/efs_vfsops.c:	revision 1.25
	sys/fs/filecorefs/filecore_vfsops.c:	revision 1.76
	sys/fs/hfs/hfs_vfsops.c:	revision 1.31
	sys/fs/msdosfs/msdosfs_vfsops.c:	revision 1.107
	sys/fs/ntfs/ntfs_vfsops.c:	revision 1.94
	sys/fs/ptyfs/ptyfs_vfsops.c:	revision 1.50 via patch
	sys/fs/puffs/puffs_vfsops.c:	revision 1.110 via patch
	sys/fs/smbfs/smbfs_vfsops.c:	revision 1.100
	sys/fs/sysvbfs/sysvbfs_vfsops.c:	revision 1.43
	sys/fs/tmpfs/tmpfs_vfsops.c:	revision 1.59 via patch
	sys/fs/udf/udf_vfsops.c:	revision 1.67
	sys/fs/union/union_vfsops.c:	revision 1.72
	sys/fs/unionfs/unionfs_vfsops.c:	revision 1.13
	sys/kern/vfs_syscalls.c:	revision 1.479
	sys/miscfs/nullfs/null_vfsops.c:	revision 1.88 via patch
	sys/miscfs/overlay/overlay_vfsops.c:	revision 1.61
	sys/miscfs/procfs/procfs_vfsops.c:	revision 1.91
	sys/miscfs/umapfs/umap_vfsops.c:	revision 1.92
	sys/nfs/nfs_vfsops.c:		revision 1.227
	sys/ufs/ext2fs/ext2fs_vfsops.c:	revision 1.180
	sys/ufs/ffs/ffs_vfsops.c:	revision 1.297
	sys/ufs/lfs/lfs_vfsops.c:	revision 1.321
	sys/ufs/mfs/mfs_vfsops.c:	revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.

Revision 1.376.4.5.2.2 / (download) - annotate - [select for diffs], Mon Apr 28 16:03:15 2014 UTC (8 years, 9 months ago) by sborrill
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-5-RELEASE
Changes since 1.376.4.5.2.1: +12 -7 lines
Diff to previous 1.376.4.5.2.1 (colored) to branchpoint 1.376.4.5 (colored) next main 1.376.4.6 (colored)

Pull up the following revisions(s) (requested by maxv in ticket #1901):
	sys/kern/vfs_syscalls.c:	revision 1.478, 1.480 via patch
	sys/coda/coda_vfsops.c:		revision 1.81
	sys/fs/adosfs/advfsops.c:	revision 1.70
	sys/fs/cd9660/cd9660_vfsops.c:	revision 1.84
	sys/fs/efs/efs_vfsops.c:	revision 1.25
	sys/fs/filecorefs/filecore_vfsops.c:	revision 1.76
	sys/fs/hfs/hfs_vfsops.c:	revision 1.31
	sys/fs/msdosfs/msdosfs_vfsops.c:	revision 1.107
	sys/fs/ntfs/ntfs_vfsops.c:	revision 1.94
	sys/fs/ptyfs/ptyfs_vfsops.c:	revision 1.50 via patch
	sys/fs/puffs/puffs_vfsops.c:	revision 1.110 via patch
	sys/fs/smbfs/smbfs_vfsops.c:	revision 1.100
	sys/fs/sysvbfs/sysvbfs_vfsops.c:	revision 1.43
	sys/fs/tmpfs/tmpfs_vfsops.c:	revision 1.59 via patch
	sys/fs/udf/udf_vfsops.c:	revision 1.67
	sys/fs/union/union_vfsops.c:	revision 1.72
	sys/fs/unionfs/unionfs_vfsops.c:	revision 1.13
	sys/kern/vfs_syscalls.c:	revision 1.479
	sys/miscfs/nullfs/null_vfsops.c:	revision 1.88 via patch
	sys/miscfs/overlay/overlay_vfsops.c:	revision 1.61
	sys/miscfs/procfs/procfs_vfsops.c:	revision 1.91
	sys/miscfs/umapfs/umap_vfsops.c:	revision 1.92
	sys/nfs/nfs_vfsops.c:		revision 1.227
	sys/ufs/ext2fs/ext2fs_vfsops.c:	revision 1.180
	sys/ufs/ffs/ffs_vfsops.c:	revision 1.297
	sys/ufs/lfs/lfs_vfsops.c:	revision 1.321
	sys/ufs/mfs/mfs_vfsops.c:	revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.

Revision 1.376.4.8 / (download) - annotate - [select for diffs], Fri Apr 25 15:43:50 2014 UTC (8 years, 9 months ago) by sborrill
Branch: netbsd-5
Changes since 1.376.4.7: +12 -7 lines
Diff to previous 1.376.4.7 (colored) to branchpoint 1.376 (colored) next main 1.377 (colored)

Pull up the following revisions(s) (requested by maxv in ticket #1901):
	sys/kern/vfs_syscalls.c:	revision 1.478, 1.480 via patch
	sys/coda/coda_vfsops.c:		revision 1.81
	sys/fs/adosfs/advfsops.c:	revision 1.70
	sys/fs/cd9660/cd9660_vfsops.c:	revision 1.84
	sys/fs/efs/efs_vfsops.c:	revision 1.25
	sys/fs/filecorefs/filecore_vfsops.c:	revision 1.76
	sys/fs/hfs/hfs_vfsops.c:	revision 1.31
	sys/fs/msdosfs/msdosfs_vfsops.c:	revision 1.107
	sys/fs/ntfs/ntfs_vfsops.c:	revision 1.94
	sys/fs/ptyfs/ptyfs_vfsops.c:	revision 1.50 via patch
	sys/fs/puffs/puffs_vfsops.c:	revision 1.110 via patch
	sys/fs/smbfs/smbfs_vfsops.c:	revision 1.100
	sys/fs/sysvbfs/sysvbfs_vfsops.c:	revision 1.43
	sys/fs/tmpfs/tmpfs_vfsops.c:	revision 1.59 via patch
	sys/fs/udf/udf_vfsops.c:	revision 1.67
	sys/fs/union/union_vfsops.c:	revision 1.72
	sys/fs/unionfs/unionfs_vfsops.c:	revision 1.13
	sys/kern/vfs_syscalls.c:	revision 1.479
	sys/miscfs/nullfs/null_vfsops.c:	revision 1.88 via patch
	sys/miscfs/overlay/overlay_vfsops.c:	revision 1.61
	sys/miscfs/procfs/procfs_vfsops.c:	revision 1.91
	sys/miscfs/umapfs/umap_vfsops.c:	revision 1.92
	sys/nfs/nfs_vfsops.c:		revision 1.227
	sys/ufs/ext2fs/ext2fs_vfsops.c:	revision 1.180
	sys/ufs/ffs/ffs_vfsops.c:	revision 1.297
	sys/ufs/lfs/lfs_vfsops.c:	revision 1.321
	sys/ufs/mfs/mfs_vfsops.c:	revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.

Revision 1.449.2.2.6.1 / (download) - annotate - [select for diffs], Mon Apr 21 10:17:47 2014 UTC (8 years, 9 months ago) by bouyer
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-5-RELEASE
Changes since 1.449.2.2: +15 -8 lines
Diff to previous 1.449.2.2 (colored) next main 1.449.2.3 (colored)

Pull up following revision(s) (requested by maxv in ticket #1050):
	sys/ufs/chfs/chfs_vfsops.c: revision 1.11
	sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
	sys/fs/nilfs/nilfs_vfsops.c: revision 1.16
	sys/ufs/mfs/mfs_vfsops.c: revision 1.107
	sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
	sys/ufs/ffs/ffs_vfsops.c: revision 1.297
	sys/kern/vfs_syscalls.c: revision 1.478
	sys/kern/vfs_syscalls.c: revision 1.479
	sys/fs/puffs/puffs_vfsops.c: revision 1.110
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
	sys/nfs/nfs_vfsops.c: revision 1.227
	sys/fs/v7fs/v7fs_vfsops.c: revision 1.10
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
	sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
	sys/miscfs/nullfs/null_vfsops.c: revision 1.88
	sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50
	sys/coda/coda_vfsops.c: revision 1.81
	sys/ufs/lfs/lfs_vfsops.c: revision 1.321
	sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59
	sys/fs/hfs/hfs_vfsops.c: revision 1.31
	sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
	sys/fs/union/union_vfsops.c: revision 1.72
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
	sys/kern/vfs_syscalls.c: revision 1.480
	sys/fs/efs/efs_vfsops.c: revision 1.25
	sys/kern/vfs_syscalls.c: revision 1.482
	sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
	external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c: revision 1.12
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
	sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
	sys/fs/adosfs/advfsops.c: revision 1.70
	sys/fs/udf/udf_vfsops.c: revision 1.67
Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.
ok christos@
An (un)privileged user can easily make the kernel dereference a NULL
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).

Revision 1.449.2.2.4.1 / (download) - annotate - [select for diffs], Mon Apr 21 10:15:36 2014 UTC (8 years, 9 months ago) by bouyer
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-6-RELEASE
Changes since 1.449.2.2: +15 -8 lines
Diff to previous 1.449.2.2 (colored) next main 1.449.2.3 (colored)

Pull up following revision(s) (requested by maxv in ticket #1050):
	sys/ufs/chfs/chfs_vfsops.c: revision 1.11
	sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
	sys/fs/nilfs/nilfs_vfsops.c: revision 1.16
	sys/ufs/mfs/mfs_vfsops.c: revision 1.107
	sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
	sys/ufs/ffs/ffs_vfsops.c: revision 1.297
	sys/kern/vfs_syscalls.c: revision 1.478
	sys/kern/vfs_syscalls.c: revision 1.479
	sys/fs/puffs/puffs_vfsops.c: revision 1.110
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
	sys/nfs/nfs_vfsops.c: revision 1.227
	sys/fs/v7fs/v7fs_vfsops.c: revision 1.10
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
	sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
	sys/miscfs/nullfs/null_vfsops.c: revision 1.88
	sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50
	sys/coda/coda_vfsops.c: revision 1.81
	sys/ufs/lfs/lfs_vfsops.c: revision 1.321
	sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59
	sys/fs/hfs/hfs_vfsops.c: revision 1.31
	sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
	sys/fs/union/union_vfsops.c: revision 1.72
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
	sys/kern/vfs_syscalls.c: revision 1.480
	sys/fs/efs/efs_vfsops.c: revision 1.25
	sys/kern/vfs_syscalls.c: revision 1.482
	sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
	external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c: revision 1.12
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
	sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
	sys/fs/adosfs/advfsops.c: revision 1.70
	sys/fs/udf/udf_vfsops.c: revision 1.67
Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.
ok christos@
An (un)privileged user can easily make the kernel dereference a NULL
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).

Revision 1.449.2.3 / (download) - annotate - [select for diffs], Mon Apr 21 10:14:17 2014 UTC (8 years, 9 months ago) by bouyer
Branch: netbsd-6
Changes since 1.449.2.2: +15 -8 lines
Diff to previous 1.449.2.2 (colored) to branchpoint 1.449 (colored)

Pull up following revision(s) (requested by maxv in ticket #1050):
	sys/ufs/chfs/chfs_vfsops.c: revision 1.11
	sys/fs/unionfs/unionfs_vfsops.c: revision 1.13
	sys/fs/nilfs/nilfs_vfsops.c: revision 1.16
	sys/ufs/mfs/mfs_vfsops.c: revision 1.107
	sys/fs/sysvbfs/sysvbfs_vfsops.c: revision 1.43
	sys/ufs/ffs/ffs_vfsops.c: revision 1.297
	sys/kern/vfs_syscalls.c: revision 1.478
	sys/kern/vfs_syscalls.c: revision 1.479
	sys/fs/puffs/puffs_vfsops.c: revision 1.110
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.84
	sys/nfs/nfs_vfsops.c: revision 1.227
	sys/fs/v7fs/v7fs_vfsops.c: revision 1.10
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
	sys/miscfs/umapfs/umap_vfsops.c: revision 1.92
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.76
	sys/miscfs/nullfs/null_vfsops.c: revision 1.88
	sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.50
	sys/coda/coda_vfsops.c: revision 1.81
	sys/ufs/lfs/lfs_vfsops.c: revision 1.321
	sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.59
	sys/fs/hfs/hfs_vfsops.c: revision 1.31
	sys/miscfs/overlay/overlay_vfsops.c: revision 1.61
	sys/fs/union/union_vfsops.c: revision 1.72
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.94
	sys/kern/vfs_syscalls.c: revision 1.480
	sys/fs/efs/efs_vfsops.c: revision 1.25
	sys/kern/vfs_syscalls.c: revision 1.482
	sys/fs/msdosfs/msdosfs_vfsops.c: revision 1.107
	external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c: revision 1.12
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.91
	sys/fs/smbfs/smbfs_vfsops.c: revision 1.100
	sys/fs/adosfs/advfsops.c: revision 1.70
	sys/fs/udf/udf_vfsops.c: revision 1.67
Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.
ok christos@
An (un)privileged user can easily make the kernel dereference a NULL
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.
If the kernel figures out that something mismatches, it will panic
(typically with kernfs).

Revision 1.482 / (download) - annotate - [select for diffs], Sun Apr 20 21:26:51 2014 UTC (8 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.481: +6 -4 lines
Diff to previous 1.481 (colored)

This thing is totally buggy: 'data_len' is modified by the fs, so calling
kmem_free with it while its value has changed since the kmem_alloc is far
from being a good idea.

If the kernel figures out that something mismatches, it will panic
(typically with kernfs).

Revision 1.481 / (download) - annotate - [select for diffs], Fri Apr 18 05:22:13 2014 UTC (8 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.480: +3 -4 lines
Diff to previous 1.480 (colored)

Memory leak (only triggerable from root).

ok christos@

Revision 1.480 / (download) - annotate - [select for diffs], Wed Apr 16 19:25:28 2014 UTC (8 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.479: +3 -3 lines
Diff to previous 1.479 (colored)

Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).

Revision 1.479 / (download) - annotate - [select for diffs], Wed Apr 16 18:55:18 2014 UTC (8 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.478: +6 -2 lines
Diff to previous 1.478 (colored)

An (un)privileged user can easily make the kernel dereference a NULL
pointer.

The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).

ok christos@

Revision 1.478 / (download) - annotate - [select for diffs], Fri Apr 4 06:47:02 2014 UTC (8 years, 9 months ago) by maxv
Branch: MAIN
Branch point for: tls-earlyentropy
Changes since 1.477: +7 -6 lines
Diff to previous 1.477 (colored)

Limit check for 'data_len'. Otherwise a (un)privileged user can easily
panic the system by passing a huge size.

ok christos@

Revision 1.477 / (download) - annotate - [select for diffs], Sat Mar 22 08:15:25 2014 UTC (8 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Changes since 1.476: +6 -4 lines
Diff to previous 1.476 (colored)

Fix a potential - but very unlikely - NULL pointer dereference.
(it does not introduce a new error code for open(), since
 pathbuf_copyin() is already there and can return ENOMEM)

Found by my code scanner.

Revision 1.476 / (download) - annotate - [select for diffs], Sat Feb 15 22:32:16 2014 UTC (8 years, 11 months ago) by njoly
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.475: +3 -3 lines
Diff to previous 1.475 (colored)

Remove argument name from prototype.

Revision 1.475 / (download) - annotate - [select for diffs], Sat Jan 25 17:24:45 2014 UTC (9 years ago) by christos
Branch: MAIN
Changes since 1.474: +12 -5 lines
Diff to previous 1.474 (colored)

Add compat_10, open NULL == open "."

Revision 1.474 / (download) - annotate - [select for diffs], Sat Jan 25 02:28:31 2014 UTC (9 years ago) by christos
Branch: MAIN
Changes since 1.473: +3 -4 lines
Diff to previous 1.473 (colored)

expose do_open

Revision 1.473 / (download) - annotate - [select for diffs], Thu Jan 23 10:13:57 2014 UTC (9 years ago) by hannken
Branch: MAIN
Changes since 1.472: +7 -7 lines
Diff to previous 1.472 (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.472 / (download) - annotate - [select for diffs], Fri Jan 17 10:55:02 2014 UTC (9 years ago) by hannken
Branch: MAIN
Changes since 1.471: +7 -2 lines
Diff to previous 1.471 (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.471 / (download) - annotate - [select for diffs], Wed Nov 27 17:24:44 2013 UTC (9 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.470: +4 -6 lines
Diff to previous 1.470 (colored)

Change the queue.3 *_END(&head) macros to NULL. Since we don't have CIRCLEQ
anymore, all the macros expand to NULL anyway, so this improves readability.
Requested by rmind@

Revision 1.470 / (download) - annotate - [select for diffs], Sat Nov 23 13:35:36 2013 UTC (9 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.469: +4 -4 lines
Diff to previous 1.469 (colored)

change the mountlist CIRCLEQ into a TAILQ

Revision 1.469 / (download) - annotate - [select for diffs], Mon Nov 18 01:31:42 2013 UTC (9 years, 2 months ago) by chs
Branch: MAIN
Changes since 1.468: +6 -13 lines
Diff to previous 1.468 (colored)

expose various do_*at() functions for compat_linux.

Revision 1.468 / (download) - annotate - [select for diffs], Thu Oct 17 18:01:11 2013 UTC (9 years, 3 months ago) by njoly
Branch: MAIN
Changes since 1.467: +4 -3 lines
Diff to previous 1.467 (colored)

Change mknodat(2) device argument type from uint32_t to dev_t.
Adds needed extra PAD argument for 64bit alignment, and libc wrapper.

Revision 1.464.2.1 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:35 2013 UTC (9 years, 5 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.464: +4 -10 lines
Diff to previous 1.464 (colored)

sync with head

Revision 1.464.4.1 / (download) - annotate - [select for diffs], Tue Jul 23 21:07:36 2013 UTC (9 years, 6 months ago) by riastradh
Branch: riastradh-drm2
Changes since 1.464: +4 -10 lines
Diff to previous 1.464 (colored) next main 1.465 (colored)

sync with HEAD

Revision 1.467 / (download) - annotate - [select for diffs], Sat Jul 20 15:55:57 2013 UTC (9 years, 6 months ago) by njoly
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1
Changes since 1.466: +2 -4 lines
Diff to previous 1.466 (colored)

Remove, in do_sys_renameat(), wrong KASSERTs that check for non NULL
from/to arguments. Such values are correctly handled by later
pathbuf_maybe_copyin() calls, that will fail with EFAULT.

ok from dholland@.

Revision 1.466 / (download) - annotate - [select for diffs], Thu Jul 18 14:06:27 2013 UTC (9 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.465: +3 -5 lines
Diff to previous 1.465 (colored)

Make do_sys_utimensat public

Revision 1.465 / (download) - annotate - [select for diffs], Thu Jul 18 13:41:08 2013 UTC (9 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.464: +3 -5 lines
Diff to previous 1.464 (colored)

export do_sys_statat for netbsd32

Revision 1.464 / (download) - annotate - [select for diffs], Fri Jun 28 15:32:20 2013 UTC (9 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base
Branch point for: rmind-smpnet, riastradh-drm2
Changes since 1.463: +4 -4 lines
Diff to previous 1.463 (colored)

don't store random values in retval
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html

Revision 1.457.2.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:57 2013 UTC (9 years, 11 months ago) by tls
Branch: tls-maxphys
Changes since 1.457.2.1: +17 -26 lines
Diff to previous 1.457.2.1 (colored)

resync with head

Revision 1.440.2.5 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:23 2013 UTC (10 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.440.2.4: +10 -30 lines
Diff to previous 1.440.2.4 (colored) to branchpoint 1.440 (colored)

sync with head

Revision 1.440.2.4 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:45 2013 UTC (10 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.440.2.3: +461 -187 lines
Diff to previous 1.440.2.3 (colored) to branchpoint 1.440 (colored)

sync with (a bit old) head

Revision 1.463 / (download) - annotate - [select for diffs], Sun Jan 13 08:15:03 2013 UTC (10 years ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base8, khorben-n900, agc-symver-base, agc-symver
Changes since 1.462: +10 -30 lines
Diff to previous 1.462 (colored)

Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
   - it is incorrect in a whole variety of ways (but fortunately, one
     of them is that the missing and improper permission checks have
     no net effect);
   - it was committed without review or discussion;
   - core ruled that all the new O_* flags pertaining to the *at calls
     needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.

Revision 1.462 / (download) - annotate - [select for diffs], Fri Nov 30 13:26:37 2012 UTC (10 years, 2 months ago) by njoly
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.461: +8 -2 lines
Diff to previous 1.461 (colored)

Apply fix from hannken to ensure that VOP_ACCESS() is called on a
locked vnode for fd_nameiat(), fd_nameiat_simple() and do_sys_openat().
Fix both PR/47226 and PR/47255.

Revision 1.457.2.1 / (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.457: +730 -307 lines
Diff to previous 1.457 (colored)

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

Revision 1.461 / (download) - annotate - [select for diffs], Mon Nov 19 15:01:17 2012 UTC (10 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.460: +9 -4 lines
Diff to previous 1.460 (colored)

Use copyout to copy data from kernel out to userland!
Fixes PR kern/47217.

Revision 1.460 / (download) - annotate - [select for diffs], Sun Nov 18 17:41:53 2012 UTC (10 years, 2 months ago) by manu
Branch: MAIN
Changes since 1.459: +449 -186 lines
Diff to previous 1.459 (colored)

Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation

Revision 1.440.2.3 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:38 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.440.2.2: +297 -124 lines
Diff to previous 1.440.2.2 (colored) to branchpoint 1.440 (colored)

sync with head

Revision 1.459 / (download) - annotate - [select for diffs], Fri Oct 19 02:07:22 2012 UTC (10 years, 3 months ago) by riastradh
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Changes since 1.458: +7 -11 lines
Diff to previous 1.458 (colored)

No, we can't elide the fs-wide rename lock for same-directory rename.

rename("a/b", "a/c") and rename("a/c/x", "a/b/y") will deadlock.

Darn.

Revision 1.458 / (download) - annotate - [select for diffs], Fri Oct 12 02:37:20 2012 UTC (10 years, 3 months ago) by riastradh
Branch: MAIN
Changes since 1.457: +288 -124 lines
Diff to previous 1.457 (colored)

Disentangle do_sys_rename.

Elide the fs-wide rename lock for single-directory renames.  This
required changing the order of lookups, so that we know what the
directories are before we lock the nodes.

Clean up error branches, explain why various nonsense happens and
what it does and doesn't do, and note some of what needs to change.

Revision 1.457 / (download) - annotate - [select for diffs], Wed Jun 27 12:28:28 2012 UTC (10 years, 7 months ago) by cheusov
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.456: +15 -2 lines
Diff to previous 1.456 (colored)


Add new action KAUTH_CRED_CHROOT for kauth(9)'s credential scope.
Reviewed and approved by elad@.

Revision 1.442.2.4 / (download) - annotate - [select for diffs], Sat Jun 2 11:09:35 2012 UTC (10 years, 8 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.442.2.3: +12 -23 lines
Diff to previous 1.442.2.3 (colored) to branchpoint 1.442 (colored) next main 1.443 (colored)

sync to latest -current.

Revision 1.440.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:13 2012 UTC (10 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.440.2.1: +20 -31 lines
Diff to previous 1.440.2.1 (colored) to branchpoint 1.440 (colored)

sync with head.

Revision 1.449.2.2 / (download) - annotate - [select for diffs], Sat May 19 15:01:35 2012 UTC (10 years, 8 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-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, 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, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: netbsd-6-1, netbsd-6-0
Changes since 1.449.2.1: +6 -14 lines
Diff to previous 1.449.2.1 (colored) to branchpoint 1.449 (colored)

Pull up following revision(s) (requested by manu in ticket #259):
	sys/kern/vfs_syscalls.c: revision 1.456
	sys/kern/vfs_mount.c: revision 1.14
	sys/kern/vfs_syscalls.c: revision 1.452
	sys/kern/vfs_syscalls.c: revision 1.453
	sys/kern/vfs_syscalls.c: revision 1.454
Do not use vp after mount_domount() call as it sets it to NULL on success.
This fixes a panic when starting extended attributes.
Fix mount -o extattr : previous patch fixed a panic but caused operation
to happen on the mount point instead of the mounted filesystem.
Fix the extattr start fix. Looking up the filesystemroot vnode again
does not seems to be reliable. Instead save it before mount_domount()
sets it to NULL.
Move VFS_EXTATTRCTL to mount_domount().  This makes the
fs/puffs/t_fuzz:mountfuzz7, fs/puffs/t_fuzz:mountfuzz8,
and fs/zfs/t_zpool:create tests pass again.  Patch from
manu, discussed on tech-kern and committed at his request.

Revision 1.449.2.1 / (download) - annotate - [select for diffs], Thu May 17 18:12:12 2012 UTC (10 years, 8 months ago) by riz
Branch: netbsd-6
Changes since 1.449: +12 -13 lines
Diff to previous 1.449 (colored)

Pull up following revision(s) (requested by rmind in ticket #246):
	sys/kern/vfs_syscalls.c: revision 1.455
do_open: move pathbuf destruction to the callers, thus simplify and fix a
memory leak on error path.

Revision 1.456 / (download) - annotate - [select for diffs], Tue May 8 08:44:49 2012 UTC (10 years, 8 months ago) by gson
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Changes since 1.455: +2 -21 lines
Diff to previous 1.455 (colored)

Move VFS_EXTATTRCTL to mount_domount().  This makes the
fs/puffs/t_fuzz:mountfuzz7, fs/puffs/t_fuzz:mountfuzz8,
and fs/zfs/t_zpool:create tests pass again.  Patch from
manu, discussed on tech-kern and committed at his request.

Revision 1.455 / (download) - annotate - [select for diffs], Wed May 2 20:48:29 2012 UTC (10 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.454: +12 -13 lines
Diff to previous 1.454 (colored)

do_open: move pathbuf destruction to the callers, thus simplify and fix a
memory leak on error path.

Revision 1.454 / (download) - annotate - [select for diffs], Mon Apr 30 10:05:12 2012 UTC (10 years, 9 months ago) by manu
Branch: MAIN
Changes since 1.453: +13 -10 lines
Diff to previous 1.453 (colored)

Fix the extattr start fix. Looking up the filesystemroot vnode again
does not seems to be reliable. Instead save it before mount_domount()
sets it to NULL.

Revision 1.453 / (download) - annotate - [select for diffs], Mon Apr 30 03:51:10 2012 UTC (10 years, 9 months ago) by manu
Branch: MAIN
Changes since 1.452: +12 -6 lines
Diff to previous 1.452 (colored)

Fix mount -o extattr : previous patch fixed a panic but caused operation
to happen on the mount point instead of the mounted filesystem.

Revision 1.442.2.3 / (download) - annotate - [select for diffs], Sun Apr 29 23:05:05 2012 UTC (10 years, 9 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.442.2.2: +14 -14 lines
Diff to previous 1.442.2.2 (colored) to branchpoint 1.442 (colored)

sync to latest -current.

Revision 1.452 / (download) - annotate - [select for diffs], Sat Apr 28 17:30:19 2012 UTC (10 years, 9 months ago) by manu
Branch: MAIN
CVS Tags: jmcneill-usbmp-base9
Changes since 1.451: +10 -8 lines
Diff to previous 1.451 (colored)

Do not use vp after mount_domount() call as it sets it to NULL on success.
This fixes a panic when starting extended attributes.

Revision 1.451 / (download) - annotate - [select for diffs], Tue Apr 17 19:15:15 2012 UTC (10 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.450: +6 -8 lines
Diff to previous 1.450 (colored)

it is not an error if the kernel needs to clear the setuid/
setgid bit on write/chown/chgrp

Revision 1.440.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.440: +490 -84 lines
Diff to previous 1.440 (colored)

sync with head

Revision 1.442.2.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:41 2012 UTC (10 years, 9 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.442.2.1: +21 -22 lines
Diff to previous 1.442.2.1 (colored) to branchpoint 1.442 (colored)

sync to latest -current.

Revision 1.450 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:56 2012 UTC (10 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base8
Changes since 1.449: +21 -22 lines
Diff to previous 1.449 (colored)

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

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

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

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

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

Revision 1.442.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:34 2012 UTC (10 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.442: +466 -49 lines
Diff to previous 1.442 (colored)

merge to -current.

Revision 1.449 / (download) - annotate - [select for diffs], Sun Feb 12 13:12:45 2012 UTC (10 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.448: +5 -3 lines
Diff to previous 1.448 (colored)

fd_open(): fix confusion between userland and kernel encoding of open flags

Revision 1.448 / (download) - annotate - [select for diffs], Sat Feb 11 23:16:17 2012 UTC (10 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.447: +61 -24 lines
Diff to previous 1.447 (colored)

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

Revision 1.447 / (download) - annotate - [select for diffs], Wed Feb 1 05:46:45 2012 UTC (11 years ago) by dholland
Branch: MAIN
Changes since 1.446: +4 -4 lines
Diff to previous 1.446 (colored)

Be consistent about whether idtype and objtype codes are signed or
unsigned. They are signed. (While unsigned might have been a better
choice, it doesn't really matter and the majority of preexisting uses
were signed. And consistency is good.)

Revision 1.446 / (download) - annotate - [select for diffs], Wed Feb 1 05:43:54 2012 UTC (11 years ago) by dholland
Branch: MAIN
Changes since 1.445: +4 -4 lines
Diff to previous 1.445 (colored)

Improve the names of some members of struct quotactl_args. These are
effectively function parameter names, but since they need to be
described with the same names in the man page the choices do matter.
Some.

Revision 1.445 / (download) - annotate - [select for diffs], Wed Feb 1 05:39:28 2012 UTC (11 years ago) by dholland
Branch: MAIN
Changes since 1.444: +50 -44 lines
Diff to previous 1.444 (colored)

Split out a do_sys_quotactl for compat_netbsd32.

Revision 1.444 / (download) - annotate - [select for diffs], Wed Feb 1 05:34:41 2012 UTC (11 years ago) by dholland
Branch: MAIN
Changes since 1.443: +393 -21 lines
Diff to previous 1.443 (colored)

Change the syscall API for quotas over to the new non-proplib one.

   - struct vfs_quotactl_args -> struct quotactl_args
   - add sys/stdint.h to sys/quotactl.h for clean userland build
   - install sys/quotactl.h in /usr/include
   - update set lists for same
   - add new marshalling code in libquota
   - add new unmarshalling code in vfs_syscalls.c
   - discard proplib interpreter code in vfs_quotactl.c
   - add dispatching code for the 14 quotactl ops in vfs_quotactl.c
   - mark the proplib quotactl syscall obsolete
   - add a new syscall number for the new quotactl syscall
   - change the name of the syscall to __quotactl()
   - remove the decl of the old quotactl from quota/quotaprop.h
   - add a decl of the new quotactl to sys/quotactl.h
   - update the libc build
   - update ktruss
   - remove proplib marshalling code from libquota
   - update copy of syscall table in gdb ppc sources
   - hack rumphijack to accomodate new quotactl name (as I recall,
     pooka wanted such a name change to simplify something, but I
     don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.

Revision 1.443 / (download) - annotate - [select for diffs], Sun Jan 29 06:29:05 2012 UTC (11 years ago) by dholland
Branch: MAIN
Changes since 1.442: +3 -3 lines
Diff to previous 1.442 (colored)

Add vfs_quotactl() in between the syscall and VFS_QUOTACTL. Call it
from the COMPAT_50 code as well as the current sys_quotactl instead
of going directly to VFS_QUOTACTL. Doesn't actually do anything yet.

Revision 1.442 / (download) - annotate - [select for diffs], Fri Dec 2 12:30:14 2011 UTC (11 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.441: +4 -5 lines
Diff to previous 1.441 (colored)

fix an indent an unwarp a short line.

Revision 1.441 / (download) - annotate - [select for diffs], Fri Nov 18 21:17:45 2011 UTC (11 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: jmcneill-audiomp3-base, jmcneill-audiomp3
Changes since 1.440: +5 -14 lines
Diff to previous 1.440 (colored)

- collect the long (and sometimes incomplete) lists of basic flags into
  the header file and use that.
- sort the list of basic flags
- add MNT_RELATIME, ST_RELATIME
- mask all the op flags, for symmetry.

The real bit difference is (which is harmless):
    - mount was missing MNT_EXTATTR
    - update sets MNT_RDONLY twice
    - ops also could or in MNT_GETARGS, but this is impossible because the
      code would have chosen to do getargs then.

Revision 1.440 / (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
Branch point for: yamt-pagecache
Changes since 1.439: +8 -3 lines
Diff to previous 1.439 (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.376.4.7 / (download) - annotate - [select for diffs], Sat Sep 17 18:47:46 2011 UTC (11 years, 4 months ago) by bouyer
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE
Branch point for: netbsd-5-2
Changes since 1.376.4.6: +54 -12 lines
Diff to previous 1.376.4.6 (colored) to branchpoint 1.376 (colored)

Pull up following revision(s) (requested by manu in ticket #1658):
	sys/rump/include/rump/rump_syscalls.h: revision 1.52 via patch
	sys/kern/init_sysent.c: revision 1.257 via patch
	sys/rump/include/rump/rumpvnode_if.h: revision 1.12 via patch
	lib/libc/sys/Makefile.inc: revision 1.208 via patch
	sys/sys/syscallargs.h: revision 1.227 via patch
	sys/kern/kern_exec.c: revision 1.317 via patch
	sys/rump/librump/rumpkern/rump_syscalls.c: revision 1.74 via patch
	include/limits.h: revision 1.30 via patch
	sys/kern/syscalls.master: revision 1.251 via patch
	sys/sys/vnode_if.h: revision 1.83 via patch
	sys/sys/fcntl.h: revision 1.40 via patch
	sys/sys/fcntl.h: revision 1.41 via patch
	sys/kern/vfs_syscalls.c: revision 1.433 via patch
	sys/rump/librump/rumpvfs/rumpvnode_if.c: revision 1.11 via patch
	sys/kern/syscalls.c: revision 1.248 via patch
	sys/sys/syscall.h: revision 1.244 via patch
	lib/libc/sys/link.2: revision 1.25 via patch
	include/unistd.h: revision 1.127 via patch
	distrib/sets/lists/comp/mi: revision 1.1659 via patch
	sys/sys/stat.h: revision 1.61 via patch
First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.
Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
regen
improve comment about AT_* defines: they are not only used by linkat(2)
Add macros to hide OpenGroup extened API set 2 from GNU configure. This
is a temporary  workaround until the implementation is completed.

Revision 1.439 / (download) - annotate - [select for diffs], Mon Aug 22 22:12:34 2011 UTC (11 years, 5 months ago) by enami
Branch: MAIN
Changes since 1.438: +2 -4 lines
Diff to previous 1.438 (colored)

Remove return statement which can't be reached.

Revision 1.438 / (download) - annotate - [select for diffs], Mon Aug 22 22:09:07 2011 UTC (11 years, 5 months ago) by enami
Branch: MAIN
Changes since 1.437: +8 -5 lines
Diff to previous 1.437 (colored)

When both nanoseconds fields of futimens/utimensat call are set
to UTIMES_NOW, act as if NULL is passed to second argument, i.e.,
do same permission check and set exactly same value to both access
and modification time.

Revision 1.437 / (download) - annotate - [select for diffs], Thu Aug 18 19:34:47 2011 UTC (11 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.436: +5 -2 lines
Diff to previous 1.436 (colored)

Fix utimes/futimes after utimensat/futimens addition

Revision 1.436 / (download) - annotate - [select for diffs], Wed Aug 17 09:29:59 2011 UTC (11 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.435: +0 -2 lines
Diff to previous 1.435 (colored)

Missing bit in previous commit: do_sys_utimens prototype in the right
place.

Revision 1.435 / (download) - annotate - [select for diffs], Wed Aug 17 08:31:27 2011 UTC (11 years, 5 months ago) by martin
Branch: MAIN
Changes since 1.434: +4 -2 lines
Diff to previous 1.434 (colored)

add missing prototype

Revision 1.434 / (download) - annotate - [select for diffs], Wed Aug 17 07:22:34 2011 UTC (11 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.433: +91 -14 lines
Diff to previous 1.433 (colored)

Add futimens(2) and part of utimnsat(2)

Revision 1.433 / (download) - annotate - [select for diffs], Mon Aug 8 12:08:53 2011 UTC (11 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.432: +232 -11 lines
Diff to previous 1.432 (colored)

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

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

Revision 1.432 / (download) - annotate - [select for diffs], Sun Jul 24 09:40:10 2011 UTC (11 years, 6 months ago) by martin
Branch: MAIN
Changes since 1.431: +4 -3 lines
Diff to previous 1.431 (colored)

Make sure to not overwrite error if it already is EEXISTS - hopefully
will fix > 100 failing fs tests in my last test run.

Revision 1.431 / (download) - annotate - [select for diffs], Sun Jul 3 15:25:09 2011 UTC (11 years, 7 months ago) by hannken
Branch: MAIN
Changes since 1.430: +4 -2 lines
Diff to previous 1.430 (colored)

Return EINVAL when trying to create a device node with "rdev == VNOVAL".

Fixes PR #45111 "tmpfs panic with mknod(2)".

Revision 1.423.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:21 2011 UTC (11 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.423: +46 -17 lines
Diff to previous 1.423 (colored) next main 1.424 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.430 / (download) - annotate - [select for diffs], Fri Jun 17 14:23:51 2011 UTC (11 years, 7 months ago) by manu
Branch: MAIN
Changes since 1.429: +32 -4 lines
Diff to previous 1.429 (colored)

Add mount -o extattr option to enable extended attributs (corrently only
for UFS1).
Remove kernel option for EA backing store autocreation and do it by
default. Add a sysctl so that autocreated attriutr size can be modified.

Revision 1.429 / (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.428: +2 -2 lines
Diff to previous 1.428 (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.404.2.6 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:30 2011 UTC (11 years, 7 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.404.2.5: +12 -11 lines
Diff to previous 1.404.2.5 (colored) to branchpoint 1.404 (colored) next main 1.405 (colored)

sync with head

Revision 1.428 / (download) - annotate - [select for diffs], Sat Jun 11 03:00:19 2011 UTC (11 years, 7 months ago) by uebayasi
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.427: +3 -3 lines
Diff to previous 1.427 (colored)

Fix build; p was not used, but l was passed to kauth.  Use curlwp directly.

Revision 1.427 / (download) - annotate - [select for diffs], Fri Jun 10 21:02:46 2011 UTC (11 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.426: +2 -3 lines
Diff to previous 1.426 (colored)

l isn't used.  nuke it.

Revision 1.426 / (download) - annotate - [select for diffs], Fri Jun 10 13:07:14 2011 UTC (11 years, 7 months ago) by uebayasi
Branch: MAIN
Changes since 1.425: +2 -4 lines
Diff to previous 1.425 (colored)

do_sys_rename: Kill an unused variable.

Revision 1.414.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:41 2011 UTC (11 years, 7 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.414: +116 -396 lines
Diff to previous 1.414 (colored) next main 1.415 (colored)

Sync with HEAD.

Revision 1.425 / (download) - annotate - [select for diffs], Sun Jun 5 09:04:22 2011 UTC (11 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.424: +12 -8 lines
Diff to previous 1.424 (colored)

Don't directly call sys_sync() from random bits of code, instead
  add do_sys_sync() that takes an 'lwp' (for l_cred) as an argument.
Explicitly pass &lwp0 rather than NULL and expecting sys_sync to
  substitute some random lwp.

Revision 1.424 / (download) - annotate - [select for diffs], Thu Jun 2 18:54:43 2011 UTC (11 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.423: +3 -3 lines
Diff to previous 1.423 (colored)

Fix type in comment
(before I replace the 'l' with 'curlwp')

Revision 1.404.2.5 / (download) - annotate - [select for diffs], Tue May 31 03:05:04 2011 UTC (11 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.404.2.4: +6 -3 lines
Diff to previous 1.404.2.4 (colored) to branchpoint 1.404 (colored)

sync with head

Revision 1.423 / (download) - annotate - [select for diffs], Sun Apr 24 21:35:29 2011 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.422: +8 -5 lines
Diff to previous 1.422 (colored)

sys_link: prevent hard links on directories (cross-mount operations are
already prevented).  File systems are no longer responsible to check this.
Clean up and add asserts (note that dvp == vp cannot happen in vop_link).

OK dholland@

Revision 1.404.2.4 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:11 2011 UTC (11 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.404.2.3: +94 -387 lines
Diff to previous 1.404.2.3 (colored) to branchpoint 1.404 (colored)

sync with head

Revision 1.422 / (download) - annotate - [select for diffs], Sun Apr 10 15:45:33 2011 UTC (11 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.421: +48 -56 lines
Diff to previous 1.421 (colored)

- Add O_CLOEXEC to open(2)
- Add fd_set_exclose() to encapsulate uses of FIO{,N}CLEX, O_CLOEXEC, F{G,S}ETFD
- Add a pipe1() function to allow passing flags to the fd's that pipe(2)
  opens to ease implementation of linux pipe2(2)
- Factor out fp handling code from open(2) and fhopen(2)

Revision 1.421 / (download) - annotate - [select for diffs], Sat Apr 2 04:57:35 2011 UTC (11 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.420: +2 -4 lines
Diff to previous 1.420 (colored)

Remove unused M_MOUNT.

Revision 1.420 / (download) - annotate - [select for diffs], Sat Apr 2 04:28:56 2011 UTC (11 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.419: +8 -319 lines
Diff to previous 1.419 (colored)

Split off parts of vfs_subr.c into vfs_vnode.c and vfs_mount.c modules.

No functional change.  Discussed on tech-kern@.

Revision 1.376.4.5.2.1 / (download) - annotate - [select for diffs], Sun Mar 20 21:20:12 2011 UTC (11 years, 10 months ago) by bouyer
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE
Changes since 1.376.4.5: +7 -2 lines
Diff to previous 1.376.4.5 (colored)

Pull up following revision(s) (requested by dholland in ticket #1567):
	sys/kern/vfs_syscalls.c: revision 1.415 via patch
Check for bogus flags to access() up front. Otherwise we end up
calling VOP_ACCESS with flags 0 and something asserts deep in the
bowels of kauth. PR 44648 from Taylor Campbell. (I moved the check
earlier relative to the suggested patch.)
Pullup candidate.

Revision 1.376.4.2.2.3 / (download) - annotate - [select for diffs], Sun Mar 20 21:20:06 2011 UTC (11 years, 10 months ago) by bouyer
Branch: netbsd-5-0
Changes since 1.376.4.2.2.2: +7 -2 lines
Diff to previous 1.376.4.2.2.2 (colored) to branchpoint 1.376.4.2 (colored) next main 1.376.4.3 (colored)

Pull up following revision(s) (requested by dholland in ticket #1567):
	sys/kern/vfs_syscalls.c: revision 1.415 via patch
Check for bogus flags to access() up front. Otherwise we end up
calling VOP_ACCESS with flags 0 and something asserts deep in the
bowels of kauth. PR 44648 from Taylor Campbell. (I moved the check
earlier relative to the suggested patch.)
Pullup candidate.

Revision 1.376.4.6 / (download) - annotate - [select for diffs], Sun Mar 20 21:19:57 2011 UTC (11 years, 10 months ago) by bouyer
Branch: netbsd-5
Changes since 1.376.4.5: +7 -2 lines
Diff to previous 1.376.4.5 (colored) to branchpoint 1.376 (colored)

Pull up following revision(s) (requested by dholland in ticket #1567):
	sys/kern/vfs_syscalls.c: revision 1.415 via patch
Check for bogus flags to access() up front. Otherwise we end up
calling VOP_ACCESS with flags 0 and something asserts deep in the
bowels of kauth. PR 44648 from Taylor Campbell. (I moved the check
earlier relative to the suggested patch.)
Pullup candidate.

Revision 1.279.2.5.6.1 / (download) - annotate - [select for diffs], Sun Mar 20 20:37:27 2011 UTC (11 years, 10 months ago) by bouyer
Branch: netbsd-4-0
Changes since 1.279.2.5: +7 -2 lines
Diff to previous 1.279.2.5 (colored) next main 1.279.2.6 (colored)

Pull up following revision(s) (requested by dholland in ticket #1417):
	sys/kern/vfs_syscalls.c: revision 1.415 via patch
Check for bogus flags to access() up front. Otherwise we end up
calling VOP_ACCESS with flags 0 and something asserts deep in the
bowels of kauth. PR 44648 from Taylor Campbell. (I moved the check
earlier relative to the suggested patch.)
Pullup candidate.

Revision 1.279.2.6 / (download) - annotate - [select for diffs], Sun Mar 20 20:36:56 2011 UTC (11 years, 10 months ago) by bouyer
Branch: netbsd-4
Changes since 1.279.2.5: +7 -2 lines
Diff to previous 1.279.2.5 (colored) to branchpoint 1.279 (colored) next main 1.280 (colored)

Pull up following revision(s) (requested by dholland in ticket #1417):
	sys/kern/vfs_syscalls.c: revision 1.415 via patch
Check for bogus flags to access() up front. Otherwise we end up
calling VOP_ACCESS with flags 0 and something asserts deep in the
bowels of kauth. PR 44648 from Taylor Campbell. (I moved the check
earlier relative to the suggested patch.)
Pullup candidate.

Revision 1.419 / (download) - annotate - [select for diffs], Sat Mar 12 07:16:50 2011 UTC (11 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.418: +27 -10 lines
Diff to previous 1.418 (colored)

prevent cross-mount operations.

Revision 1.418 / (download) - annotate - [select for diffs], Sun Mar 6 17:08:36 2011 UTC (11 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.417: +19 -8 lines
Diff to previous 1.417 (colored)

merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.

Revision 1.404.2.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:26 2011 UTC (11 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.404.2.2: +245 -92 lines
Diff to previous 1.404.2.2 (colored) to branchpoint 1.404 (colored)

sync with head

Revision 1.414.4.4 / (download) - annotate - [select for diffs], Sat Mar 5 15:10:41 2011 UTC (11 years, 10 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.414.4.3: +8 -2 lines
Diff to previous 1.414.4.3 (colored) to branchpoint 1.414 (colored) next main 1.415 (colored)

Sync with HEAD

Revision 1.417 / (download) - annotate - [select for diffs], Mon Feb 28 03:23:44 2011 UTC (11 years, 11 months ago) by dholland
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.416: +4 -3 lines
Diff to previous 1.416 (colored)

Revert previous, which doesn't cover all the cases if F_OK isn't 0,
and just CTASSERT that it is, as that's not remotely likely to change.
Per source-changes-d; ok by Christos.

Revision 1.416 / (download) - annotate - [select for diffs], Mon Feb 28 00:12:15 2011 UTC (11 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.415: +3 -3 lines
Diff to previous 1.415 (colored)

don't depend on F_OK being 0.

Revision 1.415 / (download) - annotate - [select for diffs], Sun Feb 27 23:06:40 2011 UTC (11 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.414: +7 -2 lines
Diff to previous 1.414 (colored)

Check for bogus flags to access() up front. Otherwise we end up
calling VOP_ACCESS with flags 0 and something asserts deep in the
bowels of kauth. PR 44648 from Taylor Campbell. (I moved the check
earlier relative to the suggested patch.)

Pullup candidate.

Revision 1.414.4.3 / (download) - annotate - [select for diffs], Tue Feb 15 16:45:56 2011 UTC (11 years, 11 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.414.4.2: +2 -34 lines
Diff to previous 1.414.4.2 (colored) to branchpoint 1.414 (colored)

Implement COMPAT_50 quotactl(2)

Revision 1.414.4.2 / (download) - annotate - [select for diffs], Fri Feb 11 11:27:29 2011 UTC (11 years, 11 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.414.4.1: +2 -8 lines
Diff to previous 1.414.4.1 (colored) to branchpoint 1.414 (colored)

Remove debug printf

Revision 1.414.4.1 / (download) - annotate - [select for diffs], Thu Jan 20 14:24:58 2011 UTC (12 years ago) by bouyer
Branch: bouyer-quota2
Changes since 1.414: +52 -3 lines
Diff to previous 1.414 (colored)

Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
  as parameter a path to a mount point, and a prop_dictionary
  (in plistref format) describing commands and arguments.
  For each command, status and data are returned as a prop_dictionary.
  quota commands features will be added to take advantage of this,
  exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
  ffs (and playing nicely with wapbl).
  Quotas are enabled on a ffs filesystem via superblock flags.
  tunefs(8) can enable or disable quotas.
  On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
  block and inode usages, and will check and update quotas in Pass 6.
  quota usage and limits are stored in unliked files (one for users,
  one for groups)l fsck_ffs(8) will create the files if needed, or
  free them if needed. This means that after enabling or disabling
  quotas on a filesystem; a fsck_ffs(8) run is required.
  quotacheck(8) is not needed any more, on a unclean shutdown
  fsck or journal replay will take care of fixing quotas.
  newfs(8) can create a ready-to-mount quota-enabled filesystem
  (superblock flags are set and quota inodes are created).
  Other new features or semantic changes:
  - default quota datas, applied to users or groups which don't already
    have a quota entry
  - per-user/group grace time (instead of a filesystem global one)
  - 0 really means "nothing allowed at all", not "no limit".
    If you want "no limit", set the limit to UQUAD_MAX (tools will
    understand "unlimited" and "-")

  A quota file is structured as follow:
  it starts with a header, containing a few per-filesystem values,
  and the default quota limits.
  Quota entries are linked together as a simple list, each entry has a
  pointer (as an offset withing the file) to the next.
  The header has a pointer to a list of free quota entries, and
  a hash table of in-use entries. The size of the hash table depends
  on the filesystem block size (header+hash table should fit in the
  first block). The file is not sparse and is a multiple of
  filesystem block size (when the free quota entry list is empty a new
  filesystem block is allocated). quota entries to not cross
  filesystem block boundaries.

  In memory, the kernel keeps a cache of recently used quota entries
  as a reference to the block number, and offset withing the block.
  The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
      update repquota, edquota and rpc.rquotad to the new world
      implement compat_50_quotactl ioctl.
      update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.

Revision 1.414 / (download) - annotate - [select for diffs], Thu Jan 13 07:25:50 2011 UTC (12 years ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base7, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.413: +4 -3 lines
Diff to previous 1.413 (colored)

allow file system to decide if it can be downgraded from r/w to r/o

Revision 1.413 / (download) - annotate - [select for diffs], Sun Jan 2 05:12:33 2011 UTC (12 years, 1 month ago) by dholland
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.412: +4 -4 lines
Diff to previous 1.412 (colored)

Remove remaining references to SAVESTART.

Revision 1.412 / (download) - annotate - [select for diffs], Sun Jan 2 05:09:31 2011 UTC (12 years, 1 month ago) by dholland
Branch: MAIN
Changes since 1.411: +3 -10 lines
Diff to previous 1.411 (colored)

Remove the special refcount behavior (adding an extra reference to the
parent dir) associated with SAVESTART in relookup().

Check all call sites to make sure that SAVESTART wasn't set while
calling relookup(); if it was, adjust the refcount behavior. Remove
related references to SAVESTART.

The only code that was reaching the extra ref was msdosfs_rename,
where the refcount behavior was already fairly broken and/or gross;
repair it.

Add a dummy 4th argument to relookup to make sure code that hasn't
been inspected won't compile. (This will go away next time the
relookup semantics change, which they will.)

Revision 1.411 / (download) - annotate - [select for diffs], Sun Jan 2 05:01:20 2011 UTC (12 years, 1 month ago) by dholland
Branch: MAIN
Changes since 1.410: +2 -5 lines
Diff to previous 1.410 (colored)

Remove unused nameidata field ni_startdir.

Revision 1.410 / (download) - annotate - [select for diffs], Tue Nov 30 10:30:02 2010 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.409: +2 -4 lines
Diff to previous 1.409 (colored)

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

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

Revision 1.409 / (download) - annotate - [select for diffs], Fri Nov 19 06:44:43 2010 UTC (12 years, 2 months ago) by dholland
Branch: MAIN
Changes since 1.408: +234 -74 lines
Diff to previous 1.408 (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.403.2.6 / (download) - annotate - [select for diffs], Sat Oct 23 02:34:17 2010 UTC (12 years, 3 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.403.2.5: +3 -3 lines
Diff to previous 1.403.2.5 (colored) to branchpoint 1.403 (colored) next main 1.404 (colored)

Propagate MNT_XIP in mount flags.

Revision 1.403.2.5 / (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.403.2.4: +0 -2 lines
Diff to previous 1.403.2.4 (colored) to branchpoint 1.403 (colored)

Sync with HEAD (-D20101022).

Revision 1.350.2.9 / (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.350.2.8: +2 -4 lines
Diff to previous 1.350.2.8 (colored) to branchpoint 1.350 (colored) next main 1.351 (colored)

sync with head

Revision 1.350.2.8 / (download) - annotate - [select for diffs], Sun Sep 26 03:58:54 2010 UTC (12 years, 4 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.350.2.7: +10 -4 lines
Diff to previous 1.350.2.7 (colored) to branchpoint 1.350 (colored)

locking changes

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

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

Revision 1.403.2.4 / (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.403.2.3: +106 -79 lines
Diff to previous 1.403.2.3 (colored) to branchpoint 1.403 (colored)

Sync with HEAD.

Revision 1.350.2.7 / (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.350.2.6: +110 -83 lines
Diff to previous 1.350.2.6 (colored) to branchpoint 1.350 (colored)

sync with head.

Revision 1.404.2.2 / (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.404.2.1: +108 -81 lines
Diff to previous 1.404.2.1 (colored) to branchpoint 1.404 (colored)

sync with head

Revision 1.407 / (download) - annotate - [select for diffs], Wed Jun 30 15:44:54 2010 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.406: +28 -17 lines
Diff to previous 1.406 (colored)

Enable kernel-internal symlink creation with do_sys_symlink().
I did this a while ago already, but can't remember why i didn't
commit it then.

Revision 1.406 / (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.405: +23 -23 lines
Diff to previous 1.405 (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.405 / (download) - annotate - [select for diffs], Tue Jun 15 09:43:36 2010 UTC (12 years, 7 months ago) by hannken
Branch: MAIN
Changes since 1.404: +61 -45 lines
Diff to previous 1.404 (colored)

When mounting a file system re-lookup and lock the directory we mount on
after the file system is setup by VFS_MOUNT().  This way recursive vnode
locks are no longer needed here and mounts on null mounts no longer fail
as described in PR #43439 (mount_null panic: lockdebug_wantlock: locking
against myself).

Based on a proposal from  and
Reviewed by: David A. Holland <dholland@netbsd.org>

Revision 1.403.2.3 / (download) - annotate - [select for diffs], Mon May 31 03:29:43 2010 UTC (12 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.403.2.2: +3 -3 lines
Diff to previous 1.403.2.2 (colored) to branchpoint 1.403 (colored)

Remove the "xip" option from mount_ffs(8) for simplicity.

Revision 1.403.2.2 / (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.403.2.1: +0 -2 lines
Diff to previous 1.403.2.1 (colored) to branchpoint 1.403 (colored)

Sync with HEAD.

Revision 1.376.4.2.2.1.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:19 2010 UTC (12 years, 9 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.376.4.2.2.1: +5 -5 lines
Diff to previous 1.376.4.2.2.1 (colored) next main 1.376.4.2.2.2 (colored)

sync to netbsd-5

Revision 1.404.2.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.404: +4 -4 lines
Diff to previous 1.404 (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.350.2.6 / (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.350.2.5: +57 -32 lines
Diff to previous 1.350.2.5 (colored) to branchpoint 1.350 (colored)

sync with head

Revision 1.404 / (download) - annotate - [select for diffs], Wed Mar 3 00:47:31 2010 UTC (12 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.403: +2 -4 lines
Diff to previous 1.403 (colored)

remove redundant checks of PK_MARKER.

Revision 1.403.2.1 / (download) - annotate - [select for diffs], Tue Feb 23 06:58:07 2010 UTC (12 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.403: +5 -5 lines
Diff to previous 1.403 (colored)

More bits to pass the new XIP mount option correctly.

Revision 1.376.4.5 / (download) - annotate - [select for diffs], Sun Feb 14 13:27:45 2010 UTC (12 years, 11 months ago) by bouyer
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, matt-nb5-pq3-base, matt-nb5-pq3
Branch point for: netbsd-5-1
Changes since 1.376.4.4: +4 -4 lines
Diff to previous 1.376.4.4 (colored) to branchpoint 1.376 (colored)

Pull up following revision(s) (requested by pooka in ticket #1289):
	sys/sys/namei.src: revision 1.14
	sys/kern/vfs_syscalls.c: revision 1.401
	sys/nfs/nfs_serv.c: revision 1.149
	sys/sys/namei.h: regen
Define namei flag INRENAME and set it if a lookup operation is part
of rename.  This helps with building better asserts for rename in
the DELETE lookup ... the RENAME lookup is quite obviously a part
of rename.

Revision 1.403 / (download) - annotate - [select for diffs], Fri Jan 15 01:00:46 2010 UTC (13 years ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.402: +37 -10 lines
Diff to previous 1.402 (colored)

Fix reference counting for vfsops in mount.  Otherwise it's possible
(for an unprivileged user) to force vfs modules to remain loaded
forever.  Also, it's possible for an admin with fat fingers to have
to curse out loud (a lot) and reboot.

.. or at least fix things as much as seems to be possible without
involving 1000 zorkmids.  do_sys_mount() takes either struct vfsops
(which hopefully came properly referenced) or a userspace string
for file system type.  The standard in-kernel calling convention
of "do_sys_mount(l, vfs_getopsbyname("nfs"), NULL," is not to be
considered healthy, kosher, or even tasty (although if vfs_getopsbyname()
fails the whole thing *currently* fails without the program counter
pointing to hyperspace).

Revision 1.402 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:10 2010 UTC (13 years ago) by pooka
Branch: MAIN
Changes since 1.401: +19 -19 lines
Diff to previous 1.401 (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.401 / (download) - annotate - [select for diffs], Wed Dec 23 01:09:24 2009 UTC (13 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.400: +4 -4 lines
Diff to previous 1.400 (colored)

Define namei flag INRENAME and set it if a lookup operation is part
of rename.  This helps with building better asserts for rename in
the DELETE lookup ... the RENAME lookup is quite obviously a part
of rename.

Revision 1.376.4.2.2.2 / (download) - annotate - [select for diffs], Mon Dec 21 09:41:51 2009 UTC (13 years, 1 month ago) by sborrill
Branch: netbsd-5-0
CVS Tags: netbsd-5-0-2-RELEASE
Changes since 1.376.4.2.2.1: +3 -3 lines
Diff to previous 1.376.4.2.2.1 (colored) to branchpoint 1.376.4.2 (colored)

Pull up the following revisions(s) (requested by martin in ticket #1200):
	sys/kern/vfs_syscalls.c:	revision 1.400

Use the kernel space version of the vfs name, not the original userspace
pointer. Avoids crashes on archs with completely separate userspace VA.

Revision 1.376.4.4 / (download) - annotate - [select for diffs], Mon Dec 21 09:19:16 2009 UTC (13 years, 1 month ago) by sborrill
Branch: netbsd-5
Changes since 1.376.4.3: +3 -3 lines
Diff to previous 1.376.4.3 (colored) to branchpoint 1.376 (colored)

Pull up the following revisions(s) (requested by martin in ticket #1200):
	sys/kern/vfs_syscalls.c:	revision 1.400

Use the kernel space version of the vfs name, not the original userspace
pointer. Avoids crashes on archs with completely separate userspace VA.

Revision 1.400 / (download) - annotate - [select for diffs], Sat Dec 19 20:28:27 2009 UTC (13 years, 1 month ago) by martin
Branch: MAIN
Changes since 1.399: +3 -3 lines
Diff to previous 1.399 (colored)

Use the kernel space version of the vfs name, not the original userspace
pointer. Avoids crashes on archs with completely separate userspace VA.

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

sync with head.

Revision 1.399 / (download) - annotate - [select for diffs], Sun Aug 9 22:49:00 2009 UTC (13 years, 5 months ago) by haad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.398: +7 -8 lines
Diff to previous 1.398 (colored)

Add enum uio_seg argument to do_sys_mknod and do_sys_mkdir so these functions
can be called from kernel, too.

Change needed for zfs device node creation, until we have propoer devfs.

Oked by ad@.

Revision 1.398 / (download) - annotate - [select for diffs], Sun Aug 2 20:44:55 2009 UTC (13 years, 6 months ago) by bad
Branch: MAIN
Changes since 1.397: +3 -2 lines
Diff to previous 1.397 (colored)

Add a note to change_root() that the callers need to authorize the operation.
As requested by elad@.

Revision 1.397 / (download) - annotate - [select for diffs], Sat Aug 1 21:17:11 2009 UTC (13 years, 6 months ago) by bad
Branch: MAIN
Changes since 1.396: +34 -50 lines
Diff to previous 1.396 (colored)

As discussed on tech-kern:

Factor out common code of chroot-like syscalls into change_root() and export
that function for use in other parts of the kernel.
Rename change_dir() to chdir_lookup() as the latter describes better what
the function does.  While there, move the namei_data initialisation into
chdir_lookup(), too.  And export chdir_lookup().

Revision 1.385.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.385.2.1: +98 -91 lines
Diff to previous 1.385.2.1 (colored) next main 1.386 (colored)

Sync with HEAD.

Revision 1.350.2.4 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:23 2009 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.350.2.3: +98 -91 lines
Diff to previous 1.350.2.3 (colored) to branchpoint 1.350 (colored)

sync with head.

Revision 1.396 / (download) - annotate - [select for diffs], Thu Jul 2 12:53:47 2009 UTC (13 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.395: +13 -7 lines
Diff to previous 1.395 (colored)

expose mkdir to in-kernel consumers

Revision 1.376.4.2.2.1 / (download) - annotate - [select for diffs], Wed Jul 1 22:47:12 2009 UTC (13 years, 7 months ago) by snj
Branch: netbsd-5-0
CVS Tags: netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.376.4.2: +3 -3 lines
Diff to previous 1.376.4.2 (colored)

Pull up following revision(s) (requested by rmind in ticket #841):
	sys/kern/vfs_syscalls.c: revision 1.392
do_sys_utimes: fix a bug introduced by rev.1.367.
VA_UTIMES_NULL is in va_vaflags, not va_flags.

Revision 1.376.4.3 / (download) - annotate - [select for diffs], Wed Jul 1 22:47:05 2009 UTC (13 years, 7 months ago) by snj
Branch: netbsd-5
Changes since 1.376.4.2: +3 -3 lines
Diff to previous 1.376.4.2 (colored) to branchpoint 1.376 (colored)

Pull up following revision(s) (requested by rmind in ticket #841):
	sys/kern/vfs_syscalls.c: revision 1.392
do_sys_utimes: fix a bug introduced by rev.1.367.
VA_UTIMES_NULL is in va_vaflags, not va_flags.

Revision 1.395 / (download) - annotate - [select for diffs], Mon Jun 29 05:08:18 2009 UTC (13 years, 7 months ago) by dholland
Branch: MAIN
Changes since 1.394: +87 -86 lines
Diff to previous 1.394 (colored)

Convert 67 namei call sites to use namei_simple, in these functions:

check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.

Revision 1.350.2.3 / (download) - annotate - [select for diffs], Wed Jun 24 14:21:43 2009 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.350.2.2: +8 -3 lines
Diff to previous 1.350.2.2 (colored) to branchpoint 1.350 (colored)

lock vnode when calling VOP_GETATTR because there's no reasonable way for
an implementation of VOP_GETATTR to prevent the vnode from being revoked.

Revision 1.385.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.385: +29 -53 lines
Diff to previous 1.385 (colored)

Sync with HEAD.

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

Revision 1.350.2.2 / (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.350.2.1: +149 -191 lines
Diff to previous 1.350.2.1 (colored) to branchpoint 1.350 (colored)

sync with head.

Revision 1.394 / (download) - annotate - [select for diffs], Sat May 2 14:13:28 2009 UTC (13 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, jym-xensuspend-base
Changes since 1.393: +2 -4 lines
Diff to previous 1.393 (colored)

Move dovfsusermount from vfs_syscalls.c to param.c: secmodel bsd44
depends on it and we can't isolate it in vfs.
(no, it doesn't really belong in param.c, but I couldn't figure out
a better place for it)

Revision 1.393 / (download) - annotate - [select for diffs], Wed Apr 29 01:03:43 2009 UTC (13 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-hppapmap-base4
Changes since 1.392: +4 -17 lines
Diff to previous 1.392 (colored)

Extract common code from vfs_rootmountalloc(9) and mount_domount() into
a new struct mount-allocation routine, vfs_mountalloc(9).  Documentation
updates will follow.

Attention: Synchronization Oversight Committee!  In mount_domount(),
I postpone the call mutex_enter(&mp->mnt_updating) until right before
the VFS_MOUNT(9) call because (1) that looks to me like the earliest
possible opportunity for mp to become visible to any other LWP, because
it was just kmem_zalloc(9)'d and (2) it made extracting the common code
much easier.  Tell me if my reasoning is faulty.

Revision 1.376.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.376.2.2: +2 -4 lines
Diff to previous 1.376.2.2 (colored) to branchpoint 1.376 (colored) next main 1.377 (colored)

Sync with HEAD.

Revision 1.392 / (download) - annotate - [select for diffs], Tue Apr 28 03:01:15 2009 UTC (13 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.391: +3 -3 lines
Diff to previous 1.391 (colored)

do_sys_utimes: fix a bug introduced by rev.1.367.
VA_UTIMES_NULL is in va_vaflags, not va_flags.

Revision 1.391 / (download) - annotate - [select for diffs], Fri Mar 13 11:05:26 2009 UTC (13 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.390: +2 -4 lines
Diff to previous 1.390 (colored)

do_sys_unlink: remove an unused credential.

Revision 1.376.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.376.2.1: +27 -34 lines
Diff to previous 1.376.2.1 (colored) to branchpoint 1.376 (colored)

Sync with HEAD.

Revision 1.390 / (download) - annotate - [select for diffs], Mon Feb 23 20:33:30 2009 UTC (13 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.389: +8 -7 lines
Diff to previous 1.389 (colored)

Fix some comments.

Revision 1.389 / (download) - annotate - [select for diffs], Sun Feb 22 20:28:06 2009 UTC (13 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.388: +2 -10 lines
Diff to previous 1.388 (colored)

PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.

Revision 1.376.4.2 / (download) - annotate - [select for diffs], Mon Feb 16 03:33:17 2009 UTC (13 years, 11 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3
Branch point for: netbsd-5-0
Changes since 1.376.4.1: +3 -3 lines
Diff to previous 1.376.4.1 (colored) to branchpoint 1.376 (colored)

Pull up following revision(s) (requested by enami in ticket #435):
	sys/kern/vfs_subr.c: revision 1.368
	sys/kern/vfs_syscalls.c: revision 1.385
Make revoke(2) works as before:
- vfs_syscalls.c rev. 1.342 fails to invert condition correcly when
  then-clause and else-clause is swapped.  Since then, revoke(2) fails
  if it is issued by file owner.
- Probably since rev. 1.160 of genfs_vnops.c, revoke(2) fails if it is
  applied to non-device file and drops kernel into ddb.

Revision 1.388 / (download) - annotate - [select for diffs], Sun Feb 15 03:52:49 2009 UTC (13 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.387: +3 -7 lines
Diff to previous 1.387 (colored)

Simplify the code; we already have a hint to decide which string to copy.
(And at least gcc generates better code.)

Revision 1.387 / (download) - annotate - [select for diffs], Sat Feb 14 17:06:35 2009 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.386: +24 -20 lines
Diff to previous 1.386 (colored)

from enami: Only apply rootdir changes if the chroot dir != /

Revision 1.386 / (download) - annotate - [select for diffs], Sat Feb 14 16:55:25 2009 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.385: +4 -4 lines
Diff to previous 1.385 (colored)

PR/40634: Christoph Badura: "chroot / /sbin/mount" shows only / as mounted

Revision 1.385 / (download) - annotate - [select for diffs], Thu Feb 5 13:37:24 2009 UTC (13 years, 11 months ago) by enami
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.384: +3 -3 lines
Diff to previous 1.384 (colored)

Make revoke(2) works as before:
- vfs_syscalls.c rev. 1.342 fails to invert condition correcly when
  then-clause and else-clause is swapped.  Since then, revoke(2) fails
  if it is issued by file owner.
- Probably since rev. 1.160 of genfs_vnops.c, revoke(2) fails if it is
  applied to non-device file and drops kernel into ddb.

Revision 1.376.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.376: +61 -73 lines
Diff to previous 1.376 (colored)

Sync with HEAD.

Revision 1.345.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.345.6.4: +62 -72 lines
Diff to previous 1.345.6.4 (colored) to branchpoint 1.345 (colored) next main 1.346 (colored)

Sync with HEAD.

Revision 1.384 / (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
Changes since 1.383: +15 -12 lines
Diff to previous 1.383 (colored)

malloc -> kmem_alloc.

Revision 1.383 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:53 2009 UTC (14 years ago) by christos
Branch: MAIN
Changes since 1.382: +28 -17 lines
Diff to previous 1.382 (colored)

merge christos-time_t

Revision 1.348.2.5 / (download) - annotate - [select for diffs], Sat Dec 27 23:14:24 2008 UTC (14 years, 1 month ago) by christos
Branch: christos-time_t
Changes since 1.348.2.4: +5 -5 lines
Diff to previous 1.348.2.4 (colored) to branchpoint 1.348 (colored) next main 1.349 (colored)

merge with head.

Revision 1.376.4.1 / (download) - annotate - [select for diffs], Thu Dec 18 00:52:16 2008 UTC (14 years, 1 month ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC2, netbsd-5-0-RC1
Changes since 1.376: +4 -4 lines
Diff to previous 1.376 (colored)

Pull up following revision(s) (requested by elad in ticket #188):
	sys/kern/vfs_syscalls.c: revision 1.382
Fix length passed to strlcpy(): we used to get names one character shorter
than reality.
Should be pulled up to netbsd-5.

Revision 1.382 / (download) - annotate - [select for diffs], Sun Dec 14 23:12:58 2008 UTC (14 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: christos-time_t-nbase, christos-time_t-base
Changes since 1.381: +4 -4 lines
Diff to previous 1.381 (colored)

Fix length passed to strlcpy(): we used to get names one character shorter
than reality.

Should be pulled up to netbsd-5.

Revision 1.369.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:09 2008 UTC (14 years, 1 month ago) by haad
Branch: haad-dm
Changes since 1.369.2.1: +25 -49 lines
Diff to previous 1.369.2.1 (colored) to branchpoint 1.369 (colored) next main 1.370 (colored)

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

Revision 1.348.2.4 / (download) - annotate - [select for diffs], Thu Nov 20 20:45:39 2008 UTC (14 years, 2 months ago) by christos
Branch: christos-time_t
Changes since 1.348.2.3: +22 -48 lines
Diff to previous 1.348.2.3 (colored) to branchpoint 1.348 (colored)

merge with head.

Revision 1.381 / (download) - annotate - [select for diffs], Wed Nov 19 18:36:07 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.380: +8 -8 lines
Diff to previous 1.380 (colored)

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

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

Revision 1.380 / (download) - annotate - [select for diffs], Sun Nov 16 18:44:07 2008 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.379: +3 -2 lines
Diff to previous 1.379 (colored)

<sys/buf.h> police

Revision 1.379 / (download) - annotate - [select for diffs], Fri Nov 14 23:13:02 2008 UTC (14 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.378: +3 -3 lines
Diff to previous 1.378 (colored)

Fix a comment.

Revision 1.378 / (download) - annotate - [select for diffs], Fri Nov 14 23:10:57 2008 UTC (14 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.377: +17 -43 lines
Diff to previous 1.377 (colored)

- Move some more compat code into sys/compat.
- Split 4.3BSD ifioctl stuff into its own file.
- Remove some ifdefs that include small fragments of vfs compat code
  which are difficult to relocate elsewhere.

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

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

Proposed on tech-kern@.

Revision 1.348.2.3 / (download) - annotate - [select for diffs], Sun Nov 9 01:54:31 2008 UTC (14 years, 2 months ago) by christos
Branch: christos-time_t
Changes since 1.348.2.2: +3 -3 lines
Diff to previous 1.348.2.2 (colored) to branchpoint 1.348 (colored)

fix fhstat
make major and minor ull

Revision 1.348.2.2 / (download) - annotate - [select for diffs], Sat Nov 1 21:22:28 2008 UTC (14 years, 3 months ago) by christos
Branch: christos-time_t
Changes since 1.348.2.1: +171 -144 lines
Diff to previous 1.348.2.1 (colored) to branchpoint 1.348 (colored)

Sync with head.

Revision 1.376 / (download) - annotate - [select for diffs], Wed Oct 22 11:16:29 2008 UTC (14 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: netbsd-5-base, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.375: +5 -3 lines
Diff to previous 1.375 (colored)

- Be clear about whether module load is explicit or system initiated (auto).
- Require that module_lock is held to autoload, so that any preconditions
  can be safely checked.

Revision 1.369.2.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.369: +15 -25 lines
Diff to previous 1.369 (colored)

Sync with HEAD.

Revision 1.359.2.6 / (download) - annotate - [select for diffs], Fri Oct 10 22:34:14 2008 UTC (14 years, 3 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.359.2.5: +10 -12 lines
Diff to previous 1.359.2.5 (colored) to branchpoint 1.359 (colored) next main 1.360 (colored)

Sync with HEAD.

Revision 1.345.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.345.6.3: +13 -23 lines
Diff to previous 1.345.6.3 (colored) to branchpoint 1.345 (colored)

Sync with HEAD.

Revision 1.375 / (download) - annotate - [select for diffs], Thu Sep 25 14:37:30 2008 UTC (14 years, 4 months ago) by wiz
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, haad-dm-base1
Changes since 1.374: +3 -3 lines
Diff to previous 1.374 (colored)

Fix typo in comment.

Revision 1.374 / (download) - annotate - [select for diffs], Thu Sep 25 14:17:29 2008 UTC (14 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.373: +5 -7 lines
Diff to previous 1.373 (colored)

PR kern/39307 (mfs will sometimes panic at umount time)

Change dounmount() so that it never drops the caller provided reference.
Garbage collecting 'struct mount' is up to the caller.

Revision 1.359.2.5 / (download) - annotate - [select for diffs], Wed Sep 24 16:38:57 2008 UTC (14 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.359.2.4: +3 -12 lines
Diff to previous 1.359.2.4 (colored) to branchpoint 1.359 (colored)

Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.

Revision 1.373 / (download) - annotate - [select for diffs], Wed Sep 24 10:07:19 2008 UTC (14 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.372: +6 -4 lines
Diff to previous 1.372 (colored)

PR kern/30525 remounting ffs read-only (mount -ur) does not sync metadata

Prevent r/w to r/o downgrade until such time as someone has verified all
the relevant file system code.

Revision 1.372 / (download) - annotate - [select for diffs], Wed Sep 24 09:44:09 2008 UTC (14 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.371: +3 -5 lines
Diff to previous 1.371 (colored)

PR kern/39307 mfs will sometimes panic at umount time

Don't drop reference to the mount if VFS_START() fails - that's for unmount
to do.

Revision 1.359.2.4 / (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.359.2.3: +6 -32 lines
Diff to previous 1.359.2.3 (colored) to branchpoint 1.359 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.371 / (download) - annotate - [select for diffs], Wed Sep 17 14:49:25 2008 UTC (14 years, 4 months ago) by hannken
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3
Changes since 1.370: +3 -12 lines
Diff to previous 1.370 (colored)

Replace the fss unmount hook with a vfs_hook.

fssvar.h:       struct device * -> device_t.
fss.c:          establish unmount hook on first attach, remove on last detach.
vfs_syscalls.c: remove the call of fss_umount_hook().
vfs_trans.c:    destroy cow handlers on unmount as fstrans_unmount() will be
                called before vfs_hooks.

Revision 1.370 / (download) - annotate - [select for diffs], Thu Jul 31 05:38:05 2008 UTC (14 years, 6 months ago) by simonb
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-2
Changes since 1.369: +6 -5 lines
Diff to previous 1.369 (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.365.2.4 / (download) - annotate - [select for diffs], Fri Jul 18 14:48:55 2008 UTC (14 years, 6 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.365.2.3: +2 -5 lines
Diff to previous 1.365.2.3 (colored) to branchpoint 1.365 (colored) next main 1.366 (colored)

"mount -u -o log" works now - remove the code that explicity disabled
this.

Revision 1.345.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (14 years, 7 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.345.6.2: +20 -36 lines
Diff to previous 1.345.6.2 (colored) to branchpoint 1.345 (colored)

Sync with HEAD.

Revision 1.365.2.3 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:39 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.365.2.2: +2 -29 lines
Diff to previous 1.365.2.2 (colored) to branchpoint 1.365 (colored)

Sync with head.

Revision 1.369 / (download) - annotate - [select for diffs], Tue Jun 24 11:21:46 2008 UTC (14 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.368: +2 -29 lines
Diff to previous 1.368 (colored)

Nothing uses getsock/getvnode any more.

Revision 1.359.2.3 / (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.359.2.2: +51 -22 lines
Diff to previous 1.359.2.2 (colored) to branchpoint 1.359 (colored)

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

Revision 1.365.2.2 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:35 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.365.2.1: +22 -11 lines
Diff to previous 1.365.2.1 (colored) to branchpoint 1.365 (colored)

Sync with head.

Revision 1.368 / (download) - annotate - [select for diffs], Tue Jun 17 21:02:08 2008 UTC (14 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.367: +4 -4 lines
Diff to previous 1.367 (colored)

set mtime/atime properly, not backwards.

Revision 1.367 / (download) - annotate - [select for diffs], Tue Jun 17 16:18:01 2008 UTC (14 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.366: +21 -10 lines
Diff to previous 1.366 (colored)

PR/38942: Pedro F. Giffuni: no support for birthtime in utimes(2).

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

sync with head.

Revision 1.365.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.365: +9 -5 lines
Diff to previous 1.365 (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.366 / (download) - annotate - [select for diffs], Tue Jun 10 14:14:01 2008 UTC (14 years, 7 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-pf42-base4
Changes since 1.365: +3 -3 lines
Diff to previous 1.365 (colored)

In mount_domount() there is no need to initialise "mp" if the first time
we use it we set it.

Revision 1.348.4.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.348.4.1: +31 -13 lines
Diff to previous 1.348.4.1 (colored) to branchpoint 1.348 (colored)

sync with head

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

Sync with HEAD.

Revision 1.365 / (download) - annotate - [select for diffs], Mon May 26 18:20:36 2008 UTC (14 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Changes since 1.364: +7 -3 lines
Diff to previous 1.364 (colored)

More fixes needed in the error paths for the chroot code to work.

Revision 1.364 / (download) - annotate - [select for diffs], Mon May 26 02:29:13 2008 UTC (14 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.363: +6 -4 lines
Diff to previous 1.363 (colored)

PR/38745: Kouichirou Hiratsuka: chroot(8) can leak information of outside of
chrooted directory

Revision 1.363 / (download) - annotate - [select for diffs], Tue May 20 19:30:03 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.362: +3 -4 lines
Diff to previous 1.362 (colored)

Ignore return from module_load() and just try vfsop lookup again.

Revision 1.362 / (download) - annotate - [select for diffs], Tue May 20 19:20:38 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.361: +3 -3 lines
Diff to previous 1.361 (colored)

If autoloading a module, don't consider the current working directory.

Revision 1.361 / (download) - annotate - [select for diffs], Tue May 20 17:28:59 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.360: +11 -7 lines
Diff to previous 1.360 (colored)

Don't try to load a module while holding a vnode lock.

Revision 1.360 / (download) - annotate - [select for diffs], Tue May 20 17:25:49 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.359: +13 -4 lines
Diff to previous 1.359 (colored)

If mount fails because the needed file system code isn't in kernel, try
to autoload with the needed vfsops.

Revision 1.348.4.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.348: +112 -79 lines
Diff to previous 1.348 (colored)

sync with head.

Revision 1.350.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:28 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.350: +111 -79 lines
Diff to previous 1.350 (colored)

sync with head.

Revision 1.359.2.2 / (download) - annotate - [select for diffs], Wed May 14 01:35:14 2008 UTC (14 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.359.2.1: +2 -3 lines
Diff to previous 1.359.2.1 (colored) to branchpoint 1.359 (colored)

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

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

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

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

I think this reduction is very good thing.

Revision 1.359.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:06 2008 UTC (14 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.359: +3 -2 lines
Diff to previous 1.359 (colored)

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

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

Revision 1.359 / (download) - annotate - [select for diffs], Tue May 6 19:14:32 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.358: +3 -3 lines
Diff to previous 1.358 (colored)

sys_unmount: drop ref to root dir before dounmount(), otherwise we'll
always get EBUSY.

Revision 1.358 / (download) - annotate - [select for diffs], Tue May 6 18:43:44 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.357: +57 -69 lines
Diff to previous 1.357 (colored)

PR kern/38141 lookup/vfs_busy acquire rwlock recursively

Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.

Revision 1.357 / (download) - annotate - [select for diffs], Tue May 6 13:31:02 2008 UTC (14 years, 8 months ago) by xtraeme
Branch: MAIN
Changes since 1.356: +3 -3 lines
Diff to previous 1.356 (colored)

Make this build again.

Revision 1.356 / (download) - annotate - [select for diffs], Tue May 6 12:54:25 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.355: +6 -5 lines
Diff to previous 1.355 (colored)

PR kern/38141 lookup/vfs_busy acquire rwlock recursively

- sys_sync: acquire a write lock on the mount since the operation modifies
  the mount structure.
- sys_fchdir: use vfs_trybusy(). If an unmount is in progress, just fail it.

Revision 1.355 / (download) - annotate - [select for diffs], Tue May 6 12:51:22 2008 UTC (14 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.354: +48 -24 lines
Diff to previous 1.354 (colored)

Fix a couple of problems with checkdirs():

- vnode and cwd locks were being taken with proc_lock held, which is bad
  because proc_lock can only be held for a short period of time.

- Processes could have continually forked and escaped notice, keeping
  a reference to the old directory on top of which a new mount exists.

Revision 1.354 / (download) - annotate - [select for diffs], Wed Apr 30 12:49:17 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.353: +20 -24 lines
Diff to previous 1.353 (colored)

PR kern/38135 vfs_busy/vfs_trybusy confusion

The previous fix worked, but it opened a window where mounts could have
disappeared from mountlist while the caller was traversing it using
vfs_trybusy(). Fix that.

Revision 1.353 / (download) - annotate - [select for diffs], Tue Apr 29 23:51:04 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.352: +43 -15 lines
Diff to previous 1.352 (colored)

kern/38135 vfs_busy/vfs_trybusy confusion

The symptom was that sometimes file systems would occasionally not appear
in output from 'df' or 'mount' if the system was busy. Resolution:

- Make mount locks work somewhat like vm_map locks.
- vfs_trybusy() now only fails if the mount is gone, or if someone is
  unmounting the file system. Simple contention on mnt_lock doesn't
  cause it to fail.
- vfs_busy() will wait even if the file system is being unmounted.

Revision 1.352 / (download) - annotate - [select for diffs], Tue Apr 29 15:51:23 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.351: +4 -2 lines
Diff to previous 1.351 (colored)

Ignore processes with PK_MARKER set.

Revision 1.351 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:05 2008 UTC (14 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.350: +2 -9 lines
Diff to previous 1.350 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.350 / (download) - annotate - [select for diffs], Fri Apr 25 13:40:55 2008 UTC (14 years, 9 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.349: +3 -3 lines
Diff to previous 1.349 (colored)

Before allowing rmdir to progess into the netherhells called VFS,
check if no filesystem is mounted on this node. This can happen
for null mounts on top of null mounts.

Revision 1.349 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:30 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.348: +5 -4 lines
Diff to previous 1.348 (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.345.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.345: +142 -173 lines
Diff to previous 1.345 (colored)

Sync with HEAD.

Revision 1.348.2.1 / (download) - annotate - [select for diffs], Sat Mar 29 20:47:01 2008 UTC (14 years, 10 months ago) by christos
Branch: christos-time_t
Changes since 1.348: +26 -15 lines
Diff to previous 1.348 (colored)

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

Revision 1.348 / (download) - annotate - [select for diffs], Fri Mar 28 05:02:08 2008 UTC (14 years, 10 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42, christos-time_t
Changes since 1.347: +13 -2 lines
Diff to previous 1.347 (colored)

Yet another rename workaround - this time check for . and .. early because
relookup() objects to being asked to handle them.

Revision 1.347 / (download) - annotate - [select for diffs], Tue Mar 25 22:13:32 2008 UTC (14 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: ad-socklock-base1
Changes since 1.346: +6 -3 lines
Diff to previous 1.346 (colored)

mount_domount: hold an additional reference to the mountpoint across the
call to VFS_START. The file system can be unmounted before VFS_START
returns. Partially addresses PR kern/38291.

Revision 1.223.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.223.2.8: +127 -172 lines
Diff to previous 1.223.2.8 (colored) next main 1.224 (colored)

sync with head.

Revision 1.325.2.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.325.2.2: +143 -102 lines
Diff to previous 1.325.2.2 (colored) next main 1.326 (colored)

sync with HEAD

Revision 1.346 / (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-lazymbuf-base15, yamt-lazymbuf-base14
Changes since 1.345: +127 -172 lines
Diff to previous 1.345 (colored)

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

Revision 1.331.2.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.331.2.2: +160 -109 lines
Diff to previous 1.331.2.2 (colored) to branchpoint 1.331 (colored) next main 1.332 (colored)

Sync with HEAD.

Revision 1.223.2.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:24 2008 UTC (14 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.223.2.7: +129 -91 lines
Diff to previous 1.223.2.7 (colored)

sync with head.

Revision 1.345 / (download) - annotate - [select for diffs], Wed Jan 30 11:47:01 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.344: +74 -57 lines
Diff to previous 1.344 (colored)

PR kern/37706 (forced unmount of file systems is unsafe):

- Do reference counting for 'struct mount'. Each vnode associated with a
  mount takes a reference, and in turn the mount takes a reference to the
  vfsops.
- Now that mounts are reference counted, replace the overcomplicated mount
  locking inherited from 4.4BSD with a recursable rwlock.

Revision 1.344 / (download) - annotate - [select for diffs], Mon Jan 28 14:31:18 2008 UTC (15 years ago) by dholland
Branch: MAIN
Changes since 1.343: +53 -2 lines
Diff to previous 1.343 (colored)

Fix some race conditions in rename.
Introduce a per-FS rename lock and new vfsops to manipulate it.
Get this lock while renaming. Also add another relookup() in do_sys_rename,
which is a hack to kludge around some of the worst deficiencies of
ufs_rename.
reviewed-by: pooka (and an earlier rev by ad)
posted on tech-kern with no objections.

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

Remove VOP_LEASE. Discussed on tech-kern.

Revision 1.342 / (download) - annotate - [select for diffs], Thu Jan 24 17:32:55 2008 UTC (15 years ago) by ad
Branch: MAIN
Changes since 1.341: +6 -12 lines
Diff to previous 1.341 (colored)

specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to reference a single device.

- Don't play dangerous tricks with block vnodes to ensure that only one
  vnode can describe a block device. Instead, prohibit concurrent opens of
  block devices. As a bonus remove the unreliable code that prevents
  multiple file system mounts on the same device. It's no longer needed.

- Track opens by vnode and by device. Issue cdev_close() when the last open
  goes away, instead of abusing vnode::v_usecount to tell if the device is
  open.

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

sync with head

Revision 1.334.4.3 / (download) - annotate - [select for diffs], Thu Jan 10 23:44:31 2008 UTC (15 years ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.334.4.2: +24 -21 lines
Diff to previous 1.334.4.2 (colored) to branchpoint 1.334 (colored) next main 1.335 (colored)

Sync with HEAD

Revision 1.341 / (download) - annotate - [select for diffs], Thu Jan 10 19:04:23 2008 UTC (15 years ago) by ad
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.340: +2 -9 lines
Diff to previous 1.340 (colored)

Remove hack that's no longer needed.

Revision 1.340 / (download) - annotate - [select for diffs], Wed Jan 9 08:18:12 2008 UTC (15 years ago) by elad
Branch: MAIN
Changes since 1.339: +26 -16 lines
Diff to previous 1.339 (colored)

Refactor part of the sys_revoke() code so that it can be used in the
compat code. Allows for the removal of two redundant kauth(9) calls.

okay christos@.

Revision 1.325.2.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.325.2.1: +327 -317 lines
Diff to previous 1.325.2.1 (colored)

sync with HEAD

Revision 1.334.4.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:47 2008 UTC (15 years ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.334.4.1: +6 -6 lines
Diff to previous 1.334.4.1 (colored) to branchpoint 1.334 (colored)

Sync with HEAD

Revision 1.339 / (download) - annotate - [select for diffs], Sat Jan 5 19:08:49 2008 UTC (15 years ago) by dsl
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.338: +8 -8 lines
Diff to previous 1.338 (colored)

Use FILE_LOCK() and FILE_UNLOCK()

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

Sync with HEAD

Revision 1.338 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:56 2008 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.337: +17 -19 lines
Diff to previous 1.337 (colored)

Merge vmlocking2 to head.

Revision 1.331.2.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:19 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.331.2.1: +235 -225 lines
Diff to previous 1.331.2.1 (colored) to branchpoint 1.331 (colored)

Sync with HEAD.

Revision 1.333.2.5 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:48 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.333.2.4: +235 -225 lines
Diff to previous 1.333.2.4 (colored) to branchpoint 1.333 (colored) next main 1.334 (colored)

Sync with head.

Revision 1.337 / (download) - annotate - [select for diffs], Wed Dec 26 16:01:37 2007 UTC (15 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.336: +19 -7 lines
Diff to previous 1.336 (colored)

Merge more changes from vmlocking2, mainly:

- Locking improvements.
- Use pool_cache for more items.

Revision 1.336 / (download) - annotate - [select for diffs], Mon Dec 24 15:04:19 2007 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.335: +22 -14 lines
Diff to previous 1.335 (colored)

Export do_sys_unlink, do_sys_rename to the rest of the kernel.

Revision 1.335 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:13 2007 UTC (15 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.334: +182 -181 lines
Diff to previous 1.334 (colored)

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

Revision 1.333.2.4 / (download) - annotate - [select for diffs], Sat Dec 15 01:04:33 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.333.2.3: +9 -2 lines
Diff to previous 1.333.2.3 (colored) to branchpoint 1.333 (colored)

sys_sync: take kernel_lock around VFS_SYNC().

Revision 1.333.2.3 / (download) - annotate - [select for diffs], Sun Dec 9 22:57:20 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.333.2.2: +10 -7 lines
Diff to previous 1.333.2.2 (colored) to branchpoint 1.333 (colored)

Fix error in previous.

Revision 1.333.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.333.2.1: +7 -5 lines
Diff to previous 1.333.2.1 (colored) to branchpoint 1.333 (colored)

do_sys_mount: use vn_setrecurse(), not LK_SETRECURSE.

Revision 1.324.2.7 / (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.324.2.6: +37 -36 lines
Diff to previous 1.324.2.6 (colored) to branchpoint 1.324 (colored) next main 1.325 (colored)

Sync with HEAD.

Revision 1.334 / (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, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.333: +37 -36 lines
Diff to previous 1.333 (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.331.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:45 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.331: +58 -68 lines
Diff to previous 1.331 (colored)

Sync with HEAD.

Revision 1.223.2.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:33:23 2007 UTC (15 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.223.2.5: +58 -68 lines
Diff to previous 1.223.2.5 (colored)

sync with head

Revision 1.333.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.333: +17 -19 lines
Diff to previous 1.333 (colored)

Pull the vmlocking changes into a new branch.

Revision 1.324.2.6 / (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.324.2.5: +5 -15 lines
Diff to previous 1.324.2.5 (colored) to branchpoint 1.324 (colored)

Sync with HEAD.

Revision 1.333 / (download) - annotate - [select for diffs], Fri Nov 30 16:52:20 2007 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Branch point for: vmlocking2
Changes since 1.332: +5 -15 lines
Diff to previous 1.332 (colored)

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

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

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.332 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:09 2007 UTC (15 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.331: +57 -57 lines
Diff to previous 1.331 (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.329.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:39 2007 UTC (15 years, 2 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.329: +47 -27 lines
Diff to previous 1.329 (colored) next main 1.330 (colored)

Sync with HEAD

Revision 1.325.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:32:49 2007 UTC (15 years, 2 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.325: +163 -88 lines
Diff to previous 1.325 (colored)

sync with HEAD

Revision 1.324.2.4 / (download) - annotate - [select for diffs], Sun Oct 28 20:11:13 2007 UTC (15 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.324.2.3: +47 -26 lines
Diff to previous 1.324.2.3 (colored) to branchpoint 1.324 (colored)

Sync with HEAD.

Revision 1.223.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:42 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.223.2.4: +158 -84 lines
Diff to previous 1.223.2.4 (colored)

sync with head.

Revision 1.324.2.3 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:47 2007 UTC (15 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.324.2.2: +114 -61 lines
Diff to previous 1.324.2.2 (colored) to branchpoint 1.324 (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.331 / (download) - annotate - [select for diffs], Wed Oct 24 15:28:55 2007 UTC (15 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs
Changes since 1.330: +47 -26 lines
Diff to previous 1.330 (colored)

80col & whitespace police.  no functional change.

Revision 1.330 / (download) - annotate - [select for diffs], Tue Oct 23 16:16:26 2007 UTC (15 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.329: +2 -3 lines
Diff to previous 1.329 (colored)

Don't take a reference to the vfsops structure in mount_domount().
It is now taken when the vfs structure is received instead of having
to randomly add references in random places.  Fixes at least vfs
lkm unload.

Revision 1.327.2.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:50 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.327: +114 -60 lines
Diff to previous 1.327 (colored) next main 1.328 (colored)

sync with head.

Revision 1.329 / (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
Branch point for: bouyer-xenamd64
Changes since 1.328: +52 -39 lines
Diff to previous 1.328 (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.306.2.16 / (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.306.2.15: +6 -6 lines
Diff to previous 1.306.2.15 (colored) to branchpoint 1.306 (colored) next main 1.307 (colored)

Sync with head.

Revision 1.328 / (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.327: +64 -23 lines
Diff to previous 1.327 (colored)

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

Revision 1.306.2.15 / (download) - annotate - [select for diffs], Wed Oct 3 19:11:16 2007 UTC (15 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.14: +7 -6 lines
Diff to previous 1.306.2.14 (colored) to branchpoint 1.306 (colored)

- Don't do proc_vmspace_getref() in dofileread() and friends. They only
  ever access the caller's vmspace so it's not going to go away. Instead
  just use curproc->p_vmspace. Fixes high lock contention during file I/O
  by multithreaded processes. Don't pass in lwp_t *l, it's confusing.

- Drain cleaned vnodes from mountpoints just before checking to see
  if there are danglers. Cleaned vnodes now stick around on mountpoint
  lists until reused, as it's too expensive to pull them off earlier.

Revision 1.324.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 16:48:51 2007 UTC (15 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.324.2.1: +9 -8 lines
Diff to previous 1.324.2.1 (colored) to branchpoint 1.324 (colored)

Sync with HEAD.

Revision 1.223.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:41:23 2007 UTC (15 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.223.2.3: +418 -614 lines
Diff to previous 1.223.2.3 (colored)

sync with head.

Revision 1.322.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:23:05 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.322.2.1: +10 -19 lines
Diff to previous 1.322.2.1 (colored) to branchpoint 1.322 (colored) next main 1.323 (colored)

Sync with HEAD.

Revision 1.327 / (download) - annotate - [select for diffs], Sat Sep 1 23:40:23 2007 UTC (15 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Changes since 1.326: +6 -6 lines
Diff to previous 1.326 (colored)

Make bioops a pointer and point it to the softdeps struct in softdep
init.  Decouples "options SOFTDEP" from the main kernel and ffs code.

Revision 1.326 / (download) - annotate - [select for diffs], Tue Aug 28 09:28:10 2007 UTC (15 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.325: +5 -4 lines
Diff to previous 1.325 (colored)

In quotactl, move vrele() to after the VFS call: protects the
mountpoint from being wiped under us better.

from David Holland

Revision 1.306.2.14 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:44 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.13: +14 -32 lines
Diff to previous 1.306.2.13 (colored) to branchpoint 1.306 (colored)

Sync with HEAD.

Revision 1.306.2.13 / (download) - annotate - [select for diffs], Mon Aug 20 03:22:42 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.12: +6 -6 lines
Diff to previous 1.306.2.12 (colored) to branchpoint 1.306 (colored)

softdep locking improvements. It hangs looping in flush_inodedep_deps(),
more work required.

Revision 1.324.2.1 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:44 2007 UTC (15 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.324: +3 -13 lines
Diff to previous 1.324 (colored)

Sync with HEAD.

Revision 1.322.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:24 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.322: +11 -19 lines
Diff to previous 1.322 (colored)

Sync with HEAD.

Revision 1.325 / (download) - annotate - [select for diffs], Wed Aug 15 12:07:35 2007 UTC (15 years, 5 months ago) by ad
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.324: +3 -13 lines
Diff to previous 1.324 (colored)

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

Revision 1.306.2.12 / (download) - annotate - [select for diffs], Wed Aug 15 11:45:39 2007 UTC (15 years, 5 months ago) by yamt
Branch: vmlocking
Changes since 1.306.2.11: +2 -3 lines
Diff to previous 1.306.2.11 (colored) to branchpoint 1.306 (colored)

don't destroy mnt_mutex twice.

Revision 1.324.4.2 / (download) - annotate - [select for diffs], Tue Jul 31 21:14:22 2007 UTC (15 years, 6 months ago) by pooka
Branch: matt-mips64
Changes since 1.324.4.1: +3545 -0 lines
Diff to previous 1.324.4.1 (colored) to branchpoint 1.324 (colored) next main 1.325 (colored)

* nuke the nameidata parameter from VFS_MOUNT().  Nobody on tech-kern
  knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
  use VFS_PROTOS() instead of manually prototyping the methods

Revision 1.324.4.1, Tue Jul 31 21:14:21 2007 UTC (15 years, 6 months ago) by pooka
Branch: matt-mips64
Changes since 1.324: +0 -3545 lines
FILE REMOVED

file vfs_syscalls.c was added on branch matt-mips64 on 2007-07-31 21:14:22 +0000

Revision 1.324 / (download) - annotate - [select for diffs], Tue Jul 31 21:14:21 2007 UTC (15 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64, jmcneill-pm
Changes since 1.323: +11 -14 lines
Diff to previous 1.323 (colored)

* nuke the nameidata parameter from VFS_MOUNT().  Nobody on tech-kern
  knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
  use VFS_PROTOS() instead of manually prototyping the methods

Revision 1.306.2.11 / (download) - annotate - [select for diffs], Sun Jul 29 11:37:11 2007 UTC (15 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.10: +4 -5 lines
Diff to previous 1.306.2.10 (colored) to branchpoint 1.306 (colored)

Add vfs_destroy() to free mount structures. The specificdata_ref was being
leaked.

Revision 1.323 / (download) - annotate - [select for diffs], Sun Jul 22 19:16:05 2007 UTC (15 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: hpcarm-cleanup
Changes since 1.322: +2 -7 lines
Diff to previous 1.322 (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.322 / (download) - annotate - [select for diffs], Tue Jul 17 21:15:41 2007 UTC (15 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: nick-csl-alignment-base
Branch point for: nick-csl-alignment
Changes since 1.321: +4 -4 lines
Diff to previous 1.321 (colored)

get rid of MFSNAMELEN

Revision 1.306.2.10 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:57 2007 UTC (15 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.9: +72 -128 lines
Diff to previous 1.306.2.9 (colored) to branchpoint 1.306 (colored)

Sync with head.

Revision 1.306.2.9 / (download) - annotate - [select for diffs], Sun Jul 15 13:27:48 2007 UTC (15 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.8: +111 -78 lines
Diff to previous 1.306.2.8 (colored) to branchpoint 1.306 (colored)

Sync with head.

Revision 1.321 / (download) - annotate - [select for diffs], Sat Jul 14 15:41:31 2007 UTC (15 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.320: +22 -4 lines
Diff to previous 1.320 (colored)

Version mount(2) so that the length of the 'data' buffer is passed into
the kernel.

Revision 1.320 / (download) - annotate - [select for diffs], Thu Jul 12 19:35:37 2007 UTC (15 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.319: +159 -129 lines
Diff to previous 1.319 (colored)

Change the VFS_MOUNT() interface so that the 'data' buffer passed to the
fs code is a kernel buffer, pass though the length of the buffer as well.
Since the length of the userspace buffer isn'it (yet) passed through the mount
system call, add a field to the vfsops structure containing the default length.
Split sys_mount() for calls from compat code.
Ride one of the recent kernel version changes - old fs LKMs will load, but
sys_mount() will reject any attempt to use them.

Revision 1.306.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:10:24 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.306: +170 -426 lines
Diff to previous 1.306 (colored) next main 1.307 (colored)

Sync with head.

Revision 1.217.2.13 / (download) - annotate - [select for diffs], Tue Jun 26 17:00:47 2007 UTC (15 years, 7 months ago) by ghen
Branch: netbsd-3
Changes since 1.217.2.12: +5 -4 lines
Diff to previous 1.217.2.12 (colored) to branchpoint 1.217 (colored) next main 1.218 (colored)

Pull up following revision(s) (requested by blymn in ticket #1471):
	sys/kern/kern_verifiedexec.c: patch
	sys/kern/vfs_syscalls.c: patch
	sys/sys/verified_exec.h: patch
Prevent users to rename a file to a veriexec protected file and to run
unfingerprinted files at strict level two or above.

Revision 1.217.2.12 / (download) - annotate - [select for diffs], Tue Jun 26 16:57:39 2007 UTC (15 years, 7 months ago) by ghen
Branch: netbsd-3
Changes since 1.217.2.11: +3 -3 lines
Diff to previous 1.217.2.11 (colored) to branchpoint 1.217 (colored)

Revert #1471 in favour of #1751.

Revision 1.217.2.9.2.2 / (download) - annotate - [select for diffs], Sat Jun 23 19:50:03 2007 UTC (15 years, 7 months ago) by ghen
Branch: netbsd-3-1
CVS Tags: netbsd-3-1-1-RELEASE
Changes since 1.217.2.9.2.1: +5 -4 lines
Diff to previous 1.217.2.9.2.1 (colored) to branchpoint 1.217.2.9 (colored) next main 1.217.2.10 (colored)

Pull up following revision(s) (requested by blymn in ticket #1471):
	sys/kern/kern_verifiedexec.c: patch
	sys/kern/vfs_syscalls.c: patch
Prevent users to rename a file to a veriexec protected file and to run
unfingerprinted files at strict level two or above.

Revision 1.217.2.7.2.2 / (download) - annotate - [select for diffs], Sat Jun 23 19:49:58 2007 UTC (15 years, 7 months ago) by ghen
Branch: netbsd-3-0
CVS Tags: netbsd-3-0-3-RELEASE
Changes since 1.217.2.7.2.1: +5 -4 lines
Diff to previous 1.217.2.7.2.1 (colored) to branchpoint 1.217.2.7 (colored) next main 1.217.2.8 (colored)

Pull up following revision(s) (requested by blymn in ticket #1471):
	sys/kern/kern_verifiedexec.c: patch
	sys/kern/vfs_syscalls.c: patch
Prevent users to rename a file to a veriexec protected file and to run
unfingerprinted files at strict level two or above.

Revision 1.306.2.8 / (download) - annotate - [select for diffs], Sun Jun 17 21:31:34 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.7: +12 -8 lines
Diff to previous 1.306.2.7 (colored) to branchpoint 1.306 (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.319 / (download) - annotate - [select for diffs], Sat Jun 16 20:48:04 2007 UTC (15 years, 7 months ago) by dsl
Branch: MAIN
CVS Tags: mjf-ufs-trans-base
Changes since 1.318: +6 -78 lines
Diff to previous 1.318 (colored)

Move the point at which sys_readv and sys_preadv (and writev) get merged
so that the same common code can be used with a kernel-resident 'iov'
array from the 32-bit compat code (which currently has its own copy
of these routines.

Revision 1.306.2.7 / (download) - annotate - [select for diffs], Sat Jun 9 23:58:07 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.6: +4 -3 lines
Diff to previous 1.306.2.6 (colored) to branchpoint 1.306 (colored)

Sync with head.

Revision 1.306.2.6 / (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.306.2.5: +161 -173 lines
Diff to previous 1.306.2.5 (colored) to branchpoint 1.306 (colored)

Sync with head.

Revision 1.318 / (download) - annotate - [select for diffs], Thu Jun 7 10:03:12 2007 UTC (15 years, 7 months ago) by hannken
Branch: MAIN
Changes since 1.317: +4 -3 lines
Diff to previous 1.317 (colored)

Dounmount(): rearrange mountlist_slock.  vfs_allocate_syncvnode() may sleep
getting a new vnode so it must not be called with this simple_lock taken.

Fixes PR #36395

Revision 1.317 / (download) - annotate - [select for diffs], Tue May 22 10:39:10 2007 UTC (15 years, 8 months ago) by tnn
Branch: MAIN
Changes since 1.316: +3 -3 lines
Diff to previous 1.316 (colored)

When renaming, copy the new name into the designated memory area.
Tested by martti@

Revision 1.316 / (download) - annotate - [select for diffs], Mon May 21 18:30:35 2007 UTC (15 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.315: +3 -3 lines
Diff to previous 1.315 (colored)

Fix logic inversion - probably PR kern/36284

Revision 1.315 / (download) - annotate - [select for diffs], Sat May 19 22:11:23 2007 UTC (15 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.314: +18 -34 lines
Diff to previous 1.314 (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.300.2.5 / (download) - annotate - [select for diffs], Thu May 17 13:41:48 2007 UTC (15 years, 8 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.300.2.4: +73 -64 lines
Diff to previous 1.300.2.4 (colored) to branchpoint 1.300 (colored) next main 1.301 (colored)

sync with head.

Revision 1.314 / (download) - annotate - [select for diffs], Thu May 17 00:46:30 2007 UTC (15 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.313: +15 -6 lines
Diff to previous 1.313 (colored)

- since mknod now can create regular files, make sure veriexec allows it.
Done in a way to minimize ifdefs. Per discussions with elad.

Revision 1.313 / (download) - annotate - [select for diffs], Tue May 15 19:47:45 2007 UTC (15 years, 8 months ago) by elad
Branch: MAIN
Changes since 1.312: +27 -26 lines
Diff to previous 1.312 (colored)

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

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

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

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

  - Fix table deletion logic.

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


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

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

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

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

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


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

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

        # veriexecctl dump > /etc/signatures

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

    Idea from Brett Lymn.

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

        # veriexecctl flush

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

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


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

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

  - Some of the messages Veriexec prints were improved.

  - Various documentation fixes.


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

Binary compatibility with existing veriexecctl binaries is maintained.

Revision 1.306.2.5 / (download) - annotate - [select for diffs], Sun May 13 17:36:37 2007 UTC (15 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.4: +4 -5 lines
Diff to previous 1.306.2.4 (colored) to branchpoint 1.306 (colored)

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

Revision 1.312 / (download) - annotate - [select for diffs], Sat May 12 17:28:20 2007 UTC (15 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.311: +35 -36 lines
Diff to previous 1.311 (colored)

Change the compat sys_[fl]utime code to not use the stackgap.

Revision 1.300.2.4 / (download) - annotate - [select for diffs], Mon May 7 10:55:51 2007 UTC (15 years, 8 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.300.2.3: +99 -104 lines
Diff to previous 1.300.2.3 (colored) to branchpoint 1.300 (colored)

sync with head.

Revision 1.311 / (download) - annotate - [select for diffs], Mon Apr 30 08:32:14 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.310: +65 -70 lines
Diff to previous 1.310 (colored)

Split the statvfs functions so that the 'work' is done to a kernel buffer
which can either be copied directly to userspace, or converted then copied.
Saves replicating a lot of code in the compat functions (esp. for
getvfsstat) at a cast of an extra function call in the non-emulated case -
which is unlikely to be measurable given the other costs of the actions
involved (even on vax).
Remove dofhstat() and dofhstatvfs() (and the last caller).
Remove some redundant stackgap_init() calls.

Revision 1.310 / (download) - annotate - [select for diffs], Sun Apr 22 08:30:01 2007 UTC (15 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.309: +37 -37 lines
Diff to previous 1.309 (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.300.2.3 / (download) - annotate - [select for diffs], Sun Apr 15 16:03:53 2007 UTC (15 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.300.2.2: +5 -178 lines
Diff to previous 1.300.2.2 (colored) to branchpoint 1.300 (colored)

sync with head.

Revision 1.306.2.4 / (download) - annotate - [select for diffs], Fri Apr 13 15:49:48 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.3: +6 -2 lines
Diff to previous 1.306.2.3 (colored) to branchpoint 1.306 (colored)

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

Revision 1.306.2.3 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:42 2007 UTC (15 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.2: +5 -178 lines
Diff to previous 1.306.2.2 (colored) to branchpoint 1.306 (colored)

Sync with head.

Revision 1.309 / (download) - annotate - [select for diffs], Mon Apr 9 21:11:03 2007 UTC (15 years, 9 months ago) by pooka
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.308: +3 -4 lines
Diff to previous 1.308 (colored)

If mount(MNT_UPDATE) is called for a non-VROOT directory, don't vput()
the "mountpoint" vnode twice due to an error branch.

thanks go to Gert Doering for reporting the problem and testing the fix
and to Juergen Hannken-Illjes for much of the analysis work leading to
the discovery of the problem cause

Revision 1.308 / (download) - annotate - [select for diffs], Sun Apr 8 11:20:43 2007 UTC (15 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.307: +2 -3 lines
Diff to previous 1.307 (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.307 / (download) - annotate - [select for diffs], Sun Apr 1 10:15:01 2007 UTC (15 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.306: +4 -175 lines
Diff to previous 1.306 (colored)

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

Revision 1.306.2.2 / (download) - annotate - [select for diffs], Wed Mar 21 20:18:48 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.306.2.1: +66 -23 lines
Diff to previous 1.306.2.1 (colored) to branchpoint 1.306 (colored)

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

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

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

Revision 1.300.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:46 2007 UTC (15 years, 10 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.300.2.1: +93 -64 lines
Diff to previous 1.300.2.1 (colored) to branchpoint 1.300 (colored)

Sync with HEAD.

Revision 1.306 / (download) - annotate - [select for diffs], Sat Mar 10 16:50:01 2007 UTC (15 years, 10 months ago) by dsl
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.305: +85 -57 lines
Diff to previous 1.305 (colored)

Split the work for sys_stat, sys_lstat, sys_fstat and sys_fhstat out into
separate functions that don't do the copyout.
This allows all the compat_xxx versions to convert the 'struct stat' to
the correct format without using the 'stackgap'.
The stackgap isn't at all LWP friendly, and needs to be removed from
any compat functions that might involve threads (inc. clone()).
The code is still binary compatible with existing LKMs.

Revision 1.305 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:27 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.304: +4 -4 lines
Diff to previous 1.304 (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.217.2.9.2.1 / (download) - annotate - [select for diffs], Sat Mar 3 22:56:35 2007 UTC (15 years, 11 months ago) by bouyer
Branch: netbsd-3-1
Changes since 1.217.2.9: +9 -6 lines
Diff to previous 1.217.2.9 (colored)

Pull up following revision(s) (requested by wrstuden in ticket #1616):
	sys/kern/vfs_syscalls.c: revision 1.293 via patch
Fix issue noted by Ilja van Sprundel and disclosed at 23C3.
Make sure we always FILE_UNUSE the file. To make it easier, exit
via a new "out:" exit path that does so, setting error beforehand.
Fix suggested by Elad, hand-typed by me.

Revision 1.217.2.7.2.1 / (download) - annotate - [select for diffs], Sat Mar 3 22:55:53 2007 UTC (15 years, 11 months ago) by bouyer
Branch: netbsd-3-0
Changes since 1.217.2.7: +9 -6 lines
Diff to previous 1.217.2.7 (colored)

Pull up following revision(s) (requested by wrstuden in ticket #1616):
	sys/kern/vfs_syscalls.c: revision 1.293 via patch
Fix issue noted by Ilja van Sprundel and disclosed at 23C3.
Make sure we always FILE_UNUSE the file. To make it easier, exit
via a new "out:" exit path that does so, setting error beforehand.
Fix suggested by Elad, hand-typed by me.

Revision 1.217.2.11 / (download) - annotate - [select for diffs], Sat Mar 3 22:55:06 2007 UTC (15 years, 11 months ago) by bouyer
Branch: netbsd-3
Changes since 1.217.2.10: +9 -6 lines
Diff to previous 1.217.2.10 (colored) to branchpoint 1.217 (colored)

Pull up following revision(s) (requested by wrstuden in ticket #1616):
	sys/kern/vfs_syscalls.c: revision 1.293 via patch
Fix issue noted by Ilja van Sprundel and disclosed at 23C3.
Make sure we always FILE_UNUSE the file. To make it easier, exit
via a new "out:" exit path that does so, setting error beforehand.
Fix suggested by Elad, hand-typed by me.

Revision 1.304 / (download) - annotate - [select for diffs], Thu Mar 1 10:02:31 2007 UTC (15 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.303: +3 -3 lines
Diff to previous 1.303 (colored)

simplify previous a bit.  no functional change.

Revision 1.279.2.5 / (download) - annotate - [select for diffs], Wed Feb 28 22:47:44 2007 UTC (15 years, 11 months ago) by pavel
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, matt-nb4-arm-base, matt-nb4-arm
Branch point for: netbsd-4-0
Changes since 1.279.2.4: +7 -6 lines
Diff to previous 1.279.2.4 (colored) to branchpoint 1.279 (colored)

Pull up following revision(s) (requested by pooka in ticket #480):
	sys/kern/vfs_syscalls.c: revision 1.303
avoid lock leak in error branch of sys_fchdir()
thanks to Tom Spindler and Greg Oster in helping find the cure

Revision 1.303 / (download) - annotate - [select for diffs], Wed Feb 28 20:39:06 2007 UTC (15 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.302: +7 -6 lines
Diff to previous 1.302 (colored)

avoid lock leak in error branch of sys_fchdir()

thanks to Tom Spindler and Greg Oster in helping find the cure

Revision 1.300.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:35 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.300: +24 -8 lines
Diff to previous 1.300 (colored)

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

Revision 1.223.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:22 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.223.2.2: +78 -100 lines
Diff to previous 1.223.2.2 (colored)

sync with head.

Revision 1.302 / (download) - annotate - [select for diffs], Sun Feb 18 20:36:36 2007 UTC (15 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.301: +3 -3 lines
Diff to previous 1.301 (colored)

if doing VOP_CREATE via sys_mknod, set va_rdev to VNOVAL instead of 0

Revision 1.301 / (download) - annotate - [select for diffs], Sun Feb 18 19:57:29 2007 UTC (15 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.300: +24 -8 lines
Diff to previous 1.300 (colored)

Support creating regular files with mknod(2) to match Linux/Solaris
behaviour.  This happens if mode contains S_IFREG.  mknod(2) is
still restricted to the superuser.

no objections from tech-kern

Revision 1.279.2.4 / (download) - annotate - [select for diffs], Sat Feb 17 23:27:47 2007 UTC (15 years, 11 months ago) by tron
Branch: netbsd-4
Changes since 1.279.2.3: +9 -14 lines
Diff to previous 1.279.2.3 (colored) to branchpoint 1.279 (colored)

Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.

Revision 1.279.2.3 / (download) - annotate - [select for diffs], Sun Feb 11 13:26:18 2007 UTC (15 years, 11 months ago) by tron
Branch: netbsd-4
Changes since 1.279.2.2: +2 -2 lines
Diff to previous 1.279.2.2 (colored) to branchpoint 1.279 (colored)

Pull up following revision(s) (requested by elad in ticket #412):
	sys/kern/vfs_syscalls.c: revision 1.299
Initialize pathname_t objects to NULL.

Revision 1.300 / (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
Branch point for: yamt-idlelwp
Changes since 1.299: +12 -13 lines
Diff to previous 1.299 (colored)

Merge newlock2 to head.

Revision 1.267.2.6 / (download) - annotate - [select for diffs], Fri Feb 9 21:03:53 2007 UTC (15 years, 11 months ago) by ad
Branch: newlock2
Changes since 1.267.2.5: +7 -7 lines
Diff to previous 1.267.2.5 (colored) to branchpoint 1.267 (colored) next main 1.268 (colored)

Sync with HEAD.

Revision 1.205.6.1 / (download) - annotate - [select for diffs], Tue Feb 6 21:17:16 2007 UTC (15 years, 11 months ago) by bouyer
Branch: netbsd-2-1
Changes since 1.205: +9 -6 lines
Diff to previous 1.205 (colored) next main 1.206 (colored)

Pull up following revision(s) (requested by adrianp in ticket #11015):
	sys/kern/vfs_syscalls.c: revision 1.293 via patch
Fix issue noted by Ilja van Sprundel and disclosed at 23C3.

Make sure we always FILE_UNUSE the file. To make it easier, exit
via a new "out:" exit path that does so, setting error beforehand.

Fix suggested by Elad, hand-typed by me.

Revision 1.205.2.1 / (download) - annotate - [select for diffs], Tue Feb 6 21:16:37 2007 UTC (15 years, 11 months ago) by bouyer
Branch: netbsd-2-0
Changes since 1.205: +9 -6 lines
Diff to previous 1.205 (colored) next main 1.206 (colored)

Pull up following revision(s) (requested by adrianp in ticket #11015):
	sys/kern/vfs_syscalls.c: revision 1.293 via patch
Fix issue noted by Ilja van Sprundel and disclosed at 23C3.

Make sure we always FILE_UNUSE the file. To make it easier, exit
via a new "out:" exit path that does so, setting error beforehand.

Fix suggested by Elad, hand-typed by me.

Revision 1.205.4.1 / (download) - annotate - [select for diffs], Tue Feb 6 21:15:55 2007 UTC (15 years, 11 months ago) by bouyer
Branch: netbsd-2
Changes since 1.205: +9 -6 lines
Diff to previous 1.205 (colored) next main 1.206 (colored)

Pull up following revision(s) (requested by adrianp in ticket #11015):
	sys/kern/vfs_syscalls.c: revision 1.293 via patch
Fix issue noted by Ilja van Sprundel and disclosed at 23C3.

Make sure we always FILE_UNUSE the file. To make it easier, exit
via a new "out:" exit path that does so, setting error beforehand.

Fix suggested by Elad, hand-typed by me.

Revision 1.299 / (download) - annotate - [select for diffs], Sun Feb 4 20:33:02 2007 UTC (15 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.298: +4 -4 lines
Diff to previous 1.298 (colored)

Initialize pathname_t objects to NULL.

Revision 1.298 / (download) - annotate - [select for diffs], Sun Feb 4 15:03:20 2007 UTC (15 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.297: +5 -5 lines
Diff to previous 1.297 (colored)

more fixes for the new vnode locking scheme:
 - don't use SAVESTART in calls to relookup() from unionfs,
   just vref() the desired vnode when we need to.
 - fix locking and refcounting in the unionfs EEXIST error cases.
 - release any vnode locks before calling VFS_ROOT(), vfs_busy() is enough.
   this allows us to simplify union_root() and fix PR 3006.
 - union_lock() doesn't handle shared lock requests correctly,
   so convert them to exclusive instead.  fixes PR 34775.
 - in relookup(), avoid reusing "dp" for different purposes,
   the error handling wasn't right.  (actually just get rid of dp.)
   also, change relookup() to ignore LOCKLEAF and always return the
   vnode locked since the callers already expect this.

Revision 1.267.2.5 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:40 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.267.2.4: +6 -5 lines
Diff to previous 1.267.2.4 (colored) to branchpoint 1.267 (colored)

Sync with head.

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

Remove support for SA. Ok core@.

Revision 1.279.2.2 / (download) - annotate - [select for diffs], Sun Jan 21 16:32:35 2007 UTC (16 years ago) by bouyer
Branch: netbsd-4
Changes since 1.279.2.1: +7 -5 lines
Diff to previous 1.279.2.1 (colored) to branchpoint 1.279 (colored)

Pull up following revision(s) (requested by wrstuden in ticket #374):
	sys/kern/vfs_syscalls.c: revision 1.293
Fix issue noted by Ilja van Sprundel and disclosed at 23C3.
Make sure we always FILE_UNUSE the file. To make it easier, exit
via a new "out:" exit path that does so, setting error beforehand.
Fix suggested by Elad, hand-typed by me.

Revision 1.297 / (download) - annotate - [select for diffs], Fri Jan 19 14:49:10 2007 UTC (16 years ago) by hannken
Branch: MAIN
Changes since 1.296: +5 -5 lines
Diff to previous 1.296 (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.296 / (download) - annotate - [select for diffs], Mon Jan 15 19:13:30 2007 UTC (16 years ago) by pooka
Branch: MAIN
Changes since 1.295: +3 -2 lines
Diff to previous 1.295 (colored)

TAILQ_INIT a mountpoint's vnode queue and always add vnodes to the
tail instead of an explicit check to add to the head for an empty
queue.  Apparently TAILQ_INSERT_HEAD happens to work for a
non-initialized head and does implicit initialization so that
TAILQ_INSERT_TAIL works after that.

Revision 1.267.2.3 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:07 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.267.2.2: +304 -262 lines
Diff to previous 1.267.2.2 (colored) to branchpoint 1.267 (colored)

Sync with head.

Revision 1.295 / (download) - annotate - [select for diffs], Fri Jan 5 13:34:17 2007 UTC (16 years ago) by elad
Branch: MAIN
Changes since 1.294: +5 -9 lines
Diff to previous 1.294 (colored)

Use kauth(9).

Revision 1.294 / (download) - annotate - [select for diffs], Thu Jan 4 17:38:26 2007 UTC (16 years ago) by elad
Branch: MAIN
Changes since 1.293: +5 -6 lines
Diff to previous 1.293 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.293 / (download) - annotate - [select for diffs], Wed Jan 3 23:20:58 2007 UTC (16 years, 1 month ago) by wrstuden
Branch: MAIN
Changes since 1.292: +9 -7 lines
Diff to previous 1.292 (colored)

Fix issue noted by Ilja van Sprundel and disclosed at 23C3.

Make sure we always FILE_UNUSE the file. To make it easier, exit
via a new "out:" exit path that does so, setting error beforehand.

Fix suggested by Elad, hand-typed by me.

Revision 1.279.2.1 / (download) - annotate - [select for diffs], Wed Jan 3 13:59:32 2007 UTC (16 years, 1 month ago) by tron
Branch: netbsd-4
Changes since 1.279: +28 -6 lines
Diff to previous 1.279 (colored)

Pull up following revision(s) (requested by elad in ticket #304):
	sys/kern/vfs_syscalls.c: revision 1.282
	sys/kern/vfs_lookup.c: revision 1.76
	sys/sys/namei.h: revision 1.47
PR/35278: YAMAMOTO Takashi: veriexec sometimes feeds user va to log(9)
Introduce the (intentionally undocumented) pathname_get(), pathname_path(),
and pathname_put(), to deal with allocating and copying of pathnames from
either kernel- or user-space.

Revision 1.292 / (download) - annotate - [select for diffs], Tue Jan 2 10:47:29 2007 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.291: +16 -53 lines
Diff to previous 1.291 (colored)

Make mount(2) and unmount(2) use kauth(9) for security policy.

Okay yamt@.

Revision 1.291 / (download) - annotate - [select for diffs], Mon Jan 1 22:00:16 2007 UTC (16 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.290: +4 -3 lines
Diff to previous 1.290 (colored)

in rename_files(), match pre-1.280 locking behaviour by unlocking
fromnd's dvp only in case the dvp != vp

Revision 1.290 / (download) - annotate - [select for diffs], Mon Jan 1 20:45:51 2007 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.289: +5 -2 lines
Diff to previous 1.289 (colored)

Add back MNT_NOEXEC propagation on new mounts by non-root users.
Mistakenly removed in revision 1.286.

Revision 1.289 / (download) - annotate - [select for diffs], Sun Dec 31 10:05:52 2006 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.288: +9 -11 lines
Diff to previous 1.288 (colored)

Enforce exclusive MNT_GETARGS in mount_getargs().

Revision 1.223.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.223.2.1: +688 -383 lines
Diff to previous 1.223.2.1 (colored)

sync with head.

Revision 1.288 / (download) - annotate - [select for diffs], Thu Dec 28 14:33:41 2006 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.287: +9 -2 lines
Diff to previous 1.287 (colored)

mount_domount: revive code to enforce MNT_NOSUID and MNT_NODEV for usermount,
which was removed mistakenly by rev.1.286.  pointed by elad.

Revision 1.287 / (download) - annotate - [select for diffs], Wed Dec 27 08:55:35 2006 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.286: +3 -3 lines
Diff to previous 1.286 (colored)

mount_domount: don't forget to handle MNT_RDONLY.
PR/35327 from Christian Biere.

Revision 1.286 / (download) - annotate - [select for diffs], Tue Dec 26 12:39:01 2006 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.285: +22 -48 lines
Diff to previous 1.285 (colored)

- shorten the period to modify mnt_flag temporarily.
- desupport MNT_EXPORTED without MNT_UPDATE explicitly.
- fix a comment.
- unwrap short lines.

Revision 1.285 / (download) - annotate - [select for diffs], Mon Dec 25 22:03:42 2006 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.284: +11 -10 lines
Diff to previous 1.284 (colored)

Don't reference userspace pointers.

Revision 1.284 / (download) - annotate - [select for diffs], Mon Dec 25 08:11:52 2006 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.283: +19 -2 lines
Diff to previous 1.283 (colored)

Properly handle flags in mount_domount().

Revision 1.283 / (download) - annotate - [select for diffs], Sun Dec 24 12:43:17 2006 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.282: +283 -198 lines
Diff to previous 1.282 (colored)

Slash sys_mount() and add three helper functions: mount_update(),
mount_getargs(), and mount_domount() to handle three main things it can
do.

This makes the code more readable and removes the horrible goto mess
that was lurking there since forever... it also makes it easier to
implement a security policy for that code.

Revision 1.282 / (download) - annotate - [select for diffs], Sun Dec 24 08:54:55 2006 UTC (16 years, 1 month ago) by elad
Branch: MAIN
Changes since 1.281: +28 -6 lines
Diff to previous 1.281 (colored)

PR/35278: YAMAMOTO Takashi: veriexec sometimes feeds user va to log(9)

Introduce the (intentionally undocumented) pathname_get(), pathname_path(),
and pathname_put(), to deal with allocating and copying of pathnames from
either kernel- or user-space.

Revision 1.270.2.3 / (download) - annotate - [select for diffs], Mon Dec 18 11:42:15 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.270.2.2: +2 -6 lines
Diff to previous 1.270.2.2 (colored) to branchpoint 1.270 (colored) next main 1.271 (colored)

sync with head.

Revision 1.281 / (download) - annotate - [select for diffs], Thu Dec 14 09:24:54 2006 UTC (16 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Changes since 1.280: +2 -6 lines
Diff to previous 1.280 (colored)

- just associate fileassoc "table" to struct mount.
  because the latter is always available during the lifetime of the former,
  there is little point to use another global list to keep track of them.
  it also allows to remove an #ifdef FILEASSOC.

- avoid some operations (memory allocation and VOP) in fileassoc_file_lookup,
  when fileassoc table is not used.

ok'ed by elad.

Revision 1.270.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.270.2.1: +59 -81 lines
Diff to previous 1.270.2.1 (colored) to branchpoint 1.270 (colored)

sync with head.

Revision 1.280 / (download) - annotate - [select for diffs], Sat Dec 9 16:11:51 2006 UTC (16 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3
Changes since 1.279: +5 -11 lines
Diff to previous 1.279 (colored)

a smorgasbord of improvements to vnode locking and path lookup:
 - LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
   these now always return the parent vnode locked.  namei() works as before.
   lookup() and various other paths no longer acquire vnode locks in the
   wrong order via vrele().  fixes PR 32535.
   as a nice side effect, path lookup is also up to 25% faster.
 - the above allows us to get rid of PDIRUNLOCK.
 - also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
 - remove an assumption in layer_node_find() that all file systems implement
   a recursive VOP_LOCK() (unionfs doesn't).
 - require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
   fill in eopnotsupp() for file systems that don't support being exported
   and remove the checks for NULL.  (layerfs calls these without checking.)
 - in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
   adjust which vnode is locked.  fixes PR 33374.
 - apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().

Revision 1.279 / (download) - annotate - [select for diffs], Thu Nov 30 01:09:48 2006 UTC (16 years, 2 months ago) by elad
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.278: +5 -25 lines
Diff to previous 1.278 (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.278 / (download) - annotate - [select for diffs], Tue Nov 21 23:52:41 2006 UTC (16 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.277: +9 -7 lines
Diff to previous 1.277 (colored)

printf() -> log() for Veriexec messages.

Revision 1.267.2.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.267.2.1: +18 -18 lines
Diff to previous 1.267.2.1 (colored) to branchpoint 1.267 (colored)

Sync with head.

Revision 1.277 / (download) - annotate - [select for diffs], Fri Nov 17 17:05:18 2006 UTC (16 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.276: +4 -2 lines
Diff to previous 1.276 (colored)

Add specificdata support to mount points.

Welcome to NetBSD 4.99.4

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

Revision 1.217.2.10 / (download) - annotate - [select for diffs], Thu Nov 2 12:51:21 2006 UTC (16 years, 3 months ago) by tron
Branch: netbsd-3
Changes since 1.217.2.9: +3 -3 lines
Diff to previous 1.217.2.9 (colored) to branchpoint 1.217 (colored)

Pull up following revision(s) (requested by elad in ticket #1471):
	sys/kern/vfs_syscalls.c: revision 1.254 via patch
	sys/kern/kern_verifiedexec.c: revision 1.58 via patch
Add destination file vnode to rename checking.

Revision 1.276 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:59 2006 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.275: +49 -49 lines
Diff to previous 1.275 (colored)

remove some __unused from function parameters.

Revision 1.275 / (download) - annotate - [select for diffs], Tue Oct 31 08:12:46 2006 UTC (16 years, 3 months ago) by mjf
Branch: MAIN
Changes since 1.274: +2 -13 lines
Diff to previous 1.274 (colored)

Revert the changes I introduced trying to solve tmpfs' NFS export problem.
Requested by yamt@

Revision 1.274 / (download) - annotate - [select for diffs], Tue Oct 24 21:53:10 2006 UTC (16 years, 3 months ago) by mjf
Branch: MAIN
Changes since 1.273: +15 -4 lines
Diff to previous 1.273 (colored)

Add support to allow a file system to not permit being exported over NFS.

Approved by elad@ and wrstuden@

Revision 1.270.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.270: +51 -51 lines
Diff to previous 1.270 (colored)

sync with head

Revision 1.273 / (download) - annotate - [select for diffs], Fri Oct 20 18:58:12 2006 UTC (16 years, 3 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.272: +3 -3 lines
Diff to previous 1.272 (colored)

Replace the LIST structure mp->mnt_vnodelist to a TAILQ structure since all
vnodes were synced and processed backwards. This meant that the last
accessed node was processed first and the earlierst last.

An extra benefit is the removal of the ugly hack from the Berkly days on
LFS.

In the proces, i've also replaced the various variations hand written loops
by the TAILQ_FOREACH() macro's.

Revision 1.272 / (download) - annotate - [select for diffs], Tue Oct 17 15:06:18 2006 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.271: +3 -3 lines
Diff to previous 1.271 (colored)

according to the manual, the last argument of quotactl(2) is a void *,
not a caddr_t.

Revision 1.271 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:19 2006 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.270: +49 -49 lines
Diff to previous 1.270 (colored)

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

Revision 1.238.2.5 / (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.238.2.4: +16 -16 lines
Diff to previous 1.238.2.4 (colored) to branchpoint 1.238 (colored) next main 1.239 (colored)

sync with head.

Revision 1.270 / (download) - annotate - [select for diffs], Wed Sep 13 10:07:42 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.269: +5 -5 lines
Diff to previous 1.269 (colored)

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

Revision 1.269 / (download) - annotate - [select for diffs], Tue Sep 12 07:51:29 2006 UTC (16 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.268: +4 -4 lines
Diff to previous 1.268 (colored)

Oops, add forgotten 'if'.

From Geoff Wing, thanks!

Revision 1.267.2.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.267: +12 -12 lines
Diff to previous 1.267 (colored)

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

Revision 1.235.4.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.235: +465 -194 lines
Diff to previous 1.235 (colored) next main 1.236 (colored)

sync with head

Revision 1.268 / (download) - annotate - [select for diffs], Fri Sep 8 20:58:57 2006 UTC (16 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.267: +16 -16 lines
Diff to previous 1.267 (colored)

First take at security model abstraction.

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

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

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

- Update all relevant documentation.

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

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

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

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

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

	http://kauth.linbsd.org/kauthwiki

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

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

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

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

Relevant mailing list threads:

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

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

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

Happy birthday Randi! :)

Revision 1.266.2.1 / (download) - annotate - [select for diffs], Wed Aug 16 12:16:57 2006 UTC (16 years, 5 months ago) by tron
Branch: abandoned-netbsd-4
Changes since 1.266: +13 -0 lines
Diff to previous 1.266 (colored) next main 1.267 (colored)

Pull up following revision(s) (requested by yamt in ticket #24):
	sys/kern/vfs_syscalls.c: revision 1.267
vfs_copyinfh_alloc: kludge for nfsv2 file handles.

Revision 1.238.2.4 / (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.238.2.3: +409 -184 lines
Diff to previous 1.238.2.3 (colored) to branchpoint 1.238 (colored)

sync with head

Revision 1.267 / (download) - annotate - [select for diffs], Tue Aug 8 13:08:08 2006 UTC (16 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base
Branch point for: newlock2
Changes since 1.266: +13 -0 lines
Diff to previous 1.266 (colored)

vfs_copyinfh_alloc: kludge for nfsv2 file handles.

Revision 1.266 / (download) - annotate - [select for diffs], Fri Aug 4 17:07:32 2006 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.265: +1 -1 lines
Diff to previous 1.265 (colored)

sys___fhstatvfs140: update a comment.

Revision 1.265 / (download) - annotate - [select for diffs], Fri Aug 4 16:29:51 2006 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.264: +62 -49 lines
Diff to previous 1.264 (colored)

some filehandle syscall related changes.

- remove the support of variable-sized filehandle from compat version of
  syscalls.  (strictly speaking, it breaks abi.  i don't think it's a problem
  because this feature is short-lived and there are no affected in-tree
  filesystems.)
- unify vfs_copyinfh_alloc and vfs_copyinfh_alloc_size.
- vfs_copyinfh_alloc_size: check fhsize strictly.
- reduce code duplication between compat and current syscalls.

Revision 1.264 / (download) - annotate - [select for diffs], Fri Aug 4 13:31:51 2006 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.263: +4 -4 lines
Diff to previous 1.263 (colored)

vfs_copyinfh_alloc_size: fix indent.

Revision 1.263 / (download) - annotate - [select for diffs], Mon Jul 31 16:34:44 2006 UTC (16 years, 6 months ago) by martin
Branch: MAIN
Changes since 1.262: +43 -19 lines
Diff to previous 1.262 (colored)

Make filehandles opaque to userland

Revision 1.262 / (download) - annotate - [select for diffs], Wed Jul 26 16:34:07 2006 UTC (16 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.261: +5 -5 lines
Diff to previous 1.261 (colored)

sync kpi with docs, remove old comments

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

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

Revision 1.260 / (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.259: +3 -3 lines
Diff to previous 1.259 (colored)

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

Revision 1.259 / (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.258: +4 -4 lines
Diff to previous 1.258 (colored)

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

Revision 1.258 / (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.257: +4 -4 lines
Diff to previous 1.257 (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.257 / (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.256: +87 -105 lines
Diff to previous 1.256 (colored)

Use the LWP cached credentials where sane.

Revision 1.256 / (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.255: +11 -11 lines
Diff to previous 1.255 (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.255 / (download) - annotate - [select for diffs], Thu Jul 20 16:18:14 2006 UTC (16 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.254: +3 -3 lines
Diff to previous 1.254 (colored)

PR/34043: mrt at notwork dot org: 3.99.22 kernel crashes at *_vptofh() called
from vfs_composefh_alloc() due to uninitialized "fidsize".

Revision 1.254 / (download) - annotate - [select for diffs], Wed Jul 19 12:45:19 2006 UTC (16 years, 6 months ago) by blymn
Branch: MAIN
Changes since 1.253: +5 -4 lines
Diff to previous 1.253 (colored)

Add destination file vnode to rename checking.

Revision 1.253 / (download) - annotate - [select for diffs], Mon Jul 17 19:05:36 2006 UTC (16 years, 6 months ago) by elad
Branch: MAIN
Changes since 1.252: +5 -6 lines
Diff to previous 1.252 (colored)

move the fileassoc_delete_file() call above the VOP_REMOVE() one, yamt@
says vp might not be valid after it.

Revision 1.252 / (download) - annotate - [select for diffs], Sat Jul 15 16:32:29 2006 UTC (16 years, 6 months ago) by martin
Branch: MAIN
Changes since 1.251: +3 -3 lines
Diff to previous 1.251 (colored)

FHANDLE_SIZE_MIN is an allowed value for the requested size (it happens
to be the old static size on 32bit archs, so the compat_30 code uses it)

Revision 1.251 / (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.250: +39 -2 lines
Diff to previous 1.250 (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.250 / (download) - annotate - [select for diffs], Fri Jul 14 18:30:35 2006 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.249: +22 -11 lines
Diff to previous 1.249 (colored)

introduce filehandle size limits:

- FHANDLE_SIZE_MAX: refuse unreasonable size allocation, esp. when
  it's a user-specified value.

- FHANDLE_SIZE_MIN: pad small filehandles with zero for compatibility.
  XXX it might be better to push this into filesystem dependent code so that
  new filesystems can choose smaller handles.

Revision 1.249 / (download) - annotate - [select for diffs], Fri Jul 14 18:29:40 2006 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.248: +83 -24 lines
Diff to previous 1.248 (colored)

- sys___getfh30:
	- restructure code so that it doesn't try to allocate user-specified
	  unbound amount of memory.
	- don't ignore copyout failure in the case of E2BIG.
- rename vfs_copyinfh to vfs_copyinfh_alloc for consistency.

Revision 1.248 / (download) - annotate - [select for diffs], Fri Jul 14 15:59:29 2006 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.247: +107 -71 lines
Diff to previous 1.247 (colored)

- fix buffer overruns in fhopen and friends.
- share some code among them.

Revision 1.247 / (download) - annotate - [select for diffs], Fri Jul 14 14:28:58 2006 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.246: +3 -3 lines
Diff to previous 1.246 (colored)

sys___getfh30: fix a vnode lock botch in rev.1.244.

Revision 1.246 / (download) - annotate - [select for diffs], Fri Jul 14 14:00:46 2006 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.245: +6 -7 lines
Diff to previous 1.245 (colored)

sys___getfh30: remove unnecessary casts.

Revision 1.245 / (download) - annotate - [select for diffs], Thu Jul 13 21:51:50 2006 UTC (16 years, 6 months ago) by martin
Branch: MAIN
Changes since 1.244: +4 -4 lines
Diff to previous 1.244 (colored)

fix typo

Revision 1.242.4.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:51 2006 UTC (16 years, 6 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.242: +93 -26 lines
Diff to previous 1.242 (colored) next main 1.243 (colored)

Merge from HEAD.

Revision 1.244 / (download) - annotate - [select for diffs], Thu Jul 13 12:00:25 2006 UTC (16 years, 6 months ago) by martin
Branch: MAIN
Changes since 1.243: +77 -26 lines
Diff to previous 1.243 (colored)

Fix alignement problems for fhandle_t, exposed by gcc4.1.

While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).

Revision 1.238.2.3 / (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.238.2.2: +24 -8 lines
Diff to previous 1.238.2.2 (colored) to branchpoint 1.238 (colored)

sync with head.

Revision 1.223.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.223: +347 -878 lines
Diff to previous 1.223 (colored)

sync with head.

Revision 1.242.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.242: +24 -8 lines
Diff to previous 1.242 (colored) next main 1.243 (colored)

Sync with head.

Revision 1.243 / (download) - annotate - [select for diffs], Sat Jun 17 07:06:51 2006 UTC (16 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, chap-midi-nbase, chap-midi-base
Changes since 1.242: +22 -6 lines
Diff to previous 1.242 (colored)

- introduce vfs_composefh() and use it where appropriate.
- fix lock/unlock mismatch in sys_getfh.

Revision 1.235.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:10 2006 UTC (16 years, 8 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.235.6.1: +119 -89 lines
Diff to previous 1.235.6.1 (colored) next main 1.236 (colored)

Sync with head.

Revision 1.238.6.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.238.6.1: +119 -89 lines
Diff to previous 1.238.6.1 (colored) to branchpoint 1.238 (colored) next main 1.239 (colored)

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

Revision 1.238.2.2 / (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.238.2.1: +119 -89 lines
Diff to previous 1.238.2.1 (colored) to branchpoint 1.238 (colored)

sync with head.

Revision 1.242 / (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, simonb-timecounters-base, gdamore-uart-base
Branch point for: gdamore-uart, chap-midi
Changes since 1.241: +85 -68 lines
Diff to previous 1.241 (colored)

integrate kauth.

Revision 1.238.4.5 / (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.238.4.4: +36 -23 lines
Diff to previous 1.238.4.4 (colored) to branchpoint 1.238 (colored) next main 1.239 (colored)

sync with head

Revision 1.241 / (download) - annotate - [select for diffs], Wed May 10 11:02:29 2006 UTC (16 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.240: +34 -21 lines
Diff to previous 1.240 (colored)

don't allocate struct statvfs on stack as it's too large.

Revision 1.238.4.4 / (download) - annotate - [select for diffs], Sat May 6 23:31:31 2006 UTC (16 years, 8 months ago) by christos
Branch: elad-kernelauth
Changes since 1.238.4.3: +3 -2 lines
Diff to previous 1.238.4.3 (colored) to branchpoint 1.238 (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.240 / (download) - annotate - [select for diffs], Thu May 4 17:48:56 2006 UTC (16 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.239: +4 -4 lines
Diff to previous 1.239 (colored)

fhstat needs to be versioned too (for ino_t). Pointed out by Izumi Tsutsui

Revision 1.235.6.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.235: +10 -10 lines
Diff to previous 1.235 (colored)

Sync with head.

Revision 1.238.4.3 / (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.238.4.2: +3 -2 lines
Diff to previous 1.238.4.2 (colored) to branchpoint 1.238 (colored)

sync with head.

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

sync with head.

Revision 1.238.6.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.238: +3 -2 lines
Diff to previous 1.238 (colored)

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

Revision 1.239 / (download) - annotate - [select for diffs], Mon Mar 27 20:20:45 2006 UTC (16 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Changes since 1.238: +3 -2 lines
Diff to previous 1.238 (colored)

KASSERT that the returned file id length from VPTOFH is <= the
maximum allowed value (_VFS_MAXFIDSZ).

Revision 1.238.4.2 / (download) - annotate - [select for diffs], Fri Mar 10 13:53:24 2006 UTC (16 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.238.4.1: +16 -16 lines
Diff to previous 1.238.4.1 (colored) to branchpoint 1.238 (colored)

generic_authorize() -> kauth_authorize_generic().

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

Adapt to kernel authorization KPI.

Revision 1.238 / (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-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.237: +4 -4 lines
Diff to previous 1.237 (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.235.2.2 / (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.235.2.1: +7 -8 lines
Diff to previous 1.235.2.1 (colored) next main 1.236 (colored)

sync with head.

Revision 1.237 / (download) - annotate - [select for diffs], Sun Feb 12 01:32:06 2006 UTC (16 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Changes since 1.236: +4 -5 lines
Diff to previous 1.236 (colored)

convert "magiclinks" from a per-fs mount option to a system-wide sysctl.
as discussed on tech-kern quite some time ago.

Revision 1.236 / (download) - annotate - [select for diffs], Sat Feb 4 12:09:50 2006 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.235: +5 -5 lines
Diff to previous 1.235 (colored)

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

Revision 1.217.2.9 / (download) - annotate - [select for diffs], Fri Jan 20 20:48:41 2006 UTC (17 years ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1
Branch point for: netbsd-3-1
Changes since 1.217.2.8: +4 -5 lines
Diff to previous 1.217.2.8 (colored) to branchpoint 1.217 (colored)

Back out tickets 490, 559, and 560, which added "magic symlinks", at
the request of chs@ (thorpej@ concurs), as there is consensus that
this should be changed to a system-wide tunable, rather than a mount
option.

Revision 1.235.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.235: +4 -4 lines
Diff to previous 1.235 (colored)

uio_segflg/uio_lwp -> uio_vmspace.

Revision 1.217.2.8 / (download) - annotate - [select for diffs], Thu Dec 29 00:57:09 2005 UTC (17 years, 1 month ago) by riz
Branch: netbsd-3
Changes since 1.217.2.7: +5 -4 lines
Diff to previous 1.217.2.7 (colored) to branchpoint 1.217 (colored)

Pull up following revision(s) (requested by thorpej in ticket #490):
	lib/libc/sys/mount.2: revision 1.33
	sys/sys/systm.h: revision 1.179
	sys/sys/fstypes.h: revision 1.4
	include/mntopts.h: revision 1.6
	sys/conf/newvers.sh: revision 1.41
	sys/kern/vfs_syscalls.c: revision 1.223
	sys/conf/files: revision 1.720
	sys/kern/vfs_lookup.c: revision 1.61
	share/man/man7/symlink.7: revision 1.7
	sbin/mount/mount.8: revision 1.47
	sys/kern/init_main.c: revision 1.248 via patch
	share/man/man4/options.4: revision 1.280 via patch
Implement expansion of special "magic" strings in symlinks into
system-specific values.  Submitted by Chris Demetriou in Nov 1995 (!)
in PR kern/1781, modified only slighly by me.
This is enabled on a per-mount basis with the MNT_MAGICLINKS mount
flag.  It can be enabled at mountroot() time by building the kernel
with the ROOTFS_MAGICLINKS option.
The following magic strings are supported by the implementation:
@machine    value of MACHINE for the system
@machine_arch    value of MACHINE_ARCH for the system
@hostname    the system host name, as set with sethostname()
@domainname    the system domain name, as set with setdomainname()
@kernel_ident    the kernel config file name
@osrelease    the releaes number of the OS
@ostype        the name of the OS (always "NetBSD" for NetBSD)
Example usage:
mkdir /arch/i386/bin
mkdir /arch/sparc/bin
ln -s /arch/@machine_arch/bin /bin

Revision 1.235 / (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, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.234: +4 -4 lines
Diff to previous 1.234 (colored)

Catch up with ktrace-lwp merge.

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

Revision 1.234 / (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.233: +186 -197 lines
Diff to previous 1.233 (colored)

merge ktrace-lwp.

Revision 1.190.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.190.2.10: +175 -904 lines
Diff to previous 1.190.2.10 (colored) next main 1.191 (colored)

Sync with HEAD. Here we go again...

Revision 1.233 / (download) - annotate - [select for diffs], Sat Oct 1 06:13:42 2005 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.232: +8 -9 lines
Diff to previous 1.232 (colored)

change_utimes: use nanotime(9) rather than time(9).

Revision 1.232 / (download) - annotate - [select for diffs], Sun Sep 25 21:57:40 2005 UTC (17 years, 4 months ago) by jmmv
Branch: MAIN
Changes since 1.231: +26 -2 lines
Diff to previous 1.231 (colored)

Add some COMPAT_30 code to let old mountd binaries work after the NFS
exports rototill.

Revision 1.231 / (download) - annotate - [select for diffs], Fri Sep 23 12:10:33 2005 UTC (17 years, 4 months ago) by jmmv
Branch: MAIN
Changes since 1.230: +14 -4 lines
Diff to previous 1.230 (colored)

Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
  function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
  file sys/nfs/nfs_export.c.  The former was becoming large and its code
  is always compiled, regardless of the build options.  Using the latter,
  the code is only compiled in when NFSSERVER is enabled.  While doing this,
  also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
  path and a set of export entries.  At the moment it can only clear the
  exports list or append entries, one by one, but it is done in a way that
  allows setting the whole set of entries atomically in the future (see the
  comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
  that it becomes file system agnostic.  In fact, all this whole thing was
  done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
  exports initialization; done internally by the kernel when initializing
  the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
  subsystems can run arbitrary code upon receipt of specific VFS events.
  At the moment, this only provides support for unmount and is used to
  destroy NFS exports lists from the file systems being unmounted, though it
  has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.

Revision 1.217.2.7 / (download) - annotate - [select for diffs], Thu Sep 8 21:06:31 2005 UTC (17 years, 4 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, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE
Branch point for: netbsd-3-0
Changes since 1.217.2.6: +3 -2 lines
Diff to previous 1.217.2.6 (colored) to branchpoint 1.217 (colored)

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

Revision 1.217.2.6 / (download) - annotate - [select for diffs], Fri Sep 2 12:16:17 2005 UTC (17 years, 5 months ago) by tron
Branch: netbsd-3
Changes since 1.217.2.5: +9 -4 lines
Diff to previous 1.217.2.5 (colored) to branchpoint 1.217 (colored)

Apply patch (requested by elad in ticket #709):
Implements the rename policy. Implications per strict level:
0, 1: Log renames of monitored files.
2:    Prevent renames of monitored files.
3:    Prevent renames.

Revision 1.230 / (download) - annotate - [select for diffs], Tue Aug 30 09:37:41 2005 UTC (17 years, 5 months ago) by jmmv
Branch: MAIN
Changes since 1.229: +3 -2 lines
Diff to previous 1.229 (colored)

Make all creation operations (mkdir, create, mknod and symlink) consistent
by changing the symlink one to set vap's vatype to VLNK.  All the other three
already set vatype to the correct type.  Note that, however, in the mkdir
case (and now symlink too) this is not strictly necessary.

Revision 1.217.2.5 / (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.217.2.4: +2 -3 lines
Diff to previous 1.217.2.4 (colored) to branchpoint 1.217 (colored)

Backout ticket 685. It causes build failures.

Revision 1.217.2.4 / (download) - annotate - [select for diffs], Tue Aug 23 13:44:01 2005 UTC (17 years, 5 months ago) by tron
Branch: netbsd-3
Changes since 1.217.2.3: +1 -0 lines
Diff to previous 1.217.2.3 (colored) to branchpoint 1.217 (colored)

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

Revision 1.229 / (download) - annotate - [select for diffs], Fri Aug 19 12:30:02 2005 UTC (17 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.228: +9 -4 lines
Diff to previous 1.228 (colored)

Introduce veriexec_renamechk().

Rename policy:
  - Strict levels 0, 1: Log renames of monitored files.
  - Strict level 2: Prevent renames of monitored files.
  - Strict level 3: Prevent renames.

Revision 1.228 / (download) - annotate - [select for diffs], Fri Aug 19 02:04:03 2005 UTC (17 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.227: +8 -8 lines
Diff to previous 1.227 (colored)

64 bit inode changes.

Revision 1.227 / (download) - annotate - [select for diffs], Fri Aug 5 13:22:23 2005 UTC (17 years, 5 months ago) by jmmv
Branch: MAIN
Changes since 1.226: +4 -4 lines
Diff to previous 1.226 (colored)

Fix some typos in comments.

Revision 1.226 / (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.225: +3 -2 lines
Diff to previous 1.225 (colored)

defopt verified_exec.

Revision 1.225 / (download) - annotate - [select for diffs], Sun Jul 10 14:26:02 2005 UTC (17 years, 6 months ago) by cube
Branch: MAIN
Changes since 1.224: +3 -3 lines
Diff to previous 1.224 (colored)

The comment listing the arguments of fsync_range(2) wrongly described
"length" as an int.  It is an off_t.

Revision 1.224 / (download) - annotate - [select for diffs], Sat Jul 9 01:05:24 2005 UTC (17 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.223: +2 -608 lines
Diff to previous 1.223 (colored)

Move VFS extended attribute support to its own file.

Revision 1.217.2.3 / (download) - annotate - [select for diffs], Sat Jul 2 15:51:26 2005 UTC (17 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.217.2.2: +1 -3 lines
Diff to previous 1.217.2.2 (colored) to branchpoint 1.217 (colored)

Pull up revision 1.222 (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.223 / (download) - annotate - [select for diffs], Thu Jun 23 00:30:28 2005 UTC (17 years, 7 months ago) by thorpej
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.222: +5 -4 lines
Diff to previous 1.222 (colored)

Implement expansion of special "magic" strings in symlinks into
system-specific values.  Submitted by Chris Demetriou in Nov 1995 (!)
in PR kern/1781, modified only slighly by me.

This is enabled on a per-mount basis with the MNT_MAGICLINKS mount
flag.  It can be enabled at mountroot() time by building the kernel
with the ROOTFS_MAGICLINKS option.

The following magic strings are supported by the implementation:

	@machine	value of MACHINE for the system
	@machine_arch	value of MACHINE_ARCH for the system
	@hostname	the system host name, as set with sethostname()
	@domainname	the system domain name, as set with setdomainname()
	@kernel_ident	the kernel config file name
	@osrelease	the releaes number of the OS
	@ostype		the name of the OS (always "NetBSD" for NetBSD)

Example usage:

	mkdir /arch/i386/bin
	mkdir /arch/sparc/bin
	ln -s /arch/@machine_arch/bin /bin

Revision 1.222 / (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.221: +3 -5 lines
Diff to previous 1.221 (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.217.2.2 / (download) - annotate - [select for diffs], Fri Jun 10 14:49:10 2005 UTC (17 years, 7 months ago) by tron
Branch: netbsd-3
Changes since 1.217.2.1: +19 -0 lines
Diff to previous 1.217.2.1 (colored) to branchpoint 1.217 (colored)

Pull up revision 1.219 (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.221 / (download) - annotate - [select for diffs], Sun Jun 5 23:47:48 2005 UTC (17 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.220: +74 -278 lines
Diff to previous 1.220 (colored)

Use ANSI function decls.

Revision 1.220 / (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.219: +3 -3 lines
Diff to previous 1.219 (colored)

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

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

sync with -current

Revision 1.219 / (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.218: +21 -2 lines
Diff to previous 1.218 (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.217.2.1 / (download) - annotate - [select for diffs], Wed Apr 13 21:31:09 2005 UTC (17 years, 9 months ago) by tron
Branch: netbsd-3
Changes since 1.217: +30 -19 lines
Diff to previous 1.217 (colored)

Pull up revision 1.218 (requested by yamt in ticket #142):
sys_mount:
- reject attempts of MNT_GETARGS + other MNT_xxx.
- don't modify mnt_flags needlessly for MNT_GETARGS.
  a stopgap fix for PR/29898.

Revision 1.218 / (download) - annotate - [select for diffs], Wed Apr 6 13:49:31 2005 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.217: +30 -19 lines
Diff to previous 1.217 (colored)

sys_mount:
- reject attempts of MNT_GETARGS + other MNT_xxx.
- don't modify mnt_flags needlessly for MNT_GETARGS.
  a stopgap fix for PR/29898.

Revision 1.215.2.2 / (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.215.2.1: +26 -26 lines
Diff to previous 1.215.2.1 (colored) to branchpoint 1.215 (colored) next main 1.216 (colored)

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

Revision 1.190.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.190.2.9: +26 -26 lines
Diff to previous 1.190.2.9 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.217 / (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.216: +26 -26 lines
Diff to previous 1.216 (colored)

nuke trailing whitespace

Revision 1.215.2.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:52 2005 UTC (17 years, 11 months ago) by yamt
Branch: yamt-km
Changes since 1.215: +6 -4 lines
Diff to previous 1.215 (colored)

sync with head.

Revision 1.190.2.9 / (download) - annotate - [select for diffs], Fri Feb 4 11:47:42 2005 UTC (17 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.190.2.8: +8 -4 lines
Diff to previous 1.190.2.8 (colored)

Sync with HEAD.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Jan 25 23:55:20 2005 UTC (18 years ago) by wrstuden
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.215: +6 -4 lines
Diff to previous 1.215 (colored)

Extend fsync_range(2) to support the FDISKSYNC flag, which requests
that the sync be propogated out through the disk drive caches.

Revision 1.215 / (download) - annotate - [select for diffs], Mon Jan 24 21:27:02 2005 UTC (18 years ago) by dbj
Branch: MAIN
CVS Tags: yamt-km-base
Branch point for: yamt-km
Changes since 1.214: +4 -2 lines
Diff to previous 1.214 (colored)

clear p->p_cwdi of exiting processes and
avoid dereferencing invalid p_cwdi in checkdirs
this fixes a race condition between exiting processes and mount
see discussion on tech-kern:
 http://mail-index.netbsd.org/tech-kern/2004/10/04/0006.html
 http://mail-index.netbsd.org/tech-kern/2004/10/08/0005.html

Revision 1.190.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.190.2.7: +596 -2 lines
Diff to previous 1.190.2.7 (colored)

Sync with HEAD.

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

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

From FreeBSD.

Revision 1.190.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.190.2.6: +3 -3 lines
Diff to previous 1.190.2.6 (colored)

Sync with HEAD.

Revision 1.213 / (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.212: +3 -3 lines
Diff to previous 1.212 (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.190.2.6 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:07 2004 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.190.2.5: +3 -3 lines
Diff to previous 1.190.2.5 (colored)

Sync with HEAD

Revision 1.212 / (download) - annotate - [select for diffs], Fri Oct 1 16:30:56 2004 UTC (18 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.211: +3 -3 lines
Diff to previous 1.211 (colored)

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

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

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

Fix the sync with head I botched.

Revision 1.190.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.190.2.3: +205 -192 lines
Diff to previous 1.190.2.3 (colored)

Sync with HEAD.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Sep 13 20:02:20 2004 UTC (18 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.210: +4 -2 lines
Diff to previous 1.210 (colored)

dostatvfs(): zero the statvfs structure before calling filesystem code, so that
unset parts would have defined value and not pass random parts of kernel stack

Revision 1.190.2.3 / (download) - annotate - [select for diffs], Tue Aug 24 17:57:38 2004 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.190.2.2: +7 -7 lines
Diff to previous 1.190.2.2 (colored)

Undo part of the ktrace/lwp changes.  In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.

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

Sync with HEAD

Revision 1.210 / (download) - annotate - [select for diffs], Thu Jul 1 10:03:30 2004 UTC (18 years, 7 months ago) by hannken
Branch: MAIN
Changes since 1.209: +3 -2 lines
Diff to previous 1.209 (colored)

Keep a pointer to the leaf mount. Needed for write gating where a
file system gets suspended and has layered mounts above it.

Welcome to 2.0G

Reviewed by: Bill Studenmund <wrstuden@netbsd.org>

Revision 1.209 / (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.208: +9 -6 lines
Diff to previous 1.208 (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.208 / (download) - annotate - [select for diffs], Sun May 2 12:21:02 2004 UTC (18 years, 9 months ago) by pk
Branch: MAIN
Changes since 1.207: +11 -5 lines
Diff to previous 1.207 (colored)

Add a mutex for mount point I/O and wait counters (i.e. the `mnt_wcnt',
`mnt_writeopcountupper' and `mnt_writeopcountlower' members).

Revision 1.207 / (download) - annotate - [select for diffs], Sun May 2 11:13:29 2004 UTC (18 years, 9 months ago) by pk
Branch: MAIN
Changes since 1.206: +4 -5 lines
Diff to previous 1.206 (colored)

sys_access: use crdup().

Revision 1.206 / (download) - annotate - [select for diffs], Wed Apr 21 01:05:38 2004 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.205: +51 -46 lines
Diff to previous 1.205 (colored)

Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.

Revision 1.205 / (download) - annotate - [select for diffs], Tue Mar 23 13:22:33 2004 UTC (18 years, 10 months ago) by junyoung
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-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.204: +22 -24 lines
Diff to previous 1.204 (colored)

- Nuke __P().
- Drop trailing spaces.

Revision 1.204 / (download) - annotate - [select for diffs], Wed Feb 25 04:10:28 2004 UTC (18 years, 11 months ago) by dbj
Branch: MAIN
Changes since 1.203: +3 -3 lines
Diff to previous 1.203 (colored)

fix typo in comment s/MNT_LAXY/MNT_LAZY/

Revision 1.203 / (download) - annotate - [select for diffs], Sun Feb 22 09:56:26 2004 UTC (18 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.202: +5 -3 lines
Diff to previous 1.202 (colored)

mount(2): if vinvalbuf() fails, we must also vput() the mountpoint vnode

fixes stale vnode lock after attempt to mount something on a NTFS directory

Revision 1.202 / (download) - annotate - [select for diffs], Wed Dec 10 11:40:12 2003 UTC (19 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.201: +10 -2 lines
Diff to previous 1.201 (colored)

The file system snapshot pseudo driver.

Uses a hook in spec_strategy() to save data written from a mounted
file system to its block device and a hook in dounmount().

Not enabled by default in any kernel config.

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

Revision 1.201 / (download) - annotate - [select for diffs], Sat Nov 15 01:19:38 2003 UTC (19 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.200: +76 -2 lines
Diff to previous 1.200 (colored)

Kernel portion of the fsync_range(2) system call.  Written by Bill
Studenmund, and contributed by Wasabi Systems, Inc.

Revision 1.200 / (download) - annotate - [select for diffs], Sun Nov 9 07:55:38 2003 UTC (19 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.199: +3 -2 lines
Diff to previous 1.199 (colored)

- fix an use-after-free bug in /dev/fd/* handling.
  specifically, don't keep a stale pointer in fd_ofiles.
  it isn't needed anymore as fd allocation is now done using bitmaps.
- clean up dupfdopen() a little.
- don't call fd_used() unnecessarily.

Revision 1.199 / (download) - annotate - [select for diffs], Sat Oct 25 01:18:01 2003 UTC (19 years, 3 months ago) by kleink
Branch: MAIN
Changes since 1.198: +6 -2 lines
Diff to previous 1.198 (colored)

POSIX: when attempting to fdatasync(2) a file which is not open for
writing, fail with EBADF.

Revision 1.198 / (download) - annotate - [select for diffs], Wed Oct 15 17:26:38 2003 UTC (19 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.197: +4 -5 lines
Diff to previous 1.197 (colored)

Remove the superuser check for MNT_FORCE on new mounts.  It's been
pointed out by several people that it offers no real protection.

Revision 1.197 / (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.196: +190 -17 lines
Diff to previous 1.196 (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.196 / (download) - annotate - [select for diffs], Tue Oct 14 14:02:56 2003 UTC (19 years, 3 months ago) by dbj
Branch: MAIN
Changes since 1.195: +11 -11 lines
Diff to previous 1.195 (colored)

add mnt_iflag field to struct mount for internal flags
mv MNT_GONE, MNT_UNMOUNT and MNT_WANTRDWR to this field
additonally add mnt_writeopcountupper and mnt_writeopcountlower fields
in preparation for pending write suspension support work
bump kernel version to 1.6ZD

Revision 1.195 / (download) - annotate - [select for diffs], Mon Oct 13 18:02:20 2003 UTC (19 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.194: +23 -11 lines
Diff to previous 1.194 (colored)

* Shuffle some flags to make it easier to visually compare lists
  of flags.
* In the new mount case, make sure to clear the mount "action" flags.
* Allow MNT_FORCE to be set by root on new mounts.

Revision 1.194 / (download) - annotate - [select for diffs], Sat Sep 13 08:32:14 2003 UTC (19 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.193: +6 -6 lines
Diff to previous 1.193 (colored)

move dupfd from struct proc to struct lwp - it's per-LWP, not per-process; we
use curlwp where the lwp is not directly available, i.e. in device open
routines

briefly discussed on tech-kern

Revision 1.193 / (download) - annotate - [select for diffs], Thu Sep 11 17:33:42 2003 UTC (19 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.192: +6 -5 lines
Diff to previous 1.192 (colored)

PR/15397: Jason Thorpe: directory operations on pathnames that refer to
directories and have trailing slashes should succeed. Ok'd by kjk.
Fix provided by enami.

Revision 1.192 / (download) - annotate - [select for diffs], Tue Sep 2 12:31:35 2003 UTC (19 years, 5 months ago) by drochner
Branch: MAIN
Changes since 1.191: +14 -2 lines
Diff to previous 1.191 (colored)

also feed getdents/readdir data to KTRACE

Revision 1.191 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:03 2003 UTC (19 years, 5 months ago) by agc
Branch: MAIN
Changes since 1.190: +3 -7 lines
Diff to previous 1.190 (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.190.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.190: +192 -202 lines
Diff to previous 1.190 (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.190 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:34 2003 UTC (19 years, 7 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.189: +197 -187 lines
Diff to previous 1.189 (colored)

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

Revision 1.189 / (download) - annotate - [select for diffs], Sun Jun 29 18:43:29 2003 UTC (19 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.188: +7 -7 lines
Diff to previous 1.188 (colored)

Undo part of the ktrace/lwp changes.  In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.

Revision 1.188 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:59 2003 UTC (19 years, 7 months ago) by darrenr
Branch: MAIN
Changes since 1.187: +192 -202 lines
Diff to previous 1.187 (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.187 / (download) - annotate - [select for diffs], Fri May 16 14:25:03 2003 UTC (19 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.186: +8 -5 lines
Diff to previous 1.186 (colored)

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

Revision 1.186 / (download) - annotate - [select for diffs], Sun Apr 20 07:06:33 2003 UTC (19 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.185: +4 -2 lines
Diff to previous 1.185 (colored)

add simple_locks that are missed in the previous.

Revision 1.185 / (download) - annotate - [select for diffs], Wed Apr 16 21:44:21 2003 UTC (19 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.184: +102 -43 lines
Diff to previous 1.184 (colored)

PR/1796: John Kohl: statfs misbehaves under chrooted environments.

- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.

Revision 1.184 / (download) - annotate - [select for diffs], Fri Mar 21 23:11:25 2003 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.183: +12 -12 lines
Diff to previous 1.183 (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.183 / (download) - annotate - [select for diffs], Sun Feb 23 14:37:34 2003 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.182: +14 -6 lines
Diff to previous 1.182 (colored)

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

Revision 1.182 / (download) - annotate - [select for diffs], Fri Feb 14 18:25:34 2003 UTC (19 years, 11 months ago) by drochner
Branch: MAIN
Changes since 1.181: +3 -3 lines
Diff to previous 1.181 (colored)

fix typo in comment

Revision 1.181 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:45 2003 UTC (20 years ago) by thorpej
Branch: MAIN
Changes since 1.180: +4 -2 lines
Diff to previous 1.180 (colored)

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

Revision 1.180 / (download) - annotate - [select for diffs], Tue Jan 21 00:00:10 2003 UTC (20 years ago) by christos
Branch: MAIN
Changes since 1.179: +3 -3 lines
Diff to previous 1.179 (colored)

step 2: fix sync so that it does not dereference null lwp and assign p properly.

Revision 1.179 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:38 2003 UTC (20 years ago) by thorpej
Branch: MAIN
Changes since 1.178: +177 -118 lines
Diff to previous 1.178 (colored)

Merge the nathanw_sa branch.

Revision 1.178.2.2 / (download) - annotate - [select for diffs], Thu Dec 19 05:20:16 2002 UTC (20 years, 1 month ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.178.2.1: +3 -5 lines
Diff to previous 1.178.2.1 (colored) to branchpoint 1.178 (colored) next main 1.179 (colored)

crget() + memcpy -> crdup().  From David Laight.

Revision 1.178.2.1 / (download) - annotate - [select for diffs], Wed Dec 18 01:06:17 2002 UTC (20 years, 1 month ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.178: +12 -13 lines
Diff to previous 1.178 (colored)

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

Revision 1.164.2.14 / (download) - annotate - [select for diffs], Mon Nov 11 22:14:14 2002 UTC (20 years, 2 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.164.2.13: +1 -1 lines
Diff to previous 1.164.2.13 (colored) next main 1.165 (colored)

Catch up to -current

Revision 1.178 / (download) - annotate - [select for diffs], Wed Oct 30 22:36:46 2002 UTC (20 years, 3 months ago) by kleink
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: gmcgarry_ucred
Changes since 1.177: +3 -3 lines
Diff to previous 1.177 (colored)

Revert rev. 1.147, as per PR kern/17411.

While a hard link to a symbolic link is not ruled out by POSIX-2001,
the link(2) interface is to perform normal pathname resolution,
which includes the resolution of symbolic links.

Revision 1.164.2.13 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:57 2002 UTC (20 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164.2.12: +16 -12 lines
Diff to previous 1.164.2.12 (colored)

Catch up to -current.

Revision 1.167.2.6 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:23 2002 UTC (20 years, 3 months ago) by jdolecek
Branch: kqueue
Changes since 1.167.2.5: +25 -20 lines
Diff to previous 1.167.2.5 (colored) next main 1.168 (colored)

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

Revision 1.177 / (download) - annotate - [select for diffs], Sat Sep 21 18:07:52 2002 UTC (20 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Changes since 1.176: +18 -14 lines
Diff to previous 1.176 (colored)

Add special handling of VFS_GETARGS (similar to VFS_UPDATE) so that it
can be done non-root, and it does not affect the mount lists.

Revision 1.164.2.12 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:31 2002 UTC (20 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164.2.11: +7 -6 lines
Diff to previous 1.164.2.11 (colored)

Catch up to -current.

Revision 1.167.2.5 / (download) - annotate - [select for diffs], Fri Sep 6 08:48:22 2002 UTC (20 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.167.2.4: +5 -5 lines
Diff to previous 1.167.2.4 (colored)

sync kqueue branch with HEAD

Revision 1.176 / (download) - annotate - [select for diffs], Wed Sep 4 01:32:50 2002 UTC (20 years, 5 months ago) by matt
Branch: MAIN
Changes since 1.175: +9 -8 lines
Diff to previous 1.175 (colored)

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

Revision 1.174.2.1 / (download) - annotate - [select for diffs], Thu Aug 29 05:23:17 2002 UTC (20 years, 5 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.174: +5 -5 lines
Diff to previous 1.174 (colored) next main 1.175 (colored)

catch up with -current.

Revision 1.164.2.11 / (download) - annotate - [select for diffs], Tue Aug 27 23:47:40 2002 UTC (20 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164.2.10: +5 -5 lines
Diff to previous 1.164.2.10 (colored)

Catch up to -current.

Revision 1.175 / (download) - annotate - [select for diffs], Mon Aug 26 01:28:36 2002 UTC (20 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.174: +5 -5 lines
Diff to previous 1.174 (colored)

Fix a signed/unsigned comparison warning from GCC 3.3.

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

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

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

catch up with -current on kqueue branch

Revision 1.164.2.9 / (download) - annotate - [select for diffs], Thu Jun 20 03:47:29 2002 UTC (20 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164.2.8: +4 -4 lines
Diff to previous 1.164.2.8 (colored)

Catch up to -current.

Revision 1.158.2.3 / (download) - annotate - [select for diffs], Thu Jun 6 19:53:07 2002 UTC (20 years, 7 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.158.2.2: +3 -3 lines
Diff to previous 1.158.2.2 (colored) to branchpoint 1.158 (colored) next main 1.159 (colored)

Pull up revision 1.174 (requested by enami):
  Do not release the lock on the mount point vnode too early when
  doing an update mount, to avoid race conditionn and eventual
  panic.

Revision 1.164.2.8 / (download) - annotate - [select for diffs], Wed May 29 21:33:19 2002 UTC (20 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164.2.7: +3 -2 lines
Diff to previous 1.164.2.7 (colored)

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

(Behold the Power of Ed)

Revision 1.174 / (download) - annotate - [select for diffs], Sat May 11 00:45:06 2002 UTC (20 years, 8 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Changes since 1.173: +4 -4 lines
Diff to previous 1.173 (colored)

Don't release the lock on mount point vnode so early when doing update mount.
Otherwise, race condition occurs (e.g., between mountd(8) and next mount(8)
when multiple update mount command is invoked from shell script).

Revision 1.173.4.1 / (download) - annotate - [select for diffs], Mon Mar 11 18:58:29 2002 UTC (20 years, 10 months ago) by thorpej
Branch: newlock
Changes since 1.173: +10 -10 lines
Diff to previous 1.173 (colored) next main 1.174 (colored)

Make syncer_lock an adaptive mutex and rename it to syncer_mutex.

Revision 1.167.2.3 / (download) - annotate - [select for diffs], Thu Jan 10 20:00:22 2002 UTC (21 years ago) by thorpej
Branch: kqueue
Changes since 1.167.2.2: +7 -7 lines
Diff to previous 1.167.2.2 (colored)

Sync kqueue branch with -current.

Revision 1.164.2.7 / (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.164.2.6: +5 -5 lines
Diff to previous 1.164.2.6 (colored)

Catch up to -current.

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

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

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

add RCSIDs

Revision 1.172 / (download) - annotate - [select for diffs], Mon Oct 29 07:02:31 2001 UTC (21 years, 3 months ago) by simonb
Branch: MAIN
Changes since 1.171: +2 -5 lines
Diff to previous 1.171 (colored)

Don't need to include <uvm/uvm_extern.h> just to include <sys/sysctl.h>
anymore.

Revision 1.164.2.6 / (download) - annotate - [select for diffs], Mon Oct 22 20:41:52 2001 UTC (21 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164.2.5: +3 -3 lines
Diff to previous 1.164.2.5 (colored)

Catch up to -current.

Revision 1.171 / (download) - annotate - [select for diffs], Thu Oct 11 16:27:24 2001 UTC (21 years, 3 months ago) by christos
Branch: MAIN
Branch point for: thorpej-mips-cache
Changes since 1.170: +3 -3 lines
Diff to previous 1.170 (colored)

Allow userland to pass MNT_IGNORE (from enami)

Revision 1.168.2.3 / (download) - annotate - [select for diffs], Mon Oct 1 12:47:01 2001 UTC (21 years, 4 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.168.2.2: +10 -9 lines
Diff to previous 1.168.2.2 (colored) to branchpoint 1.168 (colored) next main 1.169 (colored)

Catch up with -current.

Revision 1.168.2.2 / (download) - annotate - [select for diffs], Wed Sep 26 15:28:23 2001 UTC (21 years, 4 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.168.2.1: +2 -2 lines
Diff to previous 1.168.2.1 (colored) to branchpoint 1.168 (colored)

* add a VCLONED vnode flag that indicates a vnode representing a cloned
  device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
  to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
  clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
  to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
  clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
  to the specinfo of a cloned vnode. could possibly redirect getattr to
  the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
  original device, and reassociates it with the specified dev_t. to be
  used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
  to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
  when debugging race conditions that still exist wrt. locking and
  revoking vnodes.
* make the locking state of a vnode consistent when passed to
  d_open and d_close (unlocked). locked would be better, but has
  some deadlock issues

Revision 1.164.2.5 / (download) - annotate - [select for diffs], Tue Sep 25 16:14:51 2001 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164.2.4: +2 -1 lines
Diff to previous 1.164.2.4 (colored)

LWPify new code.

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

Catch up to -current.

Revision 1.168.2.1 / (download) - annotate - [select for diffs], Tue Sep 18 19:13:54 2001 UTC (21 years, 4 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.168: +9 -3 lines
Diff to previous 1.168 (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.167.2.2 / (download) - annotate - [select for diffs], Thu Sep 13 01:16:17 2001 UTC (21 years, 4 months ago) by thorpej
Branch: kqueue
Changes since 1.167.2.1: +10 -9 lines
Diff to previous 1.167.2.1 (colored)

Update the kqueue branch to HEAD.

Revision 1.170 / (download) - annotate - [select for diffs], Sat Sep 8 15:34:06 2001 UTC (21 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, pre-chs-ubcperf, post-chs-ubcperf
Changes since 1.169: +2 -1 lines
Diff to previous 1.169 (colored)

Don't trash the ref count of cred. It causes a memory leak.

Revision 1.169 / (download) - annotate - [select for diffs], Sat Sep 8 02:05:39 2001 UTC (21 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.168: +9 -9 lines
Diff to previous 1.168 (colored)

Hijack the credentials used to evaluate access, to avoid a potential lwp
race by modifying the proc's credentials temporarily. From Bill Sommerfeld.
Thanks for forcing me to do this right :-)

Revision 1.164.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 00:11:45 2001 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164.2.2: +20 -22 lines
Diff to previous 1.164.2.2 (colored)

Catch up with -current.

Revision 1.167.2.1 / (download) - annotate - [select for diffs], Fri Aug 3 04:13:44 2001 UTC (21 years, 6 months ago) by lukem
Branch: kqueue
Changes since 1.167: +9 -2 lines
Diff to previous 1.167 (colored)

update to -current

Revision 1.168 / (download) - annotate - [select for diffs], Tue Jul 24 15:39:31 2001 UTC (21 years, 6 months ago) by assar
Branch: MAIN
CVS Tags: thorpej-devvp-base
Branch point for: thorpej-devvp
Changes since 1.167: +9 -2 lines
Diff to previous 1.167 (colored)

change vop_symlink and vop_mknod to return vpp (the created node)
refed, so that the caller can actually use it.  update callers and
file systems that implement these vnode operations

Revision 1.167 / (download) - annotate - [select for diffs], Thu Jun 28 08:04:18 2001 UTC (21 years, 7 months ago) by jdolecek
Branch: MAIN
Branch point for: kqueue
Changes since 1.166: +12 -21 lines
Diff to previous 1.166 (colored)

Only define mountcompatnames[] for COMPAT_09 and COMPAT_43, make the
table actually match state in NetBSD 0.9 (checked against sys/mount.h
rev. 1.11).
The array is not to be modified from now on, comment updated accordingly.

Revision 1.164.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:07:11 2001 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164.2.1: +44 -30 lines
Diff to previous 1.164.2.1 (colored)

Catch up to -current.

Revision 1.166 / (download) - annotate - [select for diffs], Thu Jun 14 20:32:48 2001 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.165: +21 -23 lines
Diff to previous 1.165 (colored)

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

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

Revision 1.147.2.3 / (download) - annotate - [select for diffs], Sat Apr 21 17:46:32 2001 UTC (21 years, 9 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.147.2.2: +24 -8 lines
Diff to previous 1.147.2.2 (colored) to branchpoint 1.147 (colored) next main 1.148 (colored)

Sync with HEAD

Revision 1.165 / (download) - annotate - [select for diffs], Mon Apr 16 22:41:11 2001 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.164: +24 -8 lines
Diff to previous 1.164 (colored)

When unmounting a file system, acquire the syncer_lock before
vfs_busy'ing just before the dounmount() call.  This is to avoid
sleeping with the mountlist_slock held -- but we must acquire
syncer_lock before vfs_busy because the syncer itself uses
syncer_lock -> vfs_busy locking order.

Revision 1.164.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:48 2001 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.164: +176 -117 lines
Diff to previous 1.164 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.158.2.2 / (download) - annotate - [select for diffs], Thu Dec 14 23:36:05 2000 UTC (22 years, 1 month ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.158.2.1: +12 -6 lines
Diff to previous 1.158.2.1 (colored) to branchpoint 1.158 (colored)

Pull up revision 1.162 (requested by fvdl):
  Improve NFS performance, possibly with as much as 100% in
  throughput.  Please note: this implies a kernel interface change,
  VOP_FSYNC gains two arguments.

Revision 1.147.2.2 / (download) - annotate - [select for diffs], Fri Dec 8 09:14:02 2000 UTC (22 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.147.2.1: +6 -5 lines
Diff to previous 1.147.2.1 (colored) to branchpoint 1.147 (colored)

Sync with HEAD.

Revision 1.164 / (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.163: +6 -5 lines
Diff to previous 1.163 (colored)

Initial integration of the Unified Buffer Cache project.

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

Update thorpej_scsipi to -current as of a month ago

Revision 1.163 / (download) - annotate - [select for diffs], Thu Sep 28 06:43:20 2000 UTC (22 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.162: +30 -45 lines
Diff to previous 1.162 (colored)

Factor out common code to manupilate file flags into separate function
like others do.

Revision 1.162 / (download) - annotate - [select for diffs], Tue Sep 19 22:01:41 2000 UTC (22 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.161: +12 -6 lines
Diff to previous 1.161 (colored)

Adapt for VOP_FSYNC parameter change.

Small optimization to shutdown code: only take the syncer lock if
the FS actually used it.

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

Convert namei pathname buffer allocation to use the pool allocator.

Revision 1.158.2.1 / (download) - annotate - [select for diffs], Thu Jul 27 02:46:49 2000 UTC (22 years, 6 months ago) by mycroft
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Changes since 1.158: +5 -9 lines
Diff to previous 1.158 (colored)

Approved by thorpej:
Free the syncer vnode at unmount time.

syssrc/sys/kern/vfs_syscalls.c				1.159 -> 1.160
syssrc/sys/miscfs/syncfs/sync_subr.c			1.3 -> 1.4
syssrc/sys/miscfs/syncfs/sync_vnops.c			1.2 -> 1.3
syssrc/sys/miscfs/syncfs/syncfs.h			1.3 -> 1.4
syssrc/sys/sys/vnode.h					1.82 -> 1.83

Revision 1.160 / (download) - annotate - [select for diffs], Sun Jul 9 00:59:03 2000 UTC (22 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.159: +5 -9 lines
Diff to previous 1.159 (colored)

When unmounting, make sure to free the syncer vnode so that it can be reused.

Revision 1.159 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:52 2000 UTC (22 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.158: +3 -5 lines
Diff to previous 1.158 (colored)

remove include of <vm/vm.h>

Revision 1.133.2.2 / (download) - annotate - [select for diffs], Tue Jun 27 15:30:46 2000 UTC (22 years, 7 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003
Changes since 1.133.2.1: +4 -2 lines
Diff to previous 1.133.2.1 (colored) to branchpoint 1.133 (colored) next main 1.134 (colored)

Pull up revision 1.158 (requested by pooka):
  Do not leave a vnode around when trying (and failing) to mount
  a file system with securelevel 2.  A second attempt would freeze
  the system.

Revision 1.156.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:09:23 2000 UTC (22 years, 7 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.156: +7 -4 lines
Diff to previous 1.156 (colored) next main 1.157 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.158 / (download) - annotate - [select for diffs], Mon Jun 19 18:53:55 2000 UTC (22 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.157: +4 -2 lines
Diff to previous 1.157 (colored)

Correct situation where vnode was left hanging around when trying to
mount a filesystem with securelevel 2. A second mount-attempt left
everything completely frozen.

Fix by Bill Sommerfeld.

Revision 1.157 / (download) - annotate - [select for diffs], Thu Jun 15 22:32:44 2000 UTC (22 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.156: +4 -3 lines
Diff to previous 1.156 (colored)

Enable passing of the MNT_SOFTDEP flag in the mount system call.

Revision 1.156 / (download) - annotate - [select for diffs], Mon Apr 17 14:31:22 2000 UTC (22 years, 9 months ago) by mrg
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.155: +44 -1 lines
Diff to previous 1.155 (colored)

implement lchflags(2), which does the chflags(2) dance without following
symlinks, and thus can operate on symlinks.  remove a bogus comment in
chflags(1) that claims symlinks do not have file flags.

XXX: todo -- make chflags(1) use lchflags(2) when given the right options.

Revision 1.155 / (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.154: +73 -73 lines
Diff to previous 1.154 (colored)

Get rid of register declarations.

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

Delete redundant decl of dounmount(), it's in <sys/mount.h>.

Revision 1.153 / (download) - annotate - [select for diffs], Thu Mar 23 05:16:15 2000 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.152: +5 -5 lines
Diff to previous 1.152 (colored)

Implement fdremove() which is used in place of all the code that
did the "fdp->fd_ofiles[fd] = 0" assignment; fdremove() make sure
the fd_freefiles hints stay in sync.

From OpenBSD.

Revision 1.152 / (download) - annotate - [select for diffs], Wed Mar 15 16:30:39 2000 UTC (22 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.151: +1 -3 lines
Diff to previous 1.151 (colored)

In fdatasync, do not call bioops.io_fsync, since we're not flushing
metadata. If you do call it, there's actually a fair chance that it
will panic because its metadata dependencies were not cleared in
the VOP_FSYNC above (with FSYNC_DATAONLY).

Revision 1.151 / (download) - annotate - [select for diffs], Fri Mar 3 05:21:04 2000 UTC (22 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.150: +12 -9 lines
Diff to previous 1.150 (colored)

Allow my disk to actually spin down using `-o async' again.

Note: This uses the same questionable logic as vfs_bio.c to check MNT_ASYNC.
Something needs to be done about this.

Revision 1.150 / (download) - annotate - [select for diffs], Wed Feb 16 11:57:46 2000 UTC (22 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.149: +5 -1 lines
Diff to previous 1.149 (colored)

Introduce a sysctl to enable/disable if non-root users can mount filesystems.
Default: off.

Revision 1.133.2.1 / (download) - annotate - [select for diffs], Tue Feb 1 23:10:54 2000 UTC (23 years ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH002
Changes since 1.133: +1 -2 lines
Diff to previous 1.133 (colored)

Pull up revision 1.149 (via patch, requested by assar):
  Move the declaration of `vnops' to a header file, for the
  benefit of LKMs.

Revision 1.149 / (download) - annotate - [select for diffs], Tue Feb 1 01:24:38 2000 UTC (23 years ago) by assar
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.148: +1 -3 lines
Diff to previous 1.148 (colored)

(sys_open, sys_fhopen): remove declaration of vnops, now in
<sys/file.h>

Revision 1.147.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:35:55 1999 UTC (23 years, 1 month ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.147: +50 -8 lines
Diff to previous 1.147 (colored) next main 1.148 (colored)

Pull up to last week's -current.

Revision 1.148 / (download) - annotate - [select for diffs], Mon Nov 15 18:49:09 1999 UTC (23 years, 2 months ago) by fvdl
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.147: +50 -8 lines
Diff to previous 1.147 (colored)

Add Kirk McKusick's soft updates code to the trunk. Not enabled by
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.

Bump version number to 1.4O

Revision 1.147.4.5 / (download) - annotate - [select for diffs], Tue Oct 26 19:15:17 1999 UTC (23 years, 3 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.147.4.4: +14 -3 lines
Diff to previous 1.147.4.4 (colored) to branchpoint 1.147 (colored) next main 1.148 (colored)

Merge changes in the trickle-sync and softdep code as done by Kirk McKusick
in FreeBSD since the version that we based the branch on. Merging mostly
done by Ethan Solomita <ethan@geocast.com>.

Also, make sure the syncer thread/process isn't active when we're
unmounting a filesystem. This could wreak havoc. XXX should be done
on a per-mountpoint basis, but especially the softdep code would
end up to be a big pile of vfs_busy() calls.

Revision 1.147.4.4 / (download) - annotate - [select for diffs], Sat Oct 23 14:54:05 1999 UTC (23 years, 3 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.147.4.3: +3 -3 lines
Diff to previous 1.147.4.3 (colored) to branchpoint 1.147 (colored)

Do previous better; add VT_VFS tag check to DIAGNOSTIC case in insmntqueue.

Revision 1.147.4.3 / (download) - annotate - [select for diffs], Sat Oct 23 14:09:46 1999 UTC (23 years, 3 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.147.4.2: +3 -3 lines
Diff to previous 1.147.4.2 (colored) to branchpoint 1.147 (colored)

Clear the MNT_UNMOUNT flag before calling vfs_allocate_syncvnode. It
will cause insmntqueue to be called, which will cause a panic.

Revision 1.147.4.2 / (download) - annotate - [select for diffs], Thu Oct 21 19:21:30 1999 UTC (23 years, 3 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.147.4.1: +4 -1 lines
Diff to previous 1.147.4.1 (colored) to branchpoint 1.147 (colored)

Add workaround hacks to enable the softdep code to call getnewvnode()
when a filesystem is being unmounted. The problem is that the softdep
code stored inode numbers in the worklist structures, and does not
use vnodes. So VFS_VGET must be used to get a vnode during the final
flush stages, and this can call getnewvnode(), resulting in
a vfs_busy() + MNT_UNMOUNT hang.

I've tried to make the softdep code use vnodes, but that's a pain,
since it gets called at points were vnode ops are dangerous (i.e.
interrupt context, and uncertainty whether a vnode is locked, etc).

This is all icky stuff, but it does get things much closer to a
working state..

Revision 1.147.4.1 / (download) - annotate - [select for diffs], Tue Oct 19 12:50:08 1999 UTC (23 years, 3 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.147: +31 -7 lines
Diff to previous 1.147 (colored)

Bring in Kirk McKusick's FFS softdep code on a branch.

Revision 1.147 / (download) - annotate - [select for diffs], Sun Sep 5 23:34:39 1999 UTC (23 years, 5 months ago) by hubertf
Branch: MAIN
CVS Tags: fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.146: +2 -2 lines
Diff to previous 1.146 (colored)

Allow hardlinks to symlinks.

Reviewed by: Bill Studenmund, Klaus Klein

Revision 1.133.4.5 / (download) - annotate - [select for diffs], Mon Aug 2 22:19:15 1999 UTC (23 years, 6 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.133.4.4: +38 -5 lines
Diff to previous 1.133.4.4 (colored) to branchpoint 1.133 (colored) next main 1.134 (colored)

Update from trunk.

Revision 1.146 / (download) - annotate - [select for diffs], Sat Jul 31 03:18:43 1999 UTC (23 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.145: +24 -1 lines
Diff to previous 1.145 (colored)

OpenBSD patch to prevent non-root users who own block or character devices
(typically ttys or ptys) from changing the flags on them. [Commit by cjs.]

Revision 1.145 / (download) - annotate - [select for diffs], Mon Jul 26 19:20:09 1999 UTC (23 years, 6 months ago) by wrstuden
Branch: MAIN
Changes since 1.144: +2 -2 lines
Diff to previous 1.144 (colored)

Add VLAYER to tests which will cause VOP_REVOKE to be called in sys_revoke().

Revision 1.144 / (download) - annotate - [select for diffs], Sun Jul 25 06:30:35 1999 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.143: +2 -2 lines
Diff to previous 1.143 (colored)

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

Revision 1.143 / (download) - annotate - [select for diffs], Thu Jul 22 23:00:27 1999 UTC (23 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.142: +3 -1 lines
Diff to previous 1.142 (colored)

Add proclist locking where appropriate (forgot to commit this file previously).

Revision 1.133.4.4 / (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.133.4.3: +1 -4 lines
Diff to previous 1.133.4.3 (colored) to branchpoint 1.133 (colored)

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

Revision 1.142 / (download) - annotate - [select for diffs], Sun Jul 4 16:20:13 1999 UTC (23 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.141: +9 -4 lines
Diff to previous 1.141 (colored)

Fix kern/7906: race between unmount and getnewvnode()

mp->mnt_flags & MNT_MWAIT is replaced by mp->mnt_wcnt, and a new mount
flag MNT_GONE is created (reusing the same bit).

In insmntque(), add DIAGNOSTIC check to fail if the filesystem vnode
is being moved to is in the process of being unmounted.

getnewvnode() now protects the list of vnodes active on mp with
vfs_busy()/vfs_unbusy().

To avoid generating spurious errors during a doomed unmount, change
the "wait for unmount to finish" protocol between dounmount() and
vfs_busy().  In vfs_busy(), instead of only sleeping once, sleep until
either MNT_UNMOUNT is clear or MNT_GONE is set; also, maintain a count
of waiters in mp->mnt_wcnt so that dounmount() knows when it's safe to
free mp.

tested by running a "while :; do mount /d1; umount -f /d1; done" loop
against multiple find(1) processes.

Revision 1.141 / (download) - annotate - [select for diffs], Sun Jul 4 06:17:52 1999 UTC (23 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.140: +2 -2 lines
Diff to previous 1.140 (colored)

fix typo in previous

Revision 1.140 / (download) - annotate - [select for diffs], Sun Jul 4 06:16:29 1999 UTC (23 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.139: +4 -1 lines
Diff to previous 1.139 (colored)

Don't permanently lose the async bit on an failed unmount

Revision 1.133.4.3 / (download) - annotate - [select for diffs], Fri Jul 2 18:54:10 1999 UTC (23 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.133.4.2: +6 -1 lines
Diff to previous 1.133.4.2 (colored) to branchpoint 1.133 (colored)

Add UBC glue to sys_fhopen() (because it has some vn_open() stuff inline).

Revision 1.133.4.2 / (download) - annotate - [select for diffs], Thu Jul 1 23:43:22 1999 UTC (23 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.133.4.1: +254 -3 lines
Diff to previous 1.133.4.1 (colored) to branchpoint 1.133 (colored)

Sync w/ -current.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Jul 1 18:58:16 1999 UTC (23 years, 7 months ago) by wrstuden
Branch: MAIN
Changes since 1.138: +21 -8 lines
Diff to previous 1.138 (colored)

Make fhopen use FILE_UNUSE, and don't leak file descriptors.

Patch from Jason Thorpe. Also should close PR 7889 from
Assar Westerlund <assar@sics.se> describing this problem.

Revision 1.138 / (download) - annotate - [select for diffs], Wed Jun 30 10:00:06 1999 UTC (23 years, 7 months ago) by is
Branch: MAIN
Changes since 1.137: +5 -3 lines
Diff to previous 1.137 (colored)

Only check for ETXTBSY if the access would otherwise be allowed.
Needed to fix pr4134.

Revision 1.137 / (download) - annotate - [select for diffs], Tue Jun 29 22:18:47 1999 UTC (23 years, 7 months ago) by wrstuden
Branch: MAIN
Changes since 1.136: +237 -1 lines
Diff to previous 1.136 (colored)

Add fhopen, fhstat, fhstatfs syscalls. Also move getfh in from the nfs
syscall code.

Revision 1.133.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:24:06 1999 UTC (23 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.133: +189 -92 lines
Diff to previous 1.133 (colored)

Sync w/ -current.

Revision 1.136 / (download) - annotate - [select for diffs], Thu May 6 17:11:04 1999 UTC (23 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.135: +2 -1 lines
Diff to previous 1.135 (colored)

Add NTFS for the compat names.

Revision 1.135 / (download) - annotate - [select for diffs], Wed May 5 20:01:10 1999 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.134: +147 -55 lines
Diff to previous 1.134 (colored)

Add "use counting" to file entries.  When closing a file, and it's reference
count is 0, wait for use count to drain before finishing the close.

This is necessary in order for multiple processes to safely share file
descriptor tables.

Revision