1. 02 Dec, 2021 7 commits
  2. 01 Dec, 2021 19 commits
  3. 30 Nov, 2021 4 commits
    • Warner Losh's avatar
      Remove DS_BUSY case · cbe9faa5
      Warner Losh authored
      DS_BUSY is no longer a device state. Remove it from here.
      
      Sponsored by:		Netflix
      cbe9faa5
    • Warner Losh's avatar
      Make device_busy/unbusy work w/o Giant held · 1c7d15b0
      Warner Losh authored
      The vast majority of the busy/unbusy users in the tree don't acquire
      Giant before calling device_busy/unbusy. However, if multiple threads
      are opening a file, say, that causes the device to busy/unbusy, then we
      can race to the root marking things busy. Move to using a reference
      count to keep track of how many times a device_t has been made busy. Use
      that count to make the same decisions that we'd make with the old device
      state.
      
      Note: gpiopps.c uses D_TRACKCLOSE. Others do as well. However, there's a
      known race with closes that will be corrected for all the drivers that
      do this in a future commit.
      
      Sponsored by:		Netflix
      Reviewed by:		hselasky, jhb
      Differential Revision:	https://reviews.freebsd.org/D26284
      1c7d15b0
    • Warner Losh's avatar
      Revert "Make device_busy/unbusy work w/o Giant held" · 25c49c42
      Warner Losh authored
      This reverts commit 08e78191.
      
      Commit message was for a very old version of the patch. Will re-commit
      with the right one since it's so bad. There's no locked versions of
      it...that code was reworked to use refcnt APIs.
      
      Noticed by:	jhb, jtrc27
      Sponsored by:	Netflix
      25c49c42
    • Warner Losh's avatar
      Make device_busy/unbusy work w/o Giant held · 08e78191
      Warner Losh authored
      The vast majority of the busy/unbusy users in the tree don't acquire Giant
      before calling device_busy/unbusy. However, if multiple threads are opening a
      file, say, that causes the device to busy/unbusy, then we can race to the root
      marking things busy. Create a new device_busy_locked and device_unbusy_locked
      that are the current implemntations of device_busy and device_unbusy. Make
      device_busy and unbusy acquire Giant before calling the _locked versrions. Since
      we never sleep in the busy/unbusy path, Giant's single threaded semantics
      suffice to keep this safe.
      
      Sponsored by:		Netflix
      Reviewed by:		hselasky, jhb
      Differential Revision:	https://reviews.freebsd.org/D26284
      08e78191
  4. 01 Dec, 2021 1 commit
    • Chuck Tuffli's avatar
      bhyve blockif: fix blockif_candelete with Capsicum · d8c1d7b6
      Chuck Tuffli authored
      NVMe conformance tests for the Format command failed if the
      backing-storage for the bhyve device was a file instead of a Zvol. The
      tests (and the specification) expect a Format to destroy all previously
      written data. The bhyve NVMe emulation implements this by trimming /
      deallocating all data from the backing-storage.
      
      The blockif_candelete() function indicated the file did not support
      deallocation (i.e. fpathconf(..., _PC_DEALLOC_PRESENT) returned FALSE)
      even though the kernel supported file hole punching. This occurs on
      builds with Capsicum enabled because blockif did not allow the
      fpathconf(2) right.
      
      Fix is to add CAP_FPATHCONF to the cap_rights_init(3) call.
      
      PR:		260081
      Reviewed by:	allanjude, markj, jhb
      MFC after:	1 week
      Differential Revision:	https://reviews.freebsd.org/D33203
      d8c1d7b6
  5. 30 Nov, 2021 9 commits
    • Warner Losh's avatar
      cam: Initialize wired to false · 3846662d
      Warner Losh authored
      As part of converting the code to a while loop, the unconditional
      initialization of wired to false was lost.
      
      Sponsored by:		Netflix
      Differential Revision:	https://reviews.freebsd.org/D33163
      3846662d
    • Vladimir Kondratyev's avatar
      iichid(4): Perform acknowledgement of I2C device interrupt after RESET command · c508b081
      Vladimir Kondratyev authored
      in sampling mode to workaround firmware bug.
      
      This fixes reboot or poweroff on frame.work laptops after first touch.
      
      Reported by:	many
      PR:		259230
      MFC after:	1 week
      Tested by:	kevans, markj
      c508b081
    • Elliott Mitchell's avatar
      xen/dev: remove write-only variable · d893d9e9
      Elliott Mitchell authored
      This was found while looking for driver_filter_t functions which got the
      trap frame from the argument.  This particular instance it isn't even
      used, so remove now lest someone else get to it first.
      
      Reviewed by:	mhorne
      d893d9e9
    • Ed Maste's avatar
      OptionalObsoleteFiles: remove GCC remnants · 1b9344ad
      Ed Maste authored
      g++ and cc1plus were GCC components that are already removed
      unconditionally in ObsoleteFiles.inc.
      
      Reported by:	jhb (in review D33108)
      Fixes:		57f80467 ("remove GCC 4.2.1 build infrastructure")
      Sponsored by:	The FreeBSD Foundation
      1b9344ad
    • Alan Somers's avatar
      Revert "libc: Some enhancements to syslog(3)" · 943c4466
      Alan Somers authored
      This reverts commit 2886c93d.
      The original commit has two problems:
      
      * It sets SO_SNDBUF to be as large as MAXLINE.  But for unix domain
        sockets, the send buffer is bypassed.  Packets go directly to the
        peer's receive buffer, so setting and querying SO_SNDBUF is
        ineffective.  To ensure that the socket can accept messages of a
        certain size, it would be necessary to add a SO_PEERRCVBUF socket
        option that could query the connected peer's receive buffer size.
      
      * It sets MAXLINE to 8 kB, which is larger than the default sockbuf size
        of 4 kB.  That's ok for the builtin syslogd, which sets its recvbuf
        to 80 kB, but not ok for alternative sysloggers, like rsyslogd, which
        use the default size.
      
      As a consequence, writing messages of more than 4 kB with syslog() as a
      non-root user while running rsyslogd would cause the logging application
      to spin indefinitely within syslog().
      
      PR:		260126
      MFC:		2 weeks
      Sponsored by:	Axcient
      Reviewed by:	markj
      Differential Revision: https://reviews.freebsd.org/D33199
      943c4466
    • Stefan Eßer's avatar
      contrib/bc: merge version 5.2.1 from vendor branch · 10041e99
      Stefan Eßer authored
      Merge commit 'e63540ee'
      10041e99
    • Stefan Eßer's avatar
      vendor/bc: import release 5.2.1 · e63540ee
      Stefan Eßer authored
      This release fixes two parse bugs when in POSIX standard mode. One of
      these bugs was due to a quirk of the POSIX grammar, and the other was
      because bc was too strict.
      e63540ee
    • Stefan Eßer's avatar
      vendor/bc: import release 5.2.0 · 23aff124
      Stefan Eßer authored
      This version is imported only for documentary purposes since it does
      not contain any changes that are relevant for the FreeBSD base system.
      23aff124
    • Kristof Provost's avatar
      if_stf: KASAN fix · 439da7f0
      Kristof Provost authored
      In in_stf_input() we grabbed a pointer to the IPv4 header and later did
      an m_pullup() before we look at the IPv6 header. However, m_pullup()
      could rearrange the mbuf chain and potentially invalidate the pointer to
      the IPv4 header.
      
      Avoid this issue by copying the IP header rather than getting a pointer
      to it.
      
      Reported by:	markj, Jenkins (KASAN job)
      Reviewed by:	markj
      MFC after:	1 week
      Sponsored by:	Rubicon Communications, LLC ("Netgate")
      Differential Revision:	https://reviews.freebsd.org/D33192
      439da7f0