Skip to content
  1. Mar 04, 2021
    • Zenghui Yu's avatar
      iommu/vt-d: Fix status code for Allocate/Free PASID command · 444d66a2
      Zenghui Yu authored
      As per Intel vt-d spec, Rev 3.0 (section 10.4.45 "Virtual Command Response
      Register"), the status code of "No PASID available" error in response to
      the Allocate PASID command is 2, not 1. The same for "Invalid PASID" error
      in response to the Free PASID command.
      
      We will otherwise see confusing kernel log under the command failure from
      guest side. Fix it.
      
      Fixes: 24f27d32
      
       ("iommu/vt-d: Enlightened PASID allocation")
      Signed-off-by: default avatarZenghui Yu <yuzenghui@huawei.com>
      Acked-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
      Link: https://lore.kernel.org/r/20210227073909.432-1-yuzenghui@huawei.com
      
      
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      444d66a2
    • Lu Baolu's avatar
      iommu: Don't use lazy flush for untrusted device · 82c3cefb
      Lu Baolu authored
      The lazy IOTLB flushing setup leaves a time window, in which the device
      can still access some system memory, which has already been unmapped by
      the device driver. It's not suitable for untrusted devices. A malicious
      device might use this to attack the system by obtaining data that it
      shouldn't obtain.
      
      Fixes: c588072b
      
       ("iommu/vt-d: Convert intel iommu driver to the iommu ops")
      Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
      Link: https://lore.kernel.org/r/20210225061454.2864009-1-baolu.lu@linux.intel.com
      
      
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      82c3cefb
    • Nicolin Chen's avatar
      iommu/tegra-smmu: Fix mc errors on tegra124-nyan · 765a9d1d
      Nicolin Chen authored
      Commit 25938c73 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
      removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to
      of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and
      tegra_smmu_configure() that are typically done in the IOMMU core also.
      
      This approach works for both existing devices that have DT nodes and other
      devices (like PCI device) that don't exist in DT, on Tegra210 and Tegra3
      upon testing. However, Page Fault errors are reported on tegra124-Nyan:
      
        tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
      	 EMEM address decode error (SMMU translation error [--S])
        tegra-mc 70019000.memory-controller: display0a: read @0xfe056b40:
      	 Page fault (SMMU translation error [--S])
      
      After debugging, I found that the mentioned commit changed some function
      callback sequence of tegra-smmu's, resulting in enabling SMMU for display
      client before display driver gets initialized. I couldn't reproduce exact
      same issue on Tegra210 as Tegra124 (arm-32) differs at arch-level code.
      
      Actually this Page Fault is a known issue, as on most of Tegra platforms,
      display gets enabled by the bootloader for the splash screen feature, so
      it keeps filling the framebuffer memory. A proper fix to this issue is to
      1:1 linear map the framebuffer memory to IOVA space so the SMMU will have
      the same address as the physical address in its page table. Yet, Thierry
      has been working on the solution above for a year, and it hasn't merged.
      
      Therefore, let's partially revert the mentioned commit to fix the errors.
      
      The reason why we do a partial revert here is that we can still set priv
      in ->of_xlate() callback for PCI devices. Meanwhile, devices existing in
      DT, like display, will go through tegra_smmu_configure() at the stage of
      bus_set_iommu() when SMMU gets probed(), as what it did before we merged
      the mentioned commit.
      
      Once we have the linear map solution for framebuffer memory, this change
      can be cleaned away.
      
      [Big thank to Guillaume who reported and helped debugging/verification]
      
      Fixes: 25938c73
      
       ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()")
      Reported-by: default avatarGuillaume Tucker <guillaume.tucker@collabora.com>
      Signed-off-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
      Tested-by: default avatarGuillaume Tucker <guillaume.tucker@collabora.com>
      Acked-by: default avatarThierry Reding <treding@nvidia.com>
      Link: https://lore.kernel.org/r/20210218220702.1962-1-nicoleotsuka@gmail.com
      
      
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      765a9d1d
    • Andrey Ryabinin's avatar
      iommu/amd: Fix sleeping in atomic in increase_address_space() · 140456f9
      Andrey Ryabinin authored
      increase_address_space() calls get_zeroed_page(gfp) under spin_lock with
      disabled interrupts. gfp flags passed to increase_address_space() may allow
      sleeping, so it comes to this:
      
       BUG: sleeping function called from invalid context at mm/page_alloc.c:4342
       in_atomic(): 1, irqs_disabled(): 1, pid: 21555, name: epdcbbf1qnhbsd8
      
       Call Trace:
        dump_stack+0x66/0x8b
        ___might_sleep+0xec/0x110
        __alloc_pages_nodemask+0x104/0x300
        get_zeroed_page+0x15/0x40
        iommu_map_page+0xdd/0x3e0
        amd_iommu_map+0x50/0x70
        iommu_map+0x106/0x220
        vfio_iommu_type1_ioctl+0x76e/0x950 [vfio_iommu_type1]
        do_vfs_ioctl+0xa3/0x6f0
        ksys_ioctl+0x66/0x70
        __x64_sys_ioctl+0x16/0x20
        do_syscall_64+0x4e/0x100
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fix this by moving get_zeroed_page() out of spin_lock/unlock section.
      
      Fixes: 754265bc
      
       ("iommu/amd: Fix race in increase_address_space()")
      Signed-off-by: default avatarAndrey Ryabinin <arbn@yandex-team.com>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20210217143004.19165-1-arbn@yandex-team.com
      
      
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      140456f9
  2. Feb 12, 2021
  3. Feb 08, 2021
  4. Feb 07, 2021
    • Linus Torvalds's avatar
      Merge tag '5.11-rc6-smb3' of git://git.samba.org/sfrench/cifs-2.6 · 825b5991
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Three small smb3 fixes for stable"
      
      * tag '5.11-rc6-smb3' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: report error instead of invalid when revalidating a dentry fails
        smb3: fix crediting for compounding when only one request in flight
        smb3: Fix out-of-bounds bug in SMB2_negotiate()
      825b5991
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · f7455e5d
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
       "A handful of fixes for this week:
      
         - A fix to avoid evalating the VA twice in virt_addr_valid, which
           fixes some WARNs under DEBUG_VIRTUAL.
      
         - Two fixes related to STRICT_KERNEL_RWX: one that fixes some
           permissions when strict is disabled, and one to fix some alignment
           issues when strict is enabled.
      
         - A fix to disallow the selection of MAXPHYSMEM_2GB on RV32, which
           isn't valid any more but may still show up in some oldconfigs.
      
        We still have the HiFive Unleashed ethernet phy reset regression, so
        there will likely be something coming next week"
      
      * tag 'riscv-for-linus-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        RISC-V: Define MAXPHYSMEM_1GB only for RV32
        riscv: Align on L1_CACHE_BYTES when STRICT_KERNEL_RWX
        RISC-V: Fix .init section permission update
        riscv: virt_addr_valid must check the address belongs to linear mapping
      f7455e5d
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · f06279ea
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - A fix for a change we made to __kernel_sigtramp_rt64() which confused
         glibc's backtrace logic, and also changed the semantics of that
         symbol, which was arguably an ABI break.
      
       - A fix for a stack overwrite in our VSX instruction emulation.
      
       - A couple of fixes for the Makefile logic in the new C VDSO.
      
      Thanks to Masahiro Yamada, Naveen N.  Rao, Raoni Fassina Firmino, and
      Ravi Bangoria.
      
      * tag 'powerpc-5.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64/signal: Fix regression in __kernel_sigtramp_rt64() semantics
        powerpc/vdso64: remove meaningless vgettimeofday.o build rule
        powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o
        powerpc/sstep: Fix array out of bound warning
      f06279ea
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 4a7859ea
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
      
       - Fix latent bug with DC21285 (Footbridge PCI bridge) configuration
         accessors that affects GCC >= 4.9.2
      
       - Fix misplaced tegra_uart_config in decompressor
      
       - Ensure signal page contents are initialised
      
       - Fix kexec oops
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: kexec: fix oops after TLB are invalidated
        ARM: ensure the signal page contains defined contents
        ARM: 9043/1: tegra: Fix misplaced tegra_uart_config in decompressor
        ARM: footbridge: fix dc21285 PCI configuration accessors
      4a7859ea
    • Linus Torvalds's avatar
      Merge tag 'usb-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 368afecb
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small, last-minute, USB driver fixes for 5.11-rc7
      
        They all resolve issues reported, or are a few new device ids for some
        drivers. They include:
      
         - new device ids for some usb-serial drivers
      
         - xhci fixes for a variety of reported problems
      
         - dwc3 driver bugfixes
      
         - dwc2 driver bugfixes
      
         - usblp driver bugfix
      
         - thunderbolt bugfix
      
         - few other tiny fixes
      
        All have been in linux-next with no reported issues"
      
      * tag 'usb-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: dwc2: Fix endpoint direction check in ep_from_windex
        usb: dwc3: fix clock issue during resume in OTG mode
        xhci: fix bounce buffer usage for non-sg list case
        usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720
        usb: xhci-mtk: break loop when find the endpoint to drop
        usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints
        usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop()
        USB: gadget: legacy: fix an error code in eth_bind()
        thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link()
        USB: serial: option: Adding support for Cinterion MV31
        usb: xhci-mtk: fix unreleased bandwidth data
        usb: gadget: aspeed: add missing of_node_put
        USB: usblp: don't call usb_set_interface if there's a single alt
        USB: serial: cp210x: add pid/vid for WSDA-200-USB
        USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000
      368afecb
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 7c2d1835
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
       "Nothing terribly interesting, just a few fixups"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: xpad - sync supported devices with fork on GitHub
        Input: ariel-pwrbutton - remove unused variable ariel_pwrbutton_id_table
        Input: goodix - add support for Goodix GT9286 chip
        dt-bindings: input: touchscreen: goodix: Add binding for GT9286 IC
        dt-bindings: input: adc-keys: clarify description
        Input: ili210x - implement pressure reporting for ILI251x
        Input: i8042 - unbreak Pegatron C15B
        Input: st1232 - wait until device is ready before reading resolution
        Input: st1232 - do not read more bytes than needed
        Input: st1232 - fix off-by-one error in resolution handling
      7c2d1835
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 964d069f
      Linus Torvalds authored
      Pull SCSI fix from James Bottomley:
       "One fix in drivers (lpfc) that stops an oops on resource exhaustion"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: lpfc: Fix EEH encountering oops with NVMe traffic
      964d069f
    • Linus Torvalds's avatar
      Merge tag 'block-5.11-2021-02-05' of git://git.kernel.dk/linux-block · eec79181
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few small regression fixes:
      
         - NVMe pull request from Christoph:
             - more quirks for buggy devices (Thorsten Leemhuis, Claus Stovgaard)
             - update the email address for Keith (Keith Busch)
             - fix an out of bounds access in nvmet-tcp (Sagi Grimberg)
      
         - Regression fix for BFQ shallow depth calculations introduced in
           this merge window (Lin)"
      
      * tag 'block-5.11-2021-02-05' of git://git.kernel.dk/linux-block:
        nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs
        bfq-iosched: Revert "bfq: Fix computation of shallow depth"
        update the email address for Keith Bush
        nvme-pci: ignore the subsysem NQN on Phison E16
        nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs
      eec79181
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.11-2021-02-05' of git://git.kernel.dk/linux-block · 860b45da
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two small fixes that should go into 5.11:
      
         - task_work resource drop fix (Pavel)
      
         - identity COW fix (Xiaoguang)"
      
      * tag 'io_uring-5.11-2021-02-05' of git://git.kernel.dk/linux-block:
        io_uring: drop mm/files between task_work_submit
        io_uring: don't modify identity's files uncess identity is cowed
      860b45da
  5. Feb 06, 2021