1. 23 Jan, 2022 3 commits
  2. 21 Jan, 2022 5 commits
  3. 20 Jan, 2022 2 commits
    • HardenedBSD Sync Service's avatar
    • Kenneth D. Merry's avatar
      Free UMA zones when a pass(4) instance goes away. · 6d1a5632
      Kenneth D. Merry authored
      If the UMA zones are not freed, we get warnings about re-using the
      sysctl variables associated with the UMA zones, and we're leaking
      the other memory associated with the zone structures.  e.g.:
      sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.size)!
      sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.flags)!
      sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.bucket_size)!
      sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.bucket_size_max)!
      sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.name)!
      sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.rsize)!
      sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.ppera)!
      sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.ipers)!
      Also, correctly clear the PASS_FLAG_ZONE_INPROG flag in
      passcreatezone().  The way it was previously done, it would have
      had set the flag and cleared all other flags that were set at
      that point.
      Sponsored by:	Spectra Logic
      (cherry picked from commit ca2a7262)
  4. 19 Jan, 2022 10 commits
  5. 18 Jan, 2022 9 commits
    • HardenedBSD Sync Service's avatar
    • Joerg Wunsch's avatar
      usbconfig: actually set the exit code in usage() · 1cab5dac
      Joerg Wunsch authored
      Oversight in previous commit: usage() had been turned to accept
      an "exitcode" parameter, but it hasn't been used.
      (cherry picked from commit 1654b514)
    • Joerg Wunsch's avatar
      usbconfig: implement a -v option · bb0b7f40
      Joerg Wunsch authored
      Implement a -v option to usbconfig(8), as a shortcut for the most
      frequently needed commands dump_device_desc, dump_curr_config_desc,
      and show_ifdrv.
      While here, implement a real -h option that has been promised by the
      man page.
      Use <sysexits.h> to declare the utility return codes.
      Reviewed by:	hselasky
      Differential Revision:	https://reviews.freebsd.org/D33586
      (cherry picked from commit d69b9cc2)
    • Joerg Wunsch's avatar
      usbconfig: documentation fixes, mainly for -i option · 940db7ed
      Joerg Wunsch authored
      * in usage(), clearly mark -i interface as optional
      * both, -u busnum and -a devaddr are optional as well
      * various minor man page fixes
      * clearly mark those two commands that actually use -i ifaceidx
      * remove unused bitfield tag got_iface
      * fix indentation level according to review comment
      Differential Revision:	https://reviews.freebsd.org/D33579/
      Reviewed by:	hselasky
      (cherry picked from commit cae1884d)
    • Joerg Wunsch's avatar
      usbconfig: use getopt(3) for option handling · 08185384
      Joerg Wunsch authored
      This makes option handling consistent with other utilities as well as
      Posix rules. By that, it's no longer important whether option name and
      its argument are separated by a space or not, so -d5.3 works the same
      as -d 5.3.
      Also, recognize either /dev/ugen or ugen as prefix to the -d argument.
      Note that this removes the undocumented feature that allowed to
      specify multiple -d n.m options interleaved with commands referring to
      that particular device in a single run.
      (cherry picked from commit ae450e6d)
    • HardenedBSD Sync Service's avatar
    • Alan Somers's avatar
      fusefs: in the tests, always assume debug.try_reclaim_vnode is available · 542dbacf
      Alan Somers authored
      In an earlier version of the revision that created that sysctl (D20519)
      the sysctl was gated by INVARIANTS, so the test had to check for it.
      But in the committed version it is always available.
      (cherry picked from commit 19ab3610)
      fusefs: move common code from forget.cc to utils.cc
      (cherry picked from commit 8d99a6b9)
      fusefs: fix .. lookups when the parent has been reclaimed.
      By default, FUSE file systems are assumed not to support lookups for "."
      and "..".  They must opt-in to that.  To cope with this limitation, the
      fusefs kernel module caches every fuse vnode's parent's inode number,
      and uses that during VOP_LOOKUP for "..".  But if the parent's vnode has
      been reclaimed that won't be possible.  Previously we paniced in this
      situation.  Now, we'll return ESTALE instead.  Or, if the file system
      has opted into ".." lookups, we'll just do that instead.
      This commit also fixes VOP_LOOKUP to respect the cache timeout for ".."
      lookups, if the FUSE file system specified a finite timeout.
      PR:		259974
      Reviewed by:	pfg
      Differential Revision: https://reviews.freebsd.org/D33239
      (cherry picked from commit 1613087a)
    • Alan Somers's avatar
      Fix a race in fusefs that can corrupt a file's size. · c85846ea
      Alan Somers authored
      VOPs like VOP_SETATTR can change a file's size, with the vnode
      exclusively locked.  But VOPs like VOP_LOOKUP look up the file size from
      the server without the vnode locked.  So a race is possible.  For
      1) One thread calls VOP_SETATTR to truncate a file.  It locks the vnode
         and sends FUSE_SETATTR to the server.
      2) A second thread calls VOP_LOOKUP and fetches the file's attributes from
         the server.  Then it blocks trying to acquire the vnode lock.
      3) FUSE_SETATTR returns and the first thread releases the vnode lock.
      4) The second thread acquires the vnode lock and caches the file's
         attributes, which are now out-of-date.
      Fix this race by recording a timestamp in the vnode of the last time
      that its filesize was modified.  Check that timestamp during VOP_LOOKUP
      and VFS_VGET.  If it's newer than the time at which FUSE_LOOKUP was
      issued to the server, ignore the attributes returned by FUSE_LOOKUP.
      PR:		259071
      Reported by:	Agata <chogata@moosefs.pro>
      Reviewed by:	pfg
      Differential Revision: https://reviews.freebsd.org/D33158
      (cherry picked from commit 13d593a5)
    • Xin LI's avatar
      file: upgrade to 5.41. · 17886a89
      Xin LI authored
      (cherry picked from commit 43a5ec4e)
  6. 17 Jan, 2022 2 commits
  7. 15 Jan, 2022 3 commits
  8. 14 Jan, 2022 2 commits
  9. 11 Jan, 2022 3 commits
  10. 10 Jan, 2022 1 commit