Skip to content
  1. Dec 07, 2023
  2. Nov 25, 2023
    • Linus Torvalds's avatar
      Merge tag 'afs-fixes-20231124' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · 5b7ad877
      Linus Torvalds authored
      Pull AFS fixes from David Howells:
      
       - Fix the afs_server_list struct to be cleaned up with RCU
      
       - Fix afs to translate a no-data result from a DNS lookup into ENOENT,
         not EDESTADDRREQ for consistency with OpenAFS
      
       - Fix afs to translate a negative DNS lookup result into ENOENT rather
         than EDESTADDRREQ
      
       - Fix file locking on R/O volumes to operate in local mode as the
         server doesn't handle exclusive locks on such files
      
       - Set SB_RDONLY on superblocks for RO and Backup volumes so that the
         VFS can see that they're read only
      
      * tag 'afs-fixes-20231124' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        afs: Mark a superblock for an R/O or Backup volume as SB_RDONLY
        afs: Fix file locking on R/O volumes to operate in local mode
        afs: Return ENOENT if no cell DNS record can be found
        afs: Make error on cell lookup failure consistent with OpenAFS
        afs: Fix afs_server_list to be cleaned up with RCU
      5b7ad877
    • Linus Torvalds's avatar
      Merge tag 'vfs-6.7-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs · fa2b906f
      Linus Torvalds authored
      Pull vfs fixes from Christian Brauner:
      
       - Avoid calling back into LSMs from vfs_getattr_nosec() calls.
      
         IMA used to query inode properties accessing raw inode fields without
         dedicated helpers. That was finally fixed a few releases ago by
         forcing IMA to use vfs_getattr_nosec() helpers.
      
         The goal of the vfs_getattr_nosec() helper is to query for attributes
         without calling into the LSM layer which would be quite problematic
         because incredibly IMA is called from __fput()...
      
           __fput()
             -> ima_file_free()
      
         What it does is to call back into the filesystem to update the file's
         IMA xattr. Querying the inode without using vfs_getattr_nosec() meant
         that IMA didn't handle stacking filesystems such as overlayfs
         correctly. So the switch to vfs_getattr_nosec() is quite correct. But
         the switch to vfs_getattr_nosec() revealed another bug when used on
         stacking filesystems:
      
           __fput()
             -> ima_file_free()
                -> vfs_getattr_nosec()
                   -> i_op->getattr::ovl_getattr()
                      -> vfs_getattr()
                         -> i_op->getattr::$WHATEVER_UNDERLYING_FS_getattr()
                            -> security_inode_getattr() # calls back into LSMs
      
         Now, if that __fput() happens from task_work_run() of an exiting task
         current->fs and various other pointer could already be NULL. So
         anything in the LSM layer relying on that not being NULL would be
         quite surprised.
      
         Fix that by passing the information that this is a security request
         through to the stacking filesystem by adding a new internal
         ATT_GETATTR_NOSEC flag. Now the callchain becomes:
      
           __fput()
             -> ima_file_free()
                -> vfs_getattr_nosec()
                   -> i_op->getattr::ovl_getattr()
                      -> if (AT_GETATTR_NOSEC)
                                vfs_getattr_nosec()
                         else
                                vfs_getattr()
                         -> i_op->getattr::$WHATEVER_UNDERLYING_FS_getattr()
      
       - Fix a bug introduced with the iov_iter rework from last cycle.
      
         This broke /proc/kcore by copying too much and without the correct
         offset.
      
       - Add a missing NULL check when allocating the root inode in
         autofs_fill_super().
      
       - Fix stable writes for multi-device filesystems (xfs, btrfs etc) and
         the block device pseudo filesystem.
      
         Stable writes used to be a superblock flag only, making it a per
         filesystem property. Add an additional AS_STABLE_WRITES mapping flag
         to allow for fine-grained control.
      
       - Ensure that offset_iterate_dir() returns 0 after reaching the end of
         a directory so it adheres to getdents() convention.
      
      * tag 'vfs-6.7-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
        libfs: getdents() should return 0 after reaching EOD
        xfs: respect the stable writes flag on the RT device
        xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags
        block: update the stable_writes flag in bdev_add
        filemap: add a per-mapping stable writes flag
        autofs: add: new_inode check in autofs_fill_super()
        iov_iter: fix copy_page_to_iter_nofault()
        fs: Pass AT_GETATTR_NOSEC flag to getattr interface function
      fa2b906f
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-11-24' of git://anongit.freedesktop.org/drm/drm · afa0f6ee
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Back to regular scheduled fixes pull request, mainly a bunch of msm,
        some i915 and otherwise a few scattered, one memory crasher in the
        nouveau GSP paths is helping stabilise that work.
      
        msm:
         - Fix the VREG_CTRL_1 for 4nm CPHY to match downstream
         - Remove duplicate call to drm_kms_helper_poll_init() in
           msm_drm_init()
         - Fix the safe_lut_tbl[] for sc8280xp to match downstream
         - Don't attach the drm_dp_set_subconnector_property() for eDP
         - Fix to attach drm_dp_set_subconnector_property() for DP. Otherwise
           there is a bootup crash on multiple targets
         - Remove unnecessary NULL check left behind during cleanup
      
        i915:
         - Fix race between DP MST connectore registration and setup
         - Fix GT memory leak on probe error path
      
        panel:
         - Fixes for innolux and auo,b101uan08.3 panel.
         - Fix Himax83102-j02 timings.
      
        ivpu:
         - Fix ivpu MMIO reset.
      
        ast:
         - AST fix on connetor disconnection.
      
        nouveau:
         - gsp memory corruption fix
      
        rockchip:
         - color fix"
      
      * tag 'drm-fixes-2023-11-24' of git://anongit.freedesktop.org/drm/drm:
        nouveau/gsp: allocate enough space for all channel ids.
        drm/panel: boe-tv101wum-nl6: Fine tune Himax83102-j02 panel HFP and HBP
        drm/ast: Disconnect BMC if physical connector is connected
        accel/ivpu/37xx: Fix hangs related to MMIO reset
        drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
        drm/i915: do not clean GT table on error path
        drm/i915/dp_mst: Fix race between connector registration and setup
        drm/panel: simple: Fix Innolux G101ICE-L01 timings
        drm/panel: simple: Fix Innolux G101ICE-L01 bus flags
        drm/msm: remove unnecessary NULL check
        drm/panel: auo,b101uan08.3: Fine tune the panel power sequence
        drm/msm/dp: attach the DP subconnector property
        drm/msm/dp: don't touch DP subconnector property in eDP case
        drm/msm/dpu: Add missing safe_lut_tbl in sc8280xp catalog
        drm/msm: remove exra drm_kms_helper_poll_init() call
        drm/msm/dsi: use the correct VREG_CTRL_1 value for 4nm cphy
      afa0f6ee
  3. Nov 24, 2023
  4. Nov 23, 2023
    • Paolo Abeni's avatar
      Merge branch 'ice-restore-timestamp-config-after-reset' · e50a8061
      Paolo Abeni authored
      Tony Nguyen says:
      
      ====================
      ice: restore timestamp config after reset
      
      Jake Keller says:
      
      We recently discovered during internal validation that the ice driver has
      not been properly restoring Tx timestamp configuration after a device reset,
      which resulted in application failures after a device reset.
      
      After some digging, it turned out this problem is two-fold. Since the
      introduction of the PTP support the driver has been clobbering the storage
      of the current timestamp configuration during reset. Thus after a reset, the
      driver will no longer perform Tx or Rx timestamps, and will report
      timestamp configuration as disabled if SIOCGHWTSTAMP ioctl is issued.
      
      In addition, the recently merged auxiliary bus support code missed that
      PFINT_TSYN_MSK must be reprogrammed on the clock owner for E822 devices.
      Failure to restore this register configuration results in the driver no
      longer responding to interrupts from other ports. Depending on the traffic
      pattern, this can either result in increased latency responding to
      timestamps on the non-owner ports, or it can result in the driver never
      reporting any timestamps. The configuration of PFINT_TSYN_MSK was only done
      during initialization. Due to this, the Tx timestamp issue persists even if
      userspace reconfigures timestamping.
      
      This series fixes both issues, as well as removes a redundant Tx ring field
      since we can rely on the skb flag as the primary detector for a Tx timestamp
      request.
      
      Note that I don't think this series will directly apply to older stable
      releases (even v6.6) as we recently refactored a lot of the PTP code to
      support auxiliary bus. Patch 2/3 only matters for the post-auxiliary bus
      implementation. The principle of patch 1/3 and 3/3 could apply as far back
      as the initial PTP support, but I don't think it will apply cleanly as-is.
      ====================
      
      Link: https://lore.kernel.org/r/20231121211259.3348630-1-anthony.l.nguyen@intel.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      e50a8061
    • Jacob Keller's avatar
      ice: restore timestamp configuration after device reset · 77580179
      Jacob Keller authored
      The driver calls ice_ptp_cfg_timestamp() during ice_ptp_prepare_for_reset()
      to disable timestamping while the device is resetting. This operation
      destroys the user requested configuration. While the driver does call
      ice_ptp_cfg_timestamp in ice_rebuild() to restore some hardware settings
      after a reset, it unconditionally passes true or false, resulting in
      failure to restore previous user space configuration.
      
      This results in a device reset forcibly disabling timestamp configuration
      regardless of current user settings.
      
      This was not detected previously due to a quirk of the LinuxPTP ptp4l
      application. If ptp4l detects a missing timestamp, it enters a fault state
      and performs recovery logic which includes executing SIOCSHWTSTAMP again,
      restoring the now accidentally cleared configuration.
      
      Not every application does this, and for these applications, timestamps
      will mysteriously stop after a PF reset, without being restored until an
      application restart.
      
      Fix this by replacing ice_ptp_cfg_timestamp() with two new functions:
      
      1) ice_ptp_disable_timestamp_mode() which unconditionally disables the
         timestamping logic in ice_ptp_prepare_for_reset() and ice_ptp_release()
      
      2) ice_ptp_restore_timestamp_mode() which calls
         ice_ptp_restore_tx_interrupt() to restore Tx timestamping configuration,
         calls ice_set_rx_tstamp() to restore Rx timestamping configuration, and
         issues an immediate TSYN_TX interrupt to ensure that timestamps which
         may have occurred during the device reset get processed.
      
      Modify the ice_ptp_set_timestamp_mode to directly save the user
      configuration and then call ice_ptp_restore_timestamp_mode. This way, reset
      no longer destroys the saved user configuration.
      
      This obsoletes the ice_set_tx_tstamp() function which can now be safely
      removed.
      
      With this change, all devices should now restore Tx and Rx timestamping
      functionality correctly after a PF reset without application intervention.
      
      Fixes: 77a78115 ("ice: enable receive hardware timestamping")
      Fixes: ea9b847c
      
       ("ice: enable transmit timestamps for E810 devices")
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      77580179
    • Jacob Keller's avatar
      ice: unify logic for programming PFINT_TSYN_MSK · 7d606a1e
      Jacob Keller authored
      Commit d938a8cc ("ice: Auxbus devices & driver for E822 TS") modified
      how Tx timestamps are handled for E822 devices. On these devices, only the
      clock owner handles reading the Tx timestamp data from firmware. To do
      this, the PFINT_TSYN_MSK register is modified from the default value to one
      which enables reacting to a Tx timestamp on all PHY ports.
      
      The driver currently programs PFINT_TSYN_MSK in different places depending
      on whether the port is the clock owner or not. For the clock owner, the
      PFINT_TSYN_MSK value is programmed during ice_ptp_init_owner just before
      calling ice_ptp_tx_ena_intr to program the PHY ports.
      
      For the non-clock owner ports, the PFINT_TSYN_MSK is programmed during
      ice_ptp_init_port.
      
      If a large enough device reset occurs, the PFINT_TSYN_MSK register will be
      reset to the default value in which only the PHY associated directly with
      the PF will cause the Tx timestamp interrupt to trigger.
      
      The driver lacks logic to reprogram the PFINT_TSYN_MSK register after a
      device reset. For the E822 device, this results in the PF no longer
      responding to interrupts for other ports. This results in failure to
      deliver Tx timestamps to user space applications.
      
      Rename ice_ptp_configure_tx_tstamp to ice_ptp_cfg_tx_interrupt, and unify
      the logic for programming PFINT_TSYN_MSK and PFINT_OICR_ENA into one place.
      This function will program both registers according to the combination of
      user configuration and device requirements.
      
      This ensures that PFINT_TSYN_MSK is always restored when we configure the
      Tx timestamp interrupt.
      
      Fixes: d938a8cc
      
       ("ice: Auxbus devices & driver for E822 TS")
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      7d606a1e