1. 30 Aug, 2021 7 commits
    • Linus Torvalds's avatar
      Merge tag 'hole_punch_for_v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · aa99f3c2
      Linus Torvalds authored
      Pull fs hole punching vs cache filling race fixes from Jan Kara:
       "Fix races leading to possible data corruption or stale data exposure
        in multiple filesystems when hole punching races with operations such
        as readahead.
      
        This is the series I was sending for the last merge window but with
        your objection fixed - now filemap_fault() has been modified to take
        invalidate_lock only when we need to create new page in the page cache
        and / or bring it uptodate"
      
      * tag 'hole_punch_for_v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        filesystems/locking: fix Malformed table warning
        cifs: Fix race between hole punch and page fault
        ceph: Fix race between hole punch and page fault
        fuse: Convert to using invalidate_lock
        f2fs: Convert to using invalidate_lock
        zonefs: Convert to using invalidate_lock
        xfs: Convert double locking of MMAPLOCK to use VFS helpers
        xfs: Convert to use invalidate_lock
        xfs: Refactor xfs_isilocked()
        ext2: Convert to using invalidate_lock
        ext4: Convert to use mapping->invalidate_lock
        mm: Add functions to lock invalidate_lock for two mappings
        mm: Protect operations adding pages to page cache with invalidate_lock
        documentation: Sync file_operations members with reality
        mm: Fix comments mentioning i_mutex
      aa99f3c2
    • Linus Torvalds's avatar
      Merge tag 'fs_for_v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · a1ca8e71
      Linus Torvalds authored
      Pull UDF and isofs updates from Jan Kara:
       "Several smaller fixes and cleanups in UDF and isofs"
      
      * tag 'fs_for_v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        udf_get_extendedattr() had no boundary checks.
        isofs: joliet: Fix iocharset=utf8 mount option
        udf: Fix iocharset=utf8 mount option
        udf: Get rid of 0-length arrays in struct fileIdentDesc
        udf: Get rid of 0-length arrays
        udf: Remove unused declaration
        udf: Check LVID earlier
      a1ca8e71
    • Linus Torvalds's avatar
      Merge tag 'fiemap_for_v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 63b0c403
      Linus Torvalds authored
      Pull FIEMAP cleanups from Jan Kara:
       "FIEMAP cleanups from Christoph transitioning all remaining filesystems
        supporting FIEMAP (ext2, hpfs) to iomap API and removing the old
        helper"
      
      * tag 'fiemap_for_v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fs: remove generic_block_fiemap
        hpfs: use iomap_fiemap to implement ->fiemap
        ext2: use iomap_fiemap to implement ->fiemap
        ext2: make ext2_iomap_ops available unconditionally
      63b0c403
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 35134319
      Linus Torvalds authored
      Pull fsnotify updates from Jan Kara:
       "fsnotify speedups when notification actually isn't used and support
        for identifying processes which caused fanotify events through pidfd
        instead of normal pid"
      
      * tag 'fsnotify_for_v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fsnotify: optimize the case of no marks of any type
        fsnotify: count all objects with attached connectors
        fsnotify: count s_fsnotify_inode_refs for attached connectors
        fsnotify: replace igrab() with ihold() on attach connector
        fanotify: add pidfd support to the fanotify API
        fanotify: introduce a generic info record copying helper
        fanotify: minor cosmetic adjustments to fid labels
        kernel/pid.c: implement additional checks upon pidfd_create() parameters
        kernel/pid.c: remove static qualifier from pidfd_create()
      35134319
    • Linus Torvalds's avatar
      vt_kdsetmode: extend console locking · 2287a51b
      Linus Torvalds authored
      As per the long-suffering comment.
      Reported-by: default avatarMinh Yuan <yuanmingbuaa@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jirislaby@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2287a51b
    • nick black's avatar
      console: consume APC, DM, DCS · 3a2b2eb5
      nick black authored
      The Linux console's VT102 implementation already consumes OSC
      ("Operating System Command") sequences, probably because that's how
      palette changes are transmitted.
      
      In addition to OSC, there are three other major clases of ANSI control
      strings: APC ("Application Program Command"), PM ("Privacy Message"),
      and DCS ("Device Control String").  They are handled similarly to OSC in
      terms of termination.
      
      Source: vt100.net
      
      Add three new enumerated states, one for each of these types.  All three
      are handled the same way right now--they simply consume input until
      terminated.  I hope to expand upon this firmament in the future.  Add
      new predicate ansi_control_string(), returning true for any of these
      states.  Replace explicit checks against ESosc with calls to this
      function.  Transition to these states appropriately from the escape
      initiation (ESesc) state.
      
      This was motivated by the following Notcurses bugs:
      
       https://github.com/dankamongmen/notcurses/issues/2050
       https://github.com/dankamongmen/notcurses/issues/1828
       https://github.com/dankamongmen/notcurses/issues/2069
      
      where standard VT sequences are not consumed by the Linux console.  It's
      not necessary that the Linux console *support* these sequences, but it
      ought *consume* these well-specified classes of sequences.
      
      Tested by sending a variety of escape sequences to the console, and
      verifying that they still worked, or were now properly consumed.
      Verified that the escapes were properly terminated at a generic level.
      Verified that the Notcurses tools continued to show expected output on
      the Linux console, except now without escape bleedthrough.
      
      Link: https://lore.kernel.org/lkml/YSydL0q8iaUfkphg@schwarzgerat.orthanc/Signed-off-by: default avatarnick black <dankamongmen@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jirislaby@kernel.org>
      Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3a2b2eb5
    • Linus Torvalds's avatar
      string: improve default out-of-line memcmp() implementation · 291d47cc
      Linus Torvalds authored
      This just does the "if the architecture does efficient unaligned
      handling, start the memcmp using 'unsigned long' accesses", since
      Nikolay Borisov found a load that cares.
      
      This is basically the minimal patch, and limited to architectures that
      are known to not have slow unaligned handling.  We've had the stupid
      byte-at-a-time version forever, and nobody has ever even noticed before,
      so let's keep the fix minimal.
      
      A potential further improvement would be to align one of the sources in
      order to at least minimize unaligned cases, but the only real case of
      bigger memcmp() users seems to be the FIDEDUPERANGE ioctl().  As David
      Sterba says, the dedupe ioctl is typically called on ranges spanning
      many pages so the common case will all be page-aligned anyway.
      
      All the relevant architectures select HAVE_EFFICIENT_UNALIGNED_ACCESS,
      so I'm not going to worry about the combination of a very rare use-case
      and a rare architecture until somebody actually hits it.  Particularly
      since Nikolay also tested the more complex patch with extra alignment
      handling code, and it only added overhead.
      
      Link: https://lore.kernel.org/lkml/20210721135926.602840-1-nborisov@suse.com/Reported-by: default avatarNikolay Borisov <nborisov@suse.com>
      Cc: David Sterba <dsterba@suse.cz>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      291d47cc
  2. 29 Aug, 2021 8 commits
  3. 28 Aug, 2021 3 commits
  4. 27 Aug, 2021 18 commits
  5. 26 Aug, 2021 4 commits
    • Marek Marczykowski-Górecki's avatar
      PCI/MSI: Skip masking MSI-X on Xen PV · 1a519dc7
      Marek Marczykowski-Górecki authored
      When running as Xen PV guest, masking MSI-X is a responsibility of the
      hypervisor. The guest has no write access to the relevant BAR at all - when
      it tries to, it results in a crash like this:
      
          BUG: unable to handle page fault for address: ffffc9004069100c
          #PF: supervisor write access in kernel mode
          #PF: error_code(0x0003) - permissions violation
          RIP: e030:__pci_enable_msix_range.part.0+0x26b/0x5f0
           e1000e_set_interrupt_capability+0xbf/0xd0 [e1000e]
           e1000_probe+0x41f/0xdb0 [e1000e]
           local_pci_probe+0x42/0x80
          (...)
      
      The recently introduced function msix_mask_all() does not check the global
      variable pci_msi_ignore_mask which is set by XEN PV to bypass the masking
      of MSI[-X] interrupts.
      
      Add the check to make this function XEN PV compatible.
      
      Fixes: 7d5ec3d3 ("PCI/MSI: Mask all unused MSI-X entries")
      Signed-off-by: default avatarMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20210826170342.135172-1-marmarek@invisiblethingslab.com
      1a519dc7
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.14-1' of git://linux-nfs.org/~bfields/linux · 73367f05
      Linus Torvalds authored
      Pull nfsd fix from Bruce Fields:
       "This is a one-liner fix for a serious bug that can cause the server to
        become unresponsive to a client, so I think it's worth the last-minute
        inclusion for 5.14"
      
      * tag 'nfsd-5.14-1' of git://linux-nfs.org/~bfields/linux:
        SUNRPC: Fix XPT_BUSY flag leakage in svc_handle_xprt()...
      73367f05
    • Linus Torvalds's avatar
      Merge tag 'net-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 8a2cb8bd
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Networking fixes, including fixes from can and bpf.
      
        Closing three hw-dependent regressions. Any fixes of note are in the
        'old code' category. Nothing blocking release from our perspective.
      
        Current release - regressions:
      
         - stmmac: revert "stmmac: align RX buffers"
      
         - usb: asix: ax88772: move embedded PHY detection as early as
           possible
      
         - usb: asix: do not call phy_disconnect() for ax88178
      
         - Revert "net: really fix the build...", from Kalle to fix QCA6390
      
        Current release - new code bugs:
      
         - phy: mediatek: add the missing suspend/resume callbacks
      
        Previous releases - regressions:
      
         - qrtr: fix another OOB Read in qrtr_endpoint_post
      
         - stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings
      
        Previous releases - always broken:
      
         - inet: use siphash in exception handling
      
         - ip_gre: add validation for csum_start
      
         - bpf: fix ringbuf helper function compatibility
      
         - rtnetlink: return correct error on changing device netns
      
         - e1000e: do not try to recover the NVM checksum on Tiger Lake"
      
      * tag 'net-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (43 commits)
        Revert "net: really fix the build..."
        net: hns3: fix get wrong pfc_en when query PFC configuration
        net: hns3: fix GRO configuration error after reset
        net: hns3: change the method of getting cmd index in debugfs
        net: hns3: fix duplicate node in VLAN list
        net: hns3: fix speed unknown issue in bond 4
        net: hns3: add waiting time before cmdq memory is released
        net: hns3: clear hardware resource when loading driver
        net: fix NULL pointer reference in cipso_v4_doi_free
        rtnetlink: Return correct error on changing device netns
        net: dsa: hellcreek: Adjust schedule look ahead window
        net: dsa: hellcreek: Fix incorrect setting of GCL
        cxgb4: dont touch blocked freelist bitmap after free
        ipv4: use siphash instead of Jenkins in fnhe_hashfun()
        ipv6: use siphash in rt6_exception_hash()
        can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX error counters
        net: usb: asix: ax88772: fix boolconv.cocci warnings
        net/sched: ets: fix crash when flipping from 'strict' to 'quantum'
        qede: Fix memset corruption
        net: stmmac: fix kernel panic due to NULL pointer dereference of buf->xdp
        ...
      8a2cb8bd
    • Jens Axboe's avatar
      Revert "block/mq-deadline: Prioritize high-priority requests" · 7b05bf77
      Jens Axboe authored
      This reverts commit fb926032.
      
      Zhen reports that this commit slows down mq-deadline on a 128 thread
      box, going from 258K IOPS to 170-180K. My testing shows that Optane
      gen2 IOPS goes from 2.3M IOPS to 1.2M IOPS on a 64 thread box.
      
      Looking in detail at the code, the main culprit here is needing to sum
      percpu counters in the dispatch hot path, leading to very high CPU
      utilization there. To make matters worse, the code currently needs to
      sum 2 percpu counters, and it does so in the most naive way of iterating
      possible CPUs _twice_.
      
      Since we're close to release, revert this commit and we can re-do it
      with regular per-priority counters instead for the 5.15 kernel.
      
      Link: https://lore.kernel.org/linux-block/20210826144039.2143-1-thunder.leizhen@huawei.com/Reported-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7b05bf77