1. 05 Jan, 2024 5 commits
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.7-3a' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 6d0dc855
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "These are two correctness fixes for handing DT input in the
        Allwinner (sunxi) SMP startup code"
      
      * tag 'soc-fixes-6.7-3a' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: sun9i: smp: fix return code check of of_property_match_string
        ARM: sun9i: smp: Fix array-index-out-of-bounds read in sunxi_mc_smp_init
      6d0dc855
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 7987b8b7
      Linus Torvalds authored
      Pull kvm fix from Paolo Bonzini:
      
       - Fix boolean logic in intel_guest_get_msrs
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86/pmu: fix masking logic for MSR_CORE_PERF_GLOBAL_CTRL
      7987b8b7
    • Linus Torvalds's avatar
      Merge tag 'probes-fixes-v6.7-rc8' of... · 7131c2e9
      Linus Torvalds authored
      Merge tag 'probes-fixes-v6.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
      
      Pull kprobes/x86 fix from Masami Hiramatsu:
      
       - Fix to emulate indirect call which size is not 5 byte.
      
         Current code expects the indirect call instructions are 5 bytes, but
         that is incorrect. Usually indirect call based on register is shorter
         than that, thus the emulation causes a kernel crash by accessing
         wrong instruction boundary. This uses the instruction size to
         calculate the return address correctly.
      
      * tag 'probes-fixes-v6.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        x86/kprobes: fix incorrect return address calculation in kprobe_emulate_call_indirect
      7131c2e9
    • Linus Torvalds's avatar
      Merge tag '6.7-rc8-smb3-mchan-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 3eca8945
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
       "Three important multichannel smb3 client fixes found in recent
        testing:
      
         - fix oops due to incorrect refcounting of interfaces after
           disabling multichannel
      
         - fix possible unrecoverable session state after disabling
           multichannel with active sessions
      
         - fix two places that were missing use of chan_lock"
      
      * tag '6.7-rc8-smb3-mchan-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: do not depend on release_iface for maintaining iface_list
        cifs: cifs_chan_is_iface_active should be called with chan_lock held
        cifs: after disabling multichannel, mark tcon for reconnect
      3eca8945
    • Linus Torvalds's avatar
      Merge tag 'net-6.7-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 1f874787
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from wireless and netfilter.
      
        We haven't accumulated much over the break. If it wasn't for the
        uninterrupted stream of fixes for Intel drivers this PR would be very
        slim. There was a handful of user reports, however, either they stood
        out because of the lower traffic or users have had more time to test
        over the break. The ones which are v6.7-relevant should be wrapped up.
      
        Current release - regressions:
      
         - Revert "net: ipv6/addrconf: clamp preferred_lft to the minimum
           required", it caused issues on networks where routers send prefixes
           with preferred_lft=0
      
         - wifi:
            - iwlwifi: pcie: don't synchronize IRQs from IRQ, prevent deadlock
            - mac80211: fix re-adding debugfs entries during reconfiguration
      
        Current release - new code bugs:
      
         - tcp: print AO/MD5 messages only if there are any keys
      
        Previous releases - regressions:
      
         - virtio_net: fix missing dma unmap for resize, prevent OOM
      
        Previous releases - always broken:
      
         - mptcp: prevent tcp diag from closing listener subflows
      
         - nf_tables:
            - set transport header offset for egress hook, fix IPv4 mangling
            - skip set commit for deleted/destroyed sets, avoid double deactivation
      
         - nat: make sure action is set for all ct states, fix openvswitch
           matching on ICMP packets in related state
      
         - eth: mlxbf_gige: fix receive hang under heavy traffic
      
         - eth: r8169: fix PCI error on system resume for RTL8168FP
      
         - net: add missing getsockopt(SO_TIMESTAMPING_NEW) and cmsg handling"
      
      * tag 'net-6.7-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits)
        net/tcp: Only produce AO/MD5 logs if there are any keys
        net: Implement missing SO_TIMESTAMPING_NEW cmsg support
        bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters()
        net: ravb: Wait for operating mode to be applied
        asix: Add check for usbnet_get_endpoints
        octeontx2-af: Re-enable MAC TX in otx2_stop processing
        octeontx2-af: Always configure NIX TX link credits based on max frame size
        net/smc: fix invalid link access in dumping SMC-R connections
        net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues
        virtio_net: fix missing dma unmap for resize
        igc: Fix hicredit calculation
        ice: fix Get link status data length
        i40e: Restore VF MSI-X state during PCI reset
        i40e: fix use-after-free in i40e_aqc_add_filters()
        net: Save and restore msg_namelen in sock_sendmsg
        netfilter: nft_immediate: drop chain reference counter on error
        netfilter: nf_nat: fix action not being set for all ct states
        net: bcmgenet: Fix FCS generation for fragmented skbuffs
        mptcp: prevent tcp diag from closing listener subflows
        MAINTAINERS: add Geliang as reviewer for MPTCP
        ...
      1f874787
  2. 04 Jan, 2024 26 commits
    • Linus Torvalds's avatar
      x86/csum: clean up `csum_partial' further · a476aae3
      Linus Torvalds authored
      Commit 688eb819 ("x86/csum: Improve performance of `csum_partial`")
      ended up improving the code generation for the IP csum calculations, and
      in particular special-casing the 40-byte case that is a hot case for
      IPv6 headers.
      
      It then had _another_ special case for the 64-byte unrolled loop, which
      did two chains of 32-byte blocks, which allows modern CPU's to improve
      performance by doing the chains in parallel thanks to renaming the carry
      flag.
      
      This just unifies the special cases and combines them into just one
      single helper the 40-byte csum case, and replaces the 64-byte case by a
      80-byte case that just does that single helper twice.  It avoids having
      all these different versions of inline assembly, and actually improved
      performance further in my tests.
      
      There was never anything magical about the 64-byte unrolled case, even
      though it happens to be a common size (and typically is the cacheline
      size).
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a476aae3
    • Noah Goldstein's avatar
      x86/csum: Remove unnecessary odd handling · 5d4acb62
      Noah Goldstein authored
      The special case for odd aligned buffers is unnecessary and mostly
      just adds overhead. Aligned buffers is the expectations, and even for
      unaligned buffer, the only case that was helped is if the buffer was
      1-byte from word aligned which is ~1/7 of the cases. Overall it seems
      highly unlikely to be worth to extra branch.
      
      It was left in the previous perf improvement patch because I was
      erroneously comparing the exact output of `csum_partial(...)`, but
      really we only need `csum_fold(csum_partial(...))` to match so its
      safe to remove.
      
      All csum kunit tests pass.
      Signed-off-by: default avatarNoah Goldstein <goldstein.w.n@gmail.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Reviewed-by: default avatarDavid Laight <david.laight@aculab.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5d4acb62
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.7-7' of... · 5eff55d7
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.7-7' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fix from Ilpo Järvinen:
       "Unfortunately the P2SB deadlock fix broke some older HW and we need
        some time to figure out the best way to fix the issue so reverting the
        deadlock fix for now"
      
      * tag 'platform-drivers-x86-v6.7-7' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        Revert "platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe"
      5eff55d7
    • Linus Torvalds's avatar
      Merge tag 'sound-6.7-final' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 08bd31ec
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "It became more than wished, partly because of vacations. But all
        changes are fairly device-specific and should be safe to apply:
      
         - A regression fix for Oops at ASoC HD-audio probe
      
         - A series of TAS2781 HD-audio codec fixes
      
         - A random build regression fix with SPI helpers
      
         - Minor endianness fix for USB-audio mixer code
      
         - ASoC FSL driver error handling fix
      
         - ASoC Mediatek driver register fix
      
         - A series of ASoC meson g12a driver fixes
      
         - A few usual HD-audio oneliner quirks"
      
      * tag 'sound-6.7-final' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP ProBook 440 G6
        ASoC: meson: g12a-tohdmitx: Fix event generation for S/PDIF mux
        ASoC: meson: g12a-toacodec: Fix event generation
        ASoC: meson: g12a-tohdmitx: Validate written enum values
        ASoC: meson: g12a-toacodec: Validate written enum values
        ASoC: SOF: Intel: hda-codec: Delay the codec device registration
        ALSA: hda: cs35l41: fix building without CONFIG_SPI
        ALSA: hda/realtek: fix mute/micmute LEDs for a HP ZBook
        ALSA: hda/realtek: enable SND_PCI_QUIRK for hp pavilion 14-ec1xxx series
        ASoC: mediatek: mt8186: fix AUD_PAD_TOP register and offset
        ALSA: scarlett2: Convert meter levels from little-endian
        ALSA: hda/tas2781: remove sound controls in unbind
        ALSA: hda/tas2781: move set_drv_data outside tasdevice_init
        ALSA: hda/tas2781: fix typos in comment
        ALSA: hda/tas2781: do not use regcache
        ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable
      08bd31ec
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-01-04' of git://anongit.freedesktop.org/drm/drm · 5939a693
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "These were from over the holiday period, mainly i915, a couple of
        qaic, bridge and an mgag200.
      
        qaic:
         - fix GEM import
         - add quirk for soc version
      
        bridge:
         - parade-ps8640, ti-sn65dsi86: fix aux reads bounds
      
        mgag200:
         - fix gamma LUT init
      
        i915:
         - Fix bogus DPCD rev usage for DP phy test pattern setup
         - Fix handling of MMIO triggered reports in the OA buffer"
      
      * tag 'drm-fixes-2024-01-04' of git://anongit.freedesktop.org/drm/drm:
        drm/i915/perf: Update handling of MMIO triggered reports
        drm/i915/dp: Fix passing the correct DPCD_REV for drm_dp_set_phy_test_pattern
        drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE
        drm/bridge: ps8640: Fix size mismatch warning w/ len
        drm/bridge: ti-sn65dsi86: Never store more than msg->size bytes in AUX xfer
        drm/bridge: parade-ps8640: Never store more than msg->size bytes in AUX xfer
        accel/qaic: Implement quirk for SOC_HW_VERSION
        accel/qaic: Fix GEM import path code
      5939a693
    • Dmitry Safonov's avatar
      net/tcp: Only produce AO/MD5 logs if there are any keys · 4c8530dc
      Dmitry Safonov authored
      User won't care about inproper hash options in the TCP header if they
      don't use neither TCP-AO nor TCP-MD5. Yet, those logs can add up in
      syslog, while not being a real concern to the host admin:
      > kernel: TCP: TCP segment has incorrect auth options set for XX.20.239.12.54681->XX.XX.90.103.80 [S]
      
      Keep silent and avoid logging when there aren't any keys in the system.
      
      Side-note: I also defined static_branch_tcp_*() helpers to avoid more
      ifdeffery, going to remove more ifdeffery further with their help.
      Reported-by: default avatarChristian Kujau <lists@nerdbynature.de>
      Closes: https://lore.kernel.org/all/f6b59324-1417-566f-a976-ff2402718a8d@nerdbynature.de/Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Fixes: 2717b5ad ("net/tcp: Add tcp_hash_fail() ratelimited logs")
      Link: https://lore.kernel.org/r/20240104-tcp_hash_fail-logs-v1-1-ff3e1f6f9e72@arista.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4c8530dc
    • Jakub Kicinski's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 2e957f9c
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2024-01-03 (i40e, ice, igc)
      
      This series contains updates to i40e, ice, and igc drivers.
      
      Ke Xiao fixes use after free for unicast filters on i40e.
      
      Andrii restores VF MSI-X flag after PCI reset on i40e.
      
      Paul corrects admin queue link status structure to fulfill firmware
      expectations for ice.
      
      Rodrigo Cataldo corrects value used for hicredit calculations on igc.
      
      * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        igc: Fix hicredit calculation
        ice: fix Get link status data length
        i40e: Restore VF MSI-X state during PCI reset
        i40e: fix use-after-free in i40e_aqc_add_filters()
      ====================
      
      Link: https://lore.kernel.org/r/20240103193254.822968-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2e957f9c
    • Thomas Lange's avatar
      net: Implement missing SO_TIMESTAMPING_NEW cmsg support · 382a3201
      Thomas Lange authored
      Commit 9718475e ("socket: Add SO_TIMESTAMPING_NEW") added the new
      socket option SO_TIMESTAMPING_NEW. However, it was never implemented in
      __sock_cmsg_send thus breaking SO_TIMESTAMPING cmsg for platforms using
      SO_TIMESTAMPING_NEW.
      
      Fixes: 9718475e ("socket: Add SO_TIMESTAMPING_NEW")
      Link: https://lore.kernel.org/netdev/6a7281bf-bc4a-4f75-bb88-7011908ae471@app.fastmail.com/Signed-off-by: default avatarThomas Lange <thomas@corelatus.se>
      Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
      Link: https://lore.kernel.org/r/20240104085744.49164-1-thomas@corelatus.seSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      382a3201
    • Shin'ichiro Kawasaki's avatar
      Revert "platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe" · b20712e8
      Shin'ichiro Kawasaki authored
      This reverts commit b28ff7a7.
      
      The commit introduced P2SB device scan and resource cache during the
      boot process to avoid deadlock. But it caused detection failure of
      IDE controllers on old systems [1]. The IDE controllers on old systems
      and P2SB devices on newer systems have same PCI DEVFN. It is suspected
      the confusion between those two is the failure cause. Revert the change
      at this moment until the proper solution gets ready.
      
      Link: https://lore.kernel.org/platform-driver-x86/CABq1_vjfyp_B-f4LAL6pg394bP6nDFyvg110TOLHHb0x4aCPeg@mail.gmail.com/T/#m07b30468d9676fc5e3bb2122371121e4559bb383 [1]
      Signed-off-by: default avatarShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
      Link: https://lore.kernel.org/r/20240104114050.3142690-1-shinichiro.kawasaki@wdc.comReviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
      b20712e8
    • Paolo Bonzini's avatar
      KVM: x86/pmu: fix masking logic for MSR_CORE_PERF_GLOBAL_CTRL · 97107946
      Paolo Bonzini authored
      When commit c59a1f10 ("KVM: x86/pmu: Add IA32_PEBS_ENABLE
      MSR emulation for extended PEBS") switched the initialization of
      cpuc->guest_switch_msrs to use compound literals, it screwed up
      the boolean logic:
      
      +	u64 pebs_mask = cpuc->pebs_enabled & x86_pmu.pebs_capable;
      ...
      -	arr[0].guest = intel_ctrl & ~cpuc->intel_ctrl_host_mask;
      -	arr[0].guest &= ~(cpuc->pebs_enabled & x86_pmu.pebs_capable);
      +               .guest = intel_ctrl & (~cpuc->intel_ctrl_host_mask | ~pebs_mask),
      
      Before the patch, the value of arr[0].guest would have been intel_ctrl &
      ~cpuc->intel_ctrl_host_mask & ~pebs_mask.  The intent is to always treat
      PEBS events as host-only because, while the guest runs, there is no way
      to tell the processor about the virtual address where to put PEBS records
      intended for the host.
      
      Unfortunately, the new expression can be expanded to
      
      	(intel_ctrl & ~cpuc->intel_ctrl_host_mask) | (intel_ctrl & ~pebs_mask)
      
      which makes no sense; it includes any bit that isn't *both* marked as
      exclude_guest and using PEBS.  So, reinstate the old logic.  Another
      way to write it could be "intel_ctrl & ~(cpuc->intel_ctrl_host_mask |
      pebs_mask)", presumably the intention of the author of the faulty.
      However, I personally find the repeated application of A AND NOT B to
      be a bit more readable.
      
      This shows up as guest failures when running concurrent long-running
      perf workloads on the host, and was reported to happen with rcutorture.
      All guests on a given host would die simultaneously with something like an
      instruction fault or a segmentation violation.
      Reported-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Analyzed-by: default avatarSean Christopherson <seanjc@google.com>
      Tested-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Cc: stable@vger.kernel.org
      Fixes: c59a1f10 ("KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS")
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      97107946
    • Michael Chan's avatar
      bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters() · e009b2ef
      Michael Chan authored
      The 2 lines to check for the BNXT_HWRM_PF_UNLOAD_SP_EVENT bit was
      mis-applied to bnxt_cfg_ntp_filters() and should have been applied to
      bnxt_sp_task().
      
      Fixes: 19241368 ("bnxt_en: Send PF driver unload notification to all VFs.")
      Reviewed-by: default avatarAndy Gospodarek <andrew.gospodarek@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e009b2ef
    • Claudiu Beznea's avatar
      net: ravb: Wait for operating mode to be applied · 9039cd4c
      Claudiu Beznea authored
      CSR.OPS bits specify the current operating mode and (according to
      documentation) they are updated by HW when the operating mode change
      request is processed. To comply with this check CSR.OPS before proceeding.
      
      Commit introduces ravb_set_opmode() that does all the necessities for
      setting the operating mode (set CCC.OPC (and CCC.GAC, CCC.CSEL, if any) and
      wait for CSR.OPS) and call it where needed. This should comply with all the
      HW manuals requirements as different manual variants specify that different
      modes need to be checked in CSR.OPS when setting CCC.OPC.
      
      If gPTP active in config mode is supported and it needs to be enabled, the
      CCC.GAC and CCC.CSEL needs to be configured along with CCC.OPC in the same
      write access. For this, ravb_set_opmode() allows passing GAC and CSEL as
      part of opmode and the function updates accordingly CCC register.
      
      Fixes: c156633f ("Renesas Ethernet AVB driver proper")
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
      Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9039cd4c
    • Chen Ni's avatar
      asix: Add check for usbnet_get_endpoints · eaac6a2d
      Chen Ni authored
      Add check for usbnet_get_endpoints() and return the error if it fails
      in order to transfer the error.
      
      Fixes: 16626b0c ("asix: Add a new driver for the AX88172A")
      Signed-off-by: default avatarChen Ni <nichen@iscas.ac.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eaac6a2d
    • Naveen Mamindlapalli's avatar
      octeontx2-af: Re-enable MAC TX in otx2_stop processing · 818ed893
      Naveen Mamindlapalli authored
      During QoS scheduling testing with multiple strict priority flows, the
      netdev tx watchdog timeout routine is invoked when a low priority QoS
      queue doesn't get a chance to transmit the packets because other high
      priority flows are completely subscribing the transmit link. The netdev
      tx watchdog timeout routine will stop MAC RX and TX functionality in
      otx2_stop() routine before cleanup of HW TX queues which results in SMQ
      flush errors because the packets belonging to low priority queues will
      never gets flushed since MAC TX is disabled. This patch fixes the issue
      by re-enabling MAC TX to ensure the packets in HW pipeline gets flushed
      properly.
      
      Fixes: a7faa68b ("octeontx2-af: Start/Stop traffic in CGX along with NPC")
      Signed-off-by: default avatarNaveen Mamindlapalli <naveenm@marvell.com>
      Signed-off-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      818ed893
    • Naveen Mamindlapalli's avatar
      octeontx2-af: Always configure NIX TX link credits based on max frame size · a0d9528f
      Naveen Mamindlapalli authored
      Currently the NIX TX link credits are initialized based on the max frame
      size that can be transmitted on a link but when the MTU is changed, the
      NIX TX link credits are reprogrammed by the SW based on the new MTU value.
      Since SMQ max packet length is programmed to max frame size by default,
      there is a chance that NIX TX may stall while sending a max frame sized
      packet on the link with insufficient credits to send the packet all at
      once. This patch avoids stall issue by not changing the link credits
      dynamically when the MTU is changed.
      
      Fixes: 1c74b891 ("octeontx2-af: Wait for TX link idle for credits change")
      Signed-off-by: default avatarNaveen Mamindlapalli <naveenm@marvell.com>
      Signed-off-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarNithin Kumar Dabilpuram <ndabilpuram@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0d9528f
    • Siddhesh Dharme's avatar
      ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP ProBook 440 G6 · b6ce6e6c
      Siddhesh Dharme authored
      LEDs in 'HP ProBook 440 G6' laptop are controlled by ALC236 codec.
      Enable already existing quirk 'ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF'
      to fix mute and mic-mute LEDs.
      Signed-off-by: default avatarSiddhesh Dharme <siddheshdharme18@gmail.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20240104060736.5149-1-siddheshdharme18@gmail.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b6ce6e6c
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v6.7-rc8' of... · 2cd06bc7
      Takashi Iwai authored
      Merge tag 'asoc-fix-v6.7-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v6.7
      
      I recently got a LibreTech Sapphire board for my CI and while
      integrating it found and fixed some issues, including crashes for the
      enum validation.  There's also a couple of patches adding quirks for
      another x86 laptop from Hans and an error handling fix for the Freescale
      rpmsg driver.
      2cd06bc7
    • Jinghao Jia's avatar
      x86/kprobes: fix incorrect return address calculation in kprobe_emulate_call_indirect · f5d03da4
      Jinghao Jia authored
      kprobe_emulate_call_indirect currently uses int3_emulate_call to emulate
      indirect calls. However, int3_emulate_call always assumes the size of
      the call to be 5 bytes when calculating the return address. This is
      incorrect for register-based indirect calls in x86, which can be either
      2 or 3 bytes depending on whether REX prefix is used. At kprobe runtime,
      the incorrect return address causes control flow to land onto the wrong
      place after return -- possibly not a valid instruction boundary. This
      can lead to a panic like the following:
      
      [    7.308204][    C1] BUG: unable to handle page fault for address: 000000000002b4d8
      [    7.308883][    C1] #PF: supervisor read access in kernel mode
      [    7.309168][    C1] #PF: error_code(0x0000) - not-present page
      [    7.309461][    C1] PGD 0 P4D 0
      [    7.309652][    C1] Oops: 0000 [#1] SMP
      [    7.309929][    C1] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.7.0-rc5-trace-for-next #6
      [    7.310397][    C1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-20220807_005459-localhost 04/01/2014
      [    7.311068][    C1] RIP: 0010:__common_interrupt+0x52/0xc0
      [    7.311349][    C1] Code: 01 00 4d 85 f6 74 39 49 81 fe 00 f0 ff ff 77 30 4c 89 f7 4d 8b 5e 68 41 ba 91 76 d8 42 45 03 53 fc 74 02 0f 0b cc ff d3 65 48 <8b> 05 30 c7 ff 7e 65 4c 89 3d 28 c7 ff 7e 5b 41 5c 41 5e 41 5f c3
      [    7.312512][    C1] RSP: 0018:ffffc900000e0fd0 EFLAGS: 00010046
      [    7.312899][    C1] RAX: 0000000000000001 RBX: 0000000000000023 RCX: 0000000000000001
      [    7.313334][    C1] RDX: 00000000000003cd RSI: 0000000000000001 RDI: ffff888100d302a4
      [    7.313702][    C1] RBP: 0000000000000001 R08: 0ef439818636191f R09: b1621ff338a3b482
      [    7.314146][    C1] R10: ffffffff81e5127b R11: ffffffff81059810 R12: 0000000000000023
      [    7.314509][    C1] R13: 0000000000000000 R14: ffff888100d30200 R15: 0000000000000000
      [    7.314951][    C1] FS:  0000000000000000(0000) GS:ffff88813bc80000(0000) knlGS:0000000000000000
      [    7.315396][    C1] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [    7.315691][    C1] CR2: 000000000002b4d8 CR3: 0000000003028003 CR4: 0000000000370ef0
      [    7.316153][    C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [    7.316508][    C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [    7.316948][    C1] Call Trace:
      [    7.317123][    C1]  <IRQ>
      [    7.317279][    C1]  ? __die_body+0x64/0xb0
      [    7.317482][    C1]  ? page_fault_oops+0x248/0x370
      [    7.317712][    C1]  ? __wake_up+0x96/0xb0
      [    7.317964][    C1]  ? exc_page_fault+0x62/0x130
      [    7.318211][    C1]  ? asm_exc_page_fault+0x22/0x30
      [    7.318444][    C1]  ? __cfi_native_send_call_func_single_ipi+0x10/0x10
      [    7.318860][    C1]  ? default_idle+0xb/0x10
      [    7.319063][    C1]  ? __common_interrupt+0x52/0xc0
      [    7.319330][    C1]  common_interrupt+0x78/0x90
      [    7.319546][    C1]  </IRQ>
      [    7.319679][    C1]  <TASK>
      [    7.319854][    C1]  asm_common_interrupt+0x22/0x40
      [    7.320082][    C1] RIP: 0010:default_idle+0xb/0x10
      [    7.320309][    C1] Code: 4c 01 c7 4c 29 c2 e9 72 ff ff ff cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 b8 0c 67 40 a5 66 90 0f 00 2d 09 b9 3b 00 fb f4 <fa> c3 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 b8 0c 67 40 a5 e9
      [    7.321449][    C1] RSP: 0018:ffffc9000009bee8 EFLAGS: 00000256
      [    7.321808][    C1] RAX: ffff88813bca8b68 RBX: 0000000000000001 RCX: 000000000001ef0c
      [    7.322227][    C1] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 000000000001ef0c
      [    7.322656][    C1] RBP: ffffc9000009bef8 R08: 8000000000000000 R09: 00000000000008c2
      [    7.323083][    C1] R10: 0000000000000000 R11: ffffffff81058e70 R12: 0000000000000000
      [    7.323530][    C1] R13: ffff8881002b30c0 R14: 0000000000000000 R15: 0000000000000000
      [    7.323948][    C1]  ? __cfi_lapic_next_deadline+0x10/0x10
      [    7.324239][    C1]  default_idle_call+0x31/0x50
      [    7.324464][    C1]  do_idle+0xd3/0x240
      [    7.324690][    C1]  cpu_startup_entry+0x25/0x30
      [    7.324983][    C1]  start_secondary+0xb4/0xc0
      [    7.325217][    C1]  secondary_startup_64_no_verify+0x179/0x17b
      [    7.325498][    C1]  </TASK>
      [    7.325641][    C1] Modules linked in:
      [    7.325906][    C1] CR2: 000000000002b4d8
      [    7.326104][    C1] ---[ end trace 0000000000000000 ]---
      [    7.326354][    C1] RIP: 0010:__common_interrupt+0x52/0xc0
      [    7.326614][    C1] Code: 01 00 4d 85 f6 74 39 49 81 fe 00 f0 ff ff 77 30 4c 89 f7 4d 8b 5e 68 41 ba 91 76 d8 42 45 03 53 fc 74 02 0f 0b cc ff d3 65 48 <8b> 05 30 c7 ff 7e 65 4c 89 3d 28 c7 ff 7e 5b 41 5c 41 5e 41 5f c3
      [    7.327570][    C1] RSP: 0018:ffffc900000e0fd0 EFLAGS: 00010046
      [    7.327910][    C1] RAX: 0000000000000001 RBX: 0000000000000023 RCX: 0000000000000001
      [    7.328273][    C1] RDX: 00000000000003cd RSI: 0000000000000001 RDI: ffff888100d302a4
      [    7.328632][    C1] RBP: 0000000000000001 R08: 0ef439818636191f R09: b1621ff338a3b482
      [    7.329223][    C1] R10: ffffffff81e5127b R11: ffffffff81059810 R12: 0000000000000023
      [    7.329780][    C1] R13: 0000000000000000 R14: ffff888100d30200 R15: 0000000000000000
      [    7.330193][    C1] FS:  0000000000000000(0000) GS:ffff88813bc80000(0000) knlGS:0000000000000000
      [    7.330632][    C1] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [    7.331050][    C1] CR2: 000000000002b4d8 CR3: 0000000003028003 CR4: 0000000000370ef0
      [    7.331454][    C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [    7.331854][    C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [    7.332236][    C1] Kernel panic - not syncing: Fatal exception in interrupt
      [    7.332730][    C1] Kernel Offset: disabled
      [    7.333044][    C1] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
      
      The relevant assembly code is (from objdump, faulting address
      highlighted):
      
      ffffffff8102ed9d:       41 ff d3                  call   *%r11
      ffffffff8102eda0:       65 48 <8b> 05 30 c7 ff    mov    %gs:0x7effc730(%rip),%rax
      
      The emulation incorrectly sets the return address to be ffffffff8102ed9d
      + 0x5 = ffffffff8102eda2, which is the 8b byte in the middle of the next
      mov. This in turn causes incorrect subsequent instruction decoding and
      eventually triggers the page fault above.
      
      Instead of invoking int3_emulate_call, perform push and jmp emulation
      directly in kprobe_emulate_call_indirect. At this point we can obtain
      the instruction size from p->ainsn.size so that we can calculate the
      correct return address.
      
      Link: https://lore.kernel.org/all/20240102233345.385475-1-jinghao7@illinois.edu/
      
      Fixes: 6256e668 ("x86/kprobes: Use int3 instead of debug trap for single-step")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJinghao Jia <jinghao7@illinois.edu>
      Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
      f5d03da4
    • Jakub Kicinski's avatar
      Merge tag 'nf-24-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · cbc74fc0
      Jakub Kicinski authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net:
      
      1) Fix nat packets in the related state in OVS, from Brad Cowie.
      
      2) Drop chain reference counter on error path in case chain binding
         fails.
      
      * tag 'nf-24-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nft_immediate: drop chain reference counter on error
        netfilter: nf_nat: fix action not being set for all ct states
      ====================
      
      Link: https://lore.kernel.org/r/20240103113001.137936-1-pablo@netfilter.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      cbc74fc0
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2024-01-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · faa21f4c
      Dave Airlie authored
      drm-misc-fixes for v6.7 final:
      - 2 small qaic fixes.
      - Fixes for overflow in aux xfer.
      - Fix uninitialised gamma lut in gmag200.
      - Small compiler warning fix for backports of a ps8640 fix.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/9ba866b4-3144-47a9-a2c0-7313c67249d7@linux.intel.com
      faa21f4c
    • Jakub Kicinski's avatar
      Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · b77c1e3b
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2023-12-27 (igc)
      
      This series contains updates to igc driver only.
      
      Kurt Kanzenbach resolves issues around VLAN ntuple rules; correctly
      reporting back added rules and checking for valid values.
      
      * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        igc: Check VLAN EtherType mask
        igc: Check VLAN TCI mask
        igc: Report VLAN EtherType matching back to user
      ====================
      
      Link: https://lore.kernel.org/r/20231227210041.3035055-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b77c1e3b
    • Jakub Kicinski's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 0fa4f912
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2023-12-27 (ice, i40e)
      
      This series contains updates to ice and i40e drivers.
      
      Katarzyna changes message to no longer be reported as error under
      certain conditions as it can be expected on ice.
      
      Ngai-Mint ensures VSI is always closed when stopping interface to
      prevent NULL pointer dereference for ice.
      
      Arkadiusz corrects reporting of phase offset value for ice.
      
      Sudheer corrects checking on ADQ filters to prevent invalid values on
      i40e.
      
      * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        i40e: Fix filter input checks to prevent config with invalid values
        ice: dpll: fix phase offset value
        ice: Shut down VSI with "link-down-on-close" enabled
        ice: Fix link_down_on_close message
      ====================
      
      Link: https://lore.kernel.org/r/20231227182541.3033124-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0fa4f912
    • Wen Gu's avatar
      net/smc: fix invalid link access in dumping SMC-R connections · 9dbe086c
      Wen Gu authored
      A crash was found when dumping SMC-R connections. It can be reproduced
      by following steps:
      
      - environment: two RNICs on both sides.
      - run SMC-R between two sides, now a SMC_LGR_SYMMETRIC type link group
        will be created.
      - set the first RNIC down on either side and link group will turn to
        SMC_LGR_ASYMMETRIC_LOCAL then.
      - run 'smcss -R' and the crash will be triggered.
      
       BUG: kernel NULL pointer dereference, address: 0000000000000010
       #PF: supervisor read access in kernel mode
       #PF: error_code(0x0000) - not-present page
       PGD 8000000101fdd067 P4D 8000000101fdd067 PUD 10ce46067 PMD 0
       Oops: 0000 [#1] PREEMPT SMP PTI
       CPU: 3 PID: 1810 Comm: smcss Kdump: loaded Tainted: G W   E      6.7.0-rc6+ #51
       RIP: 0010:__smc_diag_dump.constprop.0+0x36e/0x620 [smc_diag]
       Call Trace:
        <TASK>
        ? __die+0x24/0x70
        ? page_fault_oops+0x66/0x150
        ? exc_page_fault+0x69/0x140
        ? asm_exc_page_fault+0x26/0x30
        ? __smc_diag_dump.constprop.0+0x36e/0x620 [smc_diag]
        smc_diag_dump_proto+0xd0/0xf0 [smc_diag]
        smc_diag_dump+0x26/0x60 [smc_diag]
        netlink_dump+0x19f/0x320
        __netlink_dump_start+0x1dc/0x300
        smc_diag_handler_dump+0x6a/0x80 [smc_diag]
        ? __pfx_smc_diag_dump+0x10/0x10 [smc_diag]
        sock_diag_rcv_msg+0x121/0x140
        ? __pfx_sock_diag_rcv_msg+0x10/0x10
        netlink_rcv_skb+0x5a/0x110
        sock_diag_rcv+0x28/0x40
        netlink_unicast+0x22a/0x330
        netlink_sendmsg+0x240/0x4a0
        __sock_sendmsg+0xb0/0xc0
        ____sys_sendmsg+0x24e/0x300
        ? copy_msghdr_from_user+0x62/0x80
        ___sys_sendmsg+0x7c/0xd0
        ? __do_fault+0x34/0x1a0
        ? do_read_fault+0x5f/0x100
        ? do_fault+0xb0/0x110
        __sys_sendmsg+0x4d/0x80
        do_syscall_64+0x45/0xf0
        entry_SYSCALL_64_after_hwframe+0x6e/0x76
      
      When the first RNIC is set down, the lgr->lnk[0] will be cleared and an
      asymmetric link will be allocated in lgr->link[SMC_LINKS_PER_LGR_MAX - 1]
      by smc_llc_alloc_alt_link(). Then when we try to dump SMC-R connections
      in __smc_diag_dump(), the invalid lgr->lnk[0] will be accessed, resulting
      in this issue. So fix it by accessing the right link.
      
      Fixes: f16a7dd5 ("smc: netlink interface for SMC sockets")
      Reported-by: default avatarhenaumars <henaumars@sina.com>
      Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7616Signed-off-by: default avatarWen Gu <guwen@linux.alibaba.com>
      Reviewed-by: default avatarTony Lu <tonylu@linux.alibaba.com>
      Link: https://lore.kernel.org/r/1703662835-53416-1-git-send-email-guwen@linux.alibaba.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9dbe086c
    • Dinghao Liu's avatar
      net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues · 89f45c30
      Dinghao Liu authored
      When dma_alloc_coherent() fails, we should free qdev->lrg_buf
      to prevent potential memleak.
      
      Fixes: 1357bfcf ("qla3xxx: Dynamically size the rx buffer queue based on the MTU.")
      Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
      Link: https://lore.kernel.org/r/20231227070227.10527-1-dinghao.liu@zju.edu.cnSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      89f45c30
    • Jakub Kicinski's avatar
      Merge branch '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · 320fae9e
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2023-12-26 (idpf)
      
      This series contains updates to idpf driver only.
      
      Alexander resolves issues in singleq mode to prevent corrupted frames
      and leaking skbs.
      
      Pavan prevents extra padding on RSS struct causing load failure due to
      unexpected size.
      
      * '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        idpf: avoid compiler introduced padding in virtchnl2_rss_key struct
        idpf: fix corrupted frames and skb leaks in singleq mode
      ====================
      
      Link: https://lore.kernel.org/r/20231226174125.2632875-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      320fae9e
    • Xuan Zhuo's avatar
      virtio_net: fix missing dma unmap for resize · 2311e06b
      Xuan Zhuo authored
      For rq, we have three cases getting buffers from virtio core:
      
      1. virtqueue_get_buf{,_ctx}
      2. virtqueue_detach_unused_buf
      3. callback for virtqueue_resize
      
      But in commit 295525e2("virtio_net: merge dma operations when
      filling mergeable buffers"), I missed the dma unmap for the #3 case.
      
      That will leak some memory, because I did not release the pages referred
      by the unused buffers.
      
      If we do such script, we will make the system OOM.
      
          while true
          do
                  ethtool -G ens4 rx 128
                  ethtool -G ens4 rx 256
                  free -m
          done
      
      Fixes: 295525e2 ("virtio_net: merge dma operations when filling mergeable buffers")
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Link: https://lore.kernel.org/r/20231226094333.47740-1-xuanzhuo@linux.alibaba.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2311e06b
  3. 03 Jan, 2024 9 commits