Skip to content
  1. Feb 19, 2021
    • Hans de Goede's avatar
      ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling · c27f3d01
      Hans de Goede authored
      ACPICA commit c9e0116952363b0fa815143dca7e9a2eb4fefa61
      
      The handling of the generic_serial_bus (I2C) and GPIO op_regions in
      acpi_ev_address_space_dispatch() passes a number of extra parameters
      to the address-space handler through the address-space Context pointer
      (instead of using more function parameters).
      
      The Context is shared between threads, so if multiple threads try to
      call the handler for the same address-space at the same time, then
      a second thread could change the parameters of a first thread while
      the handler is running for the first thread.
      
      An example of this race hitting is the Lenovo Yoga Tablet2 1015L,
      where there are both attrib_bytes accesses and attrib_byte accesses
      to the same address-space. The attrib_bytes access stores the number
      of bytes to transfer in Context->access_length. Where as for the
      attrib_byte access the number of bytes to transfer is always 1 and
      field_obj->Field.access_length is unused (so 0). Both types of
      accesses racing from different threads leads to the following problem:
      
       1. Thread a. starts an attrib_bytes access, stores a non 0 value
          from field_obj->Field.access_length in Context->access_length
      
       2. Thread b. starts an attrib_byte access, stores 0 in
          Context->access_length
      
       3. Thread a. calls i2c_acpi_space_handler() (under Linux). Which
          sees that the access-type is ACPI_GSB_ACCESS_ATTRIB_MULTIBYTE
          and calls acpi_gsb_i2c_read_bytes(..., Context->access_length)
      
       4. At this point Context->access_length is 0 (set by thread b.)
      
      rather then the field_obj->Field.access_length value from thread a.
      This 0 length reads leads to the following errors being logged:
      
       i2c i2c-0: adapter quirk: no zero length (addr 0x0078, size 0, read)
       i2c i2c-0: i2c read 0 bytes from client@0x78 starting at reg 0x0 failed, error: -95
      
      Note this is just an example of the problems which this race can cause.
      
      There are likely many more (sporadic) problems caused by this race.
      
      This commit adds a new context_mutex to struct acpi_object_addr_handler
      and makes acpi_ev_address_space_dispatch() take that mutex when
      using the shared Context to pass extra parameters to an address-space
      handler, fixing this race.
      
      Note the new mutex must be taken *after* exiting the interpreter,
      therefor the existing acpi_ex_exit_interpreter() call is moved to above
      the code which stores the extra parameters in the Context.
      
      Link: https://github.com/acpica/acpica/commit/c9e01169
      
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
      Signed-off-by: default avatarErik Kaneda <erik.kaneda@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c27f3d01
  2. Feb 11, 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