1. Aug 23, 2023
  2. Aug 22, 2023
  3. Aug 18, 2023
    • Junhao He's avatar
      coresight: trbe: Fix TRBE potential sleep in atomic context · c0a232f1
      Junhao He authored
      smp_call_function_single() will allocate an IPI interrupt vector to
      the target processor and send a function call request to the interrupt
      vector. After the target processor receives the IPI interrupt, it will
      execute arm_trbe_remove_coresight_cpu() call request in the interrupt
      handler.
      
      According to the device_unregister() stack information, if other process
      is useing the device, the down_write() may sleep, and trigger deadlocks
      or unexpected errors.
      
        arm_trbe_remove_coresight_cpu
          coresight_unregister
            device_unregister
              device_del
                kobject_del
                  __kobject_del
                    sysfs_remove_dir
                      kernfs_remove
                        down_write ---------> it may sleep
      
      Add a helper arm_trbe_disable_cpu() to disable TRBE precpu irq and reset
      per TRBE.
      Simply call arm_trbe_remove_coresight_cpu() directly without useing the
      smp_call_function_single(), which is the same as registering the TRBE
      coresight device.
      
      Fixes: 3fbf7f01
      
       ("coresight: sink: Add TRBE driver")
      Signed-off-by: default avatarJunhao He <hejunhao3@huawei.com>
      Link: https://lore.kernel.org/r/20230814093813.19152-2-hejunhao3@huawei.com
      
      
      [ Remove duplicate cpumask checks during removal ]
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      [ v3 - Remove the operation of assigning NULL to cpudata->drvdata ]
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20230818084052.10116-1-hejunhao3@huawei.com
      c0a232f1
    • Junhao He's avatar
      coresight: Fix memory leak in acpi_buffer->pointer · 1a9e0267
      Junhao He authored
      There are memory leaks reported by kmemleak:
      ...
      unreferenced object 0xffff00213c141000 (size 1024):
        comm "systemd-udevd", pid 2123, jiffies 4294909467 (age 6062.160s)
        hex dump (first 32 bytes):
          04 00 00 00 02 00 00 00 18 10 14 3c 21 00 ff ff  ...........<!...
          00 00 00 00 00 00 00 00 03 00 00 00 10 00 00 00  ................
        backtrace:
          [<000000004b7c9001>] __kmem_cache_alloc_node+0x2f8/0x348
          [<00000000b0fc7ceb>] __kmalloc+0x58/0x108
          [<0000000064ff4695>] acpi_os_allocate+0x2c/0x68
          [<000000007d57d116>] acpi_ut_initialize_buffer+0x54/0xe0
          [<0000000024583908>] acpi_evaluate_object+0x388/0x438
          [<0000000017b2e72b>] acpi_evaluate_object_typed+0xe8/0x240
          [<000000005df0eac2>] coresight_get_platform_data+0x1b4/0x988 [coresight]
      ...
      
      The ACPI buffer memory (buf.pointer) should be freed. But the buffer
      is also used after returning from acpi_get_dsd_graph().
      Move the temporary variables buf to acpi_coresight_parse_graph(),
      and free it before the function return to prevent memory leak.
      
      Fixes: 76ffa5ab
      
       ("coresight: Support for ACPI bindings")
      Signed-off-by: default avatarJunhao He <hejunhao3@huawei.com>
      Reviewed-by: default avatarJames Clark <james.clark@arm.com>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20230817085937.55590-2-hejunhao3@huawei.com
      1a9e0267
  4. Aug 17, 2023
  5. Aug 16, 2023
  6. Aug 15, 2023
  7. Aug 14, 2023
  8. Aug 13, 2023
  9. Aug 12, 2023
    • Linus Torvalds's avatar
      Merge tag 'usb-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 469a2f50
      Linus Torvalds authored
      Pull USB / Thunderbolt driver fixes from Greg KH:
       "Here are some small USB and Thunderbolt driver fixes for reported
        problems. Included in here are:
      
         - thunderbolt driver memory leak fix
      
         - thunderbolt display flicker fix
      
         - usb dwc3 driver fix
      
         - usb gadget uvc disconnect crash fix
      
         - usb typec Kconfig build dependency fix
      
         - usb typec small fixes
      
         - usb-con-gpio bugfix
      
         - usb-storage old driver bugfix
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        thunderbolt: Fix memory leak in tb_handle_dp_bandwidth_request()
        usb: dwc3: Properly handle processing of pending events
        usb-storage: alauda: Fix uninit-value in alauda_check_media()
        usb: common: usb-conn-gpio: Prevent bailing out if initial role is none
        USB: Gadget: core: Help prevent panic during UVC unconfigure
        usb: typec: mux: intel: Add dependency on USB_COMMON
        usb: typec: nb7vpq904m: Add an error handling path in nb7vpq904m_probe()
        usb: typec: altmodes/displayport: Signal hpd when configuring pin assignment
        usb: typec: tcpm: Fix response to vsafe0V event
        thunderbolt: Fix Thunderbolt 3 display flickering issue on 2nd hot plug onwards
      469a2f50
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 43972cf2
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Do not parse the confidential computing blob on non-AMD hardware as
         it leads to an EFI config table ending up unmapped
      
       - Use the correct segment selector in the 32-bit version of getcpu() in
         the vDSO
      
       - Make sure vDSO and VVAR regions are placed in the 47-bit VA range
         even on 5-level paging systems
      
       - Add models 0x90-0x91 to the range of AMD Zenbleed-affected CPUs
      
      * tag 'x86_urgent_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
        x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
        x86/linkage: Fix typo of BUILD_VDSO in asm/linkage.h
        x86/vdso: Choose the right GDT_ENTRY_CPUNODE for 32-bit getcpu() on 64-bit kernel
        x86/sev: Do not try to parse for the CC blob on non-AMD hardware
      43972cf2
    • Linus Torvalds's avatar
      Merge tag 'x86_bugs_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 272b86ba
      Linus Torvalds authored
      Pull x86 mitigation fixes from Borislav Petkov:
       "The first set of fallout fixes after the embargo madness. There will
        be another set next week too.
      
         - A first series of cleanups/unifications and documentation
           improvements to the SRSO and GDS mitigations code which got
           postponed to after the embargo date
      
         - Fix the SRSO aliasing addresses assertion so that the LLVM linker
           can parse it too"
      
      * tag 'x86_bugs_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        driver core: cpu: Fix the fallback cpu_show_gds() name
        x86: Move gds_ucode_mitigated() declaration to header
        x86/speculation: Add cpu_show_gds() prototype
        driver core: cpu: Make cpu_show_not_affected() static
        x86/srso: Fix build breakage with the LLVM linker
        Documentation/srso: Document IBPB aspect and fix formatting
        driver core: cpu: Unify redundant silly stubs
        Documentation/hw-vuln: Unify filename specification in index
      272b86ba