1. 23 Aug, 2024 6 commits
    • Luiz Augusto von Dentz's avatar
      Bluetooth: hci_core: Fix not handling hibernation actions · 18b3256d
      Luiz Augusto von Dentz authored
      This fixes not handling hibernation actions on suspend notifier so they
      are treated in the same way as regular suspend actions.
      
      Fixes: 9952d90e ("Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND")
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      18b3256d
    • Neeraj Sanjay Kale's avatar
      Bluetooth: btnxpuart: Fix random crash seen while removing driver · 35237475
      Neeraj Sanjay Kale authored
      This fixes the random kernel crash seen while removing the driver, when
      running the load/unload test over multiple iterations.
      
      1) modprobe btnxpuart
      2) hciconfig hci0 reset
      3) hciconfig (check hci0 interface up with valid BD address)
      4) modprobe -r btnxpuart
      Repeat steps 1 to 4
      
      The ps_wakeup() call in btnxpuart_close() schedules the psdata->work(),
      which gets scheduled after module is removed, causing a kernel crash.
      
      This hidden issue got highlighted after enabling Power Save by default
      in 4183a7be (Bluetooth: btnxpuart: Enable Power Save feature on
      startup)
      
      The new ps_cleanup() deasserts UART break immediately while closing
      serdev device, cancels any scheduled ps_work and destroys the ps_lock
      mutex.
      
      [   85.884604] Unable to handle kernel paging request at virtual address ffffd4a61638f258
      [   85.884624] Mem abort info:
      [   85.884625]   ESR = 0x0000000086000007
      [   85.884628]   EC = 0x21: IABT (current EL), IL = 32 bits
      [   85.884633]   SET = 0, FnV = 0
      [   85.884636]   EA = 0, S1PTW = 0
      [   85.884638]   FSC = 0x07: level 3 translation fault
      [   85.884642] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000041dd0000
      [   85.884646] [ffffd4a61638f258] pgd=1000000095fff003, p4d=1000000095fff003, pud=100000004823d003, pmd=100000004823e003, pte=0000000000000000
      [   85.884662] Internal error: Oops: 0000000086000007 [#1] PREEMPT SMP
      [   85.890932] Modules linked in: algif_hash algif_skcipher af_alg overlay fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine authenc libdes crct10dif_ce polyval_ce polyval_generic snd_soc_imx_spdif snd_soc_imx_card snd_soc_ak5558 snd_soc_ak4458 caam secvio error snd_soc_fsl_spdif snd_soc_fsl_micfil snd_soc_fsl_sai snd_soc_fsl_utils gpio_ir_recv rc_core fuse [last unloaded: btnxpuart(O)]
      [   85.927297] CPU: 1 PID: 67 Comm: kworker/1:3 Tainted: G           O       6.1.36+g937b1be4345a #1
      [   85.936176] Hardware name: FSL i.MX8MM EVK board (DT)
      [   85.936182] Workqueue: events 0xffffd4a61638f380
      [   85.936198] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      [   85.952817] pc : 0xffffd4a61638f258
      [   85.952823] lr : 0xffffd4a61638f258
      [   85.952827] sp : ffff8000084fbd70
      [   85.952829] x29: ffff8000084fbd70 x28: 0000000000000000 x27: 0000000000000000
      [   85.963112] x26: ffffd4a69133f000 x25: ffff4bf1c8540990 x24: ffff4bf215b87305
      [   85.963119] x23: ffff4bf215b87300 x22: ffff4bf1c85409d0 x21: ffff4bf1c8540970
      [   85.977382] x20: 0000000000000000 x19: ffff4bf1c8540880 x18: 0000000000000000
      [   85.977391] x17: 0000000000000000 x16: 0000000000000133 x15: 0000ffffe2217090
      [   85.977399] x14: 0000000000000001 x13: 0000000000000133 x12: 0000000000000139
      [   85.977407] x11: 0000000000000001 x10: 0000000000000a60 x9 : ffff8000084fbc50
      [   85.977417] x8 : ffff4bf215b7d000 x7 : ffff4bf215b83b40 x6 : 00000000000003e8
      [   85.977424] x5 : 00000000410fd030 x4 : 0000000000000000 x3 : 0000000000000000
      [   85.977432] x2 : 0000000000000000 x1 : ffff4bf1c4265880 x0 : 0000000000000000
      [   85.977443] Call trace:
      [   85.977446]  0xffffd4a61638f258
      [   85.977451]  0xffffd4a61638f3e8
      [   85.977455]  process_one_work+0x1d4/0x330
      [   85.977464]  worker_thread+0x6c/0x430
      [   85.977471]  kthread+0x108/0x10c
      [   85.977476]  ret_from_fork+0x10/0x20
      [   85.977488] Code: bad PC value
      [   85.977491] ---[ end trace 0000000000000000 ]---
      
      Preset since v6.9.11
      Fixes: 86d55f12 ("Bluetooth: btnxpuart: Deasset UART break before closing serdev device")
      Signed-off-by: default avatarNeeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
      Reviewed-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      35237475
    • Kiran K's avatar
      Bluetooth: btintel: Allow configuring drive strength of BRI · eb9e749c
      Kiran K authored
      BRI (Bluetooth Radio Interface) traffic from CNVr to CNVi was found causing
      cross talk step errors to WiFi. To avoid this potential issue OEM platforms
      can replace BRI resistor to adjust the BRI response line drive strength.
      During the *setup*, driver reads the drive strength value from uefi
      variable and passes it to the controller via vendor specific command with
      opcode 0xfc0a.
      
      dmesg:
      
      ..
      [21.982720] Bluetooth: hci0: Bootloader timestamp 2023.33 buildtype 1 build 45995
      [21.984250] Bluetooth: hci0: Found device firmware: intel/ibt-0190-0291-iml.sfi
      [21.984255] Bluetooth: hci0: Boot Address: 0x30099000
      [21.984256] Bluetooth: hci0: Firmware Version: 160-24.24
      [22.011501] Bluetooth: hci0: Waiting for firmware download to complete
      [22.011518] Bluetooth: hci0: Firmware loaded in 26624 usecs
      [22.011584] Bluetooth: hci0: Waiting for device to boot
      [22.013546] Bluetooth: hci0: Malformed MSFT vendor event: 0x02
      [22.013552] Bluetooth: hci0: Device booted in 1967 usecs
      ...
      [22.013792] Bluetooth: hci0: dsbr: enable: 0x01 value: 0x0b
      ...
      [22.015027] Bluetooth: hci0: Found device firmware: intel/ibt-0190-0291.sfi
      [22.015041] Bluetooth: hci0: Boot Address: 0x10000800
      [22.015043] Bluetooth: hci0: Firmware Version: 160-24.24
      [22.395821] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
      [22.395828] Bluetooth: BNEP filters: protocol multicast
      ...
      Signed-off-by: default avatarKiran K <kiran.k@intel.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      eb9e749c
    • Haiyang Zhang's avatar
      net: mana: Fix race of mana_hwc_post_rx_wqe and new hwc response · 8af174ea
      Haiyang Zhang authored
      The mana_hwc_rx_event_handler() / mana_hwc_handle_resp() calls
      complete(&ctx->comp_event) before posting the wqe back. It's
      possible that other callers, like mana_create_txq(), start the
      next round of mana_hwc_send_request() before the posting of wqe.
      And if the HW is fast enough to respond, it can hit no_wqe error
      on the HW channel, then the response message is lost. The mana
      driver may fail to create queues and open, because of waiting for
      the HW response and timed out.
      Sample dmesg:
      [  528.610840] mana 39d4:00:02.0: HWC: Request timed out!
      [  528.614452] mana 39d4:00:02.0: Failed to send mana message: -110, 0x0
      [  528.618326] mana 39d4:00:02.0 enP14804s2: Failed to create WQ object: -110
      
      To fix it, move posting of rx wqe before complete(&ctx->comp_event).
      
      Cc: stable@vger.kernel.org
      Fixes: ca9c54d2 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Reviewed-by: default avatarLong Li <longli@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8af174ea
    • Johannes Berg's avatar
      net: drop special comment style · 82b8000c
      Johannes Berg authored
      As we discussed in the room at netdevconf earlier this week,
      drop the requirement for special comment style for netdev.
      
      For checkpatch, the general check accepts both right now, so
      simply drop the special request there as well.
      Acked-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      82b8000c
    • Eric Dumazet's avatar
      pktgen: use cpus_read_lock() in pg_net_init() · 979b581e
      Eric Dumazet authored
      I have seen the WARN_ON(smp_processor_id() != cpu) firing
      in pktgen_thread_worker() during tests.
      
      We must use cpus_read_lock()/cpus_read_unlock()
      around the for_each_online_cpu(cpu) loop.
      
      While we are at it use WARN_ON_ONCE() to avoid a possible syslog flood.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://patch.msgid.link/20240821175339.1191779-1-edumazet@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      979b581e
  2. 22 Aug, 2024 28 commits
  3. 21 Aug, 2024 6 commits
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.11-4' of... · 872cf28b
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Ilpo Järvinen:
      
       - ISST: Fix an error-handling corner case
      
       - platform/surface: aggregator: Minor corner case fix and new HW
         support
      
      * tag 'platform-drivers-x86-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86: ISST: Fix return value on last invalid resource
        platform/surface: aggregator: Fix warning when controller is destroyed in probe
        platform/surface: aggregator_registry: Add support for Surface Laptop 6
        platform/surface: aggregator_registry: Add fan and thermal sensor support for Surface Laptop 5
        platform/surface: aggregator_registry: Add support for Surface Laptop Studio 2
        platform/surface: aggregator_registry: Add support for Surface Laptop Go 3
        platform/surface: aggregator_registry: Add Support for Surface Pro 10
        platform/x86: asus-wmi: Add quirk for ROG Ally X
      872cf28b
    • Linus Torvalds's avatar
      Merge tag 'erofs-for-6.11-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs · 5c6154ff
      Linus Torvalds authored
      Pull erofs fixes from Gao Xiang:
       "As I mentioned in the merge window pull request, there is a regression
        which could cause system hang due to page migration. The corresponding
        fix landed upstream through MM tree last week (commit 2e6506e1:
        "mm/migrate: fix deadlock in migrate_pages_batch() on large folios"),
        therefore large folios can be safely allowed for compressed inodes and
        stress tests have been running on my fleet for over 20 days without
        any regression. Users have explicitly requested this for months, so
        let's allow large folios for EROFS full cases now for wider testing.
      
        Additionally, there is a fix which addresses invalid memory accesses
        on a failure path triggered by fault injection and two minor cleanups
        to simplify the codebase.
      
        Summary:
      
         - Allow large folios on compressed inodes
      
         - Fix invalid memory accesses if z_erofs_gbuf_growsize() partially
           fails
      
         - Two minor cleanups"
      
      * tag 'erofs-for-6.11-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
        erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails
        erofs: allow large folios for compressed files
        erofs: get rid of check_layout_compatibility()
        erofs: simplify readdir operation
      5c6154ff
    • Linus Torvalds's avatar
      Merge tag '6.11-rc4-server-fixes' of git://git.samba.org/ksmbd · b311c1b4
      Linus Torvalds authored
      Pull smb server fixes from Steve French:
      
       - important reconnect fix
      
       - fix for memcpy issues on mount
      
       - two minor cleanup patches
      
      * tag '6.11-rc4-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: Replace one-element arrays with flexible-array members
        ksmbd: fix spelling mistakes in documentation
        ksmbd: fix race condition between destroy_previous_session() and smb2 operations()
        ksmbd: Use unsafe_memcpy() for ntlm_negotiate
      b311c1b4
    • Jakub Kicinski's avatar
      Merge branch 'mptcp-pm-fix-ids-not-being-reusable' · 0d76fc7e
      Jakub Kicinski authored
      Matthieu Baerts says:
      
      ====================
      mptcp: pm: fix IDs not being reusable
      
      Here are more fixes for the MPTCP in-kernel path-manager. In this
      series, the fixes are around the endpoint IDs not being reusable for
      on-going connections when re-creating endpoints with previously used IDs.
      
      - Patch 1 fixes this case for endpoints being used to send ADD_ADDR.
        Patch 2 validates this fix. The issue is present since v5.10.
      
      - Patch 3 fixes this case for endpoints being used to establish new
        subflows. Patch 4 validates this fix. The issue is present since v5.10.
      
      - Patch 5 fixes this case when all endpoints are flushed. Patch 6
        validates this fix. The issue is present since v5.13.
      
      - Patch 7 removes a helper that is confusing, and introduced in v5.10.
        It helps simplifying the next patches.
      
      - Patch 8 makes sure a 'subflow' counter is only decremented when
        removing a 'subflow' endpoint. Can be backported up to v5.13.
      
      - Patch 9 is similar, but for a 'signal' counter. Can be backported up
        to v5.10.
      
      - Patch 10 checks the last max accepted ADD_ADDR limit before accepting
        new ADD_ADDR. For v5.10 as well.
      
      - Patch 11 removes a wrong restriction for the userspace PM, added
        during a refactoring in v6.5.
      
      - Patch 12 makes sure the fullmesh mode sets the ID 0 when a new subflow
        using the source address of the initial subflow is created. Patch 13
        covers this case. This issue is present since v5.15.
      
      - Patch 14 avoid possible UaF when selecting an address from the
        endpoints list.
      ====================
      
      Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-0-38035d40de5b@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0d76fc7e
    • Matthieu Baerts (NGI0)'s avatar
      mptcp: pm: avoid possible UaF when selecting endp · 48e50dcb
      Matthieu Baerts (NGI0) authored
      select_local_address() and select_signal_address() both select an
      endpoint entry from the list inside an RCU protected section, but return
      a reference to it, to be read later on. If the entry is dereferenced
      after the RCU unlock, reading info could cause a Use-after-Free.
      
      A simple solution is to copy the required info while inside the RCU
      protected section to avoid any risk of UaF later. The address ID might
      need to be modified later to handle the ID0 case later, so a copy seems
      OK to deal with.
      Reported-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Closes: https://lore.kernel.org/45cd30d3-7710-491c-ae4d-a1368c00beb1@redhat.com
      Fixes: 01cacb00 ("mptcp: add netlink-based PM")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarMat Martineau <martineau@kernel.org>
      Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
      Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-14-38035d40de5b@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      48e50dcb
    • Matthieu Baerts (NGI0)'s avatar
      selftests: mptcp: join: validate fullmesh endp on 1st sf · 4878f9f8
      Matthieu Baerts (NGI0) authored
      This case was not covered, and the wrong ID was set before the previous
      commit.
      
      The rest is not modified, it is just that it will increase the code
      coverage.
      
      The right address ID can be verified by looking at the packet traces. We
      could automate that using Netfilter with some cBPF code for example, but
      that's always a bit cryptic. Packetdrill seems better fitted for that.
      
      Fixes: 4f49d633 ("selftests: mptcp: add fullmesh testcases")
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarMat Martineau <martineau@kernel.org>
      Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
      Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-13-38035d40de5b@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4878f9f8