OpenBSD/src R9pG8Kfsys/kern vfs_subr.c spec_vnops.c, sys/nfs nfs_vnops.c nfs_syscalls.c

   eliminate bremfree macro, just an alias for bufcache_take.
   ok claudio miod
VersionDeltaFile
1.328+4-4sys/kern/vfs_subr.c
1.207+3-3sys/nfs/nfs_vnops.c
1.114+2-2sys/kern/spec_vnops.c
1.130+2-2sys/nfs/nfs_syscalls.c
1.103+2-2sys/ufs/ffs/ffs_vnops.c
1.115+1-2sys/sys/buf.h
+14-156 files

OpenBSD/src W8BiOussys/kern vfs_syscalls.c vfs_vnops.c, sys/nfs nfs_serv.c nfs_vnops.c

   remove VATTR_NULL() define, directly call vattr_null()

   There used to be a predefined null vattr for !DIAGNOSTIC
   but that was removed in vnode.h rev 1.84 in 2007.

   ok semarie@ miod@
VersionDeltaFile
1.370+14-14sys/kern/vfs_syscalls.c
1.131+8-8sys/nfs/nfs_serv.c
1.123+3-3sys/kern/vfs_vnops.c
1.115+3-3sys/kern/tty_pty.c
1.206+3-3sys/nfs/nfs_vnops.c
1.346+2-2sys/kern/kern_sig.c
+33-332 files not shown
+36-378 files

OpenBSD/src 6ez00fXsys/miscfs/fifofs fifo_vnops.c, sys/msdosfs msdosfs_vfsops.c msdosfs_vnops.c

   Put the bowels of the various VOP_PRINT routines under
   defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
   as they won't be used otherwise.

   Shaves a few bytes off installation kernels.

   ok kn@ semarie@
VersionDeltaFile
1.164+3-4sys/ufs/ufs/ufs_vnops.c
1.108+5-1sys/miscfs/fifofs/fifo_vnops.c
1.98+2-2sys/msdosfs/msdosfs_vfsops.c
1.143+3-1sys/msdosfs/msdosfs_vnops.c
1.205+3-1sys/nfs/nfs_vnops.c
1.51+3-1sys/ntfs/ntfs_vnops.c
+19-1010 files not shown
+48-2116 files

OpenBSD/src LiQutuUsys/nfs nfs_srvsubs.c nfs_serv.c

   remove unneeded semicolons after switch statements
VersionDeltaFile
1.2+4-4sys/nfs/nfs_srvsubs.c
1.130+3-3sys/nfs/nfs_serv.c
1.128+2-2sys/nfs/nfs_syscalls.c
1.204+2-2sys/nfs/nfs_vnops.c
1.154+2-2sys/nfs/nfs_socket.c
1.32+2-2sys/nfs/nfs_srvcache.c
+15-151 files not shown
+17-177 files

OpenBSD/src crYOAe6sys/isofs/cd9660 cd9660_vnops.c, sys/isofs/udf udf_vnops.c

   Ensure that file names passed back by readdir do not include a '/'
   character. The '/' char is the path separator and is not allowed in
   any filename.

   NFS specific report by Apple Security Engineering and Architecture (SEAR).

   Input from guenther@ and millert@
   from claudio@; OK beck@ miod@

   msdos already transfroms for Windows long names a '/' char into '?'.
   Do the same for the 8.3 case as well.

   This is not ideal since now it is possible that two files in the same
   directory have the same name but the msdos code already does a lot of
   this and so the problem already exists.

   from claudio@; OK beck@ miod@

   Do a basic sanity check that dirents returned via fuse are kind of sane.

    [9 lines not shown]
VersionDeltaFile
1.67.2.1+32-1sys/miscfs/fuse/fuse_vnops.c
1.46.6.1+6-2sys/ufs/ext2fs/ext2fs_lookup.c
1.70.2.1+7-1sys/isofs/udf/udf_vnops.c
1.193.2.1+6-1sys/nfs/nfs_vnops.c
1.95.2.1+6-1sys/isofs/cd9660/cd9660_vnops.c
1.26.2.1+6-1sys/tmpfs/tmpfs_subr.c
+63-73 files not shown
+77-129 files

OpenBSD/src PIEj8gFsys/isofs/udf udf_vnops.c, sys/miscfs/fuse fuse_vnops.c

   Ensure that file names passed back by readdir do not include a '/'
   character. The '/' char is the path separator and is not allowed in
   any filename.

   NFS specific report by Apple Security Engineering and Architecture (SEAR).

   Input from guenther@ and millert@
   from claudio@; OK beck@ miod@

   msdos already transfroms for Windows long names a '/' char into '?'.
   Do the same for the 8.3 case as well.

   This is not ideal since now it is possible that two files in the same
   directory have the same name but the msdos code already does a lot of
   this and so the problem already exists.

   from claudio@; OK beck@ miod@

   Do a basic sanity check that dirents returned via fuse are kind of sane.

    [9 lines not shown]
VersionDeltaFile
1.67.4.1+32-1sys/miscfs/fuse/fuse_vnops.c
1.70.4.1+7-1sys/isofs/udf/udf_vnops.c
1.46.10.1+6-2sys/ufs/ext2fs/ext2fs_lookup.c
1.193.4.1+6-1sys/nfs/nfs_vnops.c
1.26.6.1+6-1sys/tmpfs/tmpfs_subr.c
1.160.2.1+6-1sys/ufs/ufs/ufs_vnops.c
+63-73 files not shown
+77-129 files

OpenBSD/src 1bYT5W0sys/isofs/cd9660 cd9660_vnops.c, sys/isofs/udf udf_vnops.c

   Ensure that file names passed back by readdir do not include a '/'
   character. The '/' char is the path separator and is not allowed in
   any filename.

   NFS specific report by Apple Security Engineering and Architecture (SEAR).

   Input from guenther@ and millert@
   OK beck@ miod@
VersionDeltaFile
1.47+6-2sys/ufs/ext2fs/ext2fs_lookup.c
1.73+7-1sys/isofs/udf/udf_vnops.c
1.163+6-1sys/ufs/ufs/ufs_vnops.c
1.96+6-1sys/isofs/cd9660/cd9660_vnops.c
1.203+6-1sys/nfs/nfs_vnops.c
1.27+6-1sys/tmpfs/tmpfs_subr.c
+37-71 files not shown
+42-87 files

OpenBSD/src gmiVSbssys/nfs nfsm_subs.h nfs_serv.c

   After calling m_freem() on nmi_mrep (or nmi_mreq) set the pointer to NULL.

   Only do this if struct nfsm_info doesn't have local scope.
   In some cases the caller would perfrom another m_freem and double free
   the mbuf and Bad Things(TM) would happen.

   Reported by Claes M Nyberg on bugs@; with & ok miod@
VersionDeltaFile
1.49+7-1sys/nfs/nfsm_subs.h
1.129+3-5sys/nfs/nfs_serv.c
1.202+4-1sys/nfs/nfs_vnops.c
1.153+2-1sys/nfs/nfs_socket.c
+16-84 files

OpenBSD/src Ql9xNgzsys/nfs nfs_vnops.c

   remove unused nfs_null()
   ok miod@ mlarkin@
VersionDeltaFile
1.201+1-18sys/nfs/nfs_vnops.c
+1-181 files

OpenBSD/src M4lZGxysys/nfs nfs_vnops.c

   remove unneeded nfs_getreq() prototype

   nfs_getreq() is in nfs_socket.c and not called from nfs_vnops.c
VersionDeltaFile
1.200+1-2sys/nfs/nfs_vnops.c
+1-21 files

OpenBSD/src WwOQUYTsys/kern vfs_vops.c, sys/miscfs/fuse fuse_vnops.c

   vfs: VOP_REMOVE: move vnode unlocking and ref dropping to FS-indep part

   while here, ensure all vop_remove field are set, and always call the function.

   the change is very conservative: it only adds vnode ref drop/unlock where it was
   absent because it should be unreachable (and if it wasn't, it should fix
   things).

   ok miod@
VersionDeltaFile
1.36+10-4sys/kern/vfs_vops.c
1.55+1-10sys/tmpfs/tmpfs_vnops.c
1.141+1-7sys/msdosfs/msdosfs_vnops.c
1.94+1-6sys/ufs/ext2fs/ext2fs_vnops.c
1.162+1-6sys/ufs/ufs/ufs_vnops.c
1.69+1-6sys/miscfs/fuse/fuse_vnops.c
+15-394 files not shown
+22-5110 files

OpenBSD/src ZI3fbQKsys/nfs nfs_syscalls.c nfs_vnops.c

   remove unneeded includes
   ok miod@ mpi@
VersionDeltaFile
1.126+1-10sys/nfs/nfs_syscalls.c
1.198+1-9sys/nfs/nfs_vnops.c
1.7+1-6sys/nfs/nfs_debug.c
1.130+1-6sys/nfs/nfs_vfsops.c
1.39+1-5sys/nfs/krpc_subr.c
1.86+1-4sys/nfs/nfs_bio.c
+6-406 files not shown
+12-5912 files

OpenBSD/src TJu5fxQsys/nfs nfs_subs.c nfs_srvcache.c

   Constify NFS data whenever possible. Also make a few more const data static.

   ok jsg@ semarie@
VersionDeltaFile
1.148+36-34sys/nfs/nfs_subs.c
1.30+4-4sys/nfs/nfs_srvcache.c
1.150+4-4sys/nfs/nfs_socket.c
1.125+2-4sys/nfs/nfs_serv.c
1.125+2-2sys/nfs/nfs_syscalls.c
1.197+2-2sys/nfs/nfs_vnops.c
+50-506 files

OpenBSD/src Q3lYioysys/nfs nfs_serv.c nfs_vnops.c

   Convert all the NFS macros (in nfsm_subs.h) into inline functions with the
   appropriate extra arguments.

   This (hopefully) completes the unmessyfication work started by thib@ a long,
   long time ago (in a galaxy far away).

   The conversion logic has been:
   - nfsm_dissect has been turned into an rvalue expression, leaving the
     cast operation up to its caller.
   - macros which had three different exit paths (return, goto nfsmout or
     fallthrough) have been split so that no macros have more than two exit paths.
   - then they have been modified to return a value, which lets the caller
     figure out what exit path is needed.
   - local variables abused by the macros are now local variables of the new
     inline functions.

   This single commit is the sum of 25 intermediate diffs, which have all been
   carefully reviewed by (at least) jsg@ and semarie@.


    [3 lines not shown]
VersionDeltaFile
1.124+549-191sys/nfs/nfs_serv.c
1.196+389-161sys/nfs/nfs_vnops.c
1.48+117-194sys/nfs/nfsm_subs.h
1.147+56-42sys/nfs/nfs_subs.c
1.149+46-23sys/nfs/nfs_socket.c
1.129+18-13sys/nfs/nfs_vfsops.c
+1,175-6242 files not shown
+1,178-6338 files

OpenBSD/src rr4hQbfsys/dev/acpi acpitoshiba.c, sys/dev/isa ad1848.c

   correct indentation

   no functional change, found by smatch warnings
   ok miod@ bluhm@
VersionDeltaFile
1.17+9-10sys/dev/acpi/acpitoshiba.c
1.10+9-9sys/dev/pci/ixgb_hw.c
1.49+9-8sys/dev/isa/ad1848.c
1.364+7-7sys/dev/pci/pciide.c
1.404+7-6sys/netinet/tcp_input.c
1.4+6-6sys/dev/pci/if_ngbe.c
+47-4636 files not shown
+137-13742 files

OpenBSD/src 3yvLkJclib/libc/sys link.2, sys/kern vfs_syscalls.c

   Move the "no (hard) linking directories" and "no cross-mount links"
   checks from all the filesystems that support hardlinks at all into
   the VFS layer.  Simplify, EPERM description in link(2).

   ok miod@ mpi@
VersionDeltaFile
1.364+13-5sys/kern/vfs_syscalls.c
1.54+1-14sys/tmpfs/tmpfs_vnops.c
1.92+1-11sys/ufs/ext2fs/ext2fs_vnops.c
1.161+1-11sys/ufs/ufs/ufs_vnops.c
1.68+1-11sys/miscfs/fuse/fuse_vnops.c
1.30+3-7lib/libc/sys/link.2
+20-592 files not shown
+23-678 files

OpenBSD/src CZgR7Uesys/nfs nfs_vnops.c

   Don't redeclare s, it's already there.

   noticed by miod@
   ok kettenis@
VersionDeltaFile
1.193+2-2sys/nfs/nfs_vnops.c
+2-21 files

OpenBSD/src Oivb0cWsys/nfs nfs_vnops.c

   Fix missing splbio() needed in nfs

   ok claudio@ kettenis@
VersionDeltaFile
1.192+3-1sys/nfs/nfs_vnops.c
+3-11 files

OpenBSD/src XpCPs9Ebin/csh func.c, lib/libedit vi.c common.c

   Delete obsolete /* ARGSUSED */ lint comments.

   ok miod@ millert@
VersionDeltaFile
1.462+1-52sbin/ifconfig/ifconfig.c
1.29+1-46lib/libedit/vi.c
1.41+1-28bin/csh/func.c
1.85+1-26usr.bin/ftp/cmds.c
1.23+1-25lib/libedit/common.c
1.98+1-21sys/ddb/db_command.c
+6-198283 files not shown
+289-1,192289 files

OpenBSD/src QnKH9Mvsys/kern vfs_subr.c, sys/msdosfs msdosfs_vfsops.c

   Put more struct vnode fields under splbio().

   Buffer cache related struct vnode fields can be accessed in interrupt
   context. Be more consistent with the use of splbio().

   OK mpi@
VersionDeltaFile
1.316+33-10sys/kern/vfs_subr.c
1.167+8-9sys/sys/vnode.h
1.66+10-5sys/ufs/ext2fs/ext2fs_inode.c
1.127+9-3sys/nfs/nfs_vfsops.c
1.96+9-3sys/msdosfs/msdosfs_vfsops.c
1.190+6-5sys/nfs/nfs_vnops.c
+75-353 files not shown
+96-419 files

OpenBSD/src Sqjuje7share/man/man9 VOP_LOOKUP.9, sys/isofs/cd9660 cd9660_vnops.c

   Remove unused VOP_POLL().

   OK mpi@
VersionDeltaFile
1.95+1-50sys/miscfs/fifofs/fifo_vnops.c
1.46+2-32share/man/man9/VOP_LOOKUP.9
1.108+1-18sys/kern/spec_vnops.c
1.41+1-18sys/miscfs/deadfs/dead_vnops.c
1.189+1-17sys/nfs/nfs_vnops.c
1.93+1-17sys/isofs/cd9660/cd9660_vnops.c
+7-15220 files not shown
+30-26526 files

OpenBSD/src UvNkEYishare/man/man9 VOP_LOOKUP.9, sys/dev softraid.c

   Add vnode parameter to VOP_STRATEGY()

   Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling
   the correct vop_strategy callback. Now the vnode is also available
   in the callback.

   OK mpi@
VersionDeltaFile
1.45+8-5share/man/man9/VOP_LOOKUP.9
1.34+5-4sys/kern/vfs_vops.c
1.208+4-4sys/kern/vfs_bio.c
1.152+4-4sys/uvm/uvm_swap.c
1.163+4-3sys/sys/vnode.h
1.420+3-3sys/dev/softraid.c
+28-2310 files not shown
+48-4316 files

OpenBSD/src uboVljSsys/isofs/cd9660 cd9660_vnops.c, sys/miscfs/fifofs fifo_vnops.c

   vfs: merge *_badop to vop_generic_badop

   It replaces spec_badop, fifo_badop, dead_badop and mfs_badop, which
   are only calls to panic(9), to one unique function vop_generic_badop().

   No intented behaviour changes (outside the panic message which isn't
   the same).

   ok mpi@
VersionDeltaFile
1.56+22-31sys/ufs/mfs/mfs_vnops.c
1.90+24-24sys/isofs/cd9660/cd9660_vnops.c
1.187+24-24sys/nfs/nfs_vnops.c
1.89+24-24sys/ufs/ext2fs/ext2fs_vnops.c
1.99+24-24sys/ufs/ffs/ffs_vnops.c
1.81+13-27sys/miscfs/fifofs/fifo_vnops.c
+131-1549 files not shown
+190-23215 files

OpenBSD/src s6ZQ5u3sys/miscfs/fuse fuse_device.c, sys/msdosfs msdosfs_fat.c

   spelling
VersionDeltaFile
1.38+5-5sys/ufs/ext2fs/ext2fs_alloc.c
1.36+4-4sys/miscfs/fuse/fuse_device.c
1.34+3-3sys/msdosfs/msdosfs_fat.c
1.186+3-3sys/nfs/nfs_vnops.c
1.46+3-3sys/tmpfs/tmpfs_vnops.c
1.117+2-2sys/nfs/nfs_syscalls.c
+20-2011 files not shown
+42-4217 files

OpenBSD/src sH2rlfosys/nfs nfs_vnops.c

   In the previous commit, check tv_nsec, not tv_sec as VNOVAL is a
   valid valuse of tv_sec but an invalid value for tv_nsec.
   Noticed by guenther@. ok beck@ deraadt@
VersionDeltaFile
1.185+3-3sys/nfs/nfs_vnops.c
+3-31 files

OpenBSD/src 41MDCZtsys/nfs nfs_vnops.c

   nfs_create: after an exclusive create rpc, make sure to update
   timestamps.

   This issue was iscovered after rsync 3.2 changed behaviour on an NFS
   mounted partition.. Change lifted from NetBSD (r 1.204).

   ok beck@, kn@, deraadt@
VersionDeltaFile
1.184+9-2sys/nfs/nfs_vnops.c
+9-21 files

OpenBSD/src q09CzsMsys/net pf.c if_pflow.c, sys/netinet if_ether.c

   kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

   time_second(9) and time_uptime(9) are widely used in the kernel to
   quickly get the system UTC or system uptime as a time_t.  However,
   time_t is 64-bit everywhere, so it is not generally safe to use them
   on 32-bit platforms: you have a split-read problem if your hardware
   cannot perform atomic 64-bit reads.

   This patch replaces time_second(9) with gettime(9), a safer successor
   interface, throughout the kernel.  Similarly, time_uptime(9) is replaced
   with getuptime(9).

   There is a performance cost on 32-bit platforms in exchange for
   eliminating the split-read problem: instead of two register reads you
   now have a lockless read loop to pull the values from the timehands.
   This is really not *too* bad in the grand scheme of things, but
   compared to what we were doing before it is several times slower.

   There is no performance cost on 64-bit (__LP64__) platforms.

    [6 lines not shown]
VersionDeltaFile
1.1093+20-20sys/net/pf.c
1.91+16-16sys/net/if_pflow.c
1.271+13-13sys/net/if_pfsync.c
1.243+12-12sys/netinet/if_ether.c
1.233+12-12sys/netinet6/nd6.c
1.47+11-13sys/ufs/ufs/ufs_quota.c
+84-8646 files not shown
+259-25952 files

OpenBSD/src 23LLjmMsys/isofs/cd9660 cd9660_vnops.c cd9660_extern.h, sys/nfs nfs_vnops.c

   struct vops is not modified during runtime so use const which moves each
   into read-only data segment.
   OK deraadt@ tedu@
VersionDeltaFile
1.155+5-5sys/sys/vnode.h
1.86+4-4sys/ufs/ext2fs/ext2fs_vnops.c
1.182+4-4sys/nfs/nfs_vnops.c
1.38+4-4sys/ufs/ext2fs/ext2fs_extern.h
1.81+4-4sys/isofs/cd9660/cd9660_vnops.c
1.15+4-4sys/isofs/cd9660/cd9660_extern.h
+25-2524 files not shown
+78-7830 files

OpenBSD/src A4bXfLqshare/man/man9 vwaitforio.9, sys/kern vfs_subr.c spec_vnops.c

   vwaitforio(9): tsleep(9) -> tsleep_nsec(9); ok visa@
VersionDeltaFile
1.16+9-4share/man/man9/vwaitforio.9
1.181+7-6sys/nfs/nfs_vnops.c
1.291+5-5sys/kern/vfs_subr.c
1.96+2-2sys/kern/spec_vnops.c
1.151+2-2sys/sys/vnode.h
1.94+2-2sys/ufs/ffs/ffs_vnops.c
+27-216 files

OpenBSD/src FXUgZfIsys/nfs nfs_serv.c nfs_vnops.c

   Check for negative length integers in NFS server.  A malicious
   client could crash the server.
   from bluhm@; OK tedu@

   Check for negative length integers in NFS client.  A malicious
   server could confuse the client file system code.
   from bluhm@; OK beck@

   Check for negative length in NFS strings.  This affects both, the
   client and server.
   from bluhm@; OK beck@

   OpenBSD 6.3 errata 029
VersionDeltaFile
1.112.2.1+11-10sys/nfs/nfs_serv.c
1.171.2.1+4-3sys/nfs/nfs_vnops.c
1.45.6.1+2-2sys/nfs/nfsm_subs.h
+17-153 files