1. 19 Jul, 2024 4 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration' · 903a3b1e
      Bjorn Helgaas authored
      - Move the PRESERVE_BOOT_CONFIG ACPI _DSM evaluation from drivers/acpi to
        drivers/pci so we can unify with similar DT functionality (Vidya Sagar)
      
      - Add of_pci_preserve_config() to check for a DT "linux,pci-probe-only"
        property on a per-host bridge basis in addition to a global basis (Vidya
        Sagar)
      
      - Unify ACPI PRESERVE_BOOT_CONFIG _DSM and DT "linux,pci-probe-only" in a
        generic pci_preserve_config() path (Vidya Sagar)
      
      * pci/enumeration:
        PCI: Use preserve_config in place of pci_flags
        PCI: Unify ACPI and DT 'preserve config' support
        PCI: of: Add of_pci_preserve_config() for per-host bridge support
        PCI: Move PRESERVE_BOOT_CONFIG _DSM evaluation to pci_register_host_bridge()
      903a3b1e
    • Bjorn Helgaas's avatar
      Merge branch 'pci/dpc' · 147ea50e
      Bjorn Helgaas authored
      - If there's a device below a bridge, prevent a use-after-free by holding a
        reference to the device while waiting for the secondary bus to be ready
        in case the device is concurrently removed, e.g., by DPC (Lukas Wunner)
      
      * pci/dpc:
        PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal
      147ea50e
    • Bjorn Helgaas's avatar
      Merge branch 'pci/devres' · 06bbe25c
      Bjorn Helgaas authored
      - Add pcim_add_mapping_to_legacy_table() and
        pcim_remove_mapping_from_legacy_table() helper functions to simplify
        devres iomap table (Philipp Stanner)
      
      - Reimplement devres that take a bit mask of BARs in a way that can be used
        to map partial BARs as well as entire BARs (Philipp Stanner)
      
      - Deprecate pcim_iomap_table() and pcim_iomap_regions_request_all() in
        favor of pcim_* request plus pcim_* mapping (Philipp Stanner)
      
      - Add pcim_request_region(), a managed interface to request a single BAR
        (Philipp Stanner)
      
      - Use the existing pci_is_enabled() interface to replace the struct
        devres.enabled bit (Philipp Stanner)
      
      - Move the struct pci_devres.pinned bit to struct pci_dev (Philipp Stanner)
      
      - Reimplement pcim_set_mwi() so it uses its own devres cleanup callback
        instead of a special-purpose bit in struct pci_devres (Philipp Stanner)
      
      - Add pcim_intx(), which is unambiguously managed, unlike pci_intx(), which
        is managed if pcim_enable_device() has been called but unmanaged
        otherwise (Philipp Stanner)
      
      - Remove pcim_release(), which is no longer needed after previous cleanups
        of pcim_set_mwi() and pci_intx() (Philipp Stanner)
      
      - Add pcim_iomap_range(), a managed interface to map part of a BAR (Philipp
        Stanner)
      
      - Fix vboxvideo leak by using the new pcim_iomap_range() instead of the
        unmanaged pci_iomap_range() (Philipp Stanner)
      
      * pci/devres:
        drm/vboxvideo: fix mapping leaks
        PCI: Add managed pcim_iomap_range()
        PCI: Remove legacy pcim_release()
        PCI: Add managed pcim_intx()
        PCI: Give pcim_set_mwi() its own devres cleanup callback
        PCI: Move struct pci_devres.pinned bit to struct pci_dev
        PCI: Remove struct pci_devres.enabled status bit
        PCI: Document hybrid devres hazards
        PCI: Add managed pcim_request_region()
        PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()
        PCI: Add managed partial-BAR request and map infrastructure
        PCI: Add devres helpers for iomap table
        PCI: Add and use devres helper for bit masks
      06bbe25c
    • Bjorn Helgaas's avatar
      Merge branch 'pci/acs' · cb43487e
      Bjorn Helgaas authored
      - Add ACS quirk for Broadcom BCM5760X NIC, which doesn't allow peer-to-peer
        transactions between functions, but doesn't advertise ACS support (Ajit
        Khaparde)
      
      - Add "pci=config_acs=" kernel command-line parameter to relax default ACS
        settings to enable peer-to-peer configurations.  Requires expert
        knowledge of topology and ACS operation (Vidya Sagar)
      
      * pci/acs:
        PCI: Extend ACS configurability
        PCI: Add ACS quirk for Broadcom BCM5760X NIC
      cb43487e
  2. 12 Jul, 2024 1 commit
    • Vidya Sagar's avatar
      PCI: Extend ACS configurability · 47c8846a
      Vidya Sagar authored
      PCIe ACS settings control the level of isolation and the possible P2P paths
      between devices. With greater isolation the kernel will create smaller
      iommu_groups and with less isolation there is more HW that can achieve P2P
      transfers. From a virtualization perspective all devices in the same
      iommu_group must be assigned to the same VM as they lack security
      isolation.
      
      There is no way for the kernel to automatically know the correct ACS
      settings for any given system and workload. Existing command line options
      (e.g., disable_acs_redir) allow only for large scale change, disabling all
      isolation, but this is not sufficient for more complex cases.
      
      Add a kernel command-line option 'config_acs' to directly control all the
      ACS bits for specific devices, which allows the operator to setup the right
      level of isolation to achieve the desired P2P configuration.  The
      definition is future proof; when new ACS bits are added to the spec the
      open syntax can be extended.
      
      ACS needs to be setup early in the kernel boot as the ACS settings affect
      how iommu_groups are formed. iommu_group formation is a one time event
      during initial device discovery, so changing ACS bits after kernel boot can
      result in an inaccurate view of the iommu_groups compared to the current
      isolation configuration.
      
      ACS applies to PCIe Downstream Ports and multi-function devices.  The
      default ACS settings are strict and deny any direct traffic between two
      functions. This results in the smallest iommu_group the HW can support.
      Frequently these values result in slow or non-working P2PDMA.
      
      ACS offers a range of security choices controlling how traffic is
      allowed to go directly between two devices. Some popular choices:
      
        - Full prevention
      
        - Translated requests can be direct, with various options
      
        - Asymmetric direct traffic, A can reach B but not the reverse
      
        - All traffic can be direct
      
      Along with some other less common ones for special topologies.
      
      The intention is that this option would be used with expert knowledge of
      the HW capability and workload to achieve the desired configuration.
      
      Link: https://lore.kernel.org/r/20240625153150.159310-1-vidyas@nvidia.comSigned-off-by: default avatarVidya Sagar <vidyas@nvidia.com>
      [bhelgaas: add example, tidy printk formats]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      47c8846a
  3. 11 Jul, 2024 4 commits
  4. 10 Jul, 2024 9 commits
  5. 01 Jul, 2024 1 commit
    • Lukas Wunner's avatar
      PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal · 11a1f4bc
      Lukas Wunner authored
      Keith reports a use-after-free when a DPC event occurs concurrently to
      hot-removal of the same portion of the hierarchy:
      
      The dpc_handler() awaits readiness of the secondary bus below the
      Downstream Port where the DPC event occurred.  To do so, it polls the
      config space of the first child device on the secondary bus.  If that
      child device is concurrently removed, accesses to its struct pci_dev
      cause the kernel to oops.
      
      That's because pci_bridge_wait_for_secondary_bus() neglects to hold a
      reference on the child device.  Before v6.3, the function was only
      called on resume from system sleep or on runtime resume.  Holding a
      reference wasn't necessary back then because the pciehp IRQ thread
      could never run concurrently.  (On resume from system sleep, IRQs are
      not enabled until after the resume_noirq phase.  And runtime resume is
      always awaited before a PCI device is removed.)
      
      However starting with v6.3, pci_bridge_wait_for_secondary_bus() is also
      called on a DPC event.  Commit 53b54ad0 ("PCI/DPC: Await readiness
      of secondary bus after reset"), which introduced that, failed to
      appreciate that pci_bridge_wait_for_secondary_bus() now needs to hold a
      reference on the child device because dpc_handler() and pciehp may
      indeed run concurrently.  The commit was backported to v5.10+ stable
      kernels, so that's the oldest one affected.
      
      Add the missing reference acquisition.
      
      Abridged stack trace:
      
        BUG: unable to handle page fault for address: 00000000091400c0
        CPU: 15 PID: 2464 Comm: irq/53-pcie-dpc 6.9.0
        RIP: pci_bus_read_config_dword+0x17/0x50
        pci_dev_wait()
        pci_bridge_wait_for_secondary_bus()
        dpc_reset_link()
        pcie_do_recovery()
        dpc_handler()
      
      Fixes: 53b54ad0 ("PCI/DPC: Await readiness of secondary bus after reset")
      Closes: https://lore.kernel.org/r/20240612181625.3604512-3-kbusch@meta.com/
      Link: https://lore.kernel.org/linux-pci/8e4bcd4116fd94f592f2bf2749f168099c480ddf.1718707743.git.lukas@wunner.deReported-by: default avatarKeith Busch <kbusch@kernel.org>
      Tested-by: default avatarKeith Busch <kbusch@kernel.org>
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarKrzysztof Wilczyński <kwilczynski@kernel.org>
      Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: stable@vger.kernel.org # v5.10+
      11a1f4bc
  6. 03 Jun, 2024 4 commits
  7. 28 May, 2024 1 commit
  8. 26 May, 2024 5 commits
  9. 25 May, 2024 11 commits
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-05-25-09-13' of... · 9b62e02e
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-05-25-09-13' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "16 hotfixes, 11 of which are cc:stable.
      
        A few nilfs2 fixes, the remainder are for MM: a couple of selftests
        fixes, various singletons fixing various issues in various parts"
      
      * tag 'mm-hotfixes-stable-2024-05-25-09-13' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/ksm: fix possible UAF of stable_node
        mm/memory-failure: fix handling of dissolved but not taken off from buddy pages
        mm: /proc/pid/smaps_rollup: avoid skipping vma after getting mmap_lock again
        nilfs2: fix potential hang in nilfs_detach_log_writer()
        nilfs2: fix unexpected freezing of nilfs_segctor_sync()
        nilfs2: fix use-after-free of timer for log writer thread
        selftests/mm: fix build warnings on ppc64
        arm64: patching: fix handling of execmem addresses
        selftests/mm: compaction_test: fix bogus test success and reduce probability of OOM-killer invocation
        selftests/mm: compaction_test: fix incorrect write of zero to nr_hugepages
        selftests/mm: compaction_test: fix bogus test success on Aarch64
        mailmap: update email address for Satya Priya
        mm/huge_memory: don't unpoison huge_zero_folio
        kasan, fortify: properly rename memintrinsics
        lib: add version into /proc/allocinfo output
        mm/vmalloc: fix vmalloc which may return null if called with __GFP_NOFAIL
      9b62e02e
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a0db36ed
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
      
       - Fix x86 IRQ vector leak caused by a CPU offlining race
      
       - Fix build failure in the riscv-imsic irqchip driver
         caused by an API-change semantic conflict
      
       - Fix use-after-free in irq_find_at_or_after()
      
      * tag 'irq-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/irqdesc: Prevent use-after-free in irq_find_at_or_after()
        genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline
        irqchip/riscv-imsic: Fixup riscv_ipi_set_virq_range() conflict
      a0db36ed
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3a390f24
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
      
       - Fix regressions of the new x86 CPU VFM (vendor/family/model)
         enumeration/matching code
      
       - Fix crash kernel detection on buggy firmware with
         non-compliant ACPI MADT tables
      
       - Address Kconfig warning
      
      * tag 'x86-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL
        crypto: x86/aes-xts - switch to new Intel CPU model defines
        x86/topology: Handle bogus ACPI tables correctly
        x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y
      3a390f24
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.10-1' of https://github.com/cminyard/linux-ipmi · 56676c4c
      Linus Torvalds authored
      Pull ipmi updates from Corey Minyard:
       "Mostly updates for deprecated interfaces, platform.remove and
        converting from a tasklet to a BH workqueue.
      
        Also use HAS_IOPORT for disabling inb()/outb()"
      
      * tag 'for-linus-6.10-1' of https://github.com/cminyard/linux-ipmi:
        ipmi: kcs_bmc_npcm7xx: Convert to platform remove callback returning void
        ipmi: kcs_bmc_aspeed: Convert to platform remove callback returning void
        ipmi: ipmi_ssif: Convert to platform remove callback returning void
        ipmi: ipmi_si_platform: Convert to platform remove callback returning void
        ipmi: ipmi_powernv: Convert to platform remove callback returning void
        ipmi: bt-bmc: Convert to platform remove callback returning void
        char: ipmi: handle HAS_IOPORT dependencies
        ipmi: Convert from tasklet to BH workqueue
      56676c4c
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.10-rc1' of https://github.com/ceph/ceph-client · 74eca356
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "A series from Xiubo that adds support for additional access checks
        based on MDS auth caps which were recently made available to clients.
      
        This is needed to prevent scenarios where the MDS quietly discards
        updates that a UID-restricted client previously (wrongfully) acked to
        the user.
      
        Other than that, just a documentation fixup"
      
      * tag 'ceph-for-6.10-rc1' of https://github.com/ceph/ceph-client:
        doc: ceph: update userspace command to get CephFS metadata
        ceph: add CEPHFS_FEATURE_MDS_AUTH_CAPS_CHECK feature bit
        ceph: check the cephx mds auth access for async dirop
        ceph: check the cephx mds auth access for open
        ceph: check the cephx mds auth access for setattr
        ceph: add ceph_mds_check_access() helper
        ceph: save cap_auths in MDS client when session is opened
      74eca356
    • Linus Torvalds's avatar
      Merge tag 'ntfs3_for_6.10' of https://github.com/Paragon-Software-Group/linux-ntfs3 · 89b61ca4
      Linus Torvalds authored
      Pull ntfs3 updates from Konstantin Komarov:
       "Fixes:
         - reusing of the file index (could cause the file to be trimmed)
         - infinite dir enumeration
         - taking DOS names into account during link counting
         - le32_to_cpu conversion, 32 bit overflow, NULL check
         - some code was refactored
      
        Changes:
         - removed max link count info display during driver init
      
        Remove:
         - atomic_open has been removed for lack of use"
      
      * tag 'ntfs3_for_6.10' of https://github.com/Paragon-Software-Group/linux-ntfs3:
        fs/ntfs3: Break dir enumeration if directory contents error
        fs/ntfs3: Fix case when index is reused during tree transformation
        fs/ntfs3: Mark volume as dirty if xattr is broken
        fs/ntfs3: Always make file nonresident on fallocate call
        fs/ntfs3: Redesign ntfs_create_inode to return error code instead of inode
        fs/ntfs3: Use variable length array instead of fixed size
        fs/ntfs3: Use 64 bit variable to avoid 32 bit overflow
        fs/ntfs3: Check 'folio' pointer for NULL
        fs/ntfs3: Missed le32_to_cpu conversion
        fs/ntfs3: Remove max link count info display during driver init
        fs/ntfs3: Taking DOS names into account during link counting
        fs/ntfs3: remove atomic_open
        fs/ntfs3: use kcalloc() instead of kzalloc()
      89b61ca4
    • Linus Torvalds's avatar
      Merge tag '6.10-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd · 6c8b1a2d
      Linus Torvalds authored
      Pull smb server fixes from Steve French:
       "Two ksmbd server fixes, both for stable"
      
      * tag '6.10-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: ignore trailing slashes in share paths
        ksmbd: avoid to send duplicate oplock break notifications
      6c8b1a2d
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 54f71b03
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "There is one new driver and then most of the changes are the device
        tree bindings conversions to yaml.
      
        New driver:
         - Epson RX8111
      
        Drivers:
         - Many Device Tree bindings conversions to dtschema
         - pcf8563: wakeup-source support"
      
      * tag 'rtc-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
        pcf8563: add wakeup-source support
        rtc: rx8111: handle VLOW flag
        rtc: rx8111: demote warnings to debug level
        rtc: rx6110: Constify struct regmap_config
        dt-bindings: rtc: convert trivial devices into dtschema
        dt-bindings: rtc: stmp3xxx-rtc: convert to dtschema
        dt-bindings: rtc: pxa-rtc: convert to dtschema
        rtc: Add driver for Epson RX8111
        dt-bindings: rtc: Add Epson RX8111
        rtc: mcp795: drop unneeded MODULE_ALIAS
        rtc: nuvoton: Modify part number value
        rtc: test: Split rtc unit test into slow and normal speed test
        dt-bindings: rtc: nxp,lpc1788-rtc: convert to dtschema
        dt-bindings: rtc: digicolor-rtc: move to trivial-rtc
        dt-bindings: rtc: alphascale,asm9260-rtc: convert to dtschema
        dt-bindings: rtc: armada-380-rtc: convert to dtschema
        rtc: cros-ec: provide ID table for avoiding fallback match
      54f71b03
    • Linus Torvalds's avatar
      Merge tag 'i3c/for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux · 4286e1fc
      Linus Torvalds authored
      Pull i3c updates from Alexandre Belloni:
       "Runtime PM (power management) is improved and hot-join support has
        been added to the dw controller driver.
      
        Core:
         - Allow device driver to trigger controller runtime PM
      
        Drivers:
         - dw: hot-join support
         - svc: better IBI handling"
      
      * tag 'i3c/for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
        i3c: dw: Add hot-join support.
        i3c: master: Enable runtime PM for master controller
        i3c: master: svc: fix invalidate IBI type and miss call client IBI handler
        i3c: master: svc: change ENXIO to EAGAIN when IBI occurs during start frame
        i3c: Add comment for -EAGAIN in i3c_device_do_priv_xfers()
      4286e1fc
    • Linus Torvalds's avatar
      Merge tag 'jffs2-for-linus-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · 6951abe8
      Linus Torvalds authored
      Pull jffs2 updates from Richard Weinberger:
      
       - Fix illegal memory access in jffs2_free_inode()
      
       - Kernel-doc fixes
      
       - print symbolic error names
      
      * tag 'jffs2-for-linus-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        jffs2: Fix potential illegal address access in jffs2_free_inode
        jffs2: Simplify the allocation of slab caches
        jffs2: nodemgmt: fix kernel-doc comments
        jffs2: print symbolic error name instead of error code
      6951abe8
    • Linus Torvalds's avatar
      Merge tag 'uml-for-linus-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux · 2313022e
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - Fixes for -Wmissing-prototypes warnings and further cleanup
      
       - Remove callback returning void from rtc and virtio drivers
      
       - Fix bash location
      
      * tag 'uml-for-linus-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (26 commits)
        um: virtio_uml: Convert to platform remove callback returning void
        um: rtc: Convert to platform remove callback returning void
        um: Remove unused do_get_thread_area function
        um: Fix -Wmissing-prototypes warnings for __vdso_*
        um: Add an internal header shared among the user code
        um: Fix the declaration of kasan_map_memory
        um: Fix the -Wmissing-prototypes warning for get_thread_reg
        um: Fix the -Wmissing-prototypes warning for __switch_mm
        um: Fix -Wmissing-prototypes warnings for (rt_)sigreturn
        um: Stop tracking host PID in cpu_tasks
        um: process: remove unused 'n' variable
        um: vector: remove unused len variable/calculation
        um: vector: fix bpfflash parameter evaluation
        um: slirp: remove set but unused variable 'pid'
        um: signal: move pid variable where needed
        um: Makefile: use bash from the environment
        um: Add winch to winch_handlers before registering winch IRQ
        um: Fix -Wmissing-prototypes warnings for __warp_* and foo
        um: Fix -Wmissing-prototypes warnings for text_poke*
        um: Move declarations to proper headers
        ...
      2313022e