The NetBSD Project

CVS log for src/sys/miscfs/kernfs/kernfs_vnops.c

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.174 / (download) - annotate - [select for diffs], Sun Mar 27 17:10:56 2022 UTC (2 years ago) by christos
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.173: +4 -34 lines
Diff to previous 1.173 (colored) to selected 1.56 (colored)

dedup the eofs link/symlink methods

Revision 1.173 / (download) - annotate - [select for diffs], Sat Mar 12 17:36:14 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.172: +3 -3 lines
Diff to previous 1.172 (colored) to selected 1.56 (colored)

kernfs: Just fail with EOPNOTSUPP, don't panic, on VOP_BMAP.

Reported-by: syzbot+870d2eb4b4c8904ac734@syzkaller.appspotmail.com

Revision 1.172 / (download) - annotate - [select for diffs], Mon Jul 19 01:33:53 2021 UTC (2 years, 8 months ago) by dholland
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.171: +28 -49 lines
Diff to previous 1.171 (colored) to selected 1.56 (colored)

Abolish all the silly indirection macros for initializing vnode ops tables.

These are things of the form #define foofs_op genfs_op, or #define
foofs_op genfs_eopnotsupp, or similar. They serve no purpose besides
obfuscation, and have gotten cutpasted all over everywhere.

Part 3; cvs randomly didn't commit all the files the first time, still
hunting down the files it skipped.

Revision 1.171 / (download) - annotate - [select for diffs], Sun Jul 18 23:56:13 2021 UTC (2 years, 8 months ago) by dholland
Branch: MAIN
Changes since 1.170: +3 -29 lines
Diff to previous 1.170 (colored) to selected 1.56 (colored)

Use macros for the canned parts of device and fifo vnode op tables.

Add GENFS_SPECOP_ENTRIES and GENFS_FIFOOP_ENTRIES macros that contain
the portion of the vnode ops table declaration that is
(conservatively) the same in every fs. Use these in every fs that
supports devices and/or fifos with separate ops tables.

Note that ptyfs works differently (it has one type of vnode with
open-coded dispatch to the specfs code, which I haven't changed in
this commit) and rump/librump/rumpvfs/rumpfs.c has an indirect dynamic
dispatch that already does more or less the same thing, which I also
haven't changed.

Also note that this anticipates a few bits in the next changeset here
and there, and adds missing but unreachable calls in some cases (e.g.
most fses weren't defining whiteout on devices and fifos, but it isn't
reachable there), and it changes parsepath on devices and fifos to
genfs_badop from genfs_parsepath (but it's not reachable there
either).

It appears that devices in kernfs were missing kqfilter, so it's
possible that if you try to use kqueue on /kern/rootdev that it'll
explode.

And finally note that the ops declaration tables aren't
order-dependent. (Other than vop_default_desc has to come first.)
Otherwise this wouldn't work.

Revision 1.170 / (download) - annotate - [select for diffs], Tue Jul 6 03:23:03 2021 UTC (2 years, 8 months ago) by dholland
Branch: MAIN
Changes since 1.169: +4 -4 lines
Diff to previous 1.169 (colored) to selected 1.56 (colored)

Fix perms on /kern/{r,}rootdev.

Revision 1.169 / (download) - annotate - [select for diffs], Tue Jul 6 03:22:44 2021 UTC (2 years, 8 months ago) by dholland
Branch: MAIN
Changes since 1.168: +4 -2 lines
Diff to previous 1.168 (colored) to selected 1.56 (colored)

Add missing VOP_KQFILTER to kernfs.

Not sure if lack of it can be used for local DoS or not, but best to
fix.

Revision 1.168 / (download) - annotate - [select for diffs], Tue Jun 29 22:34:08 2021 UTC (2 years, 8 months ago) by dholland
Branch: MAIN
Changes since 1.167: +4 -2 lines
Diff to previous 1.167 (colored) to selected 1.56 (colored)

- Add a new vnode op: VOP_PARSEPATH.
 - Move namei_getcomponent to genfs_vnops.c and call it genfs_parsepath.
 - Add a parsepath entry to every vnode ops table.

VOP_PARSEPATH takes a directory vnode to be searched and a complete
following path and chooses how much of that path to consume. To begin
with, all parsepath calls are genfs_parsepath, which locates the first
'/' as always.

Note that the call doesn't take the whole struct componentname, only
the string. The other bits of struct componentname should not be
needed and there's no reason to cause potential complications by
exposing them.

Revision 1.167 / (download) - annotate - [select for diffs], Mon Jun 28 17:52:13 2021 UTC (2 years, 9 months ago) by chs
Branch: MAIN
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (colored) to selected 1.56 (colored)

VOP_BMAP() may be called via ioctl(FIOGETBMAP) on any vnode that applications
can open.  change various pseudo-fs *_bmap methods return an error instead of
panic.

Reported-by: syzbot+8289a3eaf2ba60958c87@syzkaller.appspotmail.com

Revision 1.166 / (download) - annotate - [select for diffs], Sat Jun 27 17:29:19 2020 UTC (3 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, 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.165: +3 -3 lines
Diff to previous 1.165 (colored) to selected 1.56 (colored)

Introduce genfs_pathconf() and use it for the default case in all filesystems.

Revision 1.165 / (download) - annotate - [select for diffs], Sat May 16 18:31:51 2020 UTC (3 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.164: +8 -6 lines
Diff to previous 1.164 (colored) to selected 1.56 (colored)

Add ACL support for FFS. From FreeBSD.

Revision 1.164 / (download) - annotate - [select for diffs], Mon Feb 24 20:44:25 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Changes since 1.163: +3 -3 lines
Diff to previous 1.163 (colored) to selected 1.56 (colored)

v_interlock -> vmobjlock

Revision 1.163 / (download) - annotate - [select for diffs], Tue Feb 4 04:19:24 2020 UTC (4 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.162: +50 -20 lines
Diff to previous 1.162 (colored) to selected 1.56 (colored)

Use specfs vnops for specnodes in kernfs.

While here, don't filter out rootdev and rrootdev merely because
they're not cached.

Fixes the elusive /kern/rootdev and /kern/rrootdev nodes, which only
appeared sometimes when they felt like it, and fixes operations on
/kern/rootdev and /kern/rrootdev always returning EOPNOTSUPP.

We didn't seem to have a single PR for these issues but the following
PRs are all relevant:

PR bin/13564
PR kern/38265
PR kern/38778
PR kern/45974

XXX pullup-9, pullup-8, pullup-7, pullup-6, pullup-5, pullup-4, pullup-3, pullup-2, pullup-1.4T...

Revision 1.162 / (download) - annotate - [select for diffs], Thu Jan 2 15:42:27 2020 UTC (4 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.161: +16 -4 lines
Diff to previous 1.161 (colored) to selected 1.56 (colored)

- Eliminate the global "boottime" variable, which was being accessed
  without any synchronization against changes by e.g. clock_settime().
- Replace with new getbinboottime() / getnanoboottime() / getmicroboottime()
  functions (naming mirrors that of other time access functions in kern_tc.c).
  It returns the (maybe-converted) value of timebasebin, which also tracks
  our estimate of when the system was booted (i.e. the legacy "boottime" was
  redundant).

XXX There needs to be a lockless synchronization mechanism for reading
timebasebin, but this is a problem in kern_tc.c that pre-existed these
"boottime" changes.  At least now the problem is centralized in one location.

Revision 1.161 / (download) - annotate - [select for diffs], Thu Aug 29 06:43:13 2019 UTC (4 years, 7 months ago) by hannken
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.160: +24 -2 lines
Diff to previous 1.160 (colored) to selected 1.56 (colored)

Add missing operation VOP_GETPAGES() returning EFAULT.

Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.

Observed by maxv@

Revision 1.160 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (5 years, 6 months ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, netbsd-9-base, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.159: +7 -7 lines
Diff to previous 1.159 (colored) to selected 1.56 (colored)

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

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

HOWEVER!  Some subsystems have

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

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

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

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

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

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

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

Revision 1.159 / (download) - annotate - [select for diffs], Sat Mar 31 23:12:01 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407
Branch point for: phil-wifi
Changes since 1.158: +4 -5 lines
Diff to previous 1.158 (colored) to selected 1.56 (colored)

factor out some repeated code and simplify the logputchar function.

Revision 1.158 / (download) - annotate - [select for diffs], Fri May 26 14:21:01 2017 UTC (6 years, 10 months ago) by riastradh
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-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: pgoyette-compat, netbsd-8
Changes since 1.157: +5 -3 lines
Diff to previous 1.157 (colored) to selected 1.56 (colored)

Make VOP_RECLAIM do the last unlock of the vnode.

VOP_RECLAIM naturally has exclusive access to the vnode, so having it
locked on entry is not strictly necessary -- but it means if there
are any final operations that must be done on the vnode, such as
ffs_update, requiring exclusive access to it, we can now kassert that
the vnode is locked in those operations.

We can't just have the caller release the last lock because some file
systems don't use genfs_lock, and require the vnode to remain valid
for VOP_UNLOCK to work, notably unionfs.

Revision 1.157 / (download) - annotate - [select for diffs], Tue Apr 11 14:25:01 2017 UTC (6 years, 11 months ago) by riastradh
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, bouyer-socketcan-base1
Changes since 1.156: +4 -5 lines
Diff to previous 1.156 (colored) to selected 1.56 (colored)

Make VOP_INACTIVE preserve vnode lock on return.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html

Ride 7.99.68, a bumpy bus of incremental vfs improvements!

Revision 1.156 / (download) - annotate - [select for diffs], Sat Aug 20 12:37:09 2016 UTC (7 years, 7 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.155: +2 -3 lines
Diff to previous 1.155 (colored) to selected 1.56 (colored)

Remove now obsolete operation vcache_remove().

Welcome to 7.99.36

Revision 1.155 / (download) - annotate - [select for diffs], Mon Apr 20 23:03:08 2015 UTC (8 years, 11 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Branch point for: pgoyette-localcount
Changes since 1.154: +3 -4 lines
Diff to previous 1.154 (colored) to selected 1.56 (colored)

Make VOP_LINK return directory still locked and referenced.

Ride 7.99.10 bump.

Revision 1.154 / (download) - annotate - [select for diffs], Fri Jul 25 08:20:52 2014 UTC (9 years, 8 months ago) by dholland
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: nick-nhusb, netbsd-7-1, netbsd-7-0, netbsd-7
Changes since 1.153: +4 -2 lines
Diff to previous 1.153 (colored) to selected 1.56 (colored)

Add VOP_FALLOCATE and VOP_FDISCARD to every vnode ops table I can
find.

The filesystem ones all call genfs_eopnotsupp - right now I am only
implementing the plumbing and we can implement fallocate and/or
fdiscard for files later.

The device ones call spec_fallocate (which is also genfs_eopnotsupp)
and spec_fdiscard, which dispatches to the device-level op.

The fifo ones all call vn_fifo_bypass, which also ends up being
EOPNOTSUPP.

Revision 1.153 / (download) - annotate - [select for diffs], Sun Jul 20 13:58:04 2014 UTC (9 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.152: +16 -10 lines
Diff to previous 1.152 (colored) to selected 1.56 (colored)

Change kernfs from hashlist to vcache.

Revision 1.152 / (download) - annotate - [select for diffs], Thu Jul 17 08:21:34 2014 UTC (9 years, 8 months ago) by hannken
Branch: MAIN
Changes since 1.151: +6 -7 lines
Diff to previous 1.151 (colored) to selected 1.56 (colored)

Finish KAME IPSEC removal:
- Remove field kfs_value, it is always zero. Compute the hash from kt_tag.
- Remove stray definitions kernfs_revoke_sa and kernfs_revoke_sp.

While here, remove kfs_type from allocvp(), it is always kt->kt_tag.

Revision 1.151 / (download) - annotate - [select for diffs], Tue Apr 8 17:56:10 2014 UTC (9 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.150: +10 -15 lines
Diff to previous 1.150 (colored) to selected 1.56 (colored)

From Ilya Zykov: Unbreak kernfs which was broken by this commit

|Make the spec_node table implementation private to spec_vnops.c.
|To retrieve a spec_node, two new lookup functions (by device or by mount)
|are implemented.  Both return a referenced vnode, for an opened block device
|the opened vnode is returned so further diagnostic checks "vp == ... sd_bdevvp"
|will not fire.  Otherwise any vnode matching the criteria gets returned.
|No objections on tech-kern.

The effect was that ls /kernfs appeared empty in most cases.

Revision 1.150 / (download) - annotate - [select for diffs], Fri Feb 7 15:29:22 2014 UTC (10 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.149: +7 -4 lines
Diff to previous 1.149 (colored) to selected 1.56 (colored)

Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31

Revision 1.149 / (download) - annotate - [select for diffs], Thu Jan 23 10:13:57 2014 UTC (10 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored) to selected 1.56 (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.148 / (download) - annotate - [select for diffs], Fri Jan 17 10:55:02 2014 UTC (10 years, 2 months ago) by hannken
Branch: MAIN
Changes since 1.147: +3 -4 lines
Diff to previous 1.147 (colored) to selected 1.56 (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.147 / (download) - annotate - [select for diffs], Mon Mar 18 19:35:44 2013 UTC (11 years ago) by plunky
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored) to selected 1.56 (colored)

C99 section 6.7.2.3 (Tags) Note 3 states that:

  A type specifier of the form

	enum identifier

  without an enumerator list shall only appear after the type it
  specifies is complete.

which means that we cannot pass an "enum vtype" argument to
kauth_access_action() without fully specifying the type first.
Unfortunately there is a complicated include file loop which
makes that difficult, so convert this minimal function into a
macro (and capitalize it).

(ok elad@)

Revision 1.146 / (download) - annotate - [select for diffs], Thu Mar 22 20:34:38 2012 UTC (12 years ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.145: +4 -378 lines
Diff to previous 1.145 (colored) to selected 1.56 (colored)

remove KAME IPSEC, replaced by FAST_IPSEC

Revision 1.145 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:57 2012 UTC (12 years ago) by elad
Branch: MAIN
Changes since 1.144: +6 -24 lines
Diff to previous 1.144 (colored) to selected 1.56 (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.144 / (download) - annotate - [select for diffs], Mon Dec 12 19:11:22 2011 UTC (12 years, 3 months ago) by njoly
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, 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.143: +3 -3 lines
Diff to previous 1.143 (colored) to selected 1.56 (colored)

Start making fs read(2) fail with EISDIR if the implementation does
not allow read on directories (kernfs, rumpfs, ptyfs and sysvbfs).
Adjust man page accordingly, and add a small corresponding vfs
testcase.

Revision 1.143 / (download) - annotate - [select for diffs], Wed Jul 21 09:06:38 2010 UTC (13 years, 8 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.142: +4 -2 lines
Diff to previous 1.142 (colored) to selected 1.56 (colored)

Using vfinddev() leads to vnode races as it returns an unreferenced
vnode that may disappear before the caller has a chance to reference it.

Reference the vnode while the specfs cache is locked.

Welcome to 5.99.37.

No objections on tech-kern.

Revision 1.142 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:16 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.141: +3 -3 lines
Diff to previous 1.141 (colored) to selected 1.56 (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.141 / (download) - annotate - [select for diffs], Wed Mar 31 01:27:05 2010 UTC (14 years ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.140: +8 -2 lines
Diff to previous 1.140 (colored) to selected 1.56 (colored)

If msgbuf is not enabled, do not report the node in readdir.  That
way ls -l won't report funny errors because getattr for a readdir
result fails.

XXX: lookup for msgbuf still succeeds even if not enabled

Revision 1.140 / (download) - annotate - [select for diffs], Fri Jan 22 22:46:00 2010 UTC (14 years, 2 months ago) by njoly
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.139: +2 -3 lines
Diff to previous 1.139 (colored) to selected 1.56 (colored)

Remove unneeded strlen() call in KFShostname case.

Revision 1.139 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:11 2010 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.138: +4 -4 lines
Diff to previous 1.138 (colored) to selected 1.56 (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.138 / (download) - annotate - [select for diffs], Fri Jul 3 21:17:41 2009 UTC (14 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase
Changes since 1.137: +24 -4 lines
Diff to previous 1.137 (colored) to selected 1.56 (colored)

Where possible, extract the file-system's access() routine to two internal
functions: the first checking if the operation is possible (regardless of
permissions), the second checking file-system permissions, ACLs, etc.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/06/21/msg005311.html

Revision 1.137 / (download) - annotate - [select for diffs], Tue Jun 23 19:36:40 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored) to selected 1.56 (colored)

Move the implementation of vaccess() to genfs_can_access(), in line with
the other routines of the same spirit.

Adjust file-system code to use it.

Keep vaccess() for KPI compatibility and to keep element of least
surprise. A "diagnostic" message warning that vaccess() is deprecated will
be printed when it's used (obviously, only in DIAGNOSTIC kernels).

No objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/06/21/msg005310.html

Revision 1.136 / (download) - annotate - [select for diffs], Sat Mar 14 15:36:22 2009 UTC (15 years ago) by dsl
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.135: +21 -46 lines
Diff to previous 1.135 (colored) to selected 1.56 (colored)

Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)

Revision 1.135 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:53 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.134: +24 -4 lines
Diff to previous 1.134 (colored) to selected 1.56 (colored)

merge christos-time_t

Revision 1.134 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:00 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, nick-net80211-sync-base, nick-net80211-sync, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, christos-time_t-nbase, christos-time_t-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1, ad-audiomp2-base, ad-audiomp2
Branch point for: yamt-nfs-mp, nick-hppapmap, mjf-devfs2, christos-time_t
Changes since 1.133: +7 -6 lines
Diff to previous 1.133 (colored) to selected 1.56 (colored)

Merge vmlocking2 to head.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:14 2007 UTC (16 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.132: +4 -11 lines
Diff to previous 1.132 (colored) to selected 1.56 (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.132 / (download) - annotate - [select for diffs], Thu Dec 28 09:12:38 2006 UTC (17 years, 3 months ago) by elad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-idlelwp-base8, yamt-idlelwp, vmlocking-base, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, post-newlock2-merge, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, newlock2-nbase, newlock2-base, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, jmcneill-base, hpcarm-cleanup, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, mjf-devfs, matt-armv6, jmcneill-pm
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored) to selected 1.56 (colored)

Revert bogus NULL check introduced in revision 1.96 that generated false
Coverity "bugs".

Revision 1.131 / (download) - annotate - [select for diffs], Thu Dec 28 05:51:56 2006 UTC (17 years, 3 months ago) by alc
Branch: MAIN
Changes since 1.130: +2 -3 lines
Diff to previous 1.130 (colored) to selected 1.56 (colored)

revert previous, after inspection `kfs->kfs_kt' could really not be NULL here.

reported/requested by elad@

Revision 1.130 / (download) - annotate - [select for diffs], Tue Dec 26 00:01:48 2006 UTC (17 years, 3 months ago) by alc
Branch: MAIN
Changes since 1.129: +3 -2 lines
Diff to previous 1.129 (colored) to selected 1.56 (colored)

CID-3855: check if 'kfs->kfs_kt != NULL' before dereferencing it

Revision 1.129 / (download) - annotate - [select for diffs], Sat Dec 9 16:11:52 2006 UTC (17 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Changes since 1.128: +3 -17 lines
Diff to previous 1.128 (colored) to selected 1.56 (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.128 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:38 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.127: +4 -4 lines
Diff to previous 1.127 (colored) to selected 1.56 (colored)

__unused removal on arguments; approved by core.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Nov 4 20:51:32 2006 UTC (17 years, 4 months ago) by jmmv
Branch: MAIN
Changes since 1.126: +5 -4 lines
Diff to previous 1.126 (colored) to selected 1.56 (colored)

Use size_t in a couple of places as it makes more sense WRT the places
where the variables are later used.  From PR kern/25277 by Jeff Ito.

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

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

Revision 1.125 / (download) - annotate - [select for diffs], Fri Jun 23 20:54:21 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.124: +8 -6 lines
Diff to previous 1.124 (colored) to selected 1.56 (colored)

remove useless genop

Revision 1.124 / (download) - annotate - [select for diffs], Fri Jun 23 20:30:11 2006 UTC (17 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.123: +34 -7 lines
Diff to previous 1.123 (colored) to selected 1.56 (colored)

For internal types call kernfs_default_xread() directly, as no entry in
the splay tree has been added for these types. Fix kern/33797 by
Geoff C. Wing.
While here also fix writes the same way (probably broken for 2 years),
and properly implement KERNFS_XREAD.
The IPsec code could probably be moved out now, and use kernfs_alloctype().

Revision 1.123 / (download) - annotate - [select for diffs], Fri Jun 23 16:26:59 2006 UTC (17 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.122: +22 -2 lines
Diff to previous 1.122 (colored) to selected 1.56 (colored)

Backout previous: of course the change
  "Allow optional /kern regular files to have custom read methods..."
works, it's used by Xen.

Revision 1.122 / (download) - annotate - [select for diffs], Fri Jun 23 14:59:40 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.121: +3 -23 lines
Diff to previous 1.121 (colored) to selected 1.56 (colored)

PR/33797: Geoff C. Wing: kernfs files are not supplying information
Roll back the change:
    'Allow optional /kern regular files to have custom read methods...'
which does not work.

Revision 1.121 / (download) - annotate - [select for diffs], Wed Jun 7 22:33:41 2006 UTC (17 years, 9 months ago) by kardel
Branch: MAIN
CVS Tags: gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.120: +4 -9 lines
Diff to previous 1.120 (colored) to selected 1.56 (colored)

merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.120 / (download) - annotate - [select for diffs], Sun May 14 21:31:52 2006 UTC (17 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Changes since 1.119: +12 -12 lines
Diff to previous 1.119 (colored) to selected 1.56 (colored)

integrate kauth.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Apr 4 14:21:55 2006 UTC (17 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, elad-kernelauth-base
Changes since 1.118: +4 -4 lines
Diff to previous 1.118 (colored) to selected 1.56 (colored)

Coverity CID 1087: Clarify NULL test.

Revision 1.118 / (download) - annotate - [select for diffs], Tue Mar 14 20:47:52 2006 UTC (18 years ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base3, peter-altq-base
Branch point for: peter-altq
Changes since 1.117: +23 -3 lines
Diff to previous 1.117 (colored) to selected 1.56 (colored)

Allow optionnal /kern regular files to have custom read methods, the same
way writes are handled: Add KERNFS_XREAD and KERNFS_FILEOP_WRITE files
operations definitions to kfsfileop, a xread function pointer to
kernfs_fileop, rename kernfs_read to kernfs_default_xread and add a
kernfs_read calling kernfs_try_fileop(KERNFS_FILEOP_READ).

Proposed on tech-kern on Feb 18 2006.

Revision 1.117 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:32 2006 UTC (18 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base2, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, elad-kernelauth
Changes since 1.116: +7 -6 lines
Diff to previous 1.116 (colored) to selected 1.56 (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.116 / (download) - annotate - [select for diffs], Sat Dec 24 20:45:09 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.115: +3 -3 lines
Diff to previous 1.115 (colored) to selected 1.56 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.115 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:51 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.114: +11 -11 lines
Diff to previous 1.114 (colored) to selected 1.56 (colored)

merge ktrace-lwp.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Nov 23 22:00:32 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-readahead-base3, ktrace-lwp-base
Changes since 1.113: +5 -5 lines
Diff to previous 1.113 (colored) to selected 1.56 (colored)

Fix 64 bit truncation problem reported by http://www.securitylab.net

Revision 1.113 / (download) - annotate - [select for diffs], Wed Nov 2 12:38:59 2005 UTC (18 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base2, yamt-readahead-base
Branch point for: yamt-readahead
Changes since 1.112: +2 -12 lines
Diff to previous 1.112 (colored) to selected 1.56 (colored)

merge yamt-vop branch.  remove following VOPs.

	VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE

Revision 1.112 / (download) - annotate - [select for diffs], Thu Sep 1 06:25:26 2005 UTC (18 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Changes since 1.111: +6 -6 lines
Diff to previous 1.111 (colored) to selected 1.56 (colored)

Also protect the ipsec ioctls from negative offsets to prevent panics
in m_copydata(). Pointed out by Karl Janmar. Move the negative offset
check from kernfs_xread() to kernfs_read().

Revision 1.111 / (download) - annotate - [select for diffs], Wed Aug 31 09:54:54 2005 UTC (18 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.110: +6 -2 lines
Diff to previous 1.110 (colored) to selected 1.56 (colored)

Don't allow negative offsets when reading the message buffer, because it
can allow reading arbitrary kernel memory.

Revision 1.110 / (download) - annotate - [select for diffs], Tue Aug 30 20:08:01 2005 UTC (18 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.109: +22 -21 lines
Diff to previous 1.109 (colored) to selected 1.56 (colored)

Remove __P()

Revision 1.109 / (download) - annotate - [select for diffs], Sun May 29 21:55:33 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.108: +20 -20 lines
Diff to previous 1.108 (colored) to selected 1.56 (colored)

- sprinkle const
- avoid shadowed variables.

Revision 1.108 / (download) - annotate - [select for diffs], Fri May 20 13:16:54 2005 UTC (18 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.107: +2 -21 lines
Diff to previous 1.107 (colored) to selected 1.56 (colored)

kernfs does not support mmap(), remove code that pretends that it does.

Revision 1.107 / (download) - annotate - [select for diffs], Sat Feb 26 22:59:00 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, kent-audio2-base
Branch point for: netbsd-3
Changes since 1.106: +8 -8 lines
Diff to previous 1.106 (colored) to selected 1.56 (colored)

nuke trailing whitespace

Revision 1.106 / (download) - annotate - [select for diffs], Wed Oct 27 06:55:53 2004 UTC (19 years, 5 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored) to selected 1.56 (colored)

Backout previous.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Oct 27 06:51:06 2004 UTC (19 years, 5 months ago) by skrll
Branch: MAIN
Changes since 1.104: +3 -3 lines
Diff to previous 1.104 (colored) to selected 1.56 (colored)

Don't pass &proc0 in the UIO_SYSSPACE case it is not needed.

Revision 1.104 / (download) - annotate - [select for diffs], Thu May 13 15:44:04 2004 UTC (19 years, 10 months ago) by cl
Branch: MAIN
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored) to selected 1.56 (colored)

Workaround for gcc 2.95.3 failing to initialize structures
and/or unions inside structures using nested designators.
Should be reverted when gcc >=3.3.3 is ready for vax.

Revision 1.103 / (download) - annotate - [select for diffs], Wed May 12 02:07:37 2004 UTC (19 years, 10 months ago) by jrf
Branch: MAIN
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored) to selected 1.56 (colored)

caddr_t -> void * and removal of some more casts.

Revision 1.102 / (download) - annotate - [select for diffs], Fri May 7 15:33:17 2004 UTC (19 years, 10 months ago) by cl
Branch: MAIN
Changes since 1.101: +321 -20 lines
Diff to previous 1.101 (colored) to selected 1.56 (colored)

Allow additional entries (files, subdirs) in kernfs.  Also allow
defining additional kfstypes and provide hooks to run arbitrary code
for any vnodeop on the additional types.

Revision 1.101 / (download) - annotate - [select for diffs], Fri May 7 15:06:15 2004 UTC (19 years, 10 months ago) by cl
Branch: MAIN
Changes since 1.100: +77 -15 lines
Diff to previous 1.100 (colored) to selected 1.56 (colored)

Make lookup and readdir return the same inode number.  kernfs_readdir
now uses kernfs_allocvp to map from kernfs entry to inode number,
kernfs_allocvp is now the only place where entries are mapped to inode
numbers.  Also make KERNFS_FILENO not return random results for entries
not in kern_targets.

Revision 1.100 / (download) - annotate - [select for diffs], Fri May 7 14:56:48 2004 UTC (19 years, 10 months ago) by cl
Branch: MAIN
Changes since 1.99: +18 -22 lines
Diff to previous 1.99 (colored) to selected 1.56 (colored)

Find the right entry when doing lookup on dotdot in kern/ipsec subdirs.
Also remove some duplicate code.

Revision 1.99 / (download) - annotate - [select for diffs], Thu Apr 29 16:10:55 2004 UTC (19 years, 11 months ago) by jrf
Branch: MAIN
Changes since 1.98: +8 -8 lines
Diff to previous 1.98 (colored) to selected 1.56 (colored)

Removed remaining caddr_t casts we do not need in miscfs. Recompiled
kernel and ran for a day or so. There are still some caddr_t types in
the arguments of some calls, I will do those separately (later) as
they touch a lot more of the system.
Approved by christos@NetBSD.org.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Sep 27 13:29:02 2003 UTC (20 years, 6 months ago) by darcy
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.97: +61 -61 lines
Diff to previous 1.97 (colored) to selected 1.56 (colored)

Changes as discussed with itojun on tech-kern.  I have modified the enums
to have KFS or PFS differentiators.  Further I have wrapped the enum in
procfs in "#ifdef _KERNEL" as it is done in kernfs.

To see the discussion go to http://mail-index.NetBSD.org/tech-kern/2003/09/
and look for "Mismatched enums in include files" in the list.

Revision 1.97 / (download) - annotate - [select for diffs], Fri Sep 26 03:08:18 2003 UTC (20 years, 6 months ago) by atatat
Branch: MAIN
Changes since 1.96: +61 -61 lines
Diff to previous 1.96 (colored) to selected 1.56 (colored)

Make kernfs peacefully co-exist with procfs.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Sep 10 10:22:45 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored) to selected 1.56 (colored)

check before deref kfs_kt

Revision 1.95 / (download) - annotate - [select for diffs], Wed Sep 10 09:59:47 2003 UTC (20 years, 6 months ago) by dan
Branch: MAIN
Changes since 1.94: +7 -3 lines
Diff to previous 1.94 (colored) to selected 1.56 (colored)

Make /kern/. have linkcount 2 in non-IPSEC case, 4 in IPSEC case.
Thanks to Valeriy E. Ushakov.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Sep 10 03:56:33 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.93: +10 -2 lines
Diff to previous 1.93 (colored) to selected 1.56 (colored)

check if rootdev/rrootdev actually exists.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Sep 10 03:24:38 2003 UTC (20 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored) to selected 1.56 (colored)

8 spaces is evil, convert to tab.

Revision 1.92 / (download) - annotate - [select for diffs], Wed Sep 10 00:45:22 2003 UTC (20 years, 6 months ago) by dan
Branch: MAIN
Changes since 1.91: +10 -4 lines
Diff to previous 1.91 (colored) to selected 1.56 (colored)

Make vnode times on /kern/boottime be the boot time, not "now".

Handy because ls(1) helpfully converts the time to human-readable
format when printing, and because shell tools like "test -nt" and
"find -newer" can be used against it.

"Inspired" by a discussion about removing lockfiles older than the
last reboot, and Al Crooks' handy observation that a close
approximation can be found with /var/run/dmesg.boot

While here, notice that a lot of the kernfs structures and naming
changed suddenly, and though it seems a clear improvement, there was no
mention in commit logs.

Revision 1.91 / (download) - annotate - [select for diffs], Mon Sep 8 10:54:14 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.90: +3 -5 lines
Diff to previous 1.90 (colored) to selected 1.56 (colored)

remove non-precise comment

Revision 1.90 / (download) - annotate - [select for diffs], Mon Sep 8 06:51:54 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.89: +552 -203 lines
Diff to previous 1.89 (colored) to selected 1.56 (colored)

add /kern/ipsecsa and /kern/ipsecsp, which can be inspected by setkey(8).
it allows easier access to ipsecsa/sp.  it works around problem where
setkey -D does not work with large number of ipsec SAs due to socket buffer
size.

Revision 1.89 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:37 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.88: +3 -7 lines
Diff to previous 1.88 (colored) to selected 1.56 (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.88 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:41 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored) to selected 1.56 (colored)

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

Revision 1.87 / (download) - annotate - [select for diffs], Sun Jun 29 18:43:33 2003 UTC (20 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored) to selected 1.56 (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.86 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:02 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored) to selected 1.56 (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.85 / (download) - annotate - [select for diffs], Thu Apr 10 21:53:33 2003 UTC (20 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.84: +8 -8 lines
Diff to previous 1.84 (colored) to selected 1.56 (colored)

use former genfs_eopnotsupp_rele() as genfs_eopnotsupp(), so that vnodes
are vput()/vrele()d as necessary - some filesystems did use the wrong
one for some ops, and it's just safer to not take the chance

based on suggestion by Bill Studenmund

Revision 1.84 / (download) - annotate - [select for diffs], Sat Oct 12 14:04:45 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.83: +11 -7 lines
Diff to previous 1.83 (colored) to selected 1.56 (colored)

put back the while loop in kernfs_getattr() removed in rev 1.82; it's
necessary to get the whole file length e.g. for msgbuf

this fixes the '/kern/msgbuf & less' problem reported on port-i386
by Dave Tyson

Revision 1.83 / (download) - annotate - [select for diffs], Sat Aug 3 04:52:44 2002 UTC (21 years, 8 months ago) by simonb
Branch: MAIN
CVS Tags: kqueue-base, gehenna-devsw-base
Changes since 1.82: +6 -6 lines
Diff to previous 1.82 (colored) to selected 1.56 (colored)

Just use the "time" variable in the *_getattr functions instead of a call
to (the potentially expensive) microtime().

Revision 1.82 / (download) - annotate - [select for diffs], Fri Jul 19 18:35:44 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.81: +34 -33 lines
Diff to previous 1.81 (colored) to selected 1.56 (colored)

Properly detect error in kernfs_xread().
Fixes kern/10278 by IWAMOTO Toshihiro, though implemented different way.

While here, clean up some int vs. size_t confusion, make
kernfs_x{read|write}() static and g/c some #if 0 stuff.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Jul 5 03:24:06 2002 UTC (21 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.80: +7 -5 lines
Diff to previous 1.80 (colored) to selected 1.56 (colored)

be consistent about how va_[acm]time is set to the current time
(inspired by how procfs does it)

Revision 1.80 / (download) - annotate - [select for diffs], Fri Jul 5 02:02:00 2002 UTC (21 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) to selected 1.56 (colored)

set vap->va_ctime to vap->va_atime (the current time),
rather than vap->va_ctime (which is a no-op).

Revision 1.79 / (download) - annotate - [select for diffs], Thu Dec 6 04:27:42 2001 UTC (22 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.78: +4 -2 lines
Diff to previous 1.78 (colored) to selected 1.56 (colored)

add a VOP_PUTPAGES method for all the filesystems that don't have pages,
just unlock the interlock.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Nov 15 09:48:22 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.77: +2 -3 lines
Diff to previous 1.77 (colored) to selected 1.56 (colored)

don't need <sys/types.h> when including <sys/param.h>

Revision 1.77 / (download) - annotate - [select for diffs], Sat Nov 10 13:33:42 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.76: +4 -1 lines
Diff to previous 1.76 (colored) to selected 1.56 (colored)

add RCSIDs

Revision 1.76 / (download) - annotate - [select for diffs], Sun Jun 3 02:23:31 2001 UTC (22 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache, kqueue
Changes since 1.75: +2 -4 lines
Diff to previous 1.75 (colored) to selected 1.56 (colored)

let kernfs_mmap() use the default error method.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Feb 21 21:39:54 2001 UTC (23 years, 1 month ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.74: +12 -12 lines
Diff to previous 1.74 (colored) to selected 1.56 (colored)

make some more constant arrays 'const'

Revision 1.74 / (download) - annotate - [select for diffs], Sun Feb 4 10:20:00 2001 UTC (23 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored) to selected 1.56 (colored)

clean up some KERNFS_DIAGNOSTIC calls.

Revision 1.73 / (download) - annotate - [select for diffs], Sat Jan 27 12:28:35 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.72: +2 -6 lines
Diff to previous 1.72 (colored) to selected 1.56 (colored)

Back previous out, it was right the way it was. Seems like I should
attend some basic arithmetic lessons to avoid such mistakes :-/

Revision 1.72 / (download) - annotate - [select for diffs], Sat Jan 27 11:42:41 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.71: +6 -2 lines
Diff to previous 1.71 (colored) to selected 1.56 (colored)

fix 'physmem' - the actual value we want is ctob(physmem)

Revision 1.71 / (download) - annotate - [select for diffs], Mon Jan 22 12:17:38 2001 UTC (23 years, 2 months ago) by jdolecek
Branch: MAIN
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored) to selected 1.56 (colored)

make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const

Revision 1.70 / (download) - annotate - [select for diffs], Thu Aug 3 03:41:18 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.69: +3 -4 lines
Diff to previous 1.69 (colored) to selected 1.56 (colored)

MALLOC()/FREE() are not to be used for variable sized allocations.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Jul 14 07:21:50 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.68: +7 -3 lines
Diff to previous 1.68 (colored) to selected 1.56 (colored)

Sprinkle some const.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Jun 28 02:44:06 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.67: +1 -3 lines
Diff to previous 1.67 (colored) to selected 1.56 (colored)

<vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.67 / (download) - annotate - [select for diffs], Wed Aug 25 14:42:35 1999 UTC (24 years, 7 months ago) by sommerfeld
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: wrstuden-devbsize, thorpej_scsipi, netbsd-1-5
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored) to selected 1.56 (colored)

Change variable used for directory offset from "int" to "off_t".
Overkill, but avoids a host of truncation problems.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Aug 24 23:29:09 1999 UTC (24 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.65: +5 -1 lines
Diff to previous 1.65 (colored) to selected 1.56 (colored)

Fix PR8270:

Problem turned out to be due to improper handling of reads beyond EOF:
they should just return without error with the uio unchanged, and the
caller will recognize this as a zero-byte return (EOF).

The previous fix to protect directory reads against bogus uio_offset
values returned EINVAL, which broke mount -o union, which only
union'ed in the lower directory if the upper directory cleanly
returned EOF.

While we're here, protect kernfs as well.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Aug 3 20:19:19 1999 UTC (24 years, 8 months ago) by wrstuden
Branch: MAIN
Changes since 1.64: +3 -1 lines
Diff to previous 1.64 (colored) to selected 1.56 (colored)

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

Reviewed by: thorpej
Tested by: wrstuden

Revision 1.64 / (download) - annotate - [select for diffs], Thu Jul 8 01:26:27 1999 UTC (24 years, 8 months ago) by wrstuden
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.63: +28 -17 lines
Diff to previous 1.63 (colored) to selected 1.56 (colored)

Bump osrelease to 1.4E. Add layerfs files, remove null_subr.c.

Update coda to new struct lock in struct vnode.

make fdescfs, kernfs, portalfs, and procfs actually lock their vnodes.
It's not that hard.

Make unionfs set v_vnlock = NULL so any overlayed fs will call its
VOP_LOCK.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:26 1999 UTC (25 years ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: netbsd-1-4, chs-ubc2
Changes since 1.62: +2 -11 lines
Diff to previous 1.62 (colored) to selected 1.56 (colored)

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

Revision 1.62 / (download) - annotate - [select for diffs], Thu Aug 13 10:06:33 1998 UTC (25 years, 7 months ago) by kleink
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored) to selected 1.56 (colored)

Per POSIX, fail with EINVAL if advisory locking is attempted on a file type
that doesn't support it, rather than using a homegrown EBADF or EOPNOTSUPP.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Aug 10 08:11:12 1998 UTC (25 years, 7 months ago) by matthias
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored) to selected 1.56 (colored)

create miscfs/genfs/genfs_vnops.c:genfs_enoioctl and make all the other
filesystems use it instead of a private version.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Aug 9 20:51:08 1998 UTC (25 years, 7 months ago) by perry
Branch: MAIN
Changes since 1.59: +8 -8 lines
Diff to previous 1.59 (colored) to selected 1.56 (colored)

bzero->memset, bcopy->memcpy, bcmp->memcmp

Revision 1.59 / (download) - annotate - [select for diffs], Mon Aug 3 14:19:59 1998 UTC (25 years, 8 months ago) by kleink
Branch: MAIN
Changes since 1.58: +4 -1 lines
Diff to previous 1.58 (colored) to selected 1.56 (colored)

Recognize _PC_SYNC_IO.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Mar 8 14:04:14 1998 UTC (26 years ago) by mrg
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored) to selected 1.56 (colored)

standardise options header includes.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Mar 1 02:21:04 1998 UTC (26 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.56: +46 -16 lines
Diff to previous 1.56 (colored)

Merge with Lite2 + local changes

Revision 1.56 / (download) - annotate - [selected], Thu Feb 12 20:38:45 1998 UTC (26 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.55: +3 -1 lines
Diff to previous 1.55 (colored)

Don't include option headers if building an LKM.

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

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

Revision 1.54 / (download) - annotate - [select for diffs], Thu Feb 5 08:00:12 1998 UTC (26 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.53: +10 -1 lines
Diff to previous 1.53 (colored) to selected 1.56 (colored)

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

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

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)

Revision 1.53 / (download) - annotate - [select for diffs], Fri Oct 10 02:01:02 1997 UTC (26 years, 5 months ago) by fvdl
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-base
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored) to selected 1.56 (colored)

Bump last argument to VOP_READDIR to off_t (from u_long).

Revision 1.52 / (download) - annotate - [select for diffs], Fri Sep 19 19:14:20 1997 UTC (26 years, 6 months ago) by leo
Branch: MAIN
Changes since 1.51: +23 -6 lines
Diff to previous 1.51 (colored) to selected 1.56 (colored)

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Sep 10 13:44:21 1997 UTC (26 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.50: +6 -6 lines
Diff to previous 1.50 (colored) to selected 1.56 (colored)

PR/4098: Alan Barrett: Fix diagnostic printf formatting.

Revision 1.50 / (download) - annotate - [select for diffs], Sat May 10 22:04:14 1997 UTC (26 years, 10 months ago) by pk
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.49: +2 -18 lines
Diff to previous 1.49 (colored) to selected 1.56 (colored)

Move `struct kern_target' definition into kernfs.h

Revision 1.49 / (download) - annotate - [select for diffs], Thu May 8 16:20:17 1997 UTC (26 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.48: +11 -4 lines
Diff to previous 1.48 (colored) to selected 1.56 (colored)

Pass the vnode type to vaccess(), and use it when checking VEXEC.  Make sure
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Oct 25 21:58:00 1996 UTC (27 years, 5 months ago) by cgd
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored) to selected 1.56 (colored)

define path name string variables that we should not (and, thankfully, do
not) modify as 'const char *' rather 'char *'.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Oct 13 02:21:31 1996 UTC (27 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.46: +18 -18 lines
Diff to previous 1.46 (colored) to selected 1.56 (colored)

backout previous kprintf changes

Revision 1.46 / (download) - annotate - [select for diffs], Thu Oct 10 22:54:08 1996 UTC (27 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.45: +18 -18 lines
Diff to previous 1.45 (colored) to selected 1.56 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.45 / (download) - annotate - [select for diffs], Sat Sep 7 12:41:14 1996 UTC (27 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored) to selected 1.56 (colored)

Implement poll(2).

Revision 1.44 / (download) - annotate - [select for diffs], Sun Sep 1 23:48:12 1996 UTC (27 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.43: +70 -128 lines
Diff to previous 1.43 (colored) to selected 1.56 (colored)

Add a set of generic file system operations that most file systems use.
Also, fix some time stamp bogosities.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Mar 16 23:52:47 1996 UTC (28 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored) to selected 1.56 (colored)

Fix printf format follies.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Feb 13 13:12:55 1996 UTC (28 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.41: +3 -16 lines
Diff to previous 1.41 (colored) to selected 1.56 (colored)

GC *_nullop().  Minor nits.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Feb 9 22:40:24 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.40: +183 -152 lines
Diff to previous 1.40 (colored) to selected 1.56 (colored)

miscfs prototype changes

Revision 1.40 / (download) - annotate - [select for diffs], Fri Feb 9 14:45:48 1996 UTC (28 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.39: +44 -4 lines
Diff to previous 1.39 (colored) to selected 1.56 (colored)

Fix vop_link, vop_symlink, and vop_remove semantics in several ways:
* Change the argument names to vop_link so they actually make sense.
* Implement vop_link and vop_symlink for all file systems, so they do proper
  cleanup.
* Require the file system to decide whether or not linking and unlinking of
  directories is allowed, and disable it for all current file systems.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Oct 9 14:25:02 1995 UTC (28 years, 5 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored) to selected 1.56 (colored)

Fix the inode calculation in kernfs_getattr().

Revision 1.38 / (download) - annotate - [select for diffs], Mon Oct 9 14:03:35 1995 UTC (28 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.37: +5 -7 lines
Diff to previous 1.37 (colored) to selected 1.56 (colored)

Use the index number as the cookie, rather than multiplying by UIO_MX.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Oct 9 11:18:59 1995 UTC (28 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.36: +22 -29 lines
Diff to previous 1.36 (colored) to selected 1.56 (colored)

Add support for cookies, mostly from Greg Hudson.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Apr 15 01:56:43 1995 UTC (28 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.35: +4 -2 lines
Diff to previous 1.35 (colored) to selected 1.56 (colored)

fix timeval vs. timespec warnings

Revision 1.35 / (download) - annotate - [select for diffs], Fri Feb 3 16:18:46 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.34: +12 -12 lines
Diff to previous 1.34 (colored) to selected 1.56 (colored)

Return EROFS rather than ENOENT in many cases.  Also some cosmetic cleanup.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Dec 27 19:11:17 1994 UTC (29 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored) to selected 1.56 (colored)

Format police.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Dec 24 16:44:24 1994 UTC (29 years, 3 months ago) by ws
Branch: MAIN
Changes since 1.32: +2 -34 lines
Diff to previous 1.32 (colored) to selected 1.56 (colored)

Implement and use a common access checking routine

Revision 1.32 / (download) - annotate - [select for diffs], Wed Dec 14 18:47:42 1994 UTC (29 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.31: +1 -2 lines
Diff to previous 1.31 (colored) to selected 1.56 (colored)

Remove a_fp.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Dec 1 10:16:53 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.30: +2 -1 lines
Diff to previous 1.30 (colored) to selected 1.56 (colored)

Make sure averunnable.fscale is filled before using it.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 14 06:06:24 1994 UTC (29 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (colored) to selected 1.56 (colored)

fixed struct comment

Revision 1.29 / (download) - annotate - [select for diffs], Thu Oct 20 04:26:28 1994 UTC (29 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored) to selected 1.56 (colored)

update for new syscall args description mechanism

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jul 21 10:22:20 1994 UTC (29 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.27: +63 -37 lines
Diff to previous 1.27 (colored) to selected 1.56 (colored)

Implement /kern/msgbuf.

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

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

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jun 15 22:54:43 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.25: +25 -11 lines
Diff to previous 1.25 (colored) to selected 1.56 (colored)

Minor update from JSP after merging my changes.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jun 15 17:52:32 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +3 -1 lines
Diff to previous 1.24 (colored) to selected 1.56 (colored)

Deal with silly DIAGNOSTIC check.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jun 15 03:30:44 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.23: +5 -4 lines
Diff to previous 1.23 (colored) to selected 1.56 (colored)

Use vget() for devices.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jun 8 11:33:21 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.22: +412 -412 lines
Diff to previous 1.22 (colored) to selected 1.56 (colored)

Update to 4.4-Lite fs code, with local changes.

Revision 1.22 / (download) - annotate - [select for diffs], Tue May 17 06:59:17 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored) to selected 1.56 (colored)

Really fix the file size problem.

Revision 1.21 / (download) - annotate - [select for diffs], Tue May 17 04:10:29 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.20: +2 -3 lines
Diff to previous 1.20 (colored) to selected 1.56 (colored)

actually set va_size!

Revision 1.20 / (download) - annotate - [select for diffs], Mon Feb 14 19:46:18 1994 UTC (30 years, 1 month ago) by ws
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored) to selected 1.56 (colored)

Add .. entry to /kern

Revision 1.19 / (download) - annotate - [select for diffs], Fri Feb 11 01:01:51 1994 UTC (30 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored) to selected 1.56 (colored)

don't give bogus return code from read()

Revision 1.18 / (download) - annotate - [select for diffs], Wed Feb 9 06:32:17 1994 UTC (30 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.17: +4 -1 lines
Diff to previous 1.17 (colored) to selected 1.56 (colored)

don't panic if user does 'cat /kern', though result is dubious.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jan 5 11:05:12 1994 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.16: +169 -251 lines
Diff to previous 1.16 (colored) to selected 1.56 (colored)

update with latest kernfs file system from jsp@sequent.com

Revision 1.16 / (download) - annotate - [select for diffs], Wed Dec 22 13:14:10 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored) to selected 1.56 (colored)

fix return type of vnode print routine

Revision 1.15 / (download) - annotate - [select for diffs], Mon Dec 20 12:39:12 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.14: +16 -10 lines
Diff to previous 1.14 (colored) to selected 1.56 (colored)

pull load average and misc changes down from magnum

Revision 1.14 / (download) - annotate - [select for diffs], Sat Dec 18 03:56:12 1993 UTC (30 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.13: +16 -15 lines
Diff to previous 1.13 (colored) to selected 1.56 (colored)

Canonicalize all #includes.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Nov 20 01:57:07 1993 UTC (30 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.12: +7 -3 lines
Diff to previous 1.12 (colored) to selected 1.56 (colored)

#ifdef out /kern/root at theo's request

Revision 1.12 / (download) - annotate - [select for diffs], Tue Sep 7 15:41:21 1993 UTC (30 years, 6 months ago) by ws
Branch: MAIN
Changes since 1.11: +9 -3 lines
Diff to previous 1.11 (colored) to selected 1.56 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Mon Aug 2 23:00:57 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored) to selected 1.56 (colored)

Make kernfs_print have a return type of void.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jun 7 05:25:25 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored) to selected 1.56 (colored)

give various filesystems their own vnode types

Revision 1.9 / (download) - annotate - [select for diffs], Fri May 28 16:47:05 1993 UTC (30 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.8: +191 -116 lines
Diff to previous 1.8 (colored) to selected 1.56 (colored)

add some more functionality: a setattr which supports chmod+chown+chgrp,
and the various support elsewhere to deal with it.

Revision 1.8 / (download) - annotate - [select for diffs], Fri May 28 14:12:17 1993 UTC (30 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.7: +47 -6 lines
Diff to previous 1.7 (colored) to selected 1.56 (colored)

add kernfs_access function, to kill kernfs security hole

Revision 1.7 / (download) - annotate - [select for diffs], Thu May 20 04:01:31 1993 UTC (30 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored) to selected 1.56 (colored)

header cleanup

Revision 1.6 / (download) - annotate - [select for diffs], Tue Apr 27 10:06:10 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.5: +10 -4 lines
Diff to previous 1.5 (colored) to selected 1.56 (colored)

fix several off-by-one errors in hostname setting/reading

Revision 1.5 / (download) - annotate - [select for diffs], Tue Apr 27 07:21:37 1993 UTC (30 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored) to selected 1.56 (colored)

Use EPERM when write permission is denied, not EBADF.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Mar 27 00:37:11 1993 UTC (31 years ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.3: +14 -1 lines
Diff to previous 1.3 (colored) to selected 1.56 (colored)

added ".." and support for "rrootdev"

Revision 1.3 / (download) - annotate - [select for diffs], Thu Mar 25 17:34:52 1993 UTC (31 years ago) by cgd
Branch: MAIN
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored) to selected 1.56 (colored)

fixed problem where you couldn't unmount after looking...

Revision 1.2 / (download) - annotate - [select for diffs], Thu Mar 25 06:00:24 1993 UTC (31 years ago) by cgd
Branch: MAIN
Changes since 1.1: +28 -5 lines
Diff to previous 1.1 (colored) to selected 1.56 (colored)

changed copyright notice thanks to following statement:

Return-Path: jsp@compnews.co.uk
Received: from ben.uknet.ac.uk by postgres.Berkeley.EDU (5.61/1.29)
	id AA25983; Thu, 25 Mar 93 05:37:37 -0800
Received: from fennel.compnews.co.uk by ben.uknet.ac.uk via UKIP with SMTP (PP)
          id <g.05640-0@ben.uknet.ac.uk>; Thu, 25 Mar 1993 13:37:19 +0000
Received: from sage.compnews.co.uk by fennel.compnews.co.uk;
          Thu, 25 Mar 93 13:37:08 GMT
Message-Id: <28109.9303251337@sage.compnews.co.uk>
From: jsp@compnews.co.uk (Jan-Simon Pendry)
Date: Thu, 25 Mar 1993 13:37:05 +0100
In-Reply-To: cgd@postgres.berkeley.edu's message as of Mar 25, 5:32am.
Phone-Number-1: +44 430 432450
Phone-Number-2: +44 430 432480 x20
Fax-Number: +44 430 432022
X-Mailer: Mail User's Shell (7.2.5 10/14/92)
To: cgd@postgres.berkeley.edu
Subject: Re: fdesc/kernfs/etc code...

You may put this copyright message on the source code:

/*
 * Copyright (c) 1990, 1992 Jan-Simon Pendry
 * All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Jan-Simon Pendry.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *      This product includes software developed by the University of
 *      California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */

Revision 1.1 / (download) - annotate - [select for diffs], Tue Mar 23 23:56:56 1993 UTC (31 years ago) by cgd
Branch: MAIN
Diff to selected 1.56 (colored)

files which implement the kern filesystem.  from Jan-Simon Pendry,
pendry@vangogh.cs.berkeley.edu

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




CVSweb <webmaster@jp.NetBSD.org>