Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Linux for focal to latest 6.1 LTS #312

Open
wants to merge 10,000 commits into
base: master_focal
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Apr 3, 2024

  1. scsi: lpfc: Correct size for wqe for memset()

    commit 28d4199 upstream.
    
    The wqe is of type lpfc_wqe128. It should be memset with the same type.
    
    Fixes: 6c621a2 ("scsi: lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context")
    Signed-off-by: Muhammad Usama Anjum <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
    Reviewed-by: Justin Tee <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    musamaanjum authored and gregkh committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    8dbc176 View commit details
    Browse the repository at this point in the history
  2. scsi: libsas: Add a helper sas_get_sas_addr_and_dev_type()

    commit a573452 upstream.
    
    Add a helper to get attached_sas_addr and device type from disc_resp.
    
    Suggested-by: John Garry <[email protected]>
    Signed-off-by: Xingui Yang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: John Garry <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Xingui Yang authored and gregkh committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    d511040 View commit details
    Browse the repository at this point in the history
  3. scsi: libsas: Fix disk not being scanned in after being removed

    commit 8e68a45 upstream.
    
    As of commit d8649fc ("scsi: libsas: Do discovery on empty PHY to
    update PHY info"), do discovery will send a new SMP_DISCOVER and update
    phy->phy_change_count. We found that if the disk is reconnected and phy
    change_count changes at this time, the disk scanning process will not be
    triggered.
    
    Therefore, call sas_set_ex_phy() to update the PHY info with the results of
    the last query. And because the previous phy info will be used when calling
    sas_unregister_devs_sas_addr(), sas_unregister_devs_sas_addr() should be
    called before sas_set_ex_phy().
    
    Fixes: d8649fc ("scsi: libsas: Do discovery on empty PHY to update PHY info")
    Signed-off-by: Xingui Yang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: John Garry <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Xingui Yang authored and gregkh committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    98cfafa View commit details
    Browse the repository at this point in the history
  4. x86/sev: Skip ROM range scans and validation for SEV-SNP guests

    commit 0f4a1e8 upstream.
    
    SEV-SNP requires encrypted memory to be validated before access.
    Because the ROM memory range is not part of the e820 table, it is not
    pre-validated by the BIOS. Therefore, if a SEV-SNP guest kernel wishes
    to access this range, the guest must first validate the range.
    
    The current SEV-SNP code does indeed scan the ROM range during early
    boot and thus attempts to validate the ROM range in probe_roms().
    However, this behavior is neither sufficient nor necessary for the
    following reasons:
    
    * With regards to sufficiency, if EFI_CONFIG_TABLES are not enabled and
      CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK is set, the kernel will
      attempt to access the memory at SMBIOS_ENTRY_POINT_SCAN_START (which
      falls in the ROM range) prior to validation.
    
      For example, Project Oak Stage 0 provides a minimal guest firmware
      that currently meets these configuration conditions, meaning guests
      booting atop Oak Stage 0 firmware encounter a problematic call chain
      during dmi_setup() -> dmi_scan_machine() that results in a crash
      during boot if SEV-SNP is enabled.
    
    * With regards to necessity, SEV-SNP guests generally read garbage
      (which changes across boots) from the ROM range, meaning these scans
      are unnecessary. The guest reads garbage because the legacy ROM range
      is unencrypted data but is accessed via an encrypted PMD during early
      boot (where the PMD is marked as encrypted due to potentially mapping
      actually-encrypted data in other PMD-contained ranges).
    
    In one exceptional case, EISA probing treats the ROM range as
    unencrypted data, which is inconsistent with other probing.
    
    Continuing to allow SEV-SNP guests to use garbage and to inconsistently
    classify ROM range encryption status can trigger undesirable behavior.
    For instance, if garbage bytes appear to be a valid signature, memory
    may be unnecessarily reserved for the ROM range. Future code or other
    use cases may result in more problematic (arbitrary) behavior that
    should be avoided.
    
    While one solution would be to overhaul the early PMD mapping to always
    treat the ROM region of the PMD as unencrypted, SEV-SNP guests do not
    currently rely on data from the ROM region during early boot (and even
    if they did, they would be mostly relying on garbage data anyways).
    
    As a simpler solution, skip the ROM range scans (and the otherwise-
    necessary range validation) during SEV-SNP guest early boot. The
    potential SEV-SNP guest crash due to lack of ROM range validation is
    thus avoided by simply not accessing the ROM range.
    
    In most cases, skip the scans by overriding problematic x86_init
    functions during sme_early_init() to SNP-safe variants, which can be
    likened to x86_init overrides done for other platforms (ex: Xen); such
    overrides also avoid the spread of cc_platform_has() checks throughout
    the tree.
    
    In the exceptional EISA case, still use cc_platform_has() for the
    simplest change, given (1) checks for guest type (ex: Xen domain status)
    are already performed here, and (2) these checks occur in a subsys
    initcall instead of an x86_init function.
    
      [ bp: Massage commit message, remove "we"s. ]
    
    Fixes: 9704c07 ("x86/kernel: Validate ROM memory before accessing when SEV-SNP is active")
    Signed-off-by: Kevin Loughlin <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Kevin Loughlin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kevinloughlin authored and gregkh committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    df84d9f View commit details
    Browse the repository at this point in the history
  5. USB: core: Fix deadlock in usb_deauthorize_interface()

    commit 80ba43e upstream.
    
    Among the attribute file callback routines in
    drivers/usb/core/sysfs.c, the interface_authorized_store() function is
    the only one which acquires a device lock on an ancestor device: It
    calls usb_deauthorize_interface(), which locks the interface's parent
    USB device.
    
    The will lead to deadlock if another process already owns that lock
    and tries to remove the interface, whether through a configuration
    change or because the device has been disconnected.  As part of the
    removal procedure, device_del() waits for all ongoing sysfs attribute
    callbacks to complete.  But usb_deauthorize_interface() can't complete
    until the device lock has been released, and the lock won't be
    released until the removal has finished.
    
    The mechanism provided by sysfs to prevent this kind of deadlock is
    to use the sysfs_break_active_protection() function, which tells sysfs
    not to wait for the attribute callback.
    
    Reported-and-tested by: Yue Sun <[email protected]>
    Reported by: xingwei lee <[email protected]>
    
    Signed-off-by: Alan Stern <[email protected]>
    Link: https://lore.kernel.org/linux-usb/CAEkJfYO6jRVC8Tfrd_R=cjO0hguhrV31fDPrLrNOOHocDkPoAA@mail.gmail.com/#r
    Fixes: 310d2b4 ("usb: interface authorization: SysFS part of USB interface authorization")
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    AlanStern authored and gregkh committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    ab062fa View commit details
    Browse the repository at this point in the history
  6. tools/resolve_btfids: fix build with musl libc

    commit 62248b2 upstream.
    
    Include the header that defines u32.
    This fixes build of 6.6.23 and 6.1.83 kernels for Alpine Linux, which
    uses musl libc. I assume that GNU libc indirecly pulls in linux/types.h.
    
    Fixes: 9707ac4 ("tools/resolve_btfids: Refactor set sorting with types from btf_ids.h")
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218647
    Cc: [email protected]
    Signed-off-by: Natanael Copa <[email protected]>
    Tested-by: Greg Thelen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ncopa authored and gregkh committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    7b970a1 View commit details
    Browse the repository at this point in the history
  7. Linux 6.1.84

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: SeongJae Park <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Pavel Machek (CIP) <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Kelsey Steele <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Tested-by: Mark Brown <[email protected]>
    Tested-by: Mateusz Jończyk <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Salvatore Bonaccorso <[email protected]>
    Tested-by: Yann Sionneau <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    3473858 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. scripts/bpf_doc: Use silent mode when exec make cmd

    [ Upstream commit 5384cc0 ]
    
    When getting kernel version via make, the result may be polluted by other
    output, like directory change info. e.g.
    
      $ export MAKEFLAGS="-w"
      $ make kernelversion
      make: Entering directory '/home/net'
      6.8.0
      make: Leaving directory '/home/net'
    
    This will distort the reStructuredText output and make latter rst2man
    failed like:
    
      [...]
      bpf-helpers.rst:20: (WARNING/2) Field list ends without a blank line; unexpected unindent.
      [...]
    
    Using silent mode would help. e.g.
    
      $ make -s --no-print-directory kernelversion
      6.8.0
    
    Fixes: fd0a38f ("scripts/bpf: Set version attribute for bpf-helpers(7) man page")
    Signed-off-by: Michael Hofmann <[email protected]>
    Signed-off-by: Hangbin Liu <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Reviewed-by: Quentin Monnet <[email protected]>
    Acked-by: Alejandro Colomar <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    liuhangbin authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8333aae View commit details
    Browse the repository at this point in the history
  2. dma-buf: Fix NULL pointer dereference in sanitycheck()

    [ Upstream commit 2295bd8 ]
    
    If due to a memory allocation failure mock_chain() returns NULL, it is
    passed to dma_fence_enable_sw_signaling() resulting in NULL pointer
    dereference there.
    
    Call dma_fence_enable_sw_signaling() only if mock_chain() succeeds.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: d62c43a ("dma-buf: Enable signaling on fence for selftests")
    Signed-off-by: Pavel Sakharov <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Christian König <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Pave154 authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    0336995 View commit details
    Browse the repository at this point in the history
  3. nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet

    [ Upstream commit d24b035 ]
    
    syzbot reported the following uninit-value access issue [1][2]:
    
    nci_rx_work() parses and processes received packet. When the payload
    length is zero, each message type handler reads uninitialized payload
    and KMSAN detects this issue. The receipt of a packet with a zero-size
    payload is considered unexpected, and therefore, such packets should be
    silently discarded.
    
    This patch resolved this issue by checking payload size before calling
    each message type handler codes.
    
    Fixes: 6a2968a ("NFC: basic NCI protocol implementation")
    Reported-and-tested-by: [email protected]
    Reported-and-tested-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=7ea9413ea6749baf5574 [1]
    Closes: https://syzkaller.appspot.com/bug?extid=29b5ca705d2e0f4a44d2 [2]
    Signed-off-by: Ryosuke Yasuoka <[email protected]>
    Reviewed-by: Jeremy Cline <[email protected]>
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    YsuOS authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    b51ec7f View commit details
    Browse the repository at this point in the history
  4. mlxbf_gige: stop PHY during open() error paths

    [ Upstream commit d6c30c5 ]
    
    The mlxbf_gige_open() routine starts the PHY as part of normal
    initialization.  The mlxbf_gige_open() routine must stop the
    PHY during its error paths.
    
    Fixes: f92e186 ("Add Mellanox BlueField Gigabit Ethernet driver")
    Signed-off-by: David Thompson <[email protected]>
    Reviewed-by: Asmaa Mnebhi <[email protected]>
    Reviewed-by: Andrew Lunn <[email protected]>
    Reviewed-by: Jiri Pirko <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dthompso authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    57beec6 View commit details
    Browse the repository at this point in the history
  5. wifi: iwlwifi: mvm: rfi: fix potential response leaks

    [ Upstream commit 06a0938 ]
    
    If the rx payload length check fails, or if kmemdup() fails,
    we still need to free the command response. Fix that.
    
    Fixes: 2125490 ("iwlwifi: mvm: add RFI-M support")
    Co-authored-by: Anjaneyulu <[email protected]>
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Miri Korenblit <[email protected]>
    Link: https://msgid.link/20240319100755.db2fa0196aa7.I116293b132502ac68a65527330fa37799694b79c@changeid
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    2 people authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    99a75d7 View commit details
    Browse the repository at this point in the history
  6. ixgbe: avoid sleeping allocation in ixgbe_ipsec_vf_add_sa()

    [ Upstream commit aec806f ]
    
    Change kzalloc() flags used in ixgbe_ipsec_vf_add_sa() to GFP_ATOMIC, to
    avoid sleeping in IRQ context.
    
    Dan Carpenter, with the help of Smatch, has found following issue:
    The patch eda0333: "ixgbe: add VF IPsec management" from Aug 13,
    2018 (linux-next), leads to the following Smatch static checker
    warning: drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c:917 ixgbe_ipsec_vf_add_sa()
    	warn: sleeping in IRQ context
    
    The call tree that Smatch is worried about is:
    ixgbe_msix_other() <- IRQ handler
    -> ixgbe_msg_task()
       -> ixgbe_rcv_msg_from_vf()
          -> ixgbe_ipsec_vf_add_sa()
    
    Fixes: eda0333 ("ixgbe: add VF IPsec management")
    Reported-by: Dan Carpenter <[email protected]>
    Link: https://lore.kernel.org/intel-wired-lan/[email protected]
    Reviewed-by: Michal Kubiak <[email protected]>
    Signed-off-by: Przemek Kitszel <[email protected]>
    Reviewed-by: Shannon Nelson <[email protected]>
    Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pkitszel authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    231b189 View commit details
    Browse the repository at this point in the history
  7. s390/qeth: handle deferred cc1

    [ Upstream commit afb373f ]
    
    The IO subsystem expects a driver to retry a ccw_device_start, when the
    subsequent interrupt response block (irb) contains a deferred
    condition code 1.
    
    Symptoms before this commit:
    On the read channel we always trigger the next read anyhow, so no
    different behaviour here.
    On the write channel we may experience timeout errors, because the
    expected reply will never be received without the retry.
    Other callers of qeth_send_control_data() may wrongly assume that the ccw
    was successful, which may cause problems later.
    
    Note that since
    commit 2297791 ("s390/cio: dont unregister subchannel from child-drivers")
    and
    commit 5ef1dc4 ("s390/cio: fix invalid -EBUSY on ccw_device_start")
    deferred CC1s are much more likely to occur. See the commit message of the
    latter for more background information.
    
    Fixes: 2297791 ("s390/cio: dont unregister subchannel from child-drivers")
    Signed-off-by: Alexandra Winter <[email protected]>
    Co-developed-by: Thorsten Winkler <[email protected]>
    Signed-off-by: Thorsten Winkler <[email protected]>
    Reviewed-by: Peter Oberparleiter <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    SandyWinter authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    16307e7 View commit details
    Browse the repository at this point in the history
  8. tcp: properly terminate timers for kernel sockets

    [ Upstream commit 151c9c7 ]
    
    We had various syzbot reports about tcp timers firing after
    the corresponding netns has been dismantled.
    
    Fortunately Josef Bacik could trigger the issue more often,
    and could test a patch I wrote two years ago.
    
    When TCP sockets are closed, we call inet_csk_clear_xmit_timers()
    to 'stop' the timers.
    
    inet_csk_clear_xmit_timers() can be called from any context,
    including when socket lock is held.
    This is the reason it uses sk_stop_timer(), aka del_timer().
    This means that ongoing timers might finish much later.
    
    For user sockets, this is fine because each running timer
    holds a reference on the socket, and the user socket holds
    a reference on the netns.
    
    For kernel sockets, we risk that the netns is freed before
    timer can complete, because kernel sockets do not hold
    reference on the netns.
    
    This patch adds inet_csk_clear_xmit_timers_sync() function
    that using sk_stop_timer_sync() to make sure all timers
    are terminated before the kernel socket is released.
    Modules using kernel sockets close them in their netns exit()
    handler.
    
    Also add sock_not_owned_by_me() helper to get LOCKDEP
    support : inet_csk_clear_xmit_timers_sync() must not be called
    while socket lock is held.
    
    It is very possible we can revert in the future commit
    3a58f13 ("net: rds: acquire refcount on TCP sockets")
    which attempted to solve the issue in rds only.
    (net/smc/af_smc.c and net/mptcp/subflow.c have similar code)
    
    We probably can remove the check_net() tests from
    tcp_out_of_resources() and __tcp_close() in the future.
    
    Reported-by: Josef Bacik <[email protected]>
    Closes: https://lore.kernel.org/netdev/20240314210740.GA2823176@perftesting/
    Fixes: 26abe14 ("net: Modify sk_alloc to not reference count the netns of kernel sockets.")
    Fixes: 8a68173 ("net: sk_clone_lock() should only do get_net() if the parent is not a kernel socket")
    Link: https://lore.kernel.org/bpf/CANn89i+484ffqb93aQm1N-tjxxvb3WDKX0EbD7318RwRgsatjw@mail.gmail.com/
    Signed-off-by: Eric Dumazet <[email protected]>
    Tested-by: Josef Bacik <[email protected]>
    Cc: Tetsuo Handa <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Eric Dumazet authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    91b243d View commit details
    Browse the repository at this point in the history
  9. net: wwan: t7xx: Split 64bit accesses to fix alignment issues

    [ Upstream commit 7d5a7dd ]
    
    Some of the registers are aligned on a 32bit boundary, causing
    alignment faults on 64bit platforms.
    
     Unable to handle kernel paging request at virtual address ffffffc084a1d004
     Mem abort info:
     ESR = 0x0000000096000061
     EC = 0x25: DABT (current EL), IL = 32 bits
     SET = 0, FnV = 0
     EA = 0, S1PTW = 0
     FSC = 0x21: alignment fault
     Data abort info:
     ISV = 0, ISS = 0x00000061, ISS2 = 0x00000000
     CM = 0, WnR = 1, TnD = 0, TagAccess = 0
     GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
     swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000046ad6000
     [ffffffc084a1d004] pgd=100000013ffff003, p4d=100000013ffff003, pud=100000013ffff003, pmd=0068000020a00711
     Internal error: Oops: 0000000096000061 [#1] SMP
     Modules linked in: mtk_t7xx(+) qcserial pppoe ppp_async option nft_fib_inet nf_flow_table_inet mt7921u(O) mt7921s(O) mt7921e(O) mt7921_common(O) iwlmvm(O) iwldvm(O) usb_wwan rndis_host qmi_wwan pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mt7996e(O) mt792x_usb(O) mt792x_lib(O) mt7915e(O) mt76_usb(O) mt76_sdio(O) mt76_connac_lib(O) mt76(O) mac80211(O) iwlwifi(O) huawei_cdc_ncm cfg80211(O) cdc_ncm cdc_ether wwan usbserial usbnet slhc sfp rtc_pcf8563 nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mt6577_auxadc mdio_i2c libcrc32c compat(O) cdc_wdm cdc_acm at24 crypto_safexcel pwm_fan i2c_gpio i2c_smbus industrialio i2c_algo_bit i2c_mux_reg i2c_mux_pca954x i2c_mux_pca9541 i2c_mux_gpio i2c_mux dummy oid_registry tun sha512_arm64 sha1_ce sha1_generic seqiv
     md5 geniv des_generic libdes cbc authencesn authenc leds_gpio xhci_plat_hcd xhci_pci xhci_mtk_hcd xhci_hcd nvme nvme_core gpio_button_hotplug(O) dm_mirror dm_region_hash dm_log dm_crypt dm_mod dax usbcore usb_common ptp aquantia pps_core mii tpm encrypted_keys trusted
     CPU: 3 PID: 5266 Comm: kworker/u9:1 Tainted: G O 6.6.22 #0
     Hardware name: Bananapi BPI-R4 (DT)
     Workqueue: md_hk_wq t7xx_fsm_uninit [mtk_t7xx]
     pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
     pc : t7xx_cldma_hw_set_start_addr+0x1c/0x3c [mtk_t7xx]
     lr : t7xx_cldma_start+0xac/0x13c [mtk_t7xx]
     sp : ffffffc085d63d30
     x29: ffffffc085d63d30 x28: 0000000000000000 x27: 0000000000000000
     x26: 0000000000000000 x25: ffffff80c804f2c0 x24: ffffff80ca196c05
     x23: 0000000000000000 x22: ffffff80c814b9b8 x21: ffffff80c814b128
     x20: 0000000000000001 x19: ffffff80c814b080 x18: 0000000000000014
     x17: 0000000055c9806b x16: 000000007c5296d0 x15: 000000000f6bca68
     x14: 00000000dbdbdce4 x13: 000000001aeaf72a x12: 0000000000000001
     x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
     x8 : ffffff80ca1ef6b4 x7 : ffffff80c814b818 x6 : 0000000000000018
     x5 : 0000000000000870 x4 : 0000000000000000 x3 : 0000000000000000
     x2 : 000000010a947000 x1 : ffffffc084a1d004 x0 : ffffffc084a1d004
     Call trace:
     t7xx_cldma_hw_set_start_addr+0x1c/0x3c [mtk_t7xx]
     t7xx_fsm_uninit+0x578/0x5ec [mtk_t7xx]
     process_one_work+0x154/0x2a0
     worker_thread+0x2ac/0x488
     kthread+0xe0/0xec
     ret_from_fork+0x10/0x20
     Code: f9400800 91001000 8b214001 d50332bf (f9000022)
     ---[ end trace 0000000000000000 ]---
    
    The inclusion of io-64-nonatomic-lo-hi.h indicates that all 64bit
    accesses can be replaced by pairs of nonatomic 32bit access.  Fix
    alignment by forcing all accesses to be 32bit on 64bit platforms.
    
    Link: https://forum.openwrt.org/t/fibocom-fm350-gl-support/142682/72
    Fixes: 39d4390 ("net: wwan: t7xx: Add control DMA interface")
    Signed-off-by: Bjørn Mork <[email protected]>
    Reviewed-by: Sergey Ryazanov <[email protected]>
    Tested-by: Liviu Dudau <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    bmork authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    beaf0e7 View commit details
    Browse the repository at this point in the history
  10. ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_w…

    …alk_for_fields()
    
    [ Upstream commit 40e2710 ]
    
    ACPICA commit 9061cd9aa131205657c811a52a9f8325a040c6c9
    
    Errors in acpi_evaluate_object() can lead to incorrect state of buffer.
    
    This can lead to access to data in previously ACPI_FREEd buffer and
    secondary ACPI_FREE to the same buffer later.
    
    Handle errors in acpi_evaluate_object the same way it is done earlier
    with acpi_ns_handle_to_pathname.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Link: acpica/acpica@9061cd9a
    Fixes: 5fd0332 ("ACPICA: debugger: add command to dump all fields of particular subtype")
    Signed-off-by: Nikita Kiryushin <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    nkiryushin authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    ebabdae View commit details
    Browse the repository at this point in the history
  11. net: hns3: fix index limit to support all queue stats

    [ Upstream commit 47e39d2 ]
    
    Currently, hns hardware supports more than 512 queues and the index limit
    in hclge_comm_tqps_update_stats is wrong. So this patch removes it.
    
    Fixes: 287db5c ("net: hns3: create new set of common tqp stats APIs for PF and VF reuse")
    Signed-off-by: Jie Wang <[email protected]>
    Signed-off-by: Jijie Shao <[email protected]>
    Reviewed-by: Michal Kubiak <[email protected]>
    Reviewed-by: Kalesh AP <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jie Wang authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    b8b533e View commit details
    Browse the repository at this point in the history
  12. net: hns3: fix kernel crash when devlink reload during pf initialization

    [ Upstream commit 93305b7 ]
    
    The devlink reload process will access the hardware resources,
    but the register operation is done before the hardware is initialized.
    So, processing the devlink reload during initialization may lead to kernel
    crash. This patch fixes this by taking devl_lock during initialization.
    
    Fixes: b741269 ("net: hns3: add support for registering devlink for PF")
    Signed-off-by: Yonglong Liu <[email protected]>
    Signed-off-by: Jijie Shao <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    liuyonglong86 authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    50b6905 View commit details
    Browse the repository at this point in the history
  13. net: hns3: mark unexcuted loopback test result as UNEXECUTED

    [ Upstream commit 5bd088d ]
    
    Currently, loopback test may be skipped when resetting, but the test
    result will still show as 'PASS', because the driver doesn't set
    ETH_TEST_FL_FAILED flag. Fix it by setting the flag and
    initializating the value to UNEXECUTED.
    
    Fixes: 4c8dab1 ("net: hns3: reconstruct function hns3_self_test")
    Signed-off-by: Jian Shen <[email protected]>
    Signed-off-by: Jijie Shao <[email protected]>
    Reviewed-by: Michal Kubiak <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    IronShen authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    0e111ce View commit details
    Browse the repository at this point in the history
  14. tls: recv: process_rx_list shouldn't use an offset with kvec

    [ Upstream commit 7608a97 ]
    
    Only MSG_PEEK needs to copy from an offset during the final
    process_rx_list call, because the bytes we copied at the beginning of
    tls_sw_recvmsg were left on the rx_list. In the KVEC case, we removed
    data from the rx_list as we were copying it, so there's no need to use
    an offset, just like in the normal case.
    
    Fixes: 692d7b5 ("tls: Fix recvmsg() to be able to peek across multiple records")
    Signed-off-by: Sabrina Dubroca <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/e5487514f828e0347d2b92ca40002c62b58af73d.1711120964.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    qsn authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    efb4573 View commit details
    Browse the repository at this point in the history
  15. tls: adjust recv return with async crypto and failed copy to userspace

    [ Upstream commit 85eef9a ]
    
    process_rx_list may not copy as many bytes as we want to the userspace
    buffer, for example in case we hit an EFAULT during the copy. If this
    happens, we should only count the bytes that were actually copied,
    which may be 0.
    
    Subtracting async_copy_bytes is correct in both peek and !peek cases,
    because decrypted == async_copy_bytes + peeked for the peek case: peek
    is always !ZC, and we can go through either the sync or async path. In
    the async case, we add chunk to both decrypted and
    async_copy_bytes. In the sync case, we add chunk to both decrypted and
    peeked. I missed that in commit 6caaf10 ("tls: fix peeking with
    sync+async decryption").
    
    Fixes: 4d42cd6 ("tls: rx: fix return value for async crypto")
    Signed-off-by: Sabrina Dubroca <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/1b5a1eaab3c088a9dd5d9f1059ceecd7afe888d1.1711120964.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    qsn authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f52c8f1 View commit details
    Browse the repository at this point in the history
  16. tls: get psock ref after taking rxlock to avoid leak

    [ Upstream commit 417e91e ]
    
    At the start of tls_sw_recvmsg, we take a reference on the psock, and
    then call tls_rx_reader_lock. If that fails, we return directly
    without releasing the reference.
    
    Instead of adding a new label, just take the reference after locking
    has succeeded, since we don't need it before.
    
    Fixes: 4cbc325 ("tls: rx: allow only one reader at a time")
    Signed-off-by: Sabrina Dubroca <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/fe2ade22d030051ce4c3638704ed58b67d0df643.1711120964.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    qsn authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    30fabe5 View commit details
    Browse the repository at this point in the history
  17. mlxbf_gige: call request_irq() after NAPI initialized

    [ Upstream commit f7442a6 ]
    
    The mlxbf_gige driver encounters a NULL pointer exception in
    mlxbf_gige_open() when kdump is enabled.  The sequence to reproduce
    the exception is as follows:
    a) enable kdump
    b) trigger kdump via "echo c > /proc/sysrq-trigger"
    c) kdump kernel executes
    d) kdump kernel loads mlxbf_gige module
    e) the mlxbf_gige module runs its open() as the
       the "oob_net0" interface is brought up
    f) mlxbf_gige module will experience an exception
       during its open(), something like:
    
         Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
         Mem abort info:
           ESR = 0x0000000086000004
           EC = 0x21: IABT (current EL), IL = 32 bits
           SET = 0, FnV = 0
           EA = 0, S1PTW = 0
           FSC = 0x04: level 0 translation fault
         user pgtable: 4k pages, 48-bit VAs, pgdp=00000000e29a4000
         [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
         Internal error: Oops: 0000000086000004 [#1] SMP
         CPU: 0 PID: 812 Comm: NetworkManager Tainted: G           OE     5.15.0-1035-bluefield #37-Ubuntu
         Hardware name: https://www.mellanox.com BlueField-3 SmartNIC Main Card/BlueField-3 SmartNIC Main Card, BIOS 4.6.0.13024 Jan 19 2024
         pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
         pc : 0x0
         lr : __napi_poll+0x40/0x230
         sp : ffff800008003e00
         x29: ffff800008003e00 x28: 0000000000000000 x27: 00000000ffffffff
         x26: ffff000066027238 x25: ffff00007cedec00 x24: ffff800008003ec8
         x23: 000000000000012c x22: ffff800008003eb7 x21: 0000000000000000
         x20: 0000000000000001 x19: ffff000066027238 x18: 0000000000000000
         x17: ffff578fcb450000 x16: ffffa870b083c7c0 x15: 0000aaab010441d0
         x14: 0000000000000001 x13: 00726f7272655f65 x12: 6769675f6662786c
         x11: 0000000000000000 x10: 0000000000000000 x9 : ffffa870b0842398
         x8 : 0000000000000004 x7 : fe5a48b9069706ea x6 : 17fdb11fc84ae0d2
         x5 : d94a82549d594f35 x4 : 0000000000000000 x3 : 0000000000400100
         x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000066027238
         Call trace:
          0x0
          net_rx_action+0x178/0x360
          __do_softirq+0x15c/0x428
          __irq_exit_rcu+0xac/0xec
          irq_exit+0x18/0x2c
          handle_domain_irq+0x6c/0xa0
          gic_handle_irq+0xec/0x1b0
          call_on_irq_stack+0x20/0x2c
          do_interrupt_handler+0x5c/0x70
          el1_interrupt+0x30/0x50
          el1h_64_irq_handler+0x18/0x2c
          el1h_64_irq+0x7c/0x80
          __setup_irq+0x4c0/0x950
          request_threaded_irq+0xf4/0x1bc
          mlxbf_gige_request_irqs+0x68/0x110 [mlxbf_gige]
          mlxbf_gige_open+0x5c/0x170 [mlxbf_gige]
          __dev_open+0x100/0x220
          __dev_change_flags+0x16c/0x1f0
          dev_change_flags+0x2c/0x70
          do_setlink+0x220/0xa40
          __rtnl_newlink+0x56c/0x8a0
          rtnl_newlink+0x58/0x84
          rtnetlink_rcv_msg+0x138/0x3c4
          netlink_rcv_skb+0x64/0x130
          rtnetlink_rcv+0x20/0x30
          netlink_unicast+0x2ec/0x360
          netlink_sendmsg+0x278/0x490
          __sock_sendmsg+0x5c/0x6c
          ____sys_sendmsg+0x290/0x2d4
          ___sys_sendmsg+0x84/0xd0
          __sys_sendmsg+0x70/0xd0
          __arm64_sys_sendmsg+0x2c/0x40
          invoke_syscall+0x78/0x100
          el0_svc_common.constprop.0+0x54/0x184
          do_el0_svc+0x30/0xac
          el0_svc+0x48/0x160
          el0t_64_sync_handler+0xa4/0x12c
          el0t_64_sync+0x1a4/0x1a8
         Code: bad PC value
         ---[ end trace 7d1c3f3bf9d81885 ]---
         Kernel panic - not syncing: Oops: Fatal exception in interrupt
         Kernel Offset: 0x2870a7a00000 from 0xffff800008000000
         PHYS_OFFSET: 0x80000000
         CPU features: 0x0,000005c1,a3332a5a
         Memory Limit: none
         ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]---
    
    The exception happens because there is a pending RX interrupt before the
    call to request_irq(RX IRQ) executes.  Then, the RX IRQ handler fires
    immediately after this request_irq() completes. The RX IRQ handler runs
    "napi_schedule()" before NAPI is fully initialized via "netif_napi_add()"
    and "napi_enable()", both which happen later in the open() logic.
    
    The logic in mlxbf_gige_open() must fully initialize NAPI before any calls
    to request_irq() execute.
    
    Fixes: f92e186 ("Add Mellanox BlueField Gigabit Ethernet driver")
    Signed-off-by: David Thompson <[email protected]>
    Reviewed-by: Asmaa Mnebhi <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dthompso authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    24444af View commit details
    Browse the repository at this point in the history
  18. bpf: Protect against int overflow for stack access size

    [ Upstream commit ecc6a21 ]
    
    This patch re-introduces protection against the size of access to stack
    memory being negative; the access size can appear negative as a result
    of overflowing its signed int representation. This should not actually
    happen, as there are other protections along the way, but we should
    protect against it anyway. One code path was missing such protections
    (fixed in the previous patch in the series), causing out-of-bounds array
    accesses in check_stack_range_initialized(). This patch causes the
    verification of a program with such a non-sensical access size to fail.
    
    This check used to exist in a more indirect way, but was inadvertendly
    removed in a833a17.
    
    Fixes: a833a17 ("bpf: Fix verification of indirect var-off stack access")
    Reported-by: [email protected]
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/bpf/CAADnVQLORV5PT0iTAhRER+iLBTkByCYNBYyvBSgjN1T31K+gOw@mail.gmail.com/
    Acked-by: Andrii Nakryiko <[email protected]>
    Signed-off-by: Andrei Matei <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    andreimatei authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    98cdac2 View commit details
    Browse the repository at this point in the history
  19. cifs: Fix duplicate fscache cookie warnings

    [ Upstream commit 8876a37 ]
    
    fscache emits a lot of duplicate cookie warnings with cifs because the
    index key for the fscache cookies does not include everything that the
    cifs_find_inode() function does.  The latter is used with iget5_locked() to
    distinguish between inodes in the local inode cache.
    
    Fix this by adding the creation time and file type to the fscache cookie
    key.
    
    Additionally, add a couple of comments to note that if one is changed the
    other must be also.
    
    Signed-off-by: David Howells <[email protected]>
    Fixes: 70431bf ("cifs: Support fscache indexing rewrite")
    cc: Shyam Prasad N <[email protected]>
    cc: Rohith Surabattula <[email protected]>
    cc: Jeff Layton <[email protected]>
    cc: [email protected]
    cc: [email protected]
    cc: [email protected]
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dhowells authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    852698c View commit details
    Browse the repository at this point in the history
  20. net: lan743x: Add set RFE read fifo threshold for PCI1x1x chips

    [ Upstream commit e4a5898 ]
    
    PCI11x1x Rev B0 devices might drop packets when receiving back to back frames
    at 2.5G link speed. Change the B0 Rev device's Receive filtering Engine FIFO
    threshold parameter from its hardware default of 4 to 3 dwords to prevent the
    problem. Rev C0 and later hardware already defaults to 3 dwords.
    
    Fixes: bb4f6bf ("net: lan743x: Add PCI11010 / PCI11414 device IDs")
    Signed-off-by: Raju Lakkaraju <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    lakkarajun authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2553bfa View commit details
    Browse the repository at this point in the history
  21. Octeontx2-af: fix pause frame configuration in GMP mode

    [ Upstream commit 40d4b48 ]
    
    The Octeontx2 MAC block (CGX) has separate data paths (SMU and GMP) for
    different speeds, allowing for efficient data transfer.
    
    The previous patch which added pause frame configuration has a bug due
    to which pause frame feature is not working in GMP mode.
    
    This patch fixes the issue by configurating appropriate registers.
    
    Fixes: f7e086e ("octeontx2-af: Pause frame configuration at cgx")
    Signed-off-by: Hariprasad Kelam <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Hariprasad Kelam authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    0642673 View commit details
    Browse the repository at this point in the history
  22. inet: inet_defrag: prevent sk release while still in use

    [ Upstream commit 1868545 ]
    
    ip_local_out() and other functions can pass skb->sk as function argument.
    
    If the skb is a fragment and reassembly happens before such function call
    returns, the sk must not be released.
    
    This affects skb fragments reassembled via netfilter or similar
    modules, e.g. openvswitch or ct_act.c, when run as part of tx pipeline.
    
    Eric Dumazet made an initial analysis of this bug.  Quoting Eric:
      Calling ip_defrag() in output path is also implying skb_orphan(),
      which is buggy because output path relies on sk not disappearing.
    
      A relevant old patch about the issue was :
      8282f27 ("inet: frag: Always orphan skbs inside ip_defrag()")
    
      [..]
    
      net/ipv4/ip_output.c depends on skb->sk being set, and probably to an
      inet socket, not an arbitrary one.
    
      If we orphan the packet in ipvlan, then downstream things like FQ
      packet scheduler will not work properly.
    
      We need to change ip_defrag() to only use skb_orphan() when really
      needed, ie whenever frag_list is going to be used.
    
    Eric suggested to stash sk in fragment queue and made an initial patch.
    However there is a problem with this:
    
    If skb is refragmented again right after, ip_do_fragment() will copy
    head->sk to the new fragments, and sets up destructor to sock_wfree.
    IOW, we have no choice but to fix up sk_wmem accouting to reflect the
    fully reassembled skb, else wmem will underflow.
    
    This change moves the orphan down into the core, to last possible moment.
    As ip_defrag_offset is aliased with sk_buff->sk member, we must move the
    offset into the FRAG_CB, else skb->sk gets clobbered.
    
    This allows to delay the orphaning long enough to learn if the skb has
    to be queued or if the skb is completing the reasm queue.
    
    In the former case, things work as before, skb is orphaned.  This is
    safe because skb gets queued/stolen and won't continue past reasm engine.
    
    In the latter case, we will steal the skb->sk reference, reattach it to
    the head skb, and fix up wmem accouting when inet_frag inflates truesize.
    
    Fixes: 7026b1d ("netfilter: Pass socket pointer down through okfn().")
    Diagnosed-by: Eric Dumazet <[email protected]>
    Reported-by: xingwei lee <[email protected]>
    Reported-by: yue sun <[email protected]>
    Reported-by: [email protected]
    Signed-off-by: Florian Westphal <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Florian Westphal authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    7d05678 View commit details
    Browse the repository at this point in the history
  23. dm integrity: fix out-of-range warning

    [ Upstream commit 8e91c23 ]
    
    Depending on the value of CONFIG_HZ, clang complains about a pointless
    comparison:
    
    drivers/md/dm-integrity.c:4085:12: error: result of comparison of
                            constant 42949672950 with expression of type
                            'unsigned int' is always false
                            [-Werror,-Wtautological-constant-out-of-range-compare]
                            if (val >= (uint64_t)UINT_MAX * 1000 / HZ) {
    
    As the check remains useful for other configurations, shut up the
    warning by adding a second type cast to uint64_t.
    
    Fixes: 468dfca ("dm integrity: add a bitmap mode")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Reviewed-by: Mikulas Patocka <[email protected]>
    Reviewed-by: Justin Stitt <[email protected]>
    Signed-off-by: Mike Snitzer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    arndb authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    58638e3 View commit details
    Browse the repository at this point in the history
  24. x86/cpufeatures: Add new word for scattered features

    [ Upstream commit 7f274e6 ]
    
    Add a new word for scattered features because all free bits among the
    existing Linux-defined auxiliary flags have been exhausted.
    
    Signed-off-by: Sandipan Das <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Link: https://lore.kernel.org/r/8380d2a0da469a1f0ad75b8954a79fb689599ff6.1711091584.git.sandipan.das@amd.com
    Stable-dep-of: 598c2fa ("perf/x86/amd/lbr: Use freeze based on availability")
    Signed-off-by: Sasha Levin <[email protected]>
    sandip4n authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8d02911 View commit details
    Browse the repository at this point in the history
  25. perf/x86/amd/lbr: Use freeze based on availability

    [ Upstream commit 598c2fa ]
    
    Currently, the LBR code assumes that LBR Freeze is supported on all processors
    when X86_FEATURE_AMD_LBR_V2 is available i.e. CPUID leaf 0x80000022[EAX]
    bit 1 is set. This is incorrect as the availability of the feature is
    additionally dependent on CPUID leaf 0x80000022[EAX] bit 2 being set,
    which may not be set for all Zen 4 processors.
    
    Define a new feature bit for LBR and PMC freeze and set the freeze enable bit
    (FLBRI) in DebugCtl (MSR 0x1d9) conditionally.
    
    It should still be possible to use LBR without freeze for profile-guided
    optimization of user programs by using an user-only branch filter during
    profiling. When the user-only filter is enabled, branches are no longer
    recorded after the transition to CPL 0 upon PMI arrival. When branch
    entries are read in the PMI handler, the branch stack does not change.
    
    E.g.
    
      $ perf record -j any,u -e ex_ret_brn_tkn ./workload
    
    Since the feature bit is visible under flags in /proc/cpuinfo, it can be
    used to determine the feasibility of use-cases which require LBR Freeze
    to be supported by the hardware such as profile-guided optimization of
    kernels.
    
    Fixes: ca5b7c0 ("perf/x86/amd/lbr: Add LbrExtV2 branch record support")
    Signed-off-by: Sandipan Das <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Link: https://lore.kernel.org/r/69a453c97cfd11c6f2584b19f937fe6df741510f.1711091584.git.sandipan.das@amd.com
    Signed-off-by: Sasha Levin <[email protected]>
    sandip4n authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    ad141b0 View commit details
    Browse the repository at this point in the history
  26. KVM: arm64: Fix host-programmed guest events in nVHE

    commit e89c928 upstream.
    
    Programming PMU events in the host that count during guest execution is
    a feature supported by perf, e.g.
    
      perf stat -e cpu_cycles:G ./lkvm run
    
    While this works for VHE, the guest/host event bitmaps are not carried
    through to the hypervisor in the nVHE configuration. Make
    kvm_pmu_update_vcpu_events() conditional on whether or not _hardware_
    supports PMUv3 rather than if the vCPU as vPMU enabled.
    
    Cc: [email protected]
    Fixes: 84d751a ("KVM: arm64: Pass pmu events to hyp via vcpu")
    Reviewed-by: Marc Zyngier <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Oliver Upton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    oupton authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9235792 View commit details
    Browse the repository at this point in the history
  27. r8169: fix issue caused by buggy BIOS on certain boards with RTL8168d

    commit 5d872c9 upstream.
    
    On some boards with this chip version the BIOS is buggy and misses
    to reset the PHY page selector. This results in the PHY ID read
    accessing registers on a different page, returning a more or
    less random value. Fix this by resetting the page selector first.
    
    Fixes: f1e911d ("r8169: add basic phylib support")
    Cc: [email protected]
    Signed-off-by: Heiner Kallweit <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hkallweit authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    3d61f17 View commit details
    Browse the repository at this point in the history
  28. x86/cpufeatures: Add CPUID_LNX_5 to track recently added Linux-define…

    …d word
    
    commit 8cb4a9a upstream.
    
    Add CPUID_LNX_5 to track cpufeatures' word 21, and add the appropriate
    compile-time assert in KVM to prevent direct lookups on the features in
    CPUID_LNX_5.  KVM uses X86_FEATURE_* flags to manage guest CPUID, and so
    must translate features that are scattered by Linux from the Linux-defined
    bit to the hardware-defined bit, i.e. should never try to directly access
    scattered features in guest CPUID.
    
    Opportunistically add NR_CPUID_WORDS to enum cpuid_leafs, along with a
    compile-time assert in KVM's CPUID infrastructure to ensure that future
    additions update cpuid_leafs along with NCAPINTS.
    
    No functional change intended.
    
    Fixes: 7f274e6 ("x86/cpufeatures: Add new word for scattered features")
    Cc: Sandipan Das <[email protected]>
    Signed-off-by: Sean Christopherson <[email protected]>
    Acked-by: Dave Hansen <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sean-jc authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    5d92088 View commit details
    Browse the repository at this point in the history
  29. Revert "Bluetooth: hci_qca: Set BDA quirk bit if fwnode exists in DT"

    commit 4790a73 upstream.
    
    This reverts commit 7dcd3e0.
    
    Qualcomm Bluetooth controllers like WCN6855 do not have persistent
    storage for the Bluetooth address and must therefore start as
    unconfigured to allow the user to set a valid address unless one has
    been provided by the boot firmware in the devicetree.
    
    A recent change snuck into v6.8-rc7 and incorrectly started marking the
    default (non-unique) address as valid. This specifically also breaks the
    Bluetooth setup for some user of the Lenovo ThinkPad X13s.
    
    Note that this is the second time Qualcomm breaks the driver this way
    and that this was fixed last year by commit 6945795 ("Bluetooth:
    fix use-bdaddr-property quirk"), which also has some further details.
    
    Fixes: 7dcd3e0 ("Bluetooth: hci_qca: Set BDA quirk bit if fwnode exists in DT")
    Cc: [email protected]      # 6.8
    Cc: Janaki Ramaiah Thota <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Reported-by: Clayton Craft <[email protected]>
    Tested-by: Clayton Craft <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jhovold authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9bf4acc View commit details
    Browse the repository at this point in the history
  30. arm64: dts: qcom: sc7180-trogdor: mark bluetooth address as broken

    commit e12e280 upstream.
    
    Several Qualcomm Bluetooth controllers lack persistent storage for the
    device address and instead one can be provided by the boot firmware
    using the 'local-bd-address' devicetree property.
    
    The Bluetooth bindings clearly states that the address should be
    specified in little-endian order, but due to a long-standing bug in the
    Qualcomm driver which reversed the address some boot firmware has been
    providing the address in big-endian order instead.
    
    The boot firmware in SC7180 Trogdor Chromebooks is known to be affected
    so mark the 'local-bd-address' property as broken to maintain backwards
    compatibility with older firmware when fixing the underlying driver bug.
    
    Note that ChromeOS always updates the kernel and devicetree in lockstep
    so that there is no need to handle backwards compatibility with older
    devicetrees.
    
    Fixes: 7ec3e67 ("arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt")
    Cc: [email protected]      # 5.10
    Cc: Rob Clark <[email protected]>
    Reviewed-by: Douglas Anderson <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Acked-by: Bjorn Andersson <[email protected]>
    Reviewed-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jhovold authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    298dc5d View commit details
    Browse the repository at this point in the history
  31. Bluetooth: qca: fix device-address endianness

    commit 77f45cc upstream.
    
    The WCN6855 firmware on the Lenovo ThinkPad X13s expects the Bluetooth
    device address in big-endian order when setting it using the
    EDL_WRITE_BD_ADDR_OPCODE command.
    
    Presumably, this is the case for all non-ROME devices which all use the
    EDL_WRITE_BD_ADDR_OPCODE command for this (unlike the ROME devices which
    use a different command and expect the address in little-endian order).
    
    Reverse the little-endian address before setting it to make sure that
    the address can be configured using tools like btmgmt or using the
    'local-bd-address' devicetree property.
    
    Note that this can potentially break systems with boot firmware which
    has started relying on the broken behaviour and is incorrectly passing
    the address via devicetree in big-endian order.
    
    The only device affected by this should be the WCN3991 used in some
    Chromebooks. As ChromeOS updates the kernel and devicetree in lockstep,
    the new 'qcom,local-bd-address-broken' property can be used to determine
    if the firmware is buggy so that the underlying driver bug can be fixed
    without breaking backwards compatibility.
    
    Set the HCI_QUIRK_BDADDR_PROPERTY_BROKEN quirk for such platforms so
    that the address is reversed when parsing the address property.
    
    Fixes: 5c0a100 ("Bluetooth: hci_qca: Add helper to set device address")
    Cc: [email protected]      # 5.1
    Cc: Balakrishna Godavarthi <[email protected]>
    Cc: Matthias Kaehlcke <[email protected]>
    Tested-by: Nikita Travkin <[email protected]> # sc7180
    Reviewed-by: Douglas Anderson <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jhovold authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    a2812ff View commit details
    Browse the repository at this point in the history
  32. Bluetooth: add quirk for broken address properties

    commit 39646f2 upstream.
    
    Some Bluetooth controllers lack persistent storage for the device
    address and instead one can be provided by the boot firmware using the
    'local-bd-address' devicetree property.
    
    The Bluetooth devicetree bindings clearly states that the address should
    be specified in little-endian order, but due to a long-standing bug in
    the Qualcomm driver which reversed the address some boot firmware has
    been providing the address in big-endian order instead.
    
    Add a new quirk that can be set on platforms with broken firmware and
    use it to reverse the address when parsing the property so that the
    underlying driver bug can be fixed.
    
    Fixes: 5c0a100 ("Bluetooth: hci_qca: Add helper to set device address")
    Cc: [email protected]      # 5.1
    Reviewed-by: Douglas Anderson <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jhovold authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    3e773d0 View commit details
    Browse the repository at this point in the history
  33. Bluetooth: hci_event: set the conn encrypted before conn establishes

    commit c569242 upstream.
    
    We have a BT headset (Lenovo Thinkplus XT99), the pairing and
    connecting has no problem, once this headset is paired, bluez will
    remember this device and will auto re-connect it whenever the device
    is powered on. The auto re-connecting works well with Windows and
    Android, but with Linux, it always fails. Through debugging, we found
    at the rfcomm connection stage, the bluetooth stack reports
    "Connection refused - security block (0x0003)".
    
    For this device, the re-connecting negotiation process is different
    from other BT headsets, it sends the Link_KEY_REQUEST command before
    the CONNECT_REQUEST completes, and it doesn't send ENCRYPT_CHANGE
    command during the negotiation. When the device sends the "connect
    complete" to hci, the ev->encr_mode is 1.
    
    So here in the conn_complete_evt(), if ev->encr_mode is 1, link type
    is ACL and HCI_CONN_ENCRYPT is not set, we set HCI_CONN_ENCRYPT to
    this conn, and update conn->enc_key_size accordingly.
    
    After this change, this BT headset could re-connect with Linux
    successfully. This is the btmon log after applying the patch, after
    receiving the "Connect Complete" with "Encryption: Enabled", will send
    the command to read encryption key size:
    > HCI Event: Connect Request (0x04) plen 10
            Address: 8C:3C:AA:D8:11:67 (OUI 8C-3C-AA)
            Class: 0x240404
              Major class: Audio/Video (headset, speaker, stereo, video, vcr)
              Minor class: Wearable Headset Device
              Rendering (Printing, Speaker)
              Audio (Speaker, Microphone, Headset)
            Link type: ACL (0x01)
    ...
    > HCI Event: Link Key Request (0x17) plen 6
            Address: 8C:3C:AA:D8:11:67 (OUI 8C-3C-AA)
    < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
            Address: 8C:3C:AA:D8:11:67 (OUI 8C-3C-AA)
            Link key: ${32-hex-digits-key}
    ...
    > HCI Event: Connect Complete (0x03) plen 11
            Status: Success (0x00)
            Handle: 256
            Address: 8C:3C:AA:D8:11:67 (OUI 8C-3C-AA)
            Link type: ACL (0x01)
            Encryption: Enabled (0x01)
    < HCI Command: Read Encryption Key... (0x05|0x0008) plen 2
            Handle: 256
    < ACL Data TX: Handle 256 flags 0x00 dlen 10
          L2CAP: Information Request (0x0a) ident 1 len 2
            Type: Extended features supported (0x0002)
    > HCI Event: Command Complete (0x0e) plen 7
          Read Encryption Key Size (0x05|0x0008) ncmd 1
            Status: Success (0x00)
            Handle: 256
            Key size: 16
    
    Cc: [email protected]
    Link: bluez/bluez#704
    Reviewed-by: Paul Menzel <[email protected]>
    Reviewed-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Hui Wang <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jason77-wang authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    38e3eaa View commit details
    Browse the repository at this point in the history
  34. Bluetooth: Fix TOCTOU in HCI debugfs implementation

    commit 7835fcf upstream.
    
    struct hci_dev members conn_info_max_age, conn_info_min_age,
    le_conn_max_interval, le_conn_min_interval, le_adv_max_interval,
    and le_adv_min_interval can be modified from the HCI core code, as well
    through debugfs.
    
    The debugfs implementation, that's only available to privileged users,
    will check for boundaries, making sure that the minimum value being set
    is strictly above the maximum value that already exists, and vice-versa.
    
    However, as both minimum and maximum values can be changed concurrently
    to us modifying them, we need to make sure that the value we check is
    the value we end up using.
    
    For example, with ->conn_info_max_age set to 10, conn_info_min_age_set()
    gets called from vfs handlers to set conn_info_min_age to 8.
    
    In conn_info_min_age_set(), this goes through:
    	if (val == 0 || val > hdev->conn_info_max_age)
    		return -EINVAL;
    
    Concurrently, conn_info_max_age_set() gets called to set to set the
    conn_info_max_age to 7:
    	if (val == 0 || val > hdev->conn_info_max_age)
    		return -EINVAL;
    That check will also pass because we used the old value (10) for
    conn_info_max_age.
    
    After those checks that both passed, the struct hci_dev access
    is mutex-locked, disabling concurrent access, but that does not matter
    because the invalid value checks both passed, and we'll end up with
    conn_info_min_age = 8 and conn_info_max_age = 7
    
    To fix this problem, we need to lock the structure access before so the
    check and assignment are not interrupted.
    
    This fix was originally devised by the BassCheck[1] team, and
    considered the problem to be an atomicity one. This isn't the case as
    there aren't any concerns about the variable changing while we check it,
    but rather after we check it parallel to another change.
    
    This patch fixes CVE-2024-24858 and CVE-2024-24857.
    
    [1] https://sites.google.com/view/basscheck/
    
    Co-developed-by: Gui-Dong Han <[email protected]>
    Signed-off-by: Gui-Dong Han <[email protected]>
    Link: https://lore.kernel.org/linux-bluetooth/[email protected]/
    Link: https://nvd.nist.gov/vuln/detail/CVE-2024-24858
    Link: https://lore.kernel.org/linux-bluetooth/[email protected]/
    Link: https://lore.kernel.org/linux-bluetooth/[email protected]/
    Link: https://nvd.nist.gov/vuln/detail/CVE-2024-24857
    Fixes: 31ad169 ("Bluetooth: Add conn info lifetime parameters to debugfs")
    Fixes: 729a105 ("Bluetooth: Expose default LE advertising interval via debugfs")
    Fixes: 71c3b60 ("Bluetooth: Move BR/EDR debugfs file creation into hci_debugfs.c")
    Signed-off-by: Bastien Nocera <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hadess authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    18e1894 View commit details
    Browse the repository at this point in the history
  35. xen-netfront: Add missing skb_mark_for_recycle

    commit 0379654 upstream.
    
    Notice that skb_mark_for_recycle() is introduced later than fixes tag in
    commit 6a5bcd8 ("page_pool: Allow drivers to hint on SKB recycling").
    
    It is believed that fixes tag were missing a call to page_pool_release_page()
    between v5.9 to v5.14, after which is should have used skb_mark_for_recycle().
    Since v6.6 the call page_pool_release_page() were removed (in
    commit 535b9c6 ("net: page_pool: hide page_pool_release_page()")
    and remaining callers converted (in commit 6bfef2e ("Merge branch
    'net-page_pool-remove-page_pool_release_page'")).
    
    This leak became visible in v6.8 via commit dba1b8a ("mm/page_pool: catch
    page_pool memory leaks").
    
    Cc: [email protected]
    Fixes: 6c5aa6f ("xen networking: add basic XDP support for xen-netfront")
    Reported-by: Leonidas Spyropoulos <[email protected]>
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=218654
    Reported-by: Arthur Borsboom <[email protected]>
    Signed-off-by: Jesper Dangaard Brouer <[email protected]>
    Link: https://lore.kernel.org/r/171154167446.2671062.9127105384591237363.stgit@firesoul
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    netoptimizer authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    7c12507 View commit details
    Browse the repository at this point in the history
  36. net/rds: fix possible cp null dereference

    commit 62fc335 upstream.
    
    cp might be null, calling cp->cp_conn would produce null dereference
    
    [Simon Horman adds:]
    
    Analysis:
    
    * cp is a parameter of __rds_rdma_map and is not reassigned.
    
    * The following call-sites pass a NULL cp argument to __rds_rdma_map()
    
      - rds_get_mr()
      - rds_get_mr_for_dest
    
    * Prior to the code above, the following assumes that cp may be NULL
      (which is indicative, but could itself be unnecessary)
    
    	trans_private = rs->rs_transport->get_mr(
    		sg, nents, rs, &mr->r_key, cp ? cp->cp_conn : NULL,
    		args->vec.addr, args->vec.bytes,
    		need_odp ? ODP_ZEROBASED : ODP_NOT_NEEDED);
    
    * The code modified by this patch is guarded by IS_ERR(trans_private),
      where trans_private is assigned as per the previous point in this analysis.
    
      The only implementation of get_mr that I could locate is rds_ib_get_mr()
      which can return an ERR_PTR if the conn (4th) argument is NULL.
    
    * ret is set to PTR_ERR(trans_private).
      rds_ib_get_mr can return ERR_PTR(-ENODEV) if the conn (4th) argument is NULL.
      Thus ret may be -ENODEV in which case the code in question will execute.
    
    Conclusion:
    * cp may be NULL at the point where this patch adds a check;
      this patch does seem to address a possible bug
    
    Fixes: c055fc0 ("net/rds: fix WARNING in rds_conn_connect_if_down")
    Cc: [email protected] # v4.19+
    Signed-off-by: Mahmoud Adam <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mngyadam authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    cbaac2e View commit details
    Browse the repository at this point in the history
  37. net: usb: ax88179_178a: avoid the interface always configured as rand…

    …om address
    
    commit 2e91bb9 upstream.
    
    After the commit d2689b6 ("net: usb: ax88179_178a: avoid two
    consecutive device resets"), reset is not executed from bind operation and
    mac address is not read from the device registers or the devicetree at that
    moment. Since the check to configure if the assigned mac address is random
    or not for the interface, happens after the bind operation from
    usbnet_probe, the interface keeps configured as random address, although the
    address is correctly read and set during open operation (the only reset
    now).
    
    In order to keep only one reset for the device and to avoid the interface
    always configured as random address, after reset, configure correctly the
    suitable field from the driver, if the mac address is read successfully from
    the device registers or the devicetree. Take into account if a locally
    administered address (random) was previously stored.
    
    cc: [email protected] # 6.6+
    Fixes: d2689b6 ("net: usb: ax88179_178a: avoid two consecutive device resets")
    Reported-by: Dave Stevenson  <[email protected]>
    Signed-off-by: Jose Ignacio Tornos Martinez <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jtornosm authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    fc77240 View commit details
    Browse the repository at this point in the history
  38. vsock/virtio: fix packet delivery to tap device

    commit b32a09e upstream.
    
    Commit 82dfb54 ("VSOCK: Add virtio vsock vsockmon hooks") added
    virtio_transport_deliver_tap_pkt() for handing packets to the
    vsockmon device. However, in virtio_transport_send_pkt_work(),
    the function is called before actually sending the packet (i.e.
    before placing it in the virtqueue with virtqueue_add_sgs() and checking
    whether it returned successfully).
    Queuing the packet in the virtqueue can fail even multiple times.
    However, in virtio_transport_deliver_tap_pkt() we deliver the packet
    to the monitoring tap interface only the first time we call it.
    This certainly avoids seeing the same packet replicated multiple times
    in the monitoring interface, but it can show the packet sent with the
    wrong timestamp or even before we succeed to queue it in the virtqueue.
    
    Move virtio_transport_deliver_tap_pkt() after calling virtqueue_add_sgs()
    and making sure it returned successfully.
    
    Fixes: 82dfb54 ("VSOCK: Add virtio vsock vsockmon hooks")
    Cc: [email protected]
    Signed-off-by: Marco Pinna <[email protected]>
    Reviewed-by: Stefano Garzarella <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    MPinna authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    db388b8 View commit details
    Browse the repository at this point in the history
  39. Revert "x86/mm/ident_map: Use gbpages only where full GB page should …

    …be mapped."
    
    commit c567f29 upstream.
    
    This reverts commit d794734.
    
    While the original change tries to fix a bug, it also unintentionally broke
    existing systems, see the regressions reported at:
    
      https://lore.kernel.org/all/[email protected]/
    
    Since d794734 was also marked for -stable, let's back it out before
    causing more damage.
    
    Note that due to another upstream change the revert was not 100% automatic:
    
      0a845e0 mm/treewide: replace pud_large() with pud_leaf()
    
    Signed-off-by: Ingo Molnar <[email protected]>
    Cc: <[email protected]>
    Cc: Russ Anderson <[email protected]>
    Cc: Steve Wahl <[email protected]>
    Cc: Dave Hansen <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]/
    Fixes: d794734 ("x86/mm/ident_map: Use gbpages only where full GB page should be mapped.")
    Signed-off-by: Steve Wahl <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Ingo Molnar authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    1c9e71c View commit details
    Browse the repository at this point in the history
  40. netfilter: nf_tables: reject new basechain after table flag update

    commit 994209d upstream.
    
    When dormant flag is toggled, hooks are disabled in the commit phase by
    iterating over current chains in table (existing and new).
    
    The following configuration allows for an inconsistent state:
    
      add table x
      add chain x y { type filter hook input priority 0; }
      add table x { flags dormant; }
      add chain x w { type filter hook input priority 1; }
    
    which triggers the following warning when trying to unregister chain w
    which is already unregistered.
    
    [  127.322252] WARNING: CPU: 7 PID: 1211 at net/netfilter/core.c:50                                                                     1 __nf_unregister_net_hook+0x21a/0x260
    [...]
    [  127.322519] Call Trace:
    [  127.322521]  <TASK>
    [  127.322524]  ? __warn+0x9f/0x1a0
    [  127.322531]  ? __nf_unregister_net_hook+0x21a/0x260
    [  127.322537]  ? report_bug+0x1b1/0x1e0
    [  127.322545]  ? handle_bug+0x3c/0x70
    [  127.322552]  ? exc_invalid_op+0x17/0x40
    [  127.322556]  ? asm_exc_invalid_op+0x1a/0x20
    [  127.322563]  ? kasan_save_free_info+0x3b/0x60
    [  127.322570]  ? __nf_unregister_net_hook+0x6a/0x260
    [  127.322577]  ? __nf_unregister_net_hook+0x21a/0x260
    [  127.322583]  ? __nf_unregister_net_hook+0x6a/0x260
    [  127.322590]  ? __nf_tables_unregister_hook+0x8a/0xe0 [nf_tables]
    [  127.322655]  nft_table_disable+0x75/0xf0 [nf_tables]
    [  127.322717]  nf_tables_commit+0x2571/0x2620 [nf_tables]
    
    Fixes: 179d9ba ("netfilter: nf_tables: fix table flag updates")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ummakynes authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    745cf6a View commit details
    Browse the repository at this point in the history
  41. netfilter: nf_tables: flush pending destroy work before exit_net release

    commit 24cea96 upstream.
    
    Similar to 2c9f029 ("netfilter: nf_tables: flush pending destroy
    work before netlink notifier") to address a race between exit_net and
    the destroy workqueue.
    
    The trace below shows an element to be released via destroy workqueue
    while exit_net path (triggered via module removal) has already released
    the set that is used in such transaction.
    
    [ 1360.547789] BUG: KASAN: slab-use-after-free in nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
    [ 1360.547861] Read of size 8 at addr ffff888140500cc0 by task kworker/4:1/152465
    [ 1360.547870] CPU: 4 PID: 152465 Comm: kworker/4:1 Not tainted 6.8.0+ torvalds#359
    [ 1360.547882] Workqueue: events nf_tables_trans_destroy_work [nf_tables]
    [ 1360.547984] Call Trace:
    [ 1360.547991]  <TASK>
    [ 1360.547998]  dump_stack_lvl+0x53/0x70
    [ 1360.548014]  print_report+0xc4/0x610
    [ 1360.548026]  ? __virt_addr_valid+0xba/0x160
    [ 1360.548040]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
    [ 1360.548054]  ? nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
    [ 1360.548176]  kasan_report+0xae/0xe0
    [ 1360.548189]  ? nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
    [ 1360.548312]  nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
    [ 1360.548447]  ? __pfx_nf_tables_trans_destroy_work+0x10/0x10 [nf_tables]
    [ 1360.548577]  ? _raw_spin_unlock_irq+0x18/0x30
    [ 1360.548591]  process_one_work+0x2f1/0x670
    [ 1360.548610]  worker_thread+0x4d3/0x760
    [ 1360.548627]  ? __pfx_worker_thread+0x10/0x10
    [ 1360.548640]  kthread+0x16b/0x1b0
    [ 1360.548653]  ? __pfx_kthread+0x10/0x10
    [ 1360.548665]  ret_from_fork+0x2f/0x50
    [ 1360.548679]  ? __pfx_kthread+0x10/0x10
    [ 1360.548690]  ret_from_fork_asm+0x1a/0x30
    [ 1360.548707]  </TASK>
    
    [ 1360.548719] Allocated by task 192061:
    [ 1360.548726]  kasan_save_stack+0x20/0x40
    [ 1360.548739]  kasan_save_track+0x14/0x30
    [ 1360.548750]  __kasan_kmalloc+0x8f/0xa0
    [ 1360.548760]  __kmalloc_node+0x1f1/0x450
    [ 1360.548771]  nf_tables_newset+0x10c7/0x1b50 [nf_tables]
    [ 1360.548883]  nfnetlink_rcv_batch+0xbc4/0xdc0 [nfnetlink]
    [ 1360.548909]  nfnetlink_rcv+0x1a8/0x1e0 [nfnetlink]
    [ 1360.548927]  netlink_unicast+0x367/0x4f0
    [ 1360.548935]  netlink_sendmsg+0x34b/0x610
    [ 1360.548944]  ____sys_sendmsg+0x4d4/0x510
    [ 1360.548953]  ___sys_sendmsg+0xc9/0x120
    [ 1360.548961]  __sys_sendmsg+0xbe/0x140
    [ 1360.548971]  do_syscall_64+0x55/0x120
    [ 1360.548982]  entry_SYSCALL_64_after_hwframe+0x55/0x5d
    
    [ 1360.548994] Freed by task 192222:
    [ 1360.548999]  kasan_save_stack+0x20/0x40
    [ 1360.549009]  kasan_save_track+0x14/0x30
    [ 1360.549019]  kasan_save_free_info+0x3b/0x60
    [ 1360.549028]  poison_slab_object+0x100/0x180
    [ 1360.549036]  __kasan_slab_free+0x14/0x30
    [ 1360.549042]  kfree+0xb6/0x260
    [ 1360.549049]  __nft_release_table+0x473/0x6a0 [nf_tables]
    [ 1360.549131]  nf_tables_exit_net+0x170/0x240 [nf_tables]
    [ 1360.549221]  ops_exit_list+0x50/0xa0
    [ 1360.549229]  free_exit_list+0x101/0x140
    [ 1360.549236]  unregister_pernet_operations+0x107/0x160
    [ 1360.549245]  unregister_pernet_subsys+0x1c/0x30
    [ 1360.549254]  nf_tables_module_exit+0x43/0x80 [nf_tables]
    [ 1360.549345]  __do_sys_delete_module+0x253/0x370
    [ 1360.549352]  do_syscall_64+0x55/0x120
    [ 1360.549360]  entry_SYSCALL_64_after_hwframe+0x55/0x5d
    
    (gdb) list *__nft_release_table+0x473
    0x1e033 is in __nft_release_table (net/netfilter/nf_tables_api.c:11354).
    11349           list_for_each_entry_safe(flowtable, nf, &table->flowtables, list) {
    11350                   list_del(&flowtable->list);
    11351                   nft_use_dec(&table->use);
    11352                   nf_tables_flowtable_destroy(flowtable);
    11353           }
    11354           list_for_each_entry_safe(set, ns, &table->sets, list) {
    11355                   list_del(&set->list);
    11356                   nft_use_dec(&table->use);
    11357                   if (set->flags & (NFT_SET_MAP | NFT_SET_OBJECT))
    11358                           nft_map_deactivate(&ctx, set);
    (gdb)
    
    [ 1360.549372] Last potentially related work creation:
    [ 1360.549376]  kasan_save_stack+0x20/0x40
    [ 1360.549384]  __kasan_record_aux_stack+0x9b/0xb0
    [ 1360.549392]  __queue_work+0x3fb/0x780
    [ 1360.549399]  queue_work_on+0x4f/0x60
    [ 1360.549407]  nft_rhash_remove+0x33b/0x340 [nf_tables]
    [ 1360.549516]  nf_tables_commit+0x1c6a/0x2620 [nf_tables]
    [ 1360.549625]  nfnetlink_rcv_batch+0x728/0xdc0 [nfnetlink]
    [ 1360.549647]  nfnetlink_rcv+0x1a8/0x1e0 [nfnetlink]
    [ 1360.549671]  netlink_unicast+0x367/0x4f0
    [ 1360.549680]  netlink_sendmsg+0x34b/0x610
    [ 1360.549690]  ____sys_sendmsg+0x4d4/0x510
    [ 1360.549697]  ___sys_sendmsg+0xc9/0x120
    [ 1360.549706]  __sys_sendmsg+0xbe/0x140
    [ 1360.549715]  do_syscall_64+0x55/0x120
    [ 1360.549725]  entry_SYSCALL_64_after_hwframe+0x55/0x5d
    
    Fixes: 0935d55 ("netfilter: nf_tables: asynchronous release")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ummakynes authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    4e8447a View commit details
    Browse the repository at this point in the history
  42. netfilter: nf_tables: Fix potential data-race in __nft_flowtable_type…

    …_get()
    
    commit 2422501 upstream.
    
    nft_unregister_flowtable_type() within nf_flow_inet_module_exit() can
    concurrent with __nft_flowtable_type_get() within nf_tables_newflowtable().
    And thhere is not any protection when iterate over nf_tables_flowtables
    list in __nft_flowtable_type_get(). Therefore, there is pertential
    data-race of nf_tables_flowtables list entry.
    
    Use list_for_each_entry_rcu() to iterate over nf_tables_flowtables list
    in __nft_flowtable_type_get(), and use rcu_read_lock() in the caller
    nft_flowtable_type_get() to protect the entire type query process.
    
    Fixes: 3b49e2e ("netfilter: nf_tables: add flow table netlink frontend")
    Signed-off-by: Ziyang Xuan <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Ziyang Xuan authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9b5b770 View commit details
    Browse the repository at this point in the history
  43. netfilter: validate user input for expected length

    commit 0c83842 upstream.
    
    I got multiple syzbot reports showing old bugs exposed
    by BPF after commit 20f2505 ("bpf: Try to avoid kzalloc
    in cgroup/{s,g}etsockopt")
    
    setsockopt() @optlen argument should be taken into account
    before copying data.
    
     BUG: KASAN: slab-out-of-bounds in copy_from_sockptr_offset include/linux/sockptr.h:49 [inline]
     BUG: KASAN: slab-out-of-bounds in copy_from_sockptr include/linux/sockptr.h:55 [inline]
     BUG: KASAN: slab-out-of-bounds in do_replace net/ipv4/netfilter/ip_tables.c:1111 [inline]
     BUG: KASAN: slab-out-of-bounds in do_ipt_set_ctl+0x902/0x3dd0 net/ipv4/netfilter/ip_tables.c:1627
    Read of size 96 at addr ffff88802cd73da0 by task syz-executor.4/7238
    
    CPU: 1 PID: 7238 Comm: syz-executor.4 Not tainted 6.9.0-rc2-next-20240403-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
    Call Trace:
     <TASK>
      __dump_stack lib/dump_stack.c:88 [inline]
      dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
      print_address_description mm/kasan/report.c:377 [inline]
      print_report+0x169/0x550 mm/kasan/report.c:488
      kasan_report+0x143/0x180 mm/kasan/report.c:601
      kasan_check_range+0x282/0x290 mm/kasan/generic.c:189
      __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105
      copy_from_sockptr_offset include/linux/sockptr.h:49 [inline]
      copy_from_sockptr include/linux/sockptr.h:55 [inline]
      do_replace net/ipv4/netfilter/ip_tables.c:1111 [inline]
      do_ipt_set_ctl+0x902/0x3dd0 net/ipv4/netfilter/ip_tables.c:1627
      nf_setsockopt+0x295/0x2c0 net/netfilter/nf_sockopt.c:101
      do_sock_setsockopt+0x3af/0x720 net/socket.c:2311
      __sys_setsockopt+0x1ae/0x250 net/socket.c:2334
      __do_sys_setsockopt net/socket.c:2343 [inline]
      __se_sys_setsockopt net/socket.c:2340 [inline]
      __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2340
     do_syscall_64+0xfb/0x240
     entry_SYSCALL_64_after_hwframe+0x72/0x7a
    RIP: 0033:0x7fd22067dde9
    Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007fd21f9ff0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
    RAX: ffffffffffffffda RBX: 00007fd2207abf80 RCX: 00007fd22067dde9
    RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000003
    RBP: 00007fd2206ca47a R08: 0000000000000001 R09: 0000000000000000
    R10: 0000000020000880 R11: 0000000000000246 R12: 0000000000000000
    R13: 000000000000000b R14: 00007fd2207abf80 R15: 00007ffd2d0170d8
     </TASK>
    
    Allocated by task 7238:
      kasan_save_stack mm/kasan/common.c:47 [inline]
      kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
      poison_kmalloc_redzone mm/kasan/common.c:370 [inline]
      __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387
      kasan_kmalloc include/linux/kasan.h:211 [inline]
      __do_kmalloc_node mm/slub.c:4069 [inline]
      __kmalloc_noprof+0x200/0x410 mm/slub.c:4082
      kmalloc_noprof include/linux/slab.h:664 [inline]
      __cgroup_bpf_run_filter_setsockopt+0xd47/0x1050 kernel/bpf/cgroup.c:1869
      do_sock_setsockopt+0x6b4/0x720 net/socket.c:2293
      __sys_setsockopt+0x1ae/0x250 net/socket.c:2334
      __do_sys_setsockopt net/socket.c:2343 [inline]
      __se_sys_setsockopt net/socket.c:2340 [inline]
      __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2340
     do_syscall_64+0xfb/0x240
     entry_SYSCALL_64_after_hwframe+0x72/0x7a
    
    The buggy address belongs to the object at ffff88802cd73da0
     which belongs to the cache kmalloc-8 of size 8
    The buggy address is located 0 bytes inside of
     allocated 1-byte region [ffff88802cd73da0, ffff88802cd73da1)
    
    The buggy address belongs to the physical page:
    page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802cd73020 pfn:0x2cd73
    flags: 0xfff80000000000(node=0|zone=1|lastcpupid=0xfff)
    page_type: 0xffffefff(slab)
    raw: 00fff80000000000 ffff888015041280 dead000000000100 dead000000000122
    raw: ffff88802cd73020 000000008080007f 00000001ffffefff 0000000000000000
    page dumped because: kasan: bad access detected
    page_owner tracks the page as allocated
    page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 5103, tgid 2119833701 (syz-executor.4), ts 5103, free_ts 70804600828
      set_page_owner include/linux/page_owner.h:32 [inline]
      post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1490
      prep_new_page mm/page_alloc.c:1498 [inline]
      get_page_from_freelist+0x2e7e/0x2f40 mm/page_alloc.c:3454
      __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4712
      __alloc_pages_node_noprof include/linux/gfp.h:244 [inline]
      alloc_pages_node_noprof include/linux/gfp.h:271 [inline]
      alloc_slab_page+0x5f/0x120 mm/slub.c:2249
      allocate_slab+0x5a/0x2e0 mm/slub.c:2412
      new_slab mm/slub.c:2465 [inline]
      ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3615
      __slab_alloc+0x58/0xa0 mm/slub.c:3705
      __slab_alloc_node mm/slub.c:3758 [inline]
      slab_alloc_node mm/slub.c:3936 [inline]
      __do_kmalloc_node mm/slub.c:4068 [inline]
      kmalloc_node_track_caller_noprof+0x286/0x450 mm/slub.c:4089
      kstrdup+0x3a/0x80 mm/util.c:62
      device_rename+0xb5/0x1b0 drivers/base/core.c:4558
      dev_change_name+0x275/0x860 net/core/dev.c:1232
      do_setlink+0xa4b/0x41f0 net/core/rtnetlink.c:2864
      __rtnl_newlink net/core/rtnetlink.c:3680 [inline]
      rtnl_newlink+0x180b/0x20a0 net/core/rtnetlink.c:3727
      rtnetlink_rcv_msg+0x89b/0x10d0 net/core/rtnetlink.c:6594
      netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2559
      netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
      netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1361
    page last free pid 5146 tgid 5146 stack trace:
      reset_page_owner include/linux/page_owner.h:25 [inline]
      free_pages_prepare mm/page_alloc.c:1110 [inline]
      free_unref_page+0xd3c/0xec0 mm/page_alloc.c:2617
      discard_slab mm/slub.c:2511 [inline]
      __put_partials+0xeb/0x130 mm/slub.c:2980
      put_cpu_partial+0x17c/0x250 mm/slub.c:3055
      __slab_free+0x2ea/0x3d0 mm/slub.c:4254
      qlink_free mm/kasan/quarantine.c:163 [inline]
      qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179
      kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
      __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322
      kasan_slab_alloc include/linux/kasan.h:201 [inline]
      slab_post_alloc_hook mm/slub.c:3888 [inline]
      slab_alloc_node mm/slub.c:3948 [inline]
      __do_kmalloc_node mm/slub.c:4068 [inline]
      __kmalloc_node_noprof+0x1d7/0x450 mm/slub.c:4076
      kmalloc_node_noprof include/linux/slab.h:681 [inline]
      kvmalloc_node_noprof+0x72/0x190 mm/util.c:634
      bucket_table_alloc lib/rhashtable.c:186 [inline]
      rhashtable_rehash_alloc+0x9e/0x290 lib/rhashtable.c:367
      rht_deferred_worker+0x4e1/0x2440 lib/rhashtable.c:427
      process_one_work kernel/workqueue.c:3218 [inline]
      process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299
      worker_thread+0x86d/0xd70 kernel/workqueue.c:3380
      kthread+0x2f0/0x390 kernel/kthread.c:388
      ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
      ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243
    
    Memory state around the buggy address:
     ffff88802cd73c80: 07 fc fc fc 05 fc fc fc 05 fc fc fc fa fc fc fc
     ffff88802cd73d00: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
    >ffff88802cd73d80: fa fc fc fc 01 fc fc fc fa fc fc fc fa fc fc fc
                                   ^
     ffff88802cd73e00: fa fc fc fc fa fc fc fc 05 fc fc fc 07 fc fc fc
     ffff88802cd73e80: 07 fc fc fc 07 fc fc fc 07 fc fc fc 07 fc fc fc
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Reported-by: syzbot <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Pablo Neira Ayuso <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Eric Dumazet authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    18aae2c View commit details
    Browse the repository at this point in the history
  44. vboxsf: Avoid an spurious warning if load_nls_xxx() fails

    commit de3f64b upstream.
    
    If an load_nls_xxx() function fails a few lines above, the 'sbi->bdi_id' is
    still 0.
    So, in the error handling path, we will call ida_simple_remove(..., 0)
    which is not allocated yet.
    
    In order to prevent a spurious "ida_free called for id=0 which is not
    allocated." message, tweak the error handling path and add a new label.
    
    Fixes: 0fd1695 ("fs: Add VirtualBox guest shared folder (vboxsf) support")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Link: https://lore.kernel.org/r/d09eaaa4e2e08206c58a1a27ca9b3e81dc168773.1698835730.git.christophe.jaillet@wanadoo.fr
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tititiou36 authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8a57544 View commit details
    Browse the repository at this point in the history
  45. bpf, sockmap: Prevent lock inversion deadlock in map delete elem

    commit ff91059 upstream.
    
    syzkaller started using corpuses where a BPF tracing program deletes
    elements from a sockmap/sockhash map. Because BPF tracing programs can be
    invoked from any interrupt context, locks taken during a map_delete_elem
    operation must be hardirq-safe. Otherwise a deadlock due to lock inversion
    is possible, as reported by lockdep:
    
           CPU0                    CPU1
           ----                    ----
      lock(&htab->buckets[i].lock);
                                   local_irq_disable();
                                   lock(&host->lock);
                                   lock(&htab->buckets[i].lock);
      <Interrupt>
        lock(&host->lock);
    
    Locks in sockmap are hardirq-unsafe by design. We expects elements to be
    deleted from sockmap/sockhash only in task (normal) context with interrupts
    enabled, or in softirq context.
    
    Detect when map_delete_elem operation is invoked from a context which is
    _not_ hardirq-unsafe, that is interrupts are disabled, and bail out with an
    error.
    
    Note that map updates are not affected by this issue. BPF verifier does not
    allow updating sockmap/sockhash from a BPF tracing program today.
    
    Fixes: 604326b ("bpf, sockmap: convert to generic sk_msg interface")
    Reported-by: xingwei lee <[email protected]>
    Reported-by: yue sun <[email protected]>
    Reported-by: [email protected]
    Reported-by: [email protected]
    Signed-off-by: Jakub Sitnicki <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Tested-by: [email protected]
    Acked-by: John Fastabend <[email protected]>
    Closes: https://syzkaller.appspot.com/bug?extid=d4066896495db380182e
    Closes: https://syzkaller.appspot.com/bug?extid=bc922f476bd65abbd466
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jsitnicki authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    a44770f View commit details
    Browse the repository at this point in the history
  46. net/sched: act_skbmod: prevent kernel-infoleak

    commit d313eb8 upstream.
    
    syzbot found that tcf_skbmod_dump() was copying four bytes
    from kernel stack to user space [1].
    
    The issue here is that 'struct tc_skbmod' has a four bytes hole.
    
    We need to clear the structure before filling fields.
    
    [1]
    BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:114 [inline]
     BUG: KMSAN: kernel-infoleak in copy_to_user_iter lib/iov_iter.c:24 [inline]
     BUG: KMSAN: kernel-infoleak in iterate_ubuf include/linux/iov_iter.h:29 [inline]
     BUG: KMSAN: kernel-infoleak in iterate_and_advance2 include/linux/iov_iter.h:245 [inline]
     BUG: KMSAN: kernel-infoleak in iterate_and_advance include/linux/iov_iter.h:271 [inline]
     BUG: KMSAN: kernel-infoleak in _copy_to_iter+0x366/0x2520 lib/iov_iter.c:185
      instrument_copy_to_user include/linux/instrumented.h:114 [inline]
      copy_to_user_iter lib/iov_iter.c:24 [inline]
      iterate_ubuf include/linux/iov_iter.h:29 [inline]
      iterate_and_advance2 include/linux/iov_iter.h:245 [inline]
      iterate_and_advance include/linux/iov_iter.h:271 [inline]
      _copy_to_iter+0x366/0x2520 lib/iov_iter.c:185
      copy_to_iter include/linux/uio.h:196 [inline]
      simple_copy_to_iter net/core/datagram.c:532 [inline]
      __skb_datagram_iter+0x185/0x1000 net/core/datagram.c:420
      skb_copy_datagram_iter+0x5c/0x200 net/core/datagram.c:546
      skb_copy_datagram_msg include/linux/skbuff.h:4050 [inline]
      netlink_recvmsg+0x432/0x1610 net/netlink/af_netlink.c:1962
      sock_recvmsg_nosec net/socket.c:1046 [inline]
      sock_recvmsg+0x2c4/0x340 net/socket.c:1068
      __sys_recvfrom+0x35a/0x5f0 net/socket.c:2242
      __do_sys_recvfrom net/socket.c:2260 [inline]
      __se_sys_recvfrom net/socket.c:2256 [inline]
      __x64_sys_recvfrom+0x126/0x1d0 net/socket.c:2256
     do_syscall_64+0xd5/0x1f0
     entry_SYSCALL_64_after_hwframe+0x6d/0x75
    
    Uninit was stored to memory at:
      pskb_expand_head+0x30f/0x19d0 net/core/skbuff.c:2253
      netlink_trim+0x2c2/0x330 net/netlink/af_netlink.c:1317
      netlink_unicast+0x9f/0x1260 net/netlink/af_netlink.c:1351
      nlmsg_unicast include/net/netlink.h:1144 [inline]
      nlmsg_notify+0x21d/0x2f0 net/netlink/af_netlink.c:2610
      rtnetlink_send+0x73/0x90 net/core/rtnetlink.c:741
      rtnetlink_maybe_send include/linux/rtnetlink.h:17 [inline]
      tcf_add_notify net/sched/act_api.c:2048 [inline]
      tcf_action_add net/sched/act_api.c:2071 [inline]
      tc_ctl_action+0x146e/0x19d0 net/sched/act_api.c:2119
      rtnetlink_rcv_msg+0x1737/0x1900 net/core/rtnetlink.c:6595
      netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2559
      rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6613
      netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
      netlink_unicast+0xf4c/0x1260 net/netlink/af_netlink.c:1361
      netlink_sendmsg+0x10df/0x11f0 net/netlink/af_netlink.c:1905
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x30f/0x380 net/socket.c:745
      ____sys_sendmsg+0x877/0xb60 net/socket.c:2584
      ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2638
      __sys_sendmsg net/socket.c:2667 [inline]
      __do_sys_sendmsg net/socket.c:2676 [inline]
      __se_sys_sendmsg net/socket.c:2674 [inline]
      __x64_sys_sendmsg+0x307/0x4a0 net/socket.c:2674
     do_syscall_64+0xd5/0x1f0
     entry_SYSCALL_64_after_hwframe+0x6d/0x75
    
    Uninit was stored to memory at:
      __nla_put lib/nlattr.c:1041 [inline]
      nla_put+0x1c6/0x230 lib/nlattr.c:1099
      tcf_skbmod_dump+0x23f/0xc20 net/sched/act_skbmod.c:256
      tcf_action_dump_old net/sched/act_api.c:1191 [inline]
      tcf_action_dump_1+0x85e/0x970 net/sched/act_api.c:1227
      tcf_action_dump+0x1fd/0x460 net/sched/act_api.c:1251
      tca_get_fill+0x519/0x7a0 net/sched/act_api.c:1628
      tcf_add_notify_msg net/sched/act_api.c:2023 [inline]
      tcf_add_notify net/sched/act_api.c:2042 [inline]
      tcf_action_add net/sched/act_api.c:2071 [inline]
      tc_ctl_action+0x1365/0x19d0 net/sched/act_api.c:2119
      rtnetlink_rcv_msg+0x1737/0x1900 net/core/rtnetlink.c:6595
      netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2559
      rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6613
      netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
      netlink_unicast+0xf4c/0x1260 net/netlink/af_netlink.c:1361
      netlink_sendmsg+0x10df/0x11f0 net/netlink/af_netlink.c:1905
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x30f/0x380 net/socket.c:745
      ____sys_sendmsg+0x877/0xb60 net/socket.c:2584
      ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2638
      __sys_sendmsg net/socket.c:2667 [inline]
      __do_sys_sendmsg net/socket.c:2676 [inline]
      __se_sys_sendmsg net/socket.c:2674 [inline]
      __x64_sys_sendmsg+0x307/0x4a0 net/socket.c:2674
     do_syscall_64+0xd5/0x1f0
     entry_SYSCALL_64_after_hwframe+0x6d/0x75
    
    Local variable opt created at:
      tcf_skbmod_dump+0x9d/0xc20 net/sched/act_skbmod.c:244
      tcf_action_dump_old net/sched/act_api.c:1191 [inline]
      tcf_action_dump_1+0x85e/0x970 net/sched/act_api.c:1227
    
    Bytes 188-191 of 248 are uninitialized
    Memory access of size 248 starts at ffff888117697680
    Data copied to user address 00007ffe56d855f0
    
    Fixes: 86da71b ("net_sched: Introduce skbmod action")
    Signed-off-by: Eric Dumazet <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Eric Dumazet authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    55d3fe7 View commit details
    Browse the repository at this point in the history
  47. net/sched: fix lockdep splat in qdisc_tree_reduce_backlog()

    commit 7eb3223 upstream.
    
    qdisc_tree_reduce_backlog() is called with the qdisc lock held,
    not RTNL.
    
    We must use qdisc_lookup_rcu() instead of qdisc_lookup()
    
    syzbot reported:
    
    WARNING: suspicious RCU usage
    6.1.74-syzkaller #0 Not tainted
    -----------------------------
    net/sched/sch_api.c:305 suspicious rcu_dereference_protected() usage!
    
    other info that might help us debug this:
    
    rcu_scheduler_active = 2, debug_locks = 1
    3 locks held by udevd/1142:
      #0: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:306 [inline]
      #0: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline]
      #0: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: net_tx_action+0x64a/0x970 net/core/dev.c:5282
      #1: ffff888171861108 (&sch->q.lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline]
      #1: ffff888171861108 (&sch->q.lock){+.-.}-{2:2}, at: net_tx_action+0x754/0x970 net/core/dev.c:5297
      #2: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:306 [inline]
      #2: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline]
      #2: ffffffff87c729a0 (rcu_read_lock){....}-{1:2}, at: qdisc_tree_reduce_backlog+0x84/0x580 net/sched/sch_api.c:792
    
    stack backtrace:
    CPU: 1 PID: 1142 Comm: udevd Not tainted 6.1.74-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
    Call Trace:
     <TASK>
      [<ffffffff85b85f14>] __dump_stack lib/dump_stack.c:88 [inline]
      [<ffffffff85b85f14>] dump_stack_lvl+0x1b1/0x28f lib/dump_stack.c:106
      [<ffffffff85b86007>] dump_stack+0x15/0x1e lib/dump_stack.c:113
      [<ffffffff81802299>] lockdep_rcu_suspicious+0x1b9/0x260 kernel/locking/lockdep.c:6592
      [<ffffffff84f0054c>] qdisc_lookup+0xac/0x6f0 net/sched/sch_api.c:305
      [<ffffffff84f037c3>] qdisc_tree_reduce_backlog+0x243/0x580 net/sched/sch_api.c:811
      [<ffffffff84f5b78c>] pfifo_tail_enqueue+0x32c/0x4b0 net/sched/sch_fifo.c:51
      [<ffffffff84fbcf63>] qdisc_enqueue include/net/sch_generic.h:833 [inline]
      [<ffffffff84fbcf63>] netem_dequeue+0xeb3/0x15d0 net/sched/sch_netem.c:723
      [<ffffffff84eecab9>] dequeue_skb net/sched/sch_generic.c:292 [inline]
      [<ffffffff84eecab9>] qdisc_restart net/sched/sch_generic.c:397 [inline]
      [<ffffffff84eecab9>] __qdisc_run+0x249/0x1e60 net/sched/sch_generic.c:415
      [<ffffffff84d7aa96>] qdisc_run+0xd6/0x260 include/net/pkt_sched.h:125
      [<ffffffff84d85d29>] net_tx_action+0x7c9/0x970 net/core/dev.c:5313
      [<ffffffff85e002bd>] __do_softirq+0x2bd/0x9bd kernel/softirq.c:616
      [<ffffffff81568bca>] invoke_softirq kernel/softirq.c:447 [inline]
      [<ffffffff81568bca>] __irq_exit_rcu+0xca/0x230 kernel/softirq.c:700
      [<ffffffff81568ae9>] irq_exit_rcu+0x9/0x20 kernel/softirq.c:712
      [<ffffffff85b89f52>] sysvec_apic_timer_interrupt+0x42/0x90 arch/x86/kernel/apic/apic.c:1107
      [<ffffffff85c00ccb>] asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:656
    
    Fixes: d636fc5 ("net: sched: add rcu annotations around qdisc->qdisc_sleeping")
    Reported-by: syzbot <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Jiri Pirko <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Eric Dumazet authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    b7d1ce2 View commit details
    Browse the repository at this point in the history
  48. net: stmmac: fix rx queue priority assignment

    commit b3da86d upstream.
    
    The driver should ensure that same priority is not mapped to multiple
    rx queues. From DesignWare Cores Ethernet Quality-of-Service
    Databook, section 17.1.29 MAC_RxQ_Ctrl2:
    "[...]The software must ensure that the content of this field is
    mutually exclusive to the PSRQ fields for other queues, that is,
    the same priority is not mapped to multiple Rx queues[...]"
    
    Previously rx_queue_priority() function was:
    - clearing all priorities from a queue
    - adding new priorities to that queue
    After this patch it will:
    - first assign new priorities to a queue
    - then remove those priorities from all other queues
    - keep other priorities previously assigned to that queue
    
    Fixes: a8f5102 ("net: stmmac: TX and RX queue priority configuration")
    Fixes: 2142754 ("net: stmmac: Add MAC related callbacks for XGMAC2")
    Signed-off-by: Piotr Wejman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    wp9006 authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    e01835f View commit details
    Browse the repository at this point in the history
  49. net: phy: micrel: lan8814: Fix when enabling/disabling 1-step timesta…

    …mping
    
    commit de99e1e upstream.
    
    There are 2 issues with the blamed commit.
    1. When the phy is initialized, it would enable the disabled of UDPv4
       checksums. The UDPv6 checksum is already enabled by default. So when
       1-step is configured then it would clear these flags.
    2. After the 1-step is configured, then if 2-step is configured then the
       1-step would be still configured because it is not clearing the flag.
       So the sync frames will still have origin timestamps set.
    
    Fix this by reading first the value of the register and then
    just change bit 12 as this one determines if the timestamp needs to
    be inserted in the frame, without changing any other bits.
    
    Fixes: ece1950 ("net: phy: micrel: 1588 support for LAN8814 phy")
    Signed-off-by: Horatiu Vultur <[email protected]>
    Reviewed-by: Divya Koppera <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    HoratiuVultur authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    77f5e52 View commit details
    Browse the repository at this point in the history
  50. net: phy: micrel: Fix potential null pointer dereference

    commit 96c1559 upstream.
    
    In lan8814_get_sig_rx() and lan8814_get_sig_tx() ptp_parse_header() may
    return NULL as ptp_header due to abnormal packet type or corrupted packet.
    Fix this bug by adding ptp_header check.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: ece1950 ("net: phy: micrel: 1588 support for LAN8814 phy")
    Signed-off-by: Aleksandr Mishin <[email protected]>
    Reviewed-by: Andrew Lunn <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Aleksandr Mishin authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    1060816 View commit details
    Browse the repository at this point in the history
  51. selftests: net: gro fwd: update vxlan GRO test expectations

    commit 0fb101b upstream.
    
    UDP tunnel packets can't be GRO in-between their endpoints as this
    causes different issues. The UDP GRO fwd vxlan tests were relying on
    this and their expectations have to be fixed.
    
    We keep both vxlan tests and expected no GRO from happening. The vxlan
    UDP GRO bench test was removed as it's not providing any valuable
    information now.
    
    Fixes: a062260 ("selftests: net: add UDP GRO forwarding self-tests")
    Signed-off-by: Antoine Tenart <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    atenart authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    66cb665 View commit details
    Browse the repository at this point in the history
  52. gro: fix ownership transfer

    commit ed4ccce upstream.
    
    If packets are GROed with fraglist they might be segmented later on and
    continue their journey in the stack. In skb_segment_list those skbs can
    be reused as-is. This is an issue as their destructor was removed in
    skb_gro_receive_list but not the reference to their socket, and then
    they can't be orphaned. Fix this by also removing the reference to the
    socket.
    
    For example this could be observed,
    
      kernel BUG at include/linux/skbuff.h:3131!  (skb_orphan)
      RIP: 0010:ip6_rcv_core+0x11bc/0x19a0
      Call Trace:
       ipv6_list_rcv+0x250/0x3f0
       __netif_receive_skb_list_core+0x49d/0x8f0
       netif_receive_skb_list_internal+0x634/0xd40
       napi_complete_done+0x1d2/0x7d0
       gro_cell_poll+0x118/0x1f0
    
    A similar construction is found in skb_gro_receive, apply the same
    change there.
    
    Fixes: 5e10da5 ("skbuff: allow 'slow_gro' for skb carring sock reference")
    Signed-off-by: Antoine Tenart <[email protected]>
    Reviewed-by: Willem de Bruijn <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    atenart authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2eeab8c View commit details
    Browse the repository at this point in the history
  53. x86/bugs: Fix the SRSO mitigation on Zen3/4

    commit 4535e1a upstream.
    
    The original version of the mitigation would patch in the calls to the
    untraining routines directly.  That is, the alternative() in UNTRAIN_RET
    will patch in the CALL to srso_alias_untrain_ret() directly.
    
    However, even if commit e7c25c4 ("x86/cpu: Cleanup the untrain
    mess") meant well in trying to clean up the situation, due to micro-
    architectural reasons, the untraining routine srso_alias_untrain_ret()
    must be the target of a CALL instruction and not of a JMP instruction as
    it is done now.
    
    Reshuffle the alternative macros to accomplish that.
    
    Fixes: e7c25c4 ("x86/cpu: Cleanup the untrain mess")
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Ingo Molnar <[email protected]>
    Cc: [email protected]
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bp3tk0v authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    23178ec View commit details
    Browse the repository at this point in the history
  54. x86/retpoline: Do the necessary fixup to the Zen3/4 srso return thunk…

    … for !SRSO
    
    commit 0e11073 upstream.
    
    The srso_alias_untrain_ret() dummy thunk in the !CONFIG_MITIGATION_SRSO
    case is there only for the altenative in CALL_UNTRAIN_RET to have
    a symbol to resolve.
    
    However, testing with kernels which don't have CONFIG_MITIGATION_SRSO
    enabled, leads to the warning in patch_return() to fire:
    
      missing return thunk: srso_alias_untrain_ret+0x0/0x10-0x0: eb 0e 66 66 2e
      WARNING: CPU: 0 PID: 0 at arch/x86/kernel/alternative.c:826 apply_returns (arch/x86/kernel/alternative.c:826
    
    Put in a plain "ret" there so that gcc doesn't put a return thunk in
    in its place which special and gets checked.
    
    In addition:
    
      ERROR: modpost: "srso_alias_untrain_ret" [arch/x86/kvm/kvm-amd.ko] undefined!
      make[2]: *** [scripts/Makefile.modpost:145: Module.symvers] Chyba 1
      make[1]: *** [/usr/src/linux-6.8.3/Makefile:1873: modpost] Chyba 2
      make: *** [Makefile:240: __sub-make] Chyba 2
    
    since !SRSO builds would use the dummy return thunk as reported by
    [email protected], https://bugzilla.kernel.org/show_bug.cgi?id=218679.
    
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-lkp/[email protected]
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bp3tk0v authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    ed37bda View commit details
    Browse the repository at this point in the history
  55. i40e: Fix VF MAC filter removal

    commit ea2a1cf upstream.
    
    Commit 73d9629 ("i40e: Do not allow untrusted VF to remove
    administratively set MAC") fixed an issue where untrusted VF was
    allowed to remove its own MAC address although this was assigned
    administratively from PF. Unfortunately the introduced check
    is wrong because it causes that MAC filters for other MAC addresses
    including multi-cast ones are not removed.
    
    <snip>
    	if (ether_addr_equal(addr, vf->default_lan_addr.addr) &&
    	    i40e_can_vf_change_mac(vf))
    		was_unimac_deleted = true;
    	else
    		continue;
    
    	if (i40e_del_mac_filter(vsi, al->list[i].addr)) {
    	...
    </snip>
    
    The else path with `continue` effectively skips any MAC filter
    removal except one for primary MAC addr when VF is allowed to do so.
    Fix the check condition so the `continue` is only done for primary
    MAC address.
    
    Fixes: 73d9629 ("i40e: Do not allow untrusted VF to remove administratively set MAC")
    Signed-off-by: Ivan Vecera <[email protected]>
    Reviewed-by: Michal Schmidt <[email protected]>
    Reviewed-by: Brett Creeley <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Ivan Vecera authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    1829b61 View commit details
    Browse the repository at this point in the history
  56. erspan: make sure erspan_base_hdr is present in skb->head

    commit 17af420 upstream.
    
    syzbot reported a problem in ip6erspan_rcv() [1]
    
    Issue is that ip6erspan_rcv() (and erspan_rcv()) no longer make
    sure erspan_base_hdr is present in skb linear part (skb->head)
    before getting @ver field from it.
    
    Add the missing pskb_may_pull() calls.
    
    v2: Reload iph pointer in erspan_rcv() after pskb_may_pull()
        because skb->head might have changed.
    
    [1]
    
     BUG: KMSAN: uninit-value in pskb_may_pull_reason include/linux/skbuff.h:2742 [inline]
     BUG: KMSAN: uninit-value in pskb_may_pull include/linux/skbuff.h:2756 [inline]
     BUG: KMSAN: uninit-value in ip6erspan_rcv net/ipv6/ip6_gre.c:541 [inline]
     BUG: KMSAN: uninit-value in gre_rcv+0x11f8/0x1930 net/ipv6/ip6_gre.c:610
      pskb_may_pull_reason include/linux/skbuff.h:2742 [inline]
      pskb_may_pull include/linux/skbuff.h:2756 [inline]
      ip6erspan_rcv net/ipv6/ip6_gre.c:541 [inline]
      gre_rcv+0x11f8/0x1930 net/ipv6/ip6_gre.c:610
      ip6_protocol_deliver_rcu+0x1d4c/0x2ca0 net/ipv6/ip6_input.c:438
      ip6_input_finish net/ipv6/ip6_input.c:483 [inline]
      NF_HOOK include/linux/netfilter.h:314 [inline]
      ip6_input+0x15d/0x430 net/ipv6/ip6_input.c:492
      ip6_mc_input+0xa7e/0xc80 net/ipv6/ip6_input.c:586
      dst_input include/net/dst.h:460 [inline]
      ip6_rcv_finish+0x955/0x970 net/ipv6/ip6_input.c:79
      NF_HOOK include/linux/netfilter.h:314 [inline]
      ipv6_rcv+0xde/0x390 net/ipv6/ip6_input.c:310
      __netif_receive_skb_one_core net/core/dev.c:5538 [inline]
      __netif_receive_skb+0x1da/0xa00 net/core/dev.c:5652
      netif_receive_skb_internal net/core/dev.c:5738 [inline]
      netif_receive_skb+0x58/0x660 net/core/dev.c:5798
      tun_rx_batched+0x3ee/0x980 drivers/net/tun.c:1549
      tun_get_user+0x5566/0x69e0 drivers/net/tun.c:2002
      tun_chr_write_iter+0x3af/0x5d0 drivers/net/tun.c:2048
      call_write_iter include/linux/fs.h:2108 [inline]
      new_sync_write fs/read_write.c:497 [inline]
      vfs_write+0xb63/0x1520 fs/read_write.c:590
      ksys_write+0x20f/0x4c0 fs/read_write.c:643
      __do_sys_write fs/read_write.c:655 [inline]
      __se_sys_write fs/read_write.c:652 [inline]
      __x64_sys_write+0x93/0xe0 fs/read_write.c:652
     do_syscall_64+0xd5/0x1f0
     entry_SYSCALL_64_after_hwframe+0x6d/0x75
    
    Uninit was created at:
      slab_post_alloc_hook mm/slub.c:3804 [inline]
      slab_alloc_node mm/slub.c:3845 [inline]
      kmem_cache_alloc_node+0x613/0xc50 mm/slub.c:3888
      kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:577
      __alloc_skb+0x35b/0x7a0 net/core/skbuff.c:668
      alloc_skb include/linux/skbuff.h:1318 [inline]
      alloc_skb_with_frags+0xc8/0xbf0 net/core/skbuff.c:6504
      sock_alloc_send_pskb+0xa81/0xbf0 net/core/sock.c:2795
      tun_alloc_skb drivers/net/tun.c:1525 [inline]
      tun_get_user+0x209a/0x69e0 drivers/net/tun.c:1846
      tun_chr_write_iter+0x3af/0x5d0 drivers/net/tun.c:2048
      call_write_iter include/linux/fs.h:2108 [inline]
      new_sync_write fs/read_write.c:497 [inline]
      vfs_write+0xb63/0x1520 fs/read_write.c:590
      ksys_write+0x20f/0x4c0 fs/read_write.c:643
      __do_sys_write fs/read_write.c:655 [inline]
      __se_sys_write fs/read_write.c:652 [inline]
      __x64_sys_write+0x93/0xe0 fs/read_write.c:652
     do_syscall_64+0xd5/0x1f0
     entry_SYSCALL_64_after_hwframe+0x6d/0x75
    
    CPU: 1 PID: 5045 Comm: syz-executor114 Not tainted 6.9.0-rc1-syzkaller-00021-g962490525cff #0
    
    Fixes: cb73ee4 ("net: ip_gre: use erspan key field for tunnel lookup")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/netdev/[email protected]/
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Lorenzo Bianconi <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Eric Dumazet authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    1db7fcb View commit details
    Browse the repository at this point in the history
  57. selftests: reuseaddr_conflict: add missing new line at the end of the…

    … output
    
    commit 3197412 upstream.
    
    The netdev CI runs in a VM and captures serial, so stdout and
    stderr get combined. Because there's a missing new line in
    stderr the test ends up corrupting KTAP:
    
      # Successok 1 selftests: net: reuseaddr_conflict
    
    which should have been:
    
      # Success
      ok 1 selftests: net: reuseaddr_conflict
    
    Fixes: 422d8dc ("selftest: add a reuseaddr test")
    Reviewed-by: Muhammad Usama Anjum <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kuba-moo authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2febb7e View commit details
    Browse the repository at this point in the history
  58. ipv6: Fix infinite recursion in fib6_dump_done().

    commit d21d406 upstream.
    
    syzkaller reported infinite recursive calls of fib6_dump_done() during
    netlink socket destruction.  [1]
    
    From the log, syzkaller sent an AF_UNSPEC RTM_GETROUTE message, and then
    the response was generated.  The following recvmmsg() resumed the dump
    for IPv6, but the first call of inet6_dump_fib() failed at kzalloc() due
    to the fault injection.  [0]
    
      12:01:34 executing program 3:
      r0 = socket$nl_route(0x10, 0x3, 0x0)
      sendmsg$nl_route(r0, ... snip ...)
      recvmmsg(r0, ... snip ...) (fail_nth: 8)
    
    Here, fib6_dump_done() was set to nlk_sk(sk)->cb.done, and the next call
    of inet6_dump_fib() set it to nlk_sk(sk)->cb.args[3].  syzkaller stopped
    receiving the response halfway through, and finally netlink_sock_destruct()
    called nlk_sk(sk)->cb.done().
    
    fib6_dump_done() calls fib6_dump_end() and nlk_sk(sk)->cb.done() if it
    is still not NULL.  fib6_dump_end() rewrites nlk_sk(sk)->cb.done() by
    nlk_sk(sk)->cb.args[3], but it has the same function, not NULL, calling
    itself recursively and hitting the stack guard page.
    
    To avoid the issue, let's set the destructor after kzalloc().
    
    [0]:
    FAULT_INJECTION: forcing a failure.
    name failslab, interval 1, probability 0, space 0, times 0
    CPU: 1 PID: 432110 Comm: syz-executor.3 Not tainted 6.8.0-12821-g537c2e91d354-dirty #11
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    Call Trace:
     <TASK>
     dump_stack_lvl (lib/dump_stack.c:117)
     should_fail_ex (lib/fault-inject.c:52 lib/fault-inject.c:153)
     should_failslab (mm/slub.c:3733)
     kmalloc_trace (mm/slub.c:3748 mm/slub.c:3827 mm/slub.c:3992)
     inet6_dump_fib (./include/linux/slab.h:628 ./include/linux/slab.h:749 net/ipv6/ip6_fib.c:662)
     rtnl_dump_all (net/core/rtnetlink.c:4029)
     netlink_dump (net/netlink/af_netlink.c:2269)
     netlink_recvmsg (net/netlink/af_netlink.c:1988)
     ____sys_recvmsg (net/socket.c:1046 net/socket.c:2801)
     ___sys_recvmsg (net/socket.c:2846)
     do_recvmmsg (net/socket.c:2943)
     __x64_sys_recvmmsg (net/socket.c:3041 net/socket.c:3034 net/socket.c:3034)
    
    [1]:
    BUG: TASK stack guard page was hit at 00000000f2fa9af1 (stack is 00000000b7912430..000000009a436beb)
    stack guard page: 0000 [#1] PREEMPT SMP KASAN
    CPU: 1 PID: 223719 Comm: kworker/1:3 Not tainted 6.8.0-12821-g537c2e91d354-dirty #11
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    Workqueue: events netlink_sock_destruct_work
    RIP: 0010:fib6_dump_done (net/ipv6/ip6_fib.c:570)
    Code: 3c 24 e8 f3 e9 51 fd e9 28 fd ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 41 57 41 56 41 55 41 54 55 48 89 fd <53> 48 8d 5d 60 e8 b6 4d 07 fd 48 89 da 48 b8 00 00 00 00 00 fc ff
    RSP: 0018:ffffc9000d980000 EFLAGS: 00010293
    RAX: 0000000000000000 RBX: ffffffff84405990 RCX: ffffffff844059d3
    RDX: ffff8881028e0000 RSI: ffffffff84405ac2 RDI: ffff88810c02f358
    RBP: ffff88810c02f358 R08: 0000000000000007 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000224 R12: 0000000000000000
    R13: ffff888007c82c78 R14: ffff888007c82c68 R15: ffff888007c82c68
    FS:  0000000000000000(0000) GS:ffff88811b100000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: ffffc9000d97fff8 CR3: 0000000102309002 CR4: 0000000000770ef0
    PKRU: 55555554
    Call Trace:
     <#DF>
     </#DF>
     <TASK>
     fib6_dump_done (net/ipv6/ip6_fib.c:572 (discriminator 1))
     fib6_dump_done (net/ipv6/ip6_fib.c:572 (discriminator 1))
     ...
     fib6_dump_done (net/ipv6/ip6_fib.c:572 (discriminator 1))
     fib6_dump_done (net/ipv6/ip6_fib.c:572 (discriminator 1))
     netlink_sock_destruct (net/netlink/af_netlink.c:401)
     __sk_destruct (net/core/sock.c:2177 (discriminator 2))
     sk_destruct (net/core/sock.c:2224)
     __sk_free (net/core/sock.c:2235)
     sk_free (net/core/sock.c:2246)
     process_one_work (kernel/workqueue.c:3259)
     worker_thread (kernel/workqueue.c:3329 kernel/workqueue.c:3416)
     kthread (kernel/kthread.c:388)
     ret_from_fork (arch/x86/kernel/process.c:153)
     ret_from_fork_asm (arch/x86/entry/entry_64.S:256)
    Modules linked in:
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Reported-by: syzkaller <[email protected]>
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Reviewed-by: David Ahern <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    q2ven authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    167d4b4 View commit details
    Browse the repository at this point in the history
  59. mlxbf_gige: stop interface during shutdown

    commit 09ba28e upstream.
    
    The mlxbf_gige driver intermittantly encounters a NULL pointer
    exception while the system is shutting down via "reboot" command.
    The mlxbf_driver will experience an exception right after executing
    its shutdown() method.  One example of this exception is:
    
    Unable to handle kernel NULL pointer dereference at virtual address 0000000000000070
    Mem abort info:
      ESR = 0x0000000096000004
      EC = 0x25: DABT (current EL), IL = 32 bits
      SET = 0, FnV = 0
      EA = 0, S1PTW = 0
      FSC = 0x04: level 0 translation fault
    Data abort info:
      ISV = 0, ISS = 0x00000004
      CM = 0, WnR = 0
    user pgtable: 4k pages, 48-bit VAs, pgdp=000000011d373000
    [0000000000000070] pgd=0000000000000000, p4d=0000000000000000
    Internal error: Oops: 96000004 [#1] SMP
    CPU: 0 PID: 13 Comm: ksoftirqd/0 Tainted: G S         OE     5.15.0-bf.6.gef6992a #1
    Hardware name: https://www.mellanox.com BlueField SoC/BlueField SoC, BIOS 4.0.2.12669 Apr 21 2023
    pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    pc : mlxbf_gige_handle_tx_complete+0xc8/0x170 [mlxbf_gige]
    lr : mlxbf_gige_poll+0x54/0x160 [mlxbf_gige]
    sp : ffff8000080d3c10
    x29: ffff8000080d3c10 x28: ffffcce72cbb7000 x27: ffff8000080d3d58
    x26: ffff0000814e7340 x25: ffff331cd1a05000 x24: ffffcce72c4ea008
    x23: ffff0000814e4b40 x22: ffff0000814e4d10 x21: ffff0000814e4128
    x20: 0000000000000000 x19: ffff0000814e4a80 x18: ffffffffffffffff
    x17: 000000000000001c x16: ffffcce72b4553f4 x15: ffff80008805b8a7
    x14: 0000000000000000 x13: 0000000000000030 x12: 0101010101010101
    x11: 7f7f7f7f7f7f7f7f x10: c2ac898b17576267 x9 : ffffcce720fa5404
    x8 : ffff000080812138 x7 : 0000000000002e9a x6 : 0000000000000080
    x5 : ffff00008de3b000 x4 : 0000000000000000 x3 : 0000000000000001
    x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
    Call trace:
     mlxbf_gige_handle_tx_complete+0xc8/0x170 [mlxbf_gige]
     mlxbf_gige_poll+0x54/0x160 [mlxbf_gige]
     __napi_poll+0x40/0x1c8
     net_rx_action+0x314/0x3a0
     __do_softirq+0x128/0x334
     run_ksoftirqd+0x54/0x6c
     smpboot_thread_fn+0x14c/0x190
     kthread+0x10c/0x110
     ret_from_fork+0x10/0x20
    Code: 8b070000 f9000ea0 f95056c0 f86178a1 (b9407002)
    ---[ end trace 7cc3941aa0d8e6a4 ]---
    Kernel panic - not syncing: Oops: Fatal exception in interrupt
    Kernel Offset: 0x4ce722520000 from 0xffff800008000000
    PHYS_OFFSET: 0x80000000
    CPU features: 0x000005c1,a3330e5a
    Memory Limit: none
    ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]---
    
    During system shutdown, the mlxbf_gige driver's shutdown() is always executed.
    However, the driver's stop() method will only execute if networking interface
    configuration logic within the Linux distribution has been setup to do so.
    
    If shutdown() executes but stop() does not execute, NAPI remains enabled
    and this can lead to an exception if NAPI is scheduled while the hardware
    interface has only been partially deinitialized.
    
    The networking interface managed by the mlxbf_gige driver must be properly
    stopped during system shutdown so that IFF_UP is cleared, the hardware
    interface is put into a clean state, and NAPI is fully deinitialized.
    
    Fixes: f92e186 ("Add Mellanox BlueField Gigabit Ethernet driver")
    Signed-off-by: David Thompson <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dthompso authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    80247e0 View commit details
    Browse the repository at this point in the history
  60. r8169: skip DASH fw status checks when DASH is disabled

    commit 5e864d9 upstream.
    
    On devices that support DASH, the current code in the "rtl_loop_wait" function
    raises false alarms when DASH is disabled. This occurs because the function
    attempts to wait for the DASH firmware to be ready, even though it's not
    relevant in this case.
    
    r8169 0000:0c:00.0 eth0: RTL8168ep/8111ep, 38:7c:76:49:08:d9, XID 502, IRQ 86
    r8169 0000:0c:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
    r8169 0000:0c:00.0 eth0: DASH disabled
    ...
    r8169 0000:0c:00.0 eth0: rtl_ep_ocp_read_cond == 0 (loop: 30, delay: 10000).
    
    This patch modifies the driver start/stop functions to skip checking the DASH
    firmware status when DASH is explicitly disabled. This prevents unnecessary
    delays and false alarms.
    
    The patch has been tested on several ThinkStation P8/PX workstations.
    
    Fixes: 0ab0c45 ("r8169: add handling DASH when DASH is disabled")
    Signed-off-by: Atlas Yu <[email protected]>
    Reviewed-by: Heiner Kallweit <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pseudocc authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    fd6692e View commit details
    Browse the repository at this point in the history
  61. udp: do not accept non-tunnel GSO skbs landing in a tunnel

    commit 3d010c8 upstream.
    
    When rx-udp-gro-forwarding is enabled UDP packets might be GROed when
    being forwarded. If such packets might land in a tunnel this can cause
    various issues and udp_gro_receive makes sure this isn't the case by
    looking for a matching socket. This is performed in
    udp4/6_gro_lookup_skb but only in the current netns. This is an issue
    with tunneled packets when the endpoint is in another netns. In such
    cases the packets will be GROed at the UDP level, which leads to various
    issues later on. The same thing can happen with rx-gro-list.
    
    We saw this with geneve packets being GROed at the UDP level. In such
    case gso_size is set; later the packet goes through the geneve rx path,
    the geneve header is pulled, the offset are adjusted and frag_list skbs
    are not adjusted with regard to geneve. When those skbs hit
    skb_fragment, it will misbehave. Different outcomes are possible
    depending on what the GROed skbs look like; from corrupted packets to
    kernel crashes.
    
    One example is a BUG_ON[1] triggered in skb_segment while processing the
    frag_list. Because gso_size is wrong (geneve header was pulled)
    skb_segment thinks there is "geneve header size" of data in frag_list,
    although it's in fact the next packet. The BUG_ON itself has nothing to
    do with the issue. This is only one of the potential issues.
    
    Looking up for a matching socket in udp_gro_receive is fragile: the
    lookup could be extended to all netns (not speaking about performances)
    but nothing prevents those packets from being modified in between and we
    could still not find a matching socket. It's OK to keep the current
    logic there as it should cover most cases but we also need to make sure
    we handle tunnel packets being GROed too early.
    
    This is done by extending the checks in udp_unexpected_gso: GSO packets
    lacking the SKB_GSO_UDP_TUNNEL/_CSUM bits and landing in a tunnel must
    be segmented.
    
    [1] kernel BUG at net/core/skbuff.c:4408!
        RIP: 0010:skb_segment+0xd2a/0xf70
        __udp_gso_segment+0xaa/0x560
    
    Fixes: 9fd1ff5 ("udp: Support UDP fraglist GRO/GSO.")
    Fixes: 3670706 ("udp: allow forwarding of plain (non-fraglisted) UDP GRO packets")
    Signed-off-by: Antoine Tenart <[email protected]>
    Reviewed-by: Willem de Bruijn <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    atenart authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    d122450 View commit details
    Browse the repository at this point in the history
  62. udp: do not transition UDP GRO fraglist partial checksums to unnecessary

    commit f0b8c30 upstream.
    
    UDP GRO validates checksums and in udp4/6_gro_complete fraglist packets
    are converted to CHECKSUM_UNNECESSARY to avoid later checks. However
    this is an issue for CHECKSUM_PARTIAL packets as they can be looped in
    an egress path and then their partial checksums are not fixed.
    
    Different issues can be observed, from invalid checksum on packets to
    traces like:
    
      gen01: hw csum failure
      skb len=3008 headroom=160 headlen=1376 tailroom=0
      mac=(106,14) net=(120,40) trans=160
      shinfo(txflags=0 nr_frags=0 gso(size=0 type=0 segs=0))
      csum(0xffff232e ip_summed=2 complete_sw=0 valid=0 level=0)
      hash(0x77e3d716 sw=1 l4=1) proto=0x86dd pkttype=0 iif=12
      ...
    
    Fix this by only converting CHECKSUM_NONE packets to
    CHECKSUM_UNNECESSARY by reusing __skb_incr_checksum_unnecessary. All
    other checksum types are kept as-is, including CHECKSUM_COMPLETE as
    fraglist packets being segmented back would have their skb->csum valid.
    
    Fixes: 9fd1ff5 ("udp: Support UDP fraglist GRO/GSO.")
    Signed-off-by: Antoine Tenart <[email protected]>
    Reviewed-by: Willem de Bruijn <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    atenart authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8c58d38 View commit details
    Browse the repository at this point in the history
  63. udp: prevent local UDP tunnel packets from being GROed

    commit 64235ea upstream.
    
    GRO has a fundamental issue with UDP tunnel packets as it can't detect
    those in a foolproof way and GRO could happen before they reach the
    tunnel endpoint. Previous commits have fixed issues when UDP tunnel
    packets come from a remote host, but if those packets are issued locally
    they could run into checksum issues.
    
    If the inner packet has a partial checksum the information will be lost
    in the GRO logic, either in udp4/6_gro_complete or in
    udp_gro_complete_segment and packets will have an invalid checksum when
    leaving the host.
    
    Prevent local UDP tunnel packets from ever being GROed at the outer UDP
    level.
    
    Due to skb->encapsulation being wrongly used in some drivers this is
    actually only preventing UDP tunnel packets with a partial checksum to
    be GROed (see iptunnel_handle_offloads) but those were also the packets
    triggering issues so in practice this should be sufficient.
    
    Fixes: 9fd1ff5 ("udp: Support UDP fraglist GRO/GSO.")
    Fixes: 3670706 ("udp: allow forwarding of plain (non-fraglisted) UDP GRO packets")
    Suggested-by: Paolo Abeni <[email protected]>
    Signed-off-by: Antoine Tenart <[email protected]>
    Reviewed-by: Willem de Bruijn <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    atenart authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    940ff35 View commit details
    Browse the repository at this point in the history
  64. octeontx2-af: Fix issue with loading coalesced KPU profiles

    commit 0ba80d9 upstream.
    
    The current implementation for loading coalesced KPU profiles has
    a limitation.  The "offset" field, which is used to locate profiles
    within the profile is restricted to a u16.
    
    This restricts the number of profiles that can be loaded. This patch
    addresses this limitation by increasing the size of the "offset" field.
    
    Fixes: 11c730b ("octeontx2-af: support for coalescing KPU profiles")
    Signed-off-by: Hariprasad Kelam <[email protected]>
    Reviewed-by: Kalesh AP <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Hariprasad Kelam authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    39efe5b View commit details
    Browse the repository at this point in the history
  65. octeontx2-pf: check negative error code in otx2_open()

    commit e709acb upstream.
    
    otx2_rxtx_enable() return negative error code such as -EIO,
    check -EIO rather than EIO to fix this problem.
    
    Fixes: c926252 ("octeontx2-pf: Disable packet I/O for graceful exit")
    Signed-off-by: Su Hui <[email protected]>
    Reviewed-by: Subbaraya Sundeep <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Reviewed-by: Kalesh AP <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Su Hui authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    e7e7030 View commit details
    Browse the repository at this point in the history
  66. octeontx2-af: Add array index check

    commit ef15dde upstream.
    
    In rvu_map_cgx_lmac_pf() the 'iter', which is used as an array index, can reach
    value (up to 14) that exceed the size (MAX_LMAC_COUNT = 8) of the array.
    Fix this bug by adding 'iter' value check.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 91c6945 ("octeontx2-af: cn10k: Add RPM MAC support")
    Signed-off-by: Aleksandr Mishin <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Aleksandr Mishin authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    d417e3c View commit details
    Browse the repository at this point in the history
  67. i40e: fix i40e_count_filters() to count only active/new filters

    commit eb58c59 upstream.
    
    The bug usually affects untrusted VFs, because they are limited to 18 MACs,
    it affects them badly, not letting to create MAC all filters.
    Not stable to reproduce, it happens when VF user creates MAC filters
    when other MACVLAN operations are happened in parallel.
    But consequence is that VF can't receive desired traffic.
    
    Fix counter to be bumped only for new or active filters.
    
    Fixes: 621650c ("i40e: Refactoring VF MAC filters counting to make more reliable")
    Signed-off-by: Aleksandr Loktionov <[email protected]>
    Reviewed-by: Arkadiusz Kubalewski <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    aloktion authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    fe74ea5 View commit details
    Browse the repository at this point in the history
  68. i40e: fix vf may be used uninitialized in this function warning

    commit f37c4ea upstream.
    
    To fix the regression introduced by commit 52424f9, which causes
    servers hang in very hard to reproduce conditions with resets races.
    Using two sources for the information is the root cause.
    In this function before the fix bumping v didn't mean bumping vf
    pointer. But the code used this variables interchangeably, so stale vf
    could point to different/not intended vf.
    
    Remove redundant "v" variable and iterate via single VF pointer across
    whole function instead to guarantee VF pointer validity.
    
    Fixes: 52424f9 ("i40e: Fix VF hang when reset is triggered on another VF")
    Signed-off-by: Aleksandr Loktionov <[email protected]>
    Reviewed-by: Arkadiusz Kubalewski <[email protected]>
    Reviewed-by: Przemek Kitszel <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    aloktion authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    3e89846 View commit details
    Browse the repository at this point in the history
  69. drm/amd: Evict resources during PM ops prepare() callback

    [ Upstream commit 5095d54 ]
    
    Linux PM core has a prepare() callback run before suspend.
    
    If the system is under high memory pressure, the resources may need
    to be evicted into swap instead.  If the storage backing for swap
    is offlined during the suspend() step then such a call may fail.
    
    So move this step into prepare() to move evict majority of
    resources and update all non-pmops callers to call the same callback.
    
    Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2362
    Reviewed-by: Christian König <[email protected]>
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Stable-dep-of: ca299b4 ("drm/amd: Flush GFXOFF requests in prepare stage")
    Signed-off-by: Sasha Levin <[email protected]>
    superm1 authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2990d8e View commit details
    Browse the repository at this point in the history
  70. drm/amd: Add concept of running prepare_suspend() sequence for IP blocks

    [ Upstream commit cb11ca3 ]
    
    If any IP blocks allocate memory during their hw_fini() sequence
    this can cause the suspend to fail under memory pressure.  Introduce
    a new phase that IP blocks can use to allocate memory before suspend
    starts so that it can potentially be evicted into swap instead.
    
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Stable-dep-of: ca299b4 ("drm/amd: Flush GFXOFF requests in prepare stage")
    Signed-off-by: Sasha Levin <[email protected]>
    superm1 authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    43df8e6 View commit details
    Browse the repository at this point in the history
  71. drm/amd: Flush GFXOFF requests in prepare stage

    [ Upstream commit ca299b4 ]
    
    If the system hasn't entered GFXOFF when suspend starts it can cause
    hangs accessing GC and RLC during the suspend stage.
    
    Cc: <[email protected]> # 6.1.y: 5095d54 ("drm/amd: Evict resources during PM ops prepare() callback")
    Cc: <[email protected]> # 6.1.y: cb11ca3 ("drm/amd: Add concept of running prepare_suspend() sequence for IP blocks")
    Cc: <[email protected]> # 6.1.y: 2ceec37 ("drm/amd: Add missing kernel doc for prepare_suspend()")
    Cc: <[email protected]> # 6.1.y: 3a9626c ("drm/amd: Stop evicting resources on APUs in suspend")
    Cc: <[email protected]> # 6.6.y: 5095d54 ("drm/amd: Evict resources during PM ops prepare() callback")
    Cc: <[email protected]> # 6.6.y: cb11ca3 ("drm/amd: Add concept of running prepare_suspend() sequence for IP blocks")
    Cc: <[email protected]> # 6.6.y: 2ceec37 ("drm/amd: Add missing kernel doc for prepare_suspend()")
    Cc: <[email protected]> # 6.6.y: 3a9626c ("drm/amd: Stop evicting resources on APUs in suspend")
    Cc: <[email protected]> # 6.1+
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3132
    Fixes: ab47503 ("drm/amdgpu/sdma5.2: add begin/end_use ring callbacks")
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    superm1 authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    810dd06 View commit details
    Browse the repository at this point in the history
  72. i40e: Store the irq number in i40e_q_vector

    [ Upstream commit 6b85a4f ]
    
    Make it easy to figure out the IRQ number for a particular i40e_q_vector by
    storing the assigned IRQ in the structure itself.
    
    Signed-off-by: Joe Damato <[email protected]>
    Acked-by: Jesse Brandeburg <[email protected]>
    Acked-by: Sridhar Samudrala <[email protected]>
    Tested-by: Gurucharan <[email protected]> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <[email protected]>
    Stable-dep-of: ea558de ("i40e: Enforce software interrupt during busy-poll exit")
    Signed-off-by: Sasha Levin <[email protected]>
    jdamato-fsly authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f3c2ceb View commit details
    Browse the repository at this point in the history
  73. i40e: Remove _t suffix from enum type names

    [ Upstream commit addca91 ]
    
    Enum type names should not be suffixed by '_t'. Either to use
    'typedef enum name name_t' to so plain 'name_t var' instead of
    'enum name_t var'.
    
    Signed-off-by: Ivan Vecera <[email protected]>
    Reviewed-by: Jacob Keller <[email protected]>
    Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: ea558de ("i40e: Enforce software interrupt during busy-poll exit")
    Signed-off-by: Sasha Levin <[email protected]>
    Ivan Vecera authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2f69536 View commit details
    Browse the repository at this point in the history
  74. i40e: Enforce software interrupt during busy-poll exit

    [ Upstream commit ea558de ]
    
    As for ice bug fixed by commit b7306b4 ("ice: manage interrupts
    during poll exit") followed by commit 23be707 ("ice: fix software
    generating extra interrupts") I'm seeing the similar issue also with
    i40e driver.
    
    In certain situation when busy-loop is enabled together with adaptive
    coalescing, the driver occasionally misses that there are outstanding
    descriptors to clean when exiting busy poll.
    
    Try to catch the remaining work by triggering a software interrupt
    when exiting busy poll. No extra interrupts will be generated when
    busy polling is not used.
    
    The issue was found when running sockperf ping-pong tcp test with
    adaptive coalescing and busy poll enabled (50 as value busy_pool
    and busy_read sysctl knobs) and results in huge latency spikes
    with more than 100000us.
    
    The fix is inspired from the ice driver and do the following:
    1) During napi poll exit in case of busy-poll (napo_complete_done()
       returns false) this is recorded to q_vector that we were in busy
       loop.
    2) Extends i40e_buildreg_itr() to be able to add an enforced software
       interrupt into built value
    2) In i40e_update_enable_itr() enforces a software interrupt trigger
       if we are exiting busy poll to catch any pending clean-ups
    3) Reuses unused 3rd ITR (interrupt throttle) index and set it to
       20K interrupts per second to limit the number of these sw interrupts.
    
    Test results
    ============
    Prior:
    [root@dell-per640-07 net]# sockperf ping-pong -i 10.9.9.1 --tcp -m 1000 --mps=max -t 120
    sockperf: == version #3.10-no.git ==
    sockperf[CLIENT] send on:sockperf: using recvfrom() to block on socket(s)
    
    [ 0] IP = 10.9.9.1        PORT = 11111 # TCP
    sockperf: Warmup stage (sending a few dummy messages)...
    sockperf: Starting test...
    sockperf: Test end (interrupted by timer)
    sockperf: Test ended
    sockperf: [Total Run] RunTime=119.999 sec; Warm up time=400 msec; SentMessages=2438563; ReceivedMessages=2438562
    sockperf: ========= Printing statistics for Server No: 0
    sockperf: [Valid Duration] RunTime=119.549 sec; SentMessages=2429473; ReceivedMessages=2429473
    sockperf: ====> avg-latency=24.571 (std-dev=93.297, mean-ad=4.904, median-ad=1.510, siqr=1.063, cv=3.797, std-error=0.060, 99.0% ci=[24.417, 24.725])
    sockperf: # dropped messages = 0; # duplicated messages = 0; # out-of-order messages = 0
    sockperf: Summary: Latency is 24.571 usec
    sockperf: Total 2429473 observations; each percentile contains 24294.73 observations
    sockperf: ---> <MAX> observation = 103294.331
    sockperf: ---> percentile 99.999 =   45.633
    sockperf: ---> percentile 99.990 =   37.013
    sockperf: ---> percentile 99.900 =   35.910
    sockperf: ---> percentile 99.000 =   33.390
    sockperf: ---> percentile 90.000 =   28.626
    sockperf: ---> percentile 75.000 =   27.741
    sockperf: ---> percentile 50.000 =   26.743
    sockperf: ---> percentile 25.000 =   25.614
    sockperf: ---> <MIN> observation =   12.220
    
    After:
    [root@dell-per640-07 net]# sockperf ping-pong -i 10.9.9.1 --tcp -m 1000 --mps=max -t 120
    sockperf: == version #3.10-no.git ==
    sockperf[CLIENT] send on:sockperf: using recvfrom() to block on socket(s)
    
    [ 0] IP = 10.9.9.1        PORT = 11111 # TCP
    sockperf: Warmup stage (sending a few dummy messages)...
    sockperf: Starting test...
    sockperf: Test end (interrupted by timer)
    sockperf: Test ended
    sockperf: [Total Run] RunTime=119.999 sec; Warm up time=400 msec; SentMessages=2400055; ReceivedMessages=2400054
    sockperf: ========= Printing statistics for Server No: 0
    sockperf: [Valid Duration] RunTime=119.549 sec; SentMessages=2391186; ReceivedMessages=2391186
    sockperf: ====> avg-latency=24.965 (std-dev=5.934, mean-ad=4.642, median-ad=1.485, siqr=1.067, cv=0.238, std-error=0.004, 99.0% ci=[24.955, 24.975])
    sockperf: # dropped messages = 0; # duplicated messages = 0; # out-of-order messages = 0
    sockperf: Summary: Latency is 24.965 usec
    sockperf: Total 2391186 observations; each percentile contains 23911.86 observations
    sockperf: ---> <MAX> observation =  195.841
    sockperf: ---> percentile 99.999 =   45.026
    sockperf: ---> percentile 99.990 =   39.009
    sockperf: ---> percentile 99.900 =   35.922
    sockperf: ---> percentile 99.000 =   33.482
    sockperf: ---> percentile 90.000 =   28.902
    sockperf: ---> percentile 75.000 =   27.821
    sockperf: ---> percentile 50.000 =   26.860
    sockperf: ---> percentile 25.000 =   25.685
    sockperf: ---> <MIN> observation =   12.277
    
    Fixes: 0bcd952 ("ethernet/intel: consolidate NAPI and NAPI exit")
    Reported-by: Hugo Ferreira <[email protected]>
    Reviewed-by: Michal Schmidt <[email protected]>
    Signed-off-by: Ivan Vecera <[email protected]>
    Reviewed-by: Jesse Brandeburg <[email protected]>
    Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ivan Vecera authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    095cfa2 View commit details
    Browse the repository at this point in the history
  75. r8169: use spinlock to protect mac ocp register access

    [ Upstream commit 91c8643 ]
    
    For disabling ASPM during NAPI poll we'll have to access mac ocp
    registers in atomic context. This could result in races because
    a mac ocp read consists of a write to register OCPDR, followed
    by a read from the same register. Therefore add a spinlock to
    protect access to mac ocp registers.
    
    Reviewed-by: Simon Horman <[email protected]>
    Tested-by: Kai-Heng Feng <[email protected]>
    Tested-by: Holger Hoffstätte <[email protected]>
    Signed-off-by: Heiner Kallweit <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: 5e864d9 ("r8169: skip DASH fw status checks when DASH is disabled")
    Signed-off-by: Sasha Levin <[email protected]>
    hkallweit authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    a33b7cb View commit details
    Browse the repository at this point in the history
  76. r8169: use spinlock to protect access to registers Config2 and Config5

    [ Upstream commit 6bc6c4e ]
    
    For disabling ASPM during NAPI poll we'll have to access both registers
    in atomic context. Use a spinlock to protect access.
    
    Reviewed-by: Simon Horman <[email protected]>
    Tested-by: Kai-Heng Feng <[email protected]>
    Tested-by: Holger Hoffstätte <[email protected]>
    Signed-off-by: Heiner Kallweit <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: 5e864d9 ("r8169: skip DASH fw status checks when DASH is disabled")
    Signed-off-by: Sasha Levin <[email protected]>
    hkallweit authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9109472 View commit details
    Browse the repository at this point in the history
  77. r8169: prepare rtl_hw_aspm_clkreq_enable for usage in atomic context

    [ Upstream commit 49ef7d8 ]
    
    Bail out if the function is used with chip versions that don't support
    ASPM configuration. In addition remove the delay, it tuned out that
    it's not needed, also vendor driver r8125 doesn't have it.
    
    Suggested-by: Kai-Heng Feng <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Tested-by: Kai-Heng Feng <[email protected]>
    Tested-by: Holger Hoffstätte <[email protected]>
    Signed-off-by: Heiner Kallweit <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: 5e864d9 ("r8169: skip DASH fw status checks when DASH is disabled")
    Signed-off-by: Sasha Levin <[email protected]>
    hkallweit authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    77db987 View commit details
    Browse the repository at this point in the history
  78. tcp: Fix bind() regression for v6-only wildcard and v4(-mapped-v6) no…

    …n-wildcard addresses.
    
    [ Upstream commit d91ef1e ]
    
    Jianguo Wu reported another bind() regression introduced by bhash2.
    
    Calling bind() for the following 3 addresses on the same port, the
    3rd one should fail but now succeeds.
    
      1. 0.0.0.0 or ::ffff:0.0.0.0
      2. [::] w/ IPV6_V6ONLY
      3. IPv4 non-wildcard address or v4-mapped-v6 non-wildcard address
    
    The first two bind() create tb2 like this:
    
      bhash2 -> tb2(:: w/ IPV6_V6ONLY) -> tb2(0.0.0.0)
    
    The 3rd bind() will match with the IPv6 only wildcard address bucket
    in inet_bind2_bucket_match_addr_any(), however, no conflicting socket
    exists in the bucket.  So, inet_bhash2_conflict() will returns false,
    and thus, inet_bhash2_addr_any_conflict() returns false consequently.
    
    As a result, the 3rd bind() bypasses conflict check, which should be
    done against the IPv4 wildcard address bucket.
    
    So, in inet_bhash2_addr_any_conflict(), we must iterate over all buckets.
    
    Note that we cannot add ipv6_only flag for inet_bind2_bucket as it
    would confuse the following patetrn.
    
      1. [::] w/ SO_REUSE{ADDR,PORT} and IPV6_V6ONLY
      2. [::] w/ SO_REUSE{ADDR,PORT}
      3. IPv4 non-wildcard address or v4-mapped-v6 non-wildcard address
    
    The first bind() would create a bucket with ipv6_only flag true,
    the second bind() would add the [::] socket into the same bucket,
    and the third bind() could succeed based on the wrong assumption
    that ipv6_only bucket would not conflict with v4(-mapped-v6) address.
    
    Fixes: 28044fc ("net: Add a bhash2 table hashed by port and address")
    Diagnosed-by: Jianguo Wu <[email protected]>
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    q2ven authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    4eed9d0 View commit details
    Browse the repository at this point in the history
  79. drivers: net: convert to boolean for the mac_managed_pm flag

    [ Upstream commit eca485d ]
    
    Signed-off-by: Dennis Kirjanov <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: cbc17e7 ("net: fec: Set mac_managed_pm during probe")
    Signed-off-by: Sasha Levin <[email protected]>
    DenisKirjanov authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    c178122 View commit details
    Browse the repository at this point in the history
  80. net: fec: Set mac_managed_pm during probe

    [ Upstream commit cbc17e7 ]
    
    Setting mac_managed_pm during interface up is too late.
    
    In situations where the link is not brought up yet and the system suspends
    the regular PHY power management will run. Since the FEC ETHEREN control
    bit is cleared (automatically) on suspend the controller is off in resume.
    When the regular PHY power management resume path runs in this context it
    will write to the MII_DATA register but nothing will be transmitted on the
    MDIO bus.
    
    This can be observed by the following log:
    
        fec 5b040000.ethernet eth0: MDIO read timeout
        Microchip LAN87xx T1 5b040000.ethernet-1:04: PM: dpm_run_callback(): mdio_bus_phy_resume+0x0/0xc8 returns -110
        Microchip LAN87xx T1 5b040000.ethernet-1:04: PM: failed to resume: error -110
    
    The data written will however remain in the MII_DATA register.
    
    When the link later is set to administrative up it will trigger a call to
    fec_restart() which will restore the MII_SPEED register. This triggers the
    quirk explained in f166f89 ("net: ethernet: fec: Replace interrupt
    driven MDIO with polled IO") causing an extra MII_EVENT.
    
    This extra event desynchronizes all the MDIO register reads, causing them
    to complete too early. Leading all reads to read as 0 because
    fec_enet_mdio_wait() returns too early.
    
    When a Microchip LAN8700R PHY is connected to the FEC, the 0 reads causes
    the PHY to be initialized incorrectly and the PHY will not transmit any
    ethernet signal in this state. It cannot be brought out of this state
    without a power cycle of the PHY.
    
    Fixes: 557d5dc ("net: fec: use mac-managed PHY PM")
    Closes: https://lore.kernel.org/netdev/[email protected]/
    Signed-off-by: Wei Fang <[email protected]>
    [jernberg: commit message]
    Signed-off-by: John Ernberg <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Wei Fang authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    b3608fe View commit details
    Browse the repository at this point in the history
  81. net: ravb: Let IP-specific receive function to interrogate descriptors

    [ Upstream commit 2b993bf ]
    
    ravb_poll() initial code used to interrogate the first descriptor of the
    RX queue in case gPTP is false to determine if ravb_rx() should be called.
    This is done for non-gPTP IPs. For gPTP IPs the driver PTP-specific
    information was used to determine if receive function should be called. As
    every IP has its own receive function that interrogates the RX descriptors
    list in the same way the ravb_poll() was doing there is no need to double
    check this in ravb_poll(). Removing the code from ravb_poll() leads to a
    cleaner code.
    
    Signed-off-by: Claudiu Beznea <[email protected]>
    Reviewed-by: Sergey Shtylyov <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    Stable-dep-of: 596a425 ("net: ravb: Always process TX descriptor ring")
    Signed-off-by: Sasha Levin <[email protected]>
    claudiubeznea authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    265a0fc View commit details
    Browse the repository at this point in the history
  82. net: ravb: Always process TX descriptor ring

    [ Upstream commit 596a425 ]
    
    The TX queue should be serviced each time the poll function is called,
    even if the full RX work budget has been consumed. This prevents
    starvation of the TX queue when RX bandwidth usage is high.
    
    Fixes: c156633 ("Renesas Ethernet AVB driver proper")
    Signed-off-by: Paul Barker <[email protected]>
    Reviewed-by: Sergey Shtylyov <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pbrkr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f9690df View commit details
    Browse the repository at this point in the history
  83. net: ravb: Always update error counters

    [ Upstream commit 101b764 ]
    
    The error statistics should be updated each time the poll function is
    called, even if the full RX work budget has been consumed. This prevents
    the counts from becoming stuck when RX bandwidth usage is high.
    
    This also ensures that error counters are not updated after we've
    re-enabled interrupts as that could result in a race condition.
    
    Also drop an unnecessary space.
    
    Fixes: c156633 ("Renesas Ethernet AVB driver proper")
    Signed-off-by: Paul Barker <[email protected]>
    Reviewed-by: Sergey Shtylyov <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pbrkr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f089d45 View commit details
    Browse the repository at this point in the history
  84. KVM: SVM: enhance info printk's in SEV init

    [ Upstream commit 6d1bc97 ]
    
    Let's print available ASID ranges for SEV/SEV-ES guests.
    This information can be useful for system administrator
    to debug if SEV/SEV-ES fails to enable.
    
    There are a few reasons.
    SEV:
    - NPT is disabled (module parameter)
    - CPU lacks some features (sev, decodeassists)
    - Maximum SEV ASID is 0
    
    SEV-ES:
    - mmio_caching is disabled (module parameter)
    - CPU lacks sev_es feature
    - Minimum SEV ASID value is 1 (can be adjusted in BIOS/UEFI)
    
    Cc: Sean Christopherson <[email protected]>
    Cc: Paolo Bonzini <[email protected]>
    Cc: Stéphane Graber <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Suggested-by: Sean Christopherson <[email protected]>
    Signed-off-by: Alexander Mikhalitsyn <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    [sean: print '0' for min SEV-ES ASID if there are no available ASIDs]
    Signed-off-by: Sean Christopherson <[email protected]>
    Stable-dep-of: 0aa6b90 ("KVM: SVM: Add support for allowing zero SEV ASIDs")
    Signed-off-by: Sasha Levin <[email protected]>
    mihalicyn authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2f7efda View commit details
    Browse the repository at this point in the history
  85. KVM: SVM: WARN, but continue, if misc_cg_set_capacity() fails

    [ Upstream commit 106ed2c ]
    
    WARN and continue if misc_cg_set_capacity() fails, as the only scenario
    in which it can fail is if the specified resource is invalid, which should
    never happen when CONFIG_KVM_AMD_SEV=y.  Deliberately not bailing "fixes"
    a theoretical bug where KVM would leak the ASID bitmaps on failure, which
    again can't happen.
    
    If the impossible should happen, the end result is effectively the same
    with respect to SEV and SEV-ES (they are unusable), while continuing on
    has the advantage of letting KVM load, i.e. userspace can still run
    non-SEV guests.
    
    Reported-by: Alexander Mikhalitsyn <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sean Christopherson <[email protected]>
    Stable-dep-of: 0aa6b90 ("KVM: SVM: Add support for allowing zero SEV ASIDs")
    Signed-off-by: Sasha Levin <[email protected]>
    sean-jc authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    815c2a1 View commit details
    Browse the repository at this point in the history
  86. KVM: SVM: Use unsigned integers when dealing with ASIDs

    [ Upstream commit 466eec4 ]
    
    Convert all local ASID variables and parameters throughout the SEV code
    from signed integers to unsigned integers.  As ASIDs are fundamentally
    unsigned values, and the global min/max variables are appropriately
    unsigned integers, too.
    
    Functionally, this is a glorified nop as KVM guarantees min_sev_asid is
    non-zero, and no CPU supports -1u as the _only_ asid, i.e. the signed vs.
    unsigned goof won't cause problems in practice.
    
    Opportunistically use sev_get_asid() in sev_flush_encrypted_page() instead
    of open coding an equivalent.
    
    Reviewed-by: Tom Lendacky <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sean Christopherson <[email protected]>
    Stable-dep-of: 0aa6b90 ("KVM: SVM: Add support for allowing zero SEV ASIDs")
    Signed-off-by: Sasha Levin <[email protected]>
    sean-jc authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2233bd5 View commit details
    Browse the repository at this point in the history
  87. KVM: SVM: Add support for allowing zero SEV ASIDs

    [ Upstream commit 0aa6b90 ]
    
    Some BIOSes allow the end user to set the minimum SEV ASID value
    (CPUID 0x8000001F_EDX) to be greater than the maximum number of
    encrypted guests, or maximum SEV ASID value (CPUID 0x8000001F_ECX)
    in order to dedicate all the SEV ASIDs to SEV-ES or SEV-SNP.
    
    The SEV support, as coded, does not handle the case where the minimum
    SEV ASID value can be greater than the maximum SEV ASID value.
    As a result, the following confusing message is issued:
    
    [   30.715724] kvm_amd: SEV enabled (ASIDs 1007 - 1006)
    
    Fix the support to properly handle this case.
    
    Fixes: 916391a ("KVM: SVM: Add support for SEV-ES capability in KVM")
    Suggested-by: Sean Christopherson <[email protected]>
    Signed-off-by: Ashish Kalra <[email protected]>
    Cc: [email protected]
    Acked-by: Tom Lendacky <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sean Christopherson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ashkalra authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    4af6d5b View commit details
    Browse the repository at this point in the history
  88. fs/pipe: Fix lockdep false-positive in watchqueue pipe_write()

    [ Upstream commit 055ca83 ]
    
    When you try to splice between a normal pipe and a notification pipe,
    get_pipe_info(..., true) fails, so splice() falls back to treating the
    notification pipe like a normal pipe - so we end up in
    iter_file_splice_write(), which first locks the input pipe, then calls
    vfs_iter_write(), which locks the output pipe.
    
    Lockdep complains about that, because we're taking a pipe lock while
    already holding another pipe lock.
    
    I think this probably (?) can't actually lead to deadlocks, since you'd
    need another way to nest locking a normal pipe into locking a
    watch_queue pipe, but the lockdep annotations don't make that clear.
    
    Bail out earlier in pipe_write() for notification pipes, before taking
    the pipe lock.
    
    Reported-and-tested-by: <[email protected]>
    Closes: https://syzkaller.appspot.com/bug?extid=011e4ea1da6692cf881c
    Fixes: c73be61 ("pipe: Add general notification queue support")
    Signed-off-by: Jann Horn <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Christian Brauner <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    thejh authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    90a477d View commit details
    Browse the repository at this point in the history
  89. 9p: Fix read/write debug statements to report server reply

    [ Upstream commit be3193e ]
    
    Previous conversion to iov missed these debug statements which would now
    always print the requested size instead of the actual server reply.
    
    Write also added a loop in a much older commit but we didn't report
    these, while reads do report each iteration -- it's more coherent to
    keep reporting all requests to server so move that at the same time.
    
    Fixes: 7f02464 ("9p: convert to advancing variant of iov_iter_get_pages_alloc()")
    Signed-off-by: Dominique Martinet <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    martinetd authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    d00c24d View commit details
    Browse the repository at this point in the history
  90. drivers/perf: riscv: Disable PERF_SAMPLE_BRANCH_* while not supported

    [ Upstream commit ea68731 ]
    
    RISC-V perf driver does not yet support branch sampling. Although the
    specification is in the works [0], it is best to disable such events
    until support is available, otherwise we will get unexpected results.
    Due to this reason, two riscv bpf testcases get_branch_snapshot and
    perf_branches/perf_branches_hw fail.
    
    Link: https://github.com/riscv/riscv-control-transfer-records [0]
    Fixes: f5bfa23 ("RISC-V: Add a perf core library for pmu drivers")
    Signed-off-by: Pu Lehui <[email protected]>
    Reviewed-by: Atish Patra <[email protected]>
    Reviewed-by: Conor Dooley <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Pu Lehui authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    81f7c9d View commit details
    Browse the repository at this point in the history
  91. drm/panfrost: fix power transition timeout warnings

    [ Upstream commit 2bd02f5 ]
    
    Increase the timeout value to prevent system logs on Amlogic boards flooding
    with power transition warnings:
    
    [   13.047638] panfrost ffe40000.gpu: shader power transition timeout
    [   13.048674] panfrost ffe40000.gpu: l2 power transition timeout
    [   13.937324] panfrost ffe40000.gpu: shader power transition timeout
    [   13.938351] panfrost ffe40000.gpu: l2 power transition timeout
    ...
    [39829.506904] panfrost ffe40000.gpu: shader power transition timeout
    [39829.507938] panfrost ffe40000.gpu: l2 power transition timeout
    [39949.508369] panfrost ffe40000.gpu: shader power transition timeout
    [39949.509405] panfrost ffe40000.gpu: l2 power transition timeout
    
    The 2000 value has been found through trial and error testing with devices
    using G52 and G31 GPUs.
    
    Fixes: 22aa1a2 ("drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off()")
    Signed-off-by: Christian Hewitt <[email protected]>
    Reviewed-by: Steven Price <[email protected]>
    Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
    Signed-off-by: Steven Price <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    chewitt authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    392c47f View commit details
    Browse the repository at this point in the history
  92. ASoC: rt5682-sdw: fix locking sequence

    [ Upstream commit 310a5ca ]
    
    The disable_irq_lock protects the 'disable_irq' value, we need to lock
    before testing it.
    
    Fixes: 02fb23d ("ASoC: rt5682-sdw: fix for JD event handling in ClockStop Mode0")
    Signed-off-by: Pierre-Louis Bossart <[email protected]>
    Reviewed-by: Bard Liao <[email protected]>
    Reviewed-by: Chao Song <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    plbossart authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    eb028d1 View commit details
    Browse the repository at this point in the history
  93. ASoC: rt711-sdca: fix locking sequence

    [ Upstream commit ee28777 ]
    
    The disable_irq_lock protects the 'disable_irq' value, we need to lock
    before testing it.
    
    Fixes: 23adeb7 ("ASoC: rt711-sdca: fix for JD event handling in ClockStop Mode0")
    Signed-off-by: Pierre-Louis Bossart <[email protected]>
    Reviewed-by: Bard Liao <[email protected]>
    Reviewed-by: Chao Song <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    plbossart authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    044c34f View commit details
    Browse the repository at this point in the history
  94. ASoC: rt711-sdw: fix locking sequence

    [ Upstream commit aae86cf ]
    
    The disable_irq_lock protects the 'disable_irq' value, we need to lock
    before testing it.
    
    Fixes: b69de26 ("ASoC: rt711: fix for JD event handling in ClockStop Mode0")
    Signed-off-by: Pierre-Louis Bossart <[email protected]>
    Reviewed-by: Bard Liao <[email protected]>
    Reviewed-by: Chao Song <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    plbossart authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    4ff3d8a View commit details
    Browse the repository at this point in the history
  95. ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw

    [ Upstream commit fc563aa ]
    
    In snd_soc_info_volsw(), mask is generated by figuring out the index of
    the most significant bit set in max and converting the index to a
    bitmask through bit shift 1. Unintended wraparound occurs when max is an
    integer value with msb bit set. Since the bit shift value 1 is treated
    as an integer type, the left shift operation will wraparound and set
    mask to 0 instead of all 1's. In order to fix this, we type cast 1 as
    `1ULL` to prevent the wraparound.
    
    Fixes: 7077148 ("ASoC: core: Split ops out of soc-core.c")
    Signed-off-by: Stephen Lee <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Stephen Lee authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    7ff957c View commit details
    Browse the repository at this point in the history
  96. ata: sata_sx4: fix pdc20621_get_from_dimm() on 64-bit

    [ Upstream commit 52f80bb ]
    
    gcc warns about a memcpy() with overlapping pointers because of an
    incorrect size calculation:
    
    In file included from include/linux/string.h:369,
                     from drivers/ata/sata_sx4.c:66:
    In function 'memcpy_fromio',
        inlined from 'pdc20621_get_from_dimm.constprop' at drivers/ata/sata_sx4.c:962:2:
    include/linux/fortify-string.h:97:33: error: '__builtin_memcpy' accessing 4294934464 bytes at offsets 0 and [16, 16400] overlaps 6442385281 bytes at offset -2147450817 [-Werror=restrict]
       97 | #define __underlying_memcpy     __builtin_memcpy
          |                                 ^
    include/linux/fortify-string.h:620:9: note: in expansion of macro '__underlying_memcpy'
      620 |         __underlying_##op(p, q, __fortify_size);                        \
          |         ^~~~~~~~~~~~~
    include/linux/fortify-string.h:665:26: note: in expansion of macro '__fortify_memcpy_chk'
      665 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
          |                          ^~~~~~~~~~~~~~~~~~~~
    include/asm-generic/io.h:1184:9: note: in expansion of macro 'memcpy'
     1184 |         memcpy(buffer, __io_virt(addr), size);
          |         ^~~~~~
    
    The problem here is the overflow of an unsigned 32-bit number to a
    negative that gets converted into a signed 'long', keeping a large
    positive number.
    
    Replace the complex calculation with a more readable min() variant
    that avoids the warning.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    arndb authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    7171d6a View commit details
    Browse the repository at this point in the history
  97. scsi: mylex: Fix sysfs buffer lengths

    [ Upstream commit 1197c5b ]
    
    The myrb and myrs drivers use an odd way of implementing their sysfs files,
    calling snprintf() with a fixed length of 32 bytes to print into a page
    sized buffer. One of the strings is actually longer than 32 bytes, which
    clang can warn about:
    
    drivers/scsi/myrb.c:1906:10: error: 'snprintf' will always be truncated; specified size is 32, but format string expands to at least 34 [-Werror,-Wformat-truncation]
    drivers/scsi/myrs.c:1089:10: error: 'snprintf' will always be truncated; specified size is 32, but format string expands to at least 34 [-Werror,-Wformat-truncation]
    
    These could all be plain sprintf() without a length as the buffer is always
    long enough. On the other hand, sysfs files should not be overly long
    either, so just double the length to make sure the longest strings don't
    get truncated here.
    
    Fixes: 7726618 ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
    Fixes: 081ff39 ("scsi: myrb: Add Mylex RAID controller (block interface)")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hannes Reinecke <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    arndb authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    4b87c1b View commit details
    Browse the repository at this point in the history
  98. scsi: sd: Unregister device if device_add_disk() failed in sd_probe()

    [ Upstream commit 0296bea ]
    
    "if device_add() succeeds, you should call device_del() when you want to
    get rid of it."
    
    In sd_probe(), device_add_disk() fails when device_add() has already
    succeeded, so change put_device() to device_unregister() to ensure device
    resources are released.
    
    Fixes: 2a7a891 ("scsi: sd: Add error handling support for add_disk()")
    Signed-off-by: Li Nan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Bart Van Assche <[email protected]>
    Reviewed-by: Yu Kuai <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Li Nan authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9adcfd5 View commit details
    Browse the repository at this point in the history
  99. cifs: Fix caching to try to do open O_WRONLY as rdwr on server

    [ Upstream commit e9e6224 ]
    
    When we're engaged in local caching of a cifs filesystem, we cannot perform
    caching of a partially written cache granule unless we can read the rest of
    the granule.  This can result in unexpected access errors being reported to
    the user.
    
    Fix this by the following: if a file is opened O_WRONLY locally, but the
    mount was given the "-o fsc" flag, try first opening the remote file with
    GENERIC_READ|GENERIC_WRITE and if that returns -EACCES, try dropping the
    GENERIC_READ and doing the open again.  If that last succeeds, invalidate
    the cache for that file as for O_DIRECT.
    
    Fixes: 70431bf ("cifs: Support fscache indexing rewrite")
    Signed-off-by: David Howells <[email protected]>
    cc: Steve French <[email protected]>
    cc: Shyam Prasad N <[email protected]>
    cc: Rohith Surabattula <[email protected]>
    cc: Jeff Layton <[email protected]>
    cc: [email protected]
    cc: [email protected]
    cc: [email protected]
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dhowells authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    78942ac View commit details
    Browse the repository at this point in the history
  100. ata: sata_mv: Fix PCI device ID table declaration compilation warning

    [ Upstream commit 3137b83 ]
    
    Building with W=1 shows a warning for an unused variable when CONFIG_PCI
    is diabled:
    
    drivers/ata/sata_mv.c:790:35: error: unused variable 'mv_pci_tbl' [-Werror,-Wunused-const-variable]
    static const struct pci_device_id mv_pci_tbl[] = {
    
    Move the table into the same block that containsn the pci_driver
    definition.
    
    Fixes: 7bb3c52 ("sata_mv: Remove PCI dependency")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    arndb authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    12059cf View commit details
    Browse the repository at this point in the history
  101. nfsd: hold a lighter-weight client reference over CB_RECALL_ANY

    [ Upstream commit 10396f4 ]
    
    Currently the CB_RECALL_ANY job takes a cl_rpc_users reference to the
    client. While a callback job is technically an RPC that counter is
    really more for client-driven RPCs, and this has the effect of
    preventing the client from being unhashed until the callback completes.
    
    If nfsd decides to send a CB_RECALL_ANY just as the client reboots, we
    can end up in a situation where the callback can't complete on the (now
    dead) callback channel, but the new client can't connect because the old
    client can't be unhashed. This usually manifests as a NFS4ERR_DELAY
    return on the CREATE_SESSION operation.
    
    The job is only holding a reference to the client so it can clear a flag
    after the RPC completes. Fix this by having CB_RECALL_ANY instead hold a
    reference to the cl_nfsdfs.cl_ref. Typically we only take that sort of
    reference when dealing with the nfsdfs info files, but it should work
    appropriately here to ensure that the nfs4_client doesn't disappear.
    
    Fixes: 44df6f4 ("NFSD: add delegation reaper to react to low memory condition")
    Reported-by: Vladimir Benes <[email protected]>
    Signed-off-by: Jeff Layton <[email protected]>
    Signed-off-by: Chuck Lever <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jtlayton authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    c19715e View commit details
    Browse the repository at this point in the history
  102. x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk

    commit b377c66 upstream.
    
    srso_alias_untrain_ret() is special code, even if it is a dummy
    which is called in the !SRSO case, so annotate it like its real
    counterpart, to address the following objtool splat:
    
      vmlinux.o: warning: objtool: .export_symbol+0x2b290: data relocation to !ENDBR: srso_alias_untrain_ret+0x0
    
    Fixes: 4535e1a ("x86/bugs: Fix the SRSO mitigation on Zen3/4")
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Cc: Linus Torvalds <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bp3tk0v authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    7ef6a7f View commit details
    Browse the repository at this point in the history
  103. ksmbd: don't send oplock break if rename fails

    commit c1832f6 upstream.
    
    Don't send oplock break if rename fails. This patch fix
    smb2.oplock.batch20 test.
    
    Cc: [email protected]
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    namjaejeon authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2e5f8dc View commit details
    Browse the repository at this point in the history
  104. ksmbd: validate payload size in ipc response

    commit a677ebd upstream.
    
    If installing malicious ksmbd-tools, ksmbd.mountd can return invalid ipc
    response to ksmbd kernel server. ksmbd should validate payload size of
    ipc response from ksmbd.mountd to avoid memory overrun or
    slab-out-of-bounds. This patch validate 3 ipc response that has payload.
    
    Cc: [email protected]
    Reported-by: Chao Ma <[email protected]>
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    namjaejeon authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    51a6c2a View commit details
    Browse the repository at this point in the history
  105. ksmbd: do not set SMB2_GLOBAL_CAP_ENCRYPTION for SMB 3.1.1

    commit 5ed11af upstream.
    
    SMB2_GLOBAL_CAP_ENCRYPTION flag should be used only for 3.0 and
    3.0.2 dialects. This flags set cause compatibility problems with
    other SMB clients.
    
    Reported-by: James Christopher Adduono <[email protected]>
    Tested-by: James Christopher Adduono <[email protected]>
    Cc: [email protected]
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    namjaejeon authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    883e072 View commit details
    Browse the repository at this point in the history
  106. ALSA: hda/realtek - Fix inactive headset mic jack

    commit daf6c46 upstream.
    
    This patch adds the existing fixup to certain TF platforms implementing
    the ALC274 codec with a headset jack. It fixes/activates the inactive
    microphone of the headset.
    
    Signed-off-by: Christoffer Sandberg <[email protected]>
    Signed-off-by: Werner Sembach <[email protected]>
    Cc: <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tuxedoxt authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2ff8f06 View commit details
    Browse the repository at this point in the history
  107. ALSA: hda/realtek: Update Panasonic CF-SZ6 quirk to support headset w…

    …ith microphone
    
    commit 1576f26 upstream.
    
    This patch addresses an issue with the Panasonic CF-SZ6's existing quirk,
    specifically its headset microphone functionality. Previously, the quirk
    used ALC269_FIXUP_HEADSET_MODE, which does not support the CF-SZ6's design
    of a single 3.5mm jack for both mic and audio output effectively. The
    device uses pin 0x19 for the headset mic without jack detection.
    
    Following verification on the CF-SZ6 and discussions with the original
    patch author, i determined that the update to
    ALC269_FIXUP_ASPIRE_HEADSET_MIC is the appropriate solution. This change
    is custom-designed for the CF-SZ6's unique hardware setup, which includes
    a single 3.5mm jack for both mic and audio output, connecting the headset
    microphone to pin 0x19 without the use of jack detection.
    
    Fixes: 0fca97a ("ALSA: hda/realtek - Add Panasonic CF-SZ6 headset jack quirk")
    Signed-off-by: I Gede Agastya Darma Laksana <[email protected]>
    Cc: <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gedeagas authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f35d7ed View commit details
    Browse the repository at this point in the history
  108. driver core: Introduce device_link_wait_removal()

    commit 0462c56 upstream.
    
    The commit 80dd33c ("drivers: base: Fix device link removal")
    introduces a workqueue to release the consumer and supplier devices used
    in the devlink.
    In the job queued, devices are release and in turn, when all the
    references to these devices are dropped, the release function of the
    device itself is called.
    
    Nothing is present to provide some synchronisation with this workqueue
    in order to ensure that all ongoing releasing operations are done and
    so, some other operations can be started safely.
    
    For instance, in the following sequence:
      1) of_platform_depopulate()
      2) of_overlay_remove()
    
    During the step 1, devices are released and related devlinks are removed
    (jobs pushed in the workqueue).
    During the step 2, OF nodes are destroyed but, without any
    synchronisation with devlink removal jobs, of_overlay_remove() can raise
    warnings related to missing of_node_put():
      ERROR: memory leak, expected refcount 1 instead of 2
    
    Indeed, the missing of_node_put() call is going to be done, too late,
    from the workqueue job execution.
    
    Introduce device_link_wait_removal() to offer a way to synchronize
    operations waiting for the end of devlink removals (i.e. end of
    workqueue jobs).
    Also, as a flushing operation is done on the workqueue, the workqueue
    used is moved from a system-wide workqueue to a local one.
    
    Cc: [email protected]
    Signed-off-by: Herve Codina <[email protected]>
    Tested-by: Luca Ceresoli <[email protected]>
    Reviewed-by: Nuno Sa <[email protected]>
    Reviewed-by: Saravana Kannan <[email protected]>
    Acked-by: Greg Kroah-Hartman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Rob Herring <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hcodina authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9406d59 View commit details
    Browse the repository at this point in the history
  109. of: dynamic: Synchronize of_changeset_destroy() with the devlink remo…

    …vals
    
    commit 8917e73 upstream.
    
    In the following sequence:
      1) of_platform_depopulate()
      2) of_overlay_remove()
    
    During the step 1, devices are destroyed and devlinks are removed.
    During the step 2, OF nodes are destroyed but
    __of_changeset_entry_destroy() can raise warnings related to missing
    of_node_put():
      ERROR: memory leak, expected refcount 1 instead of 2 ...
    
    Indeed, during the devlink removals performed at step 1, the removal
    itself releasing the device (and the attached of_node) is done by a job
    queued in a workqueue and so, it is done asynchronously with respect to
    function calls.
    When the warning is present, of_node_put() will be called but wrongly
    too late from the workqueue job.
    
    In order to be sure that any ongoing devlink removals are done before
    the of_node destruction, synchronize the of_changeset_destroy() with the
    devlink removals.
    
    Fixes: 80dd33c ("drivers: base: Fix device link removal")
    Cc: [email protected]
    Signed-off-by: Herve Codina <[email protected]>
    Reviewed-by: Saravana Kannan <[email protected]>
    Tested-by: Luca Ceresoli <[email protected]>
    Reviewed-by: Nuno Sa <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Rob Herring <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    hcodina authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    7b6df05 View commit details
    Browse the repository at this point in the history
  110. x86/mm/pat: fix VM_PAT handling in COW mappings

    commit 04c35ab upstream.
    
    PAT handling won't do the right thing in COW mappings: the first PTE (or,
    in fact, all PTEs) can be replaced during write faults to point at anon
    folios.  Reliably recovering the correct PFN and cachemode using
    follow_phys() from PTEs will not work in COW mappings.
    
    Using follow_phys(), we might just get the address+protection of the anon
    folio (which is very wrong), or fail on swap/nonswap entries, failing
    follow_phys() and triggering a WARN_ON_ONCE() in untrack_pfn() and
    track_pfn_copy(), not properly calling free_pfn_range().
    
    In free_pfn_range(), we either wouldn't call memtype_free() or would call
    it with the wrong range, possibly leaking memory.
    
    To fix that, let's update follow_phys() to refuse returning anon folios,
    and fallback to using the stored PFN inside vma->vm_pgoff for COW mappings
    if we run into that.
    
    We will now properly handle untrack_pfn() with COW mappings, where we
    don't need the cachemode.  We'll have to fail fork()->track_pfn_copy() if
    the first page was replaced by an anon folio, though: we'd have to store
    the cachemode in the VMA to make this work, likely growing the VMA size.
    
    For now, lets keep it simple and let track_pfn_copy() just fail in that
    case: it would have failed in the past with swap/nonswap entries already,
    and it would have done the wrong thing with anon folios.
    
    Simple reproducer to trigger the WARN_ON_ONCE() in untrack_pfn():
    
    <--- C reproducer --->
     #include <stdio.h>
     #include <sys/mman.h>
     #include <unistd.h>
     #include <liburing.h>
    
     int main(void)
     {
             struct io_uring_params p = {};
             int ring_fd;
             size_t size;
             char *map;
    
             ring_fd = io_uring_setup(1, &p);
             if (ring_fd < 0) {
                     perror("io_uring_setup");
                     return 1;
             }
             size = p.sq_off.array + p.sq_entries * sizeof(unsigned);
    
             /* Map the submission queue ring MAP_PRIVATE */
             map = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
                        ring_fd, IORING_OFF_SQ_RING);
             if (map == MAP_FAILED) {
                     perror("mmap");
                     return 1;
             }
    
             /* We have at least one page. Let's COW it. */
             *map = 0;
             pause();
             return 0;
     }
    <--- C reproducer --->
    
    On a system with 16 GiB RAM and swap configured:
     # ./iouring &
     # memhog 16G
     # killall iouring
    [  301.552930] ------------[ cut here ]------------
    [  301.553285] WARNING: CPU: 7 PID: 1402 at arch/x86/mm/pat/memtype.c:1060 untrack_pfn+0xf4/0x100
    [  301.553989] Modules linked in: binfmt_misc nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_g
    [  301.558232] CPU: 7 PID: 1402 Comm: iouring Not tainted 6.7.5-100.fc38.x86_64 #1
    [  301.558772] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebu4
    [  301.559569] RIP: 0010:untrack_pfn+0xf4/0x100
    [  301.559893] Code: 75 c4 eb cf 48 8b 43 10 8b a8 e8 00 00 00 3b 6b 28 74 b8 48 8b 7b 30 e8 ea 1a f7 000
    [  301.561189] RSP: 0018:ffffba2c0377fab8 EFLAGS: 00010282
    [  301.561590] RAX: 00000000ffffffea RBX: ffff9208c8ce9cc0 RCX: 000000010455e047
    [  301.562105] RDX: 07fffffff0eb1e0a RSI: 0000000000000000 RDI: ffff9208c391d200
    [  301.562628] RBP: 0000000000000000 R08: ffffba2c0377fab8 R09: 0000000000000000
    [  301.563145] R10: ffff9208d2292d50 R11: 0000000000000002 R12: 00007fea890e0000
    [  301.563669] R13: 0000000000000000 R14: ffffba2c0377fc08 R15: 0000000000000000
    [  301.564186] FS:  0000000000000000(0000) GS:ffff920c2fbc0000(0000) knlGS:0000000000000000
    [  301.564773] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  301.565197] CR2: 00007fea88ee8a20 CR3: 00000001033a8000 CR4: 0000000000750ef0
    [  301.565725] PKRU: 55555554
    [  301.565944] Call Trace:
    [  301.566148]  <TASK>
    [  301.566325]  ? untrack_pfn+0xf4/0x100
    [  301.566618]  ? __warn+0x81/0x130
    [  301.566876]  ? untrack_pfn+0xf4/0x100
    [  301.567163]  ? report_bug+0x171/0x1a0
    [  301.567466]  ? handle_bug+0x3c/0x80
    [  301.567743]  ? exc_invalid_op+0x17/0x70
    [  301.568038]  ? asm_exc_invalid_op+0x1a/0x20
    [  301.568363]  ? untrack_pfn+0xf4/0x100
    [  301.568660]  ? untrack_pfn+0x65/0x100
    [  301.568947]  unmap_single_vma+0xa6/0xe0
    [  301.569247]  unmap_vmas+0xb5/0x190
    [  301.569532]  exit_mmap+0xec/0x340
    [  301.569801]  __mmput+0x3e/0x130
    [  301.570051]  do_exit+0x305/0xaf0
    ...
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: David Hildenbrand <[email protected]>
    Reported-by: Wupeng Ma <[email protected]>
    Closes: https://lkml.kernel.org/r/[email protected]
    Fixes: b1a86e1 ("x86, pat: remove the dependency on 'vm_pgoff' in track/untrack pfn vma routines")
    Fixes: 5899329 ("x86: PAT: implement track/untrack of pfnmap regions for x86 - v3")
    Acked-by: Ingo Molnar <[email protected]>
    Cc: Dave Hansen <[email protected]>
    Cc: Andy Lutomirski <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Thomas Gleixner <[email protected]>
    Cc: Borislav Petkov <[email protected]>
    Cc: "H. Peter Anvin" <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    davidhildenbrand authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    97e9336 View commit details
    Browse the repository at this point in the history
  111. x86/mce: Make sure to grab mce_sysfs_mutex in set_bank()

    commit 3ddf944 upstream.
    
    Modifying a MCA bank's MCA_CTL bits which control which error types to
    be reported is done over
    
      /sys/devices/system/machinecheck/
      ├── machinecheck0
      │   ├── bank0
      │   ├── bank1
      │   ├── bank10
      │   ├── bank11
      ...
    
    sysfs nodes by writing the new bit mask of events to enable.
    
    When the write is accepted, the kernel deletes all current timers and
    reinits all banks.
    
    Doing that in parallel can lead to initializing a timer which is already
    armed and in the timer wheel, i.e., in use already:
    
      ODEBUG: init active (active state 0) object: ffff888063a28000 object
      type: timer_list hint: mce_timer_fn+0x0/0x240 arch/x86/kernel/cpu/mce/core.c:2642
      WARNING: CPU: 0 PID: 8120 at lib/debugobjects.c:514
      debug_print_object+0x1a0/0x2a0 lib/debugobjects.c:514
    
    Fix that by grabbing the sysfs mutex as the rest of the MCA sysfs code
    does.
    
    Reported by: Yue Sun <[email protected]>
    Reported by: xingwei lee <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/CAEkJfYNiENwQY8yV1LYJ9LjJs%[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bp3tk0v authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    20a9151 View commit details
    Browse the repository at this point in the history
  112. x86/coco: Require seeding RNG with RDRAND on CoCo systems

    commit 99485c4 upstream.
    
    There are few uses of CoCo that don't rely on working cryptography and
    hence a working RNG. Unfortunately, the CoCo threat model means that the
    VM host cannot be trusted and may actively work against guests to
    extract secrets or manipulate computation. Since a malicious host can
    modify or observe nearly all inputs to guests, the only remaining source
    of entropy for CoCo guests is RDRAND.
    
    If RDRAND is broken -- due to CPU hardware fault -- the RNG as a whole
    is meant to gracefully continue on gathering entropy from other sources,
    but since there aren't other sources on CoCo, this is catastrophic.
    This is mostly a concern at boot time when initially seeding the RNG, as
    after that the consequences of a broken RDRAND are much more
    theoretical.
    
    So, try at boot to seed the RNG using 256 bits of RDRAND output. If this
    fails, panic(). This will also trigger if the system is booted without
    RDRAND, as RDRAND is essential for a safe CoCo boot.
    
    Add this deliberately to be "just a CoCo x86 driver feature" and not
    part of the RNG itself. Many device drivers and platforms have some
    desire to contribute something to the RNG, and add_device_randomness()
    is specifically meant for this purpose.
    
    Any driver can call it with seed data of any quality, or even garbage
    quality, and it can only possibly make the quality of the RNG better or
    have no effect, but can never make it worse.
    
    Rather than trying to build something into the core of the RNG, consider
    the particular CoCo issue just a CoCo issue, and therefore separate it
    all out into driver (well, arch/platform) code.
    
      [ bp: Massage commit message. ]
    
    Signed-off-by: Jason A. Donenfeld <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Elena Reshetova <[email protected]>
    Reviewed-by: Kirill A. Shutemov <[email protected]>
    Reviewed-by: Theodore Ts'o <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    zx2c4 authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    22943e4 View commit details
    Browse the repository at this point in the history
  113. s390/entry: align system call table on 8 bytes

    commit 378ca2d upstream.
    
    Align system call table on 8 bytes. With sys_call_table entry size
    of 8 bytes that eliminates the possibility of a system call pointer
    crossing cache line boundary.
    
    Cc: [email protected]
    Suggested-by: Ulrich Weigand <[email protected]>
    Reviewed-by: Alexander Gordeev <[email protected]>
    Signed-off-by: Sumanth Korikkar <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sumanthkorikkar authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    447d844 View commit details
    Browse the repository at this point in the history
  114. riscv: Fix spurious errors from __get/put_kernel_nofault

    commit d080a08 upstream.
    
    These macros did not initialize __kr_err, so they could fail even if
    the access did not fault.
    
    Cc: [email protected]
    Fixes: d464118 ("riscv: implement __get_kernel_nofault and __put_user_nofault")
    Signed-off-by: Samuel Holland <[email protected]>
    Reviewed-by: Alexandre Ghiti <[email protected]>
    Reviewed-by: Charlie Jenkins <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    SiFiveHolland authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    c88f7a7 View commit details
    Browse the repository at this point in the history
  115. riscv: process: Fix kernel gp leakage

    commit d14fa1f upstream.
    
    childregs represents the registers which are active for the new thread
    in user context. For a kernel thread, childregs->gp is never used since
    the kernel gp is not touched by switch_to. For a user mode helper, the
    gp value can be observed in user space after execve or possibly by other
    means.
    
    [From the email thread]
    
    The /* Kernel thread */ comment is somewhat inaccurate in that it is also used
    for user_mode_helper threads, which exec a user process, e.g. /sbin/init or
    when /proc/sys/kernel/core_pattern is a pipe. Such threads do not have
    PF_KTHREAD set and are valid targets for ptrace etc. even before they exec.
    
    childregs is the *user* context during syscall execution and it is observable
    from userspace in at least five ways:
    
    1. kernel_execve does not currently clear integer registers, so the starting
       register state for PID 1 and other user processes started by the kernel has
       sp = user stack, gp = kernel __global_pointer$, all other integer registers
       zeroed by the memset in the patch comment.
    
       This is a bug in its own right, but I'm unwilling to bet that it is the only
       way to exploit the issue addressed by this patch.
    
    2. ptrace(PTRACE_GETREGSET): you can PTRACE_ATTACH to a user_mode_helper thread
       before it execs, but ptrace requires SIGSTOP to be delivered which can only
       happen at user/kernel boundaries.
    
    3. /proc/*/task/*/syscall: this is perfectly happy to read pt_regs for
       user_mode_helpers before the exec completes, but gp is not one of the
       registers it returns.
    
    4. PERF_SAMPLE_REGS_USER: LOCKDOWN_PERF normally prevents access to kernel
       addresses via PERF_SAMPLE_REGS_INTR, but due to this bug kernel addresses
       are also exposed via PERF_SAMPLE_REGS_USER which is permitted under
       LOCKDOWN_PERF. I have not attempted to write exploit code.
    
    5. Much of the tracing infrastructure allows access to user registers. I have
       not attempted to determine which forms of tracing allow access to user
       registers without already allowing access to kernel registers.
    
    Fixes: 7db91e5 ("RISC-V: Task implementation")
    Cc: [email protected]
    Signed-off-by: Stefan O'Rear <[email protected]>
    Reviewed-by: Alexandre Ghiti <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sorear authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f658344 View commit details
    Browse the repository at this point in the history
  116. smb3: retrying on failed server close

    commit 173217b upstream.
    
    In the current implementation, CIFS close sends a close to the
    server and does not check for the success of the server close.
    This patch adds functionality to check for server close return
    status and retries in case of an EBUSY or EAGAIN error.
    
    This can help avoid handle leaks
    
    Cc: [email protected]
    Signed-off-by: Ritvik Budhiraja <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ritbudhiraja authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8c99dfb View commit details
    Browse the repository at this point in the history
  117. smb: client: fix potential UAF in cifs_debug_files_proc_show()

    commit ca545b7 upstream.
    
    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    2290423 View commit details
    Browse the repository at this point in the history
  118. smb: client: fix potential UAF in cifs_stats_proc_write()

    commit d3da25c upstream.
    
    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8fefd16 View commit details
    Browse the repository at this point in the history
  119. smb: client: fix potential UAF in cifs_stats_proc_show()

    commit 0865ffe upstream.
    
    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    16b7d78 View commit details
    Browse the repository at this point in the history
  120. smb: client: fix potential UAF in smb2_is_valid_oplock_break()

    commit 2286348 upstream.
    
    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8448846 View commit details
    Browse the repository at this point in the history
  121. smb: client: fix potential UAF in smb2_is_valid_lease_break()

    commit 705c76f upstream.
    
    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    c868cab View commit details
    Browse the repository at this point in the history
  122. smb: client: fix potential UAF in is_valid_oplock_break()

    commit 69ccf04 upstream.
    
    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    494c91e View commit details
    Browse the repository at this point in the history
  123. smb: client: fix potential UAF in smb2_is_network_name_deleted()

    commit 6398156 upstream.
    
    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f941400 View commit details
    Browse the repository at this point in the history
  124. smb: client: fix potential UAF in cifs_signal_cifsd_for_reconnect()

    commit e0e5040 upstream.
    
    Skip sessions that are being teared down (status == SES_EXITING) to
    avoid UAF.
    
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    7e8360a View commit details
    Browse the repository at this point in the history
  125. selftests: mptcp: join: fix dev in check_endpoint

    commit 4006181 upstream.
    
    There's a bug in pm_nl_check_endpoint(), 'dev' didn't be parsed correctly.
    If calling it in the 2nd test of endpoint_tests() too, it fails with an
    error like this:
    
     creation  [FAIL] expected '10.0.2.2 id 2 subflow dev dev' \
                         found '10.0.2.2 id 2 subflow dev ns2eth2'
    
    The reason is '$2' should be set to 'dev', not '$1'. This patch fixes it.
    
    Fixes: 69c6ce7 ("selftests: mptcp: add implicit endpoint test case")
    Cc: [email protected]
    Signed-off-by: Geliang Tang <[email protected]>
    Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Link: https://lore.kernel.org/r/20240329-upstream-net-20240329-fallback-mib-v1-2-324a8981da48@kernel.org
    Signed-off-by: Jakub Kicinski <[email protected]>
    [ Conflicts in mptcp_join.sh: only the fix has been added, not the
      verification because this modified subtest is quite different in
      v6.1: to add this verification, we would need to change a bit the
      subtest: pm_nl_check_endpoint() takes an extra argument for the
      title, the next chk_subflow_nr() will no longer need the title, etc.
      Easier with only the fix without the extra test. ]
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Geliang Tang authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    08ef93e View commit details
    Browse the repository at this point in the history
  126. mptcp: don't account accept() of non-MPC client as fallback to TCP

    commit 7a1b349 upstream.
    
    Current MPTCP servers increment MPTcpExtMPCapableFallbackACK when they
    accept non-MPC connections. As reported by Christoph, this is "surprising"
    because the counter might become greater than MPTcpExtMPCapableSYNRX.
    
    MPTcpExtMPCapableFallbackACK counter's name suggests it should only be
    incremented when a connection was seen using MPTCP options, then a
    fallback to TCP has been done. Let's do that by incrementing it when
    the subflow context of an inbound MPC connection attempt is dropped.
    Also, update mptcp_connect.sh kselftest, to ensure that the
    above MIB does not increment in case a pure TCP client connects to a
    MPTCP server.
    
    Fixes: fc51895 ("mptcp: add and use MIB counter infrastructure")
    Cc: [email protected]
    Reported-by: Christoph Paasch <[email protected]>
    Closes: multipath-tcp/mptcp_net-next#449
    Signed-off-by: Davide Caratti <[email protected]>
    Reviewed-by: Mat Martineau <[email protected]>
    Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Link: https://lore.kernel.org/r/20240329-upstream-net-20240329-fallback-mib-v1-1-324a8981da48@kernel.org
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dcaratti authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    d1fefed View commit details
    Browse the repository at this point in the history
  127. selftests: mptcp: display simult in extra_msg

    commit 629b35a upstream.
    
    Just like displaying "invert" after "Info: ", "simult" should be
    displayed too when rm_subflow_nr doesn't match the expect value in
    chk_rm_nr():
    
          syn                                 [ ok ]
          synack                              [ ok ]
          ack                                 [ ok ]
          add                                 [ ok ]
          echo                                [ ok ]
          rm                                  [ ok ]
          rmsf                                [ ok ] 3 in [2:4]
          Info: invert simult
    
          syn                                 [ ok ]
          synack                              [ ok ]
          ack                                 [ ok ]
          add                                 [ ok ]
          echo                                [ ok ]
          rm                                  [ ok ]
          rmsf                                [ ok ]
          Info: invert
    
    Reviewed-by: Matthieu Baerts <[email protected]>
    Signed-off-by: Geliang Tang <[email protected]>
    Signed-off-by: Mat Martineau <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    geliangtang authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    a6dc534 View commit details
    Browse the repository at this point in the history
  128. mm/secretmem: fix GUP-fast succeeding on secretmem folios

    commit 65291dc upstream.
    
    folio_is_secretmem() currently relies on secretmem folios being LRU
    folios, to save some cycles.
    
    However, folios might reside in a folio batch without the LRU flag set, or
    temporarily have their LRU flag cleared.  Consequently, the LRU flag is
    unreliable for this purpose.
    
    In particular, this is the case when secretmem_fault() allocates a fresh
    page and calls filemap_add_folio()->folio_add_lru().  The folio might be
    added to the per-cpu folio batch and won't get the LRU flag set until the
    batch was drained using e.g., lru_add_drain().
    
    Consequently, folio_is_secretmem() might not detect secretmem folios and
    GUP-fast can succeed in grabbing a secretmem folio, crashing the kernel
    when we would later try reading/writing to the folio, because the folio
    has been unmapped from the directmap.
    
    Fix it by removing that unreliable check.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 1507f51 ("mm: introduce memfd_secret system call to create "secret" memory areas")
    Signed-off-by: David Hildenbrand <[email protected]>
    Reported-by: xingwei lee <[email protected]>
    Reported-by: yue sun <[email protected]>
    Closes: https://lore.kernel.org/lkml/CABOYnLyevJeravW=QrH0JUPYEcDN160aZFb7kwndm-J2rmz0HQ@mail.gmail.com/
    Debugged-by: Miklos Szeredi <[email protected]>
    Tested-by: Miklos Szeredi <[email protected]>
    Reviewed-by: Mike Rapoport (IBM) <[email protected]>
    Cc: Lorenzo Stoakes <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: David Hildenbrand <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    davidhildenbrand authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9c2b4b6 View commit details
    Browse the repository at this point in the history
  129. nvme: fix miss command type check

    commit 31a5978 upstream.
    
    In the function nvme_passthru_end(), only the value of the command
    opcode is checked, without checking the command type (IO command or
    Admin command). When we send a Dataset Management command (The opcode
    of the Dataset Management command is the same as the Set Feature
    command), kernel thinks it is a set feature command, then sets the
    controller's keep alive interval, and calls nvme_keep_alive_work().
    
    Signed-off-by: min15.li <[email protected]>
    Reviewed-by: Kanchan Joshi <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Fixes: b58da2d ("nvme: update keep alive interval when kato is modified")
    Signed-off-by: Tokunori Ikegami <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    min15.li authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    5e6898b View commit details
    Browse the repository at this point in the history
  130. x86/bugs: Change commas to semicolons in 'spectre_v2' sysfs file

    commit 0cd01ac upstream.
    
    Change the format of the 'spectre_v2' vulnerabilities sysfs file
    slightly by converting the commas to semicolons, so that mitigations for
    future variants can be grouped together and separated by commas.
    
    Signed-off-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jpoimboe authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    fd52c03 View commit details
    Browse the repository at this point in the history
  131. x86/syscall: Don't force use of indirect calls for system calls

    commit 1e3ad78 upstream.
    
    Make <asm/syscall.h> build a switch statement instead, and the compiler can
    either decide to generate an indirect jump, or - more likely these days due
    to mitigations - just a series of conditional branches.
    
    Yes, the conditional branches also have branch prediction, but the branch
    prediction is much more controlled, in that it just causes speculatively
    running the wrong system call (harmless), rather than speculatively running
    possibly wrong random less controlled code gadgets.
    
    This doesn't mitigate other indirect calls, but the system call indirection
    is the first and most easily triggered case.
    
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    torvalds authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    74fcb18 View commit details
    Browse the repository at this point in the history
  132. x86/bhi: Add support for clearing branch history at syscall entry

    commit 7390db8 upstream.
    
    Branch History Injection (BHI) attacks may allow a malicious application to
    influence indirect branch prediction in kernel by poisoning the branch
    history. eIBRS isolates indirect branch targets in ring0.  The BHB can
    still influence the choice of indirect branch predictor entry, and although
    branch predictor entries are isolated between modes when eIBRS is enabled,
    the BHB itself is not isolated between modes.
    
    Alder Lake and new processors supports a hardware control BHI_DIS_S to
    mitigate BHI.  For older processors Intel has released a software sequence
    to clear the branch history on parts that don't support BHI_DIS_S. Add
    support to execute the software sequence at syscall entry and VMexit to
    overwrite the branch history.
    
    For now, branch history is not cleared at interrupt entry, as malicious
    applications are not believed to have sufficient control over the
    registers, since previous register state is cleared at interrupt
    entry. Researchers continue to poke at this area and it may become
    necessary to clear at interrupt entry as well in the future.
    
    This mitigation is only defined here. It is enabled later.
    
    Signed-off-by: Pawan Gupta <[email protected]>
    Co-developed-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Alexandre Chartre <[email protected]>
    Reviewed-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pa1gupta authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    07dbb10 View commit details
    Browse the repository at this point in the history
  133. x86/bhi: Define SPEC_CTRL_BHI_DIS_S

    commit 0f4a837 upstream.
    
    Newer processors supports a hardware control BHI_DIS_S to mitigate
    Branch History Injection (BHI). Setting BHI_DIS_S protects the kernel
    from userspace BHI attacks without having to manually overwrite the
    branch history.
    
    Define MSR_SPEC_CTRL bit BHI_DIS_S and its enumeration CPUID.BHI_CTRL.
    Mitigation is enabled later.
    
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Alexandre Chartre <[email protected]>
    Reviewed-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Daniel Sneddon authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    29c50bb View commit details
    Browse the repository at this point in the history
  134. x86/bhi: Enumerate Branch History Injection (BHI) bug

    commit be482ff upstream.
    
    Mitigation for BHI is selected based on the bug enumeration. Add bits
    needed to enumerate BHI bug.
    
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Alexandre Chartre <[email protected]>
    Reviewed-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pa1gupta authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    42196bd View commit details
    Browse the repository at this point in the history
  135. x86/bhi: Add BHI mitigation knob

    commit ec9404e upstream.
    
    Branch history clearing software sequences and hardware control
    BHI_DIS_S were defined to mitigate Branch History Injection (BHI).
    
    Add cmdline spectre_bhi={on|off|auto} to control BHI mitigation:
    
     auto - Deploy the hardware mitigation BHI_DIS_S, if available.
     on   - Deploy the hardware mitigation BHI_DIS_S, if available,
            otherwise deploy the software sequence at syscall entry and
    	VMexit.
     off  - Turn off BHI mitigation.
    
    The default is auto mode which does not deploy the software sequence
    mitigation.  This is because of the hardening done in the syscall
    dispatch path, which is the likely target of BHI.
    
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Alexandre Chartre <[email protected]>
    Reviewed-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pa1gupta authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    bb8384b View commit details
    Browse the repository at this point in the history
  136. x86/bhi: Mitigate KVM by default

    commit 95a6ccb upstream.
    
    BHI mitigation mode spectre_bhi=auto does not deploy the software
    mitigation by default. In a cloud environment, it is a likely scenario
    where userspace is trusted but the guests are not trusted. Deploying
    system wide mitigation in such cases is not desirable.
    
    Update the auto mode to unconditionally mitigate against malicious
    guests. Deploy the software sequence at VMexit in auto mode also, when
    hardware mitigation is not available. Unlike the force =on mode,
    software sequence is not deployed at syscalls in auto mode.
    
    Suggested-by: Alexandre Chartre <[email protected]>
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Alexandre Chartre <[email protected]>
    Reviewed-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pa1gupta authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    43704e9 View commit details
    Browse the repository at this point in the history
  137. KVM: x86: Add BHI_NO

    Intel processors that aren't vulnerable to BHI will set
    commit ed2e8d4 upstream.
    
    MSR_IA32_ARCH_CAPABILITIES[BHI_NO] = 1;. Guests may use this BHI_NO bit to
    determine if they need to implement BHI mitigations or not.  Allow this bit
    to be passed to the guests.
    
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Alexandre Chartre <[email protected]>
    Reviewed-by: Josh Poimboeuf <[email protected]>
    
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Daniel Sneddon authored and gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    3e4283b View commit details
    Browse the repository at this point in the history
  138. x86: set SPECTRE_BHI_ON as default

    commit 2bb69f5 upstream.
    
    Part of a merge commit from Linus that adjusted the default setting of
    SPECTRE_BHI_ON.
    
    Cc: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    e21838d View commit details
    Browse the repository at this point in the history
  139. Linux 6.1.85

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: SeongJae Park <[email protected]>
    Tested-by: Kelsey Steele <[email protected]>
    Tested-by: Salvatore Bonaccorso <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Pavel Machek (CIP) <[email protected]>
    Tested-by: Conor Dooley <[email protected]>
    Tested-by: Mark Brown <[email protected]>
    Tested-by: Sven Joachim <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: kernelci.org bot <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    bf1e3b1 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2024

  1. amdkfd: use calloc instead of kzalloc to avoid integer overflow

    commit 3b0daec upstream.
    
    This uses calloc instead of doing the multiplication which might
    overflow.
    
    Cc: [email protected]
    Signed-off-by: Dave Airlie <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    airlied authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    e6768c6 View commit details
    Browse the repository at this point in the history
  2. wifi: ath9k: fix LNA selection in ath_ant_try_scan()

    [ Upstream commit d6b27eb ]
    
    In 'ath_ant_try_scan()', (most likely) the 2nd LNA's signal
    strength should be used in comparison against RSSI when
    selecting first LNA as the main one. Compile tested only.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Signed-off-by: Dmitry Antipov <[email protected]>
    Acked-by: Toke Høiland-Jørgensen <[email protected]>
    Signed-off-by: Kalle Valo <[email protected]>
    Link: https://msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    dmantipov authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    7dd4831 View commit details
    Browse the repository at this point in the history
  3. bnx2x: Fix firmware version string character counts

    [ Upstream commit 5642c82 ]
    
    A potential string truncation was reported in bnx2x_fill_fw_str(),
    when a long bp->fw_ver and a long phy_fw_ver might coexist, but seems
    unlikely with real-world hardware.
    
    Use scnprintf() to indicate the intent that truncations are tolerated.
    
    While reading this code, I found a collection of various buffer size
    counting issues. None looked like they might lead to a buffer overflow
    with current code (the small buffers are 20 bytes and might only ever
    consume 10 bytes twice with a trailing %NUL). However, early truncation
    (due to a %NUL in the middle of the string) might be happening under
    likely rare conditions. Regardless fix the formatters and related
    functions:
    
    - Switch from a separate strscpy() to just adding an additional "%s" to
      the format string that immediately follows it in bnx2x_fill_fw_str().
    - Use sizeof() universally instead of using unbound defines.
    - Fix bnx2x_7101_format_ver() and bnx2x_null_format_ver() to report the
      number of characters written, not including the trailing %NUL (as
      already done with the other firmware formatting functions).
    - Require space for at least 1 byte in bnx2x_get_ext_phy_fw_version()
      for the trailing %NUL.
    - Correct the needed buffer size in bnx2x_3_seq_format_ver().
    
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Cc: Ariel Elior <[email protected]>
    Cc: Sudarsana Kalluru <[email protected]>
    Cc: Manish Chopra <[email protected]>
    Signed-off-by: Kees Cook <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kees authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    d6b0472 View commit details
    Browse the repository at this point in the history
  4. wifi: rtw89: pci: enlarge RX DMA buffer to consider size of RX descri…

    …ptor
    
    [ Upstream commit c108b4a ]
    
    Hardware puts RX descriptor and packet in RX DMA buffer, so it could be
    over one buffer size if packet size is 11454, and then it will be split
    into two segments. WiFi 7 chips use larger size of RX descriptor, so
    enlarge DMA buffer size according to RX descriptor to have better
    performance and simple flow.
    
    Signed-off-by: Ping-Ke Shih <[email protected]>
    Signed-off-by: Kalle Valo <[email protected]>
    Link: https://msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Ping-Ke Shih authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    fd5fdac View commit details
    Browse the repository at this point in the history
  5. VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()

    [ Upstream commit 19b070f ]
    
    Syzkaller hit 'WARNING in dg_dispatch_as_host' bug.
    
    memcpy: detected field-spanning write (size 56) of single field "&dg_info->msg"
    at drivers/misc/vmw_vmci/vmci_datagram.c:237 (size 24)
    
    WARNING: CPU: 0 PID: 1555 at drivers/misc/vmw_vmci/vmci_datagram.c:237
    dg_dispatch_as_host+0x88e/0xa60 drivers/misc/vmw_vmci/vmci_datagram.c:237
    
    Some code commentry, based on my understanding:
    
    544 #define VMCI_DG_SIZE(_dg) (VMCI_DG_HEADERSIZE + (size_t)(_dg)->payload_size)
    /// This is 24 + payload_size
    
    memcpy(&dg_info->msg, dg, dg_size);
    	Destination = dg_info->msg ---> this is a 24 byte
    					structure(struct vmci_datagram)
    	Source = dg --> this is a 24 byte structure (struct vmci_datagram)
    	Size = dg_size = 24 + payload_size
    
    {payload_size = 56-24 =32} -- Syzkaller managed to set payload_size to 32.
    
     35 struct delayed_datagram_info {
     36         struct datagram_entry *entry;
     37         struct work_struct work;
     38         bool in_dg_host_queue;
     39         /* msg and msg_payload must be together. */
     40         struct vmci_datagram msg;
     41         u8 msg_payload[];
     42 };
    
    So those extra bytes of payload are copied into msg_payload[], a run time
    warning is seen while fuzzing with Syzkaller.
    
    One possible way to fix the warning is to split the memcpy() into
    two parts -- one -- direct assignment of msg and second taking care of payload.
    
    Gustavo quoted:
    "Under FORTIFY_SOURCE we should not copy data across multiple members
    in a structure."
    
    Reported-by: syzkaller <[email protected]>
    Suggested-by: Vegard Nossum <[email protected]>
    Suggested-by: Gustavo A. R. Silva <[email protected]>
    Signed-off-by: Harshit Mogalapalli <[email protected]>
    Reviewed-by: Gustavo A. R. Silva <[email protected]>
    Reviewed-by: Kees Cook <[email protected]>
    Reviewed-by: Dan Carpenter <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    harshimogalapalli authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    feacd43 View commit details
    Browse the repository at this point in the history
  6. wifi: iwlwifi: pcie: Add the PCI device id for new hardware

    [ Upstream commit 6770eee ]
    
    Add the support for a new PCI device id.
    
    Signed-off-by: Mukesh Sisodiya <[email protected]>
    Reviewed-by: Gregory Greenman <[email protected]>
    Signed-off-by: Miri Korenblit <[email protected]>
    Link: https://msgid.link/20240129211905.fde32107e0a3.I597cff4f340e4bed12b7568a0ad504bd4b2c1cf8@changeid
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    sisodiyamukesh authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    8d80e09 View commit details
    Browse the repository at this point in the history
  7. panic: Flush kernel log buffer at the end

    [ Upstream commit d988d9a ]
    
    If the kernel crashes in a context where printk() calls always
    defer printing (such as in NMI or inside a printk_safe section)
    then the final panic messages will be deferred to irq_work. But
    if irq_work is not available, the messages will not get printed
    unless explicitly flushed. The result is that the final
    "end Kernel panic" banner does not get printed.
    
    Add one final flush after the last printk() call to make sure
    the final panic messages make it out as well.
    
    Signed-off-by: John Ogness <[email protected]>
    Reviewed-by: Petr Mladek <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Petr Mladek <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jogness authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    94b016b View commit details
    Browse the repository at this point in the history
  8. cpuidle: Avoid potential overflow in integer multiplication

    [ Upstream commit 88390dd ]
    
    In detail:
    
    In C language, when you perform a multiplication operation, if
    both operands are of int type, the multiplication operation is
    performed on the int type, and then the result is converted to
    the target type. This means that if the product of int type
    multiplication exceeds the range that int type can represent,
    an overflow will occur even if you store the result in a
    variable of int64_t type.
    
    For a multiplication of two int values, it is better to use
    mul_u32_u32() rather than s->exit_latency_ns = s->exit_latency *
    NSEC_PER_USEC to avoid potential overflow happenning.
    
    Signed-off-by: C Cheng <[email protected]>
    Signed-off-by: Bo Ye <[email protected]>
    Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
    [ rjw: New subject ]
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    C Cheng authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    b510fbe View commit details
    Browse the repository at this point in the history
  9. arm64: dts: rockchip: fix rk3328 hdmi ports node

    [ Upstream commit 1d00ba4 ]
    
    Fix rk3328 hdmi ports node so that it matches the
    rockchip,dw-hdmi.yaml binding.
    
    Signed-off-by: Johan Jonker <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Heiko Stuebner <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Johan Jonker authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    a292048 View commit details
    Browse the repository at this point in the history
  10. arm64: dts: rockchip: fix rk3399 hdmi ports node

    [ Upstream commit f051b6a ]
    
    Fix rk3399 hdmi ports node so that it matches the
    rockchip,dw-hdmi.yaml binding.
    
    Signed-off-by: Johan Jonker <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Heiko Stuebner <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Johan Jonker authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    6925d11 View commit details
    Browse the repository at this point in the history
  11. ionic: set adminq irq affinity

    [ Upstream commit c699f35 ]
    
    We claim to have the AdminQ on our irq0 and thus cpu id 0,
    but we need to be sure we set the affinity hint to try to
    keep it there.
    
    Signed-off-by: Shannon Nelson <[email protected]>
    Reviewed-by: Brett Creeley <[email protected]>
    Reviewed-by: Jacob Keller <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    emusln authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    b8ca158 View commit details
    Browse the repository at this point in the history
  12. net: skbuff: add overflow debug check to pull/push helpers

    [ Upstream commit 219eee9 ]
    
    syzbot managed to trigger following splat:
    BUG: KASAN: use-after-free in __skb_flow_dissect+0x4a3b/0x5e50
    Read of size 1 at addr ffff888208a4000e by task a.out/2313
    [..]
      __skb_flow_dissect+0x4a3b/0x5e50
      __skb_get_hash+0xb4/0x400
      ip_tunnel_xmit+0x77e/0x26f0
      ipip_tunnel_xmit+0x298/0x410
      ..
    
    Analysis shows that the skb has a valid ->head, but bogus ->data
    pointer.
    
    skb->data gets its bogus value via the neigh layer, which does:
    
    1556    __skb_pull(skb, skb_network_offset(skb));
    
    ... and the skb was already dodgy at this point:
    
    skb_network_offset(skb) returns a negative value due to an
    earlier overflow of skb->network_header (u16).  __skb_pull thus
    "adjusts" skb->data by a huge offset, pointing outside skb->head
    area.
    
    Allow debug builds to splat when we try to pull/push more than
    INT_MAX bytes.
    
    After this, the syzkaller reproducer yields a more precise splat
    before the flow dissector attempts to read off skb->data memory:
    
    WARNING: CPU: 5 PID: 2313 at include/linux/skbuff.h:2653 neigh_connected_output+0x28e/0x400
      ip_finish_output2+0xb25/0xed0
      iptunnel_xmit+0x4ff/0x870
      ipgre_xmit+0x78e/0xbb0
    
    Signed-off-by: Florian Westphal <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Florian Westphal authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    8af60bb View commit details
    Browse the repository at this point in the history
  13. firmware: tegra: bpmp: Return directly after a failed kzalloc() in ge…

    …t_filename()
    
    [ Upstream commit 1315848 ]
    
    The kfree() function was called in one case by
    the get_filename() function during error handling
    even if the passed variable contained a null pointer.
    This issue was detected by using the Coccinelle software.
    
    Thus return directly after a call of the function “kzalloc” failed
    at the beginning.
    
    Signed-off-by: Markus Elfring <[email protected]>
    Signed-off-by: Thierry Reding <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    elfring authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    161d6b8 View commit details
    Browse the repository at this point in the history
  14. wifi: brcmfmac: Add DMI nvram filename quirk for ACEPC W5 Pro

    [ Upstream commit 3216770 ]
    
    The ACEPC W5 Pro HDMI stick contains quite generic names in the sys_vendor
    and product_name DMI strings, without this patch brcmfmac will try to load:
    "brcmfmac43455-sdio.$(DEFAULT_STRING)-$(DEFAULT_STRING).txt" as nvram file
    which is both too generic and messy with the $ symbols in the name.
    
    The ACEPC W5 Pro uses the same Ampak AP6255 module as the ACEPC T8
    and the nvram for the T8 is already in linux-firmware, so point the new
    DMI nvram filename quirk to the T8 nvram file.
    
    Signed-off-by: Hans de Goede <[email protected]>
    Acked-by: Arend van Spriel <[email protected]>
    Signed-off-by: Kalle Valo <[email protected]>
    Link: https://msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    jwrdegoede authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    8ead0a0 View commit details
    Browse the repository at this point in the history
  15. pstore/zone: Add a null pointer check to the psz_kmsg_read

    [ Upstream commit 98bc7e2 ]
    
    kasprintf() returns a pointer to dynamically allocated memory
    which can be NULL upon failure. Ensure the allocation was successful
    by checking the pointer validity.
    
    Signed-off-by: Kunwu Chan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    KunWuChan authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    635594c View commit details
    Browse the repository at this point in the history
  16. tools/power x86_energy_perf_policy: Fix file leak in get_pkg_num()

    [ Upstream commit f85450f ]
    
    In function get_pkg_num() if fopen_or_die() succeeds it returns a file
    pointer to be used. But fclose() is never called before returning from
    the function.
    
    Signed-off-by: Samasth Norway Ananda <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    samasth-norway authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    51a9b20 View commit details
    Browse the repository at this point in the history
  17. net: pcs: xpcs: Return EINVAL in the internal methods

    [ Upstream commit f515100 ]
    
    In particular the xpcs_soft_reset() and xpcs_do_config() functions
    currently return -1 if invalid auto-negotiation mode is specified. That
    value might be then passed to the generic kernel subsystems which require
    a standard kernel errno value. Even though the erroneous conditions are
    very specific (memory corruption or buggy driver implementation) using a
    hard-coded -1 literal doesn't seem correct anyway especially when it comes
    to passing it higher to the network subsystem or printing to the system
    log.  Convert the hard-coded error values to -EINVAL then.
    
    Signed-off-by: Serge Semin <[email protected]>
    Tested-by: Andrew Lunn <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    fancer authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    a3f6045 View commit details
    Browse the repository at this point in the history
  18. dma-direct: Leak pages on dma_set_decrypted() failure

    [ Upstream commit b9fa169 ]
    
    On TDX it is possible for the untrusted host to cause
    set_memory_encrypted() or set_memory_decrypted() to fail such that an
    error is returned and the resulting memory is shared. Callers need to
    take care to handle these errors to avoid returning decrypted (shared)
    memory to the page allocator, which could lead to functional or security
    issues.
    
    DMA could free decrypted/shared pages if dma_set_decrypted() fails. This
    should be a rare case. Just leak the pages in this case instead of
    freeing them.
    
    Signed-off-by: Rick Edgecombe <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rpedgeco authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    4e0cfb2 View commit details
    Browse the repository at this point in the history
  19. wifi: ath11k: decrease MHI channel buffer length to 8KB

    [ Upstream commit 1cca1bd ]
    
    Currently buf_len field of ath11k_mhi_config_qca6390 is assigned
    with 0, making MHI use a default size, 64KB, to allocate channel
    buffers. This is likely to fail in some scenarios where system
    memory is highly fragmented and memory compaction or reclaim is
    not allowed.
    
    There is a fail report which is caused by it:
    kworker/u32:45: page allocation failure: order:4, mode:0x40c00(GFP_NOIO|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0
    CPU: 0 PID: 19318 Comm: kworker/u32:45 Not tainted 6.8.0-rc3-1.gae4495f-default #1 openSUSE Tumbleweed (unreleased) 493b6d5b382c603654d7a81fc3c144d59a1dfceb
    Workqueue: events_unbound async_run_entry_fn
    Call Trace:
     <TASK>
     dump_stack_lvl+0x47/0x60
     warn_alloc+0x13a/0x1b0
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? __alloc_pages_direct_compact+0xab/0x210
     __alloc_pages_slowpath.constprop.0+0xd3e/0xda0
     __alloc_pages+0x32d/0x350
     ? mhi_prepare_channel+0x127/0x2d0 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814]
     __kmalloc_large_node+0x72/0x110
     __kmalloc+0x37c/0x480
     ? mhi_map_single_no_bb+0x77/0xf0 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814]
     ? mhi_prepare_channel+0x127/0x2d0 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814]
     mhi_prepare_channel+0x127/0x2d0 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814]
     __mhi_prepare_for_transfer+0x44/0x80 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814]
     ? __pfx_____mhi_prepare_for_transfer+0x10/0x10 [mhi 40df44e07c05479f7a6e7b90fba9f0e0031a7814]
     device_for_each_child+0x5c/0xa0
     ? __pfx_pci_pm_resume+0x10/0x10
     ath11k_core_resume+0x65/0x100 [ath11k a5094e22d7223135c40d93c8f5321cf09fd85e4e]
     ? srso_alias_return_thunk+0x5/0xfbef5
     ath11k_pci_pm_resume+0x32/0x60 [ath11k_pci 830b7bfc3ea80ebef32e563cafe2cb55e9cc73ec]
     ? srso_alias_return_thunk+0x5/0xfbef5
     dpm_run_callback+0x8c/0x1e0
     device_resume+0x104/0x340
     ? __pfx_dpm_watchdog_handler+0x10/0x10
     async_resume+0x1d/0x30
     async_run_entry_fn+0x32/0x120
     process_one_work+0x168/0x330
     worker_thread+0x2f5/0x410
     ? __pfx_worker_thread+0x10/0x10
     kthread+0xe8/0x120
     ? __pfx_kthread+0x10/0x10
     ret_from_fork+0x34/0x50
     ? __pfx_kthread+0x10/0x10
     ret_from_fork_asm+0x1b/0x30
     </TASK>
    
    Actually those buffers are used only by QMI target -> host communication.
    And for WCN6855 and QCA6390, the largest packet size for that is less
    than 6KB. So change buf_len field to 8KB, which results in order 1
    allocation if page size is 4KB. In this way, we can at least save some
    memory, and as well as decrease the possibility of allocation failure
    in those scenarios.
    
    Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
    
    Reported-by: Vlastimil Babka <[email protected]>
    Closes: https://lore.kernel.org/ath11k/[email protected]/
    Signed-off-by: Baochen Qiang <[email protected]>
    Acked-by: Jeff Johnson <[email protected]>
    Signed-off-by: Kalle Valo <[email protected]>
    Link: https://msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Baochen Qiang authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    6597a66 View commit details
    Browse the repository at this point in the history
  20. cpufreq: Don't unregister cpufreq cooling on CPU hotplug

    [ Upstream commit c4d61a5 ]
    
    Offlining a CPU and bringing it back online is a common operation and it
    happens frequently during system suspend/resume, where the non-boot CPUs
    are hotplugged out during suspend and brought back at resume.
    
    The cpufreq core already tries to make this path as fast as possible as
    the changes are only temporary in nature and full cleanup of resources
    isn't required in this case. For example the drivers can implement
    online()/offline() callbacks to avoid a lot of tear down of resources.
    
    On similar lines, there is no need to unregister the cpufreq cooling
    device during suspend / resume, but only while the policy is getting
    removed.
    
    Moreover, unregistering the cpufreq cooling device is resulting in an
    unwanted outcome, where the system suspend is eventually aborted in the
    process.  Currently, during system suspend the cpufreq core unregisters
    the cooling device, which in turn removes a kobject using device_del()
    and that generates a notification to the userspace via uevent broadcast.
    This causes system suspend to abort in some setups.
    
    This was also earlier reported (indirectly) by Roman [1]. Maybe there is
    another way around to fixing that problem properly, but this change
    makes sense anyways.
    
    Move the registering and unregistering of the cooling device to policy
    creation and removal times onlyy.
    
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218521
    Reported-by: Manaf Meethalavalappu Pallikunhi <[email protected]>
    Reported-by: Roman Stratiienko <[email protected]>
    Link: https://patchwork.kernel.org/project/linux-pm/patch/[email protected]/ [1]
    Tested-by: Manaf Meethalavalappu Pallikunhi <[email protected]>
    Signed-off-by: Viresh Kumar <[email protected]>
    Reviewed-by: Dhruva Gole <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    vireshk authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    50bd749 View commit details
    Browse the repository at this point in the history
  21. btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()

    [ Upstream commit 7411055 ]
    
    The unhandled case in btrfs_relocate_sys_chunks() loop is a corruption,
    as it could be caused only by two impossible conditions:
    
    - at first the search key is set up to look for a chunk tree item, with
      offset -1, this is an inexact search and the key->offset will contain
      the correct offset upon a successful search, a valid chunk tree item
      cannot have an offset -1
    
    - after first successful search, the found_key corresponds to a chunk
      item, the offset is decremented by 1 before the next loop, it's
      impossible to find a chunk item there due to alignment and size
      constraints
    
    Reviewed-by: Josef Bacik <[email protected]>
    Reviewed-by: Anand Jain <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kdave authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    36c2a28 View commit details
    Browse the repository at this point in the history
  22. btrfs: export: handle invalid inode or root reference in btrfs_get_pa…

    …rent()
    
    [ Upstream commit 26b66d1 ]
    
    The get_parent handler looks up a parent of a given dentry, this can be
    either a subvolume or a directory. The search is set up with offset -1
    but it's never expected to find such item, as it would break allowed
    range of inode number or a root id. This means it's a corruption (ext4
    also returns this error code).
    
    Reviewed-by: Josef Bacik <[email protected]>
    Reviewed-by: Anand Jain <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kdave authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    0f30f95 View commit details
    Browse the repository at this point in the history
  23. btrfs: send: handle path ref underflow in header iterate_inode_ref()

    [ Upstream commit 3c6ee34 ]
    
    Change BUG_ON to proper error handling if building the path buffer
    fails. The pointers are not printed so we don't accidentally leak kernel
    addresses.
    
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kdave authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    9ae356c View commit details
    Browse the repository at this point in the history
  24. ice: use relative VSI index for VFs instead of PF VSI number

    [ Upstream commit 11fbb1b ]
    
    When initializing over virtchnl, the PF is required to pass a VSI ID to the
    VF as part of its capabilities exchange. The VF driver reports this value
    back to the PF in a variety of commands. The PF driver validates that this
    value matches the value it sent to the VF.
    
    Some hardware families such as the E700 series could use this value when
    reading RSS registers or communicating directly with firmware over the
    Admin Queue.
    
    However, E800 series hardware does not support any of these interfaces and
    the VF's only use for this value is to report it back to the PF. Thus,
    there is no requirement that this value be an actual VSI ID value of any
    kind.
    
    The PF driver already does not trust that the VF sends it a real VSI ID.
    The VSI structure is always looked up from the VF structure. The PF does
    validate that the VSI ID provided matches a VSI associated with the VF, but
    otherwise does not use the VSI ID for any purpose.
    
    Instead of reporting the VSI number relative to the PF space, report a
    fixed value of 1. When communicating with the VF over virtchnl, validate
    that the VSI number is returned appropriately.
    
    This avoids leaking information about the firmware of the PF state.
    Currently the ice driver only supplies a VF with a single VSI. However, it
    appears that virtchnl has some support for allowing multiple VSIs. I did
    not attempt to implement this. However, space is left open to allow further
    relative indexes if additional VSIs are provided in future feature
    development. For this reason, keep the ice_vc_isvalid_vsi_id function in
    place to allow extending it for multiple VSIs in the future.
    
    This change will also simplify handling of live migration in a future
    series. Since we no longer will provide a real VSI number to the VF, there
    will be no need to keep track of this number when migrating to a new host.
    
    Signed-off-by: Jacob Keller <[email protected]>
    Reviewed-by: Przemek Kitszel <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jacob-keller authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    5693dd6 View commit details
    Browse the repository at this point in the history
  25. net/smc: reduce rtnl pressure in smc_pnet_create_pnetids_list()

    [ Upstream commit 00af2aa ]
    
    Many syzbot reports show extreme rtnl pressure, and many of them hint
    that smc acquires rtnl in netns creation for no good reason [1]
    
    This patch returns early from smc_pnet_net_init()
    if there is no netdevice yet.
    
    I am not even sure why smc_pnet_create_pnetids_list() even exists,
    because smc_pnet_netdev_event() is also calling
    smc_pnet_add_base_pnetid() when handling NETDEV_UP event.
    
    [1] extract of typical syzbot reports
    
    2 locks held by syz-executor.3/12252:
      #0: ffffffff8f369610 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4c7/0x7b0 net/core/net_namespace.c:491
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_create_pnetids_list net/smc/smc_pnet.c:809 [inline]
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_net_init+0x10a/0x1e0 net/smc/smc_pnet.c:878
    2 locks held by syz-executor.4/12253:
      #0: ffffffff8f369610 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4c7/0x7b0 net/core/net_namespace.c:491
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_create_pnetids_list net/smc/smc_pnet.c:809 [inline]
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_net_init+0x10a/0x1e0 net/smc/smc_pnet.c:878
    2 locks held by syz-executor.1/12257:
      #0: ffffffff8f369610 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4c7/0x7b0 net/core/net_namespace.c:491
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_create_pnetids_list net/smc/smc_pnet.c:809 [inline]
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_net_init+0x10a/0x1e0 net/smc/smc_pnet.c:878
    2 locks held by syz-executor.2/12261:
      #0: ffffffff8f369610 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4c7/0x7b0 net/core/net_namespace.c:491
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_create_pnetids_list net/smc/smc_pnet.c:809 [inline]
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_net_init+0x10a/0x1e0 net/smc/smc_pnet.c:878
    2 locks held by syz-executor.0/12265:
      #0: ffffffff8f369610 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4c7/0x7b0 net/core/net_namespace.c:491
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_create_pnetids_list net/smc/smc_pnet.c:809 [inline]
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_net_init+0x10a/0x1e0 net/smc/smc_pnet.c:878
    2 locks held by syz-executor.3/12268:
      #0: ffffffff8f369610 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4c7/0x7b0 net/core/net_namespace.c:491
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_create_pnetids_list net/smc/smc_pnet.c:809 [inline]
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_net_init+0x10a/0x1e0 net/smc/smc_pnet.c:878
    2 locks held by syz-executor.4/12271:
      #0: ffffffff8f369610 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4c7/0x7b0 net/core/net_namespace.c:491
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_create_pnetids_list net/smc/smc_pnet.c:809 [inline]
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_net_init+0x10a/0x1e0 net/smc/smc_pnet.c:878
    2 locks held by syz-executor.1/12274:
      #0: ffffffff8f369610 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4c7/0x7b0 net/core/net_namespace.c:491
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_create_pnetids_list net/smc/smc_pnet.c:809 [inline]
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_net_init+0x10a/0x1e0 net/smc/smc_pnet.c:878
    2 locks held by syz-executor.2/12280:
      #0: ffffffff8f369610 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4c7/0x7b0 net/core/net_namespace.c:491
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_create_pnetids_list net/smc/smc_pnet.c:809 [inline]
      #1: ffffffff8f375b88 (rtnl_mutex){+.+.}-{3:3}, at: smc_pnet_net_init+0x10a/0x1e0 net/smc/smc_pnet.c:878
    
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Wenjia Zhang <[email protected]>
    Cc: Jan Karcher <[email protected]>
    Cc: "D. Wythe" <[email protected]>
    Cc: Tony Lu <[email protected]>
    Cc: Wen Gu <[email protected]>
    Reviewed-by: Wenjia Zhang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Eric Dumazet authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    d7ee3bf View commit details
    Browse the repository at this point in the history
  26. Bluetooth: btintel: Fix null ptr deref in btintel_read_version

    [ Upstream commit b79e040 ]
    
    If hci_cmd_sync_complete() is triggered and skb is NULL, then
    hdev->req_skb is NULL, which will cause this issue.
    
    Reported-and-tested-by: [email protected]
    Signed-off-by: Edward Adam Davis <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Edward-AD authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    b19fe5e View commit details
    Browse the repository at this point in the history
  27. Bluetooth: btmtk: Add MODULE_FIRMWARE() for MT7922

    [ Upstream commit 3e465a0 ]
    
    Since dracut refers to the module info for defining the required
    firmware files and btmtk driver doesn't provide the firmware info for
    MT7922, the generate initrd misses the firmware, resulting in the
    broken Bluetooth.
    
    This patch simply adds the MODULE_FIRMWARE() for the missing entry
    for covering that.
    
    Link: https://bugzilla.suse.com/show_bug.cgi?id=1214133
    Signed-off-by: Takashi Iwai <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Reviewed-by: Matthias Brugger <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tiwai authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    a83a772 View commit details
    Browse the repository at this point in the history
  28. drm/vc4: don't check if plane->state->fb == state->fb

    [ Upstream commit 5ee0d47 ]
    
    Currently, when using non-blocking commits, we can see the following
    kernel warning:
    
    [  110.908514] ------------[ cut here ]------------
    [  110.908529] refcount_t: underflow; use-after-free.
    [  110.908620] WARNING: CPU: 0 PID: 1866 at lib/refcount.c:87 refcount_dec_not_one+0xb8/0xc0
    [  110.908664] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep hid_logitech_hidpp vc4 brcmfmac hci_uart btbcm brcmutil bluetooth snd_soc_hdmi_codec cfg80211 cec drm_display_helper drm_dma_helper drm_kms_helper snd_soc_core snd_compress snd_pcm_dmaengine fb_sys_fops sysimgblt syscopyarea sysfillrect raspberrypi_hwmon ecdh_generic ecc rfkill libaes i2c_bcm2835 binfmt_misc joydev snd_bcm2835(C) bcm2835_codec(C) bcm2835_isp(C) v4l2_mem2mem videobuf2_dma_contig snd_pcm bcm2835_v4l2(C) raspberrypi_gpiomem bcm2835_mmal_vchiq(C) videobuf2_v4l2 snd_timer videobuf2_vmalloc videobuf2_memops videobuf2_common snd videodev vc_sm_cma(C) mc hid_logitech_dj uio_pdrv_genirq uio i2c_dev drm fuse dm_mod drm_panel_orientation_quirks backlight ip_tables x_tables ipv6
    [  110.909086] CPU: 0 PID: 1866 Comm: kodi.bin Tainted: G         C         6.1.66-v8+ #32
    [  110.909104] Hardware name: Raspberry Pi 3 Model B Rev 1.2 (DT)
    [  110.909114] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  110.909132] pc : refcount_dec_not_one+0xb8/0xc0
    [  110.909152] lr : refcount_dec_not_one+0xb4/0xc0
    [  110.909170] sp : ffffffc00913b9c0
    [  110.909177] x29: ffffffc00913b9c0 x28: 000000556969bbb0 x27: 000000556990df60
    [  110.909205] x26: 0000000000000002 x25: 0000000000000004 x24: ffffff8004448480
    [  110.909230] x23: ffffff800570b500 x22: ffffff802e03a7bc x21: ffffffecfca68c78
    [  110.909257] x20: ffffff8002b42000 x19: ffffff802e03a600 x18: 0000000000000000
    [  110.909283] x17: 0000000000000011 x16: ffffffffffffffff x15: 0000000000000004
    [  110.909308] x14: 0000000000000fff x13: ffffffed577e47e0 x12: 0000000000000003
    [  110.909333] x11: 0000000000000000 x10: 0000000000000027 x9 : c912d0d083728c00
    [  110.909359] x8 : c912d0d083728c00 x7 : 65646e75203a745f x6 : 746e756f63666572
    [  110.909384] x5 : ffffffed579f62ee x4 : ffffffed579eb01e x3 : 0000000000000000
    [  110.909409] x2 : 0000000000000000 x1 : ffffffc00913b750 x0 : 0000000000000001
    [  110.909434] Call trace:
    [  110.909441]  refcount_dec_not_one+0xb8/0xc0
    [  110.909461]  vc4_bo_dec_usecnt+0x4c/0x1b0 [vc4]
    [  110.909903]  vc4_cleanup_fb+0x44/0x50 [vc4]
    [  110.910315]  drm_atomic_helper_cleanup_planes+0x88/0xa4 [drm_kms_helper]
    [  110.910669]  vc4_atomic_commit_tail+0x390/0x9dc [vc4]
    [  110.911079]  commit_tail+0xb0/0x164 [drm_kms_helper]
    [  110.911397]  drm_atomic_helper_commit+0x1d0/0x1f0 [drm_kms_helper]
    [  110.911716]  drm_atomic_commit+0xb0/0xdc [drm]
    [  110.912569]  drm_mode_atomic_ioctl+0x348/0x4b8 [drm]
    [  110.913330]  drm_ioctl_kernel+0xec/0x15c [drm]
    [  110.914091]  drm_ioctl+0x24c/0x3b0 [drm]
    [  110.914850]  __arm64_sys_ioctl+0x9c/0xd4
    [  110.914873]  invoke_syscall+0x4c/0x114
    [  110.914897]  el0_svc_common+0xd0/0x118
    [  110.914917]  do_el0_svc+0x38/0xd0
    [  110.914936]  el0_svc+0x30/0x8c
    [  110.914958]  el0t_64_sync_handler+0x84/0xf0
    [  110.914979]  el0t_64_sync+0x18c/0x190
    [  110.914996] ---[ end trace 0000000000000000 ]---
    
    This happens because, although `prepare_fb` and `cleanup_fb` are
    perfectly balanced, we cannot guarantee consistency in the check
    plane->state->fb == state->fb. This means that sometimes we can increase
    the refcount in `prepare_fb` and don't decrease it in `cleanup_fb`. The
    opposite can also be true.
    
    In fact, the struct drm_plane .state shouldn't be accessed directly
    but instead, the `drm_atomic_get_new_plane_state()` helper function should
    be used. So, we could stick to this check, but using
    `drm_atomic_get_new_plane_state()`. But actually, this check is not really
    needed. We can increase and decrease the refcount symmetrically without
    problems.
    
    This is going to make the code more simple and consistent.
    
    Signed-off-by: Maíra Canal <[email protected]>
    Acked-by: Maxime Ripard <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    mairacanal authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    48bfb4b View commit details
    Browse the repository at this point in the history
  29. Input: synaptics-rmi4 - fail probing if memory allocation for "phys" …

    …fails
    
    [ Upstream commit bc49961 ]
    
    While input core can work with input->phys set to NULL userspace might
    depend on it, so better fail probing if allocation fails. The system must
    be in a pretty bad shape for it to happen anyway.
    
    Signed-off-by: Kunwu Chan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    KunWuChan authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    ac1e0f0 View commit details
    Browse the repository at this point in the history
  30. drm: panel-orientation-quirks: Add quirk for GPD Win Mini

    [ Upstream commit 2f862fd ]
    
    This adds a DMI orientation quirk for the GPD Win Mini panel.
    
    Signed-off-by: Samuel Dionne-Riel <[email protected]>
    Signed-off-by: Linus Walleij <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    samueldr authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    c87dd15 View commit details
    Browse the repository at this point in the history
  31. pinctrl: renesas: checker: Limit cfg reg enum checks to provided IDs

    [ Upstream commit 3803584 ]
    
    If the number of provided enum IDs in a variable width config register
    description does not match the expected number, the checker uses the
    expected number for validating the individual enum IDs.
    
    However, this may cause out-of-bounds accesses on the array holding the
    enum IDs, leading to bogus enum_id conflict warnings.  Worse, if the bug
    is an incorrect bit field description (e.g. accidentally using "12"
    instead of "-12" for a reserved field), thousands of warnings may be
    printed, overflowing the kernel log buffer.
    
    Fix this by limiting the enum ID check to the number of provided enum
    IDs.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Link: https://lore.kernel.org/r/c7385f44f2faebb8856bcbb4e908d846fc1531fb.1705930809.git.geert+renesas@glider.be
    Signed-off-by: Sasha Levin <[email protected]>
    geertu authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    5238e1c View commit details
    Browse the repository at this point in the history
  32. sysv: don't call sb_bread() with pointers_lock held

    [ Upstream commit f123dc8 ]
    
    syzbot is reporting sleep in atomic context in SysV filesystem [1], for
    sb_bread() is called with rw_spinlock held.
    
    A "write_lock(&pointers_lock) => read_lock(&pointers_lock) deadlock" bug
    and a "sb_bread() with write_lock(&pointers_lock)" bug were introduced by
    "Replace BKL for chain locking with sysvfs-private rwlock" in Linux 2.5.12.
    
    Then, "[PATCH] err1-40: sysvfs locking fix" in Linux 2.6.8 fixed the
    former bug by moving pointers_lock lock to the callers, but instead
    introduced a "sb_bread() with read_lock(&pointers_lock)" bug (which made
    this problem easier to hit).
    
    Al Viro suggested that why not to do like get_branch()/get_block()/
    find_shared() in Minix filesystem does. And doing like that is almost a
    revert of "[PATCH] err1-40: sysvfs locking fix" except that get_branch()
     from with find_shared() is called without write_lock(&pointers_lock).
    
    Reported-by: syzbot <[email protected]>
    Link: https://syzkaller.appspot.com/bug?extid=69b40dc5fd40f32c199f
    Suggested-by: Al Viro <[email protected]>
    Signed-off-by: Tetsuo Handa <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Christian Brauner <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Tetsuo Handa authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    53cb1e5 View commit details
    Browse the repository at this point in the history
  33. scsi: lpfc: Fix possible memory leak in lpfc_rcv_padisc()

    [ Upstream commit 2ae917d ]
    
    The call to lpfc_sli4_resume_rpi() in lpfc_rcv_padisc() may return an
    unsuccessful status.  In such cases, the elsiocb is not issued, the
    completion is not called, and thus the elsiocb resource is leaked.
    
    Check return value after calling lpfc_sli4_resume_rpi() and conditionally
    release the elsiocb resource.
    
    Signed-off-by: Justin Tee <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Himanshu Madhani <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Justin Tee authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    ee0b5f9 View commit details
    Browse the repository at this point in the history
  34. isofs: handle CDs with bad root inode but good Joliet root directory

    [ Upstream commit 4243bf8 ]
    
    I have a CD copy of the original Tom Clancy's Ghost Recon game from
    2001. The disc mounts without error on Windows, but on Linux mounting
    fails with the message "isofs_fill_super: get root inode failed". The
    error originates in isofs_read_inode, which returns -EIO because de_len
    is 0. The superblock on this disc appears to be intentionally corrupt as
    a form of copy protection.
    
    When the root inode is unusable, instead of giving up immediately, try
    to continue with the Joliet file table. This fixes the Ghost Recon CD
    and probably other copy-protected CDs too.
    
    Signed-off-by: Alex Henrie <[email protected]>
    Signed-off-by: Jan Kara <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    alexhenrie authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    13701b0 View commit details
    Browse the repository at this point in the history
  35. ASoC: Intel: common: DMI remap for rebranded Intel NUC M15 (LAPRC710)…

    … laptops
    
    [ Upstream commit c13e031 ]
    
    Added DMI quirk to handle the rebranded variants of Intel NUC M15
    (LAPRC710) laptops. The DMI matching is based on motherboard
    attributes.
    
    Link: thesofproject#4218
    Signed-off-by: Máté Mosonyi <[email protected]>
    Reviewed-by: Bard Liao <[email protected]>
    Signed-off-by: Pierre-Louis Bossart <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mosomate authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    eae948e View commit details
    Browse the repository at this point in the history
  36. rcu-tasks: Repair RCU Tasks Trace quiescence check

    [ Upstream commit 2eb52fa ]
    
    The context-switch-time check for RCU Tasks Trace quiescence expects
    current->trc_reader_special.b.need_qs to be zero, and if so, updates
    it to TRC_NEED_QS_CHECKED.  This is backwards, because if this value
    is zero, there is no RCU Tasks Trace grace period in flight, an thus
    no need for a quiescent state.  Instead, when a grace period starts,
    this field is set to TRC_NEED_QS.
    
    This commit therefore changes the check from zero to TRC_NEED_QS.
    
    Reported-by: Steven Rostedt <[email protected]>
    Signed-off-by: Paul E. McKenney <[email protected]>
    Tested-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Boqun Feng <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    paulmckrcu authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    3f3c1e7 View commit details
    Browse the repository at this point in the history
  37. Julia Lawall reported this null pointer dereference, this should fix it.

    [ Upstream commit 9bf93dc ]
    
    Signed-off-by: Mike Marshall <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    hubcapsc authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    2e2177f View commit details
    Browse the repository at this point in the history
  38. media: sta2x11: fix irq handler cast

    [ Upstream commit 3de49ae ]
    
    clang-16 warns about casting incompatible function pointers:
    
    drivers/media/pci/sta2x11/sta2x11_vip.c:1057:6: error: cast from 'irqreturn_t (*)(int, struct sta2x11_vip *)' (aka 'enum irqreturn (*)(int, struct sta2x11_vip *)') to 'irq_handler_t' (aka 'enum irqreturn (*)(int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
    
    Change the prototype of the irq handler to the regular version with a
    local variable to adjust the argument type.
    
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Hans Verkuil <[email protected]>
    [hverkuil: update argument documentation]
    Signed-off-by: Sasha Levin <[email protected]>
    arndb authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    84ed33a View commit details
    Browse the repository at this point in the history
  39. ALSA: firewire-lib: handle quirk to calculate payload quadlets as dat…

    …a block counter
    
    [ Upstream commit 4a48643 ]
    
    Miglia Harmony Audio (OXFW970) has a quirk to put the number of
    accumulated quadlets in CIP payload into the dbc field of CIP header.
    
    This commit handles the quirk in the packet processing layer.
    
    Signed-off-by: Takashi Sakamoto <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    takaswie authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    b75395e View commit details
    Browse the repository at this point in the history
  40. ext4: add a hint for block bitmap corrupt state in mb_groups

    [ Upstream commit 68ee261 ]
    
    If one group is marked as block bitmap corrupted, its free blocks cannot
    be used and its free count is also deducted from the global
    sbi->s_freeclusters_counter. User might be confused about the absent
    free space because we can't query the information about corrupted block
    groups except unreliable error messages in syslog. So add a hint to show
    block bitmap corrupted groups in mb_groups.
    
    Signed-off-by: Zhang Yi <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zhangyi089 authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    baba351 View commit details
    Browse the repository at this point in the history
  41. ext4: forbid commit inconsistent quota data when errors=remount-ro

    [ Upstream commit d8b945f ]
    
    There's issue as follows When do IO fault injection test:
    Quota error (device dm-3): find_block_dqentry: Quota for id 101 referenced but not present
    Quota error (device dm-3): qtree_read_dquot: Can't read quota structure for id 101
    Quota error (device dm-3): do_check_range: Getting block 2021161007 out of range 1-186
    Quota error (device dm-3): qtree_read_dquot: Can't read quota structure for id 661
    
    Now, ext4_write_dquot()/ext4_acquire_dquot()/ext4_release_dquot() may commit
    inconsistent quota data even if process failed. This may lead to filesystem
    corruption.
    To ensure filesystem consistent when errors=remount-ro there is need to call
    ext4_handle_error() to abort journal.
    
    Signed-off-by: Ye Bin <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ye Bin authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    aba6648 View commit details
    Browse the repository at this point in the history
  42. drm/amd/display: Fix nanosec stat overflow

    [ Upstream commit 14d68ac ]
    
    [Why]
    Nanosec stats can overflow on long running systems potentially causing
    statistic logging issues.
    
    [How]
    Use 64bit types for nanosec stats to ensure no overflow.
    
    Reviewed-by: Rodrigo Siqueira <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Aric Cyr <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    AMD-aric authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    354a5d7 View commit details
    Browse the repository at this point in the history
  43. drm/amd/amdgpu: Fix potential ioremap() memory leaks in amdgpu_device…

    …_init()
    
    [ Upstream commit eb4f139 ]
    
    This ensures that the memory mapped by ioremap for adev->rmmio, is
    properly handled in amdgpu_device_init(). If the function exits early
    due to an error, the memory is unmapped. If the function completes
    successfully, the memory remains mapped.
    
    Reported by smatch:
    drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4337 amdgpu_device_init() warn: 'adev->rmmio' from ioremap() not released on lines: 4035,4045,4051,4058,4068,4337
    
    Cc: Christian König <[email protected]>
    Cc: Alex Deucher <[email protected]>
    Signed-off-by: Srinivasan Shanmugam <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    srishanm authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    3a94fea View commit details
    Browse the repository at this point in the history
  44. SUNRPC: increase size of rpc_wait_queue.qlen from unsigned short to u…

    …nsigned int
    
    [ Upstream commit 2c35f43 ]
    
    When the NFS client is under extreme load the rpc_wait_queue.qlen counter
    can be overflowed. Here is an instant of the backlog queue overflow in a
    real world environment shown by drgn helper:
    
    rpc_task_stats(rpc_clnt):
    -------------------------
    rpc_clnt: 0xffff92b65d2bae00
    rpc_xprt: 0xffff9275db64f000
      Queue:  sending[64887] pending[524] backlog[30441] binding[0]
    XMIT task: 0xffff925c6b1d8e98
         WRITE: 750654
            __dta_call_status_580: 65463
            __dta_call_transmit_status_579: 1
            call_reserveresult: 685189
            nfs_client_init_is_complete: 1
        COMMIT: 584
            call_reserveresult: 573
            __dta_call_status_580: 11
        ACCESS: 1
            __dta_call_status_580: 1
       GETATTR: 10
            __dta_call_status_580: 4
            call_reserveresult: 6
    751249 tasks for server 111.222.333.444
    Total tasks: 751249
    
    count_rpc_wait_queues(xprt):
    ----------------------------
    **** rpc_xprt: 0xffff9275db64f000 num_reqs: 65511
    wait_queue: xprt_binding[0] cnt: 0
    wait_queue: xprt_binding[1] cnt: 0
    wait_queue: xprt_binding[2] cnt: 0
    wait_queue: xprt_binding[3] cnt: 0
    rpc_wait_queue[xprt_binding].qlen: 0 maxpriority: 0
    wait_queue: xprt_sending[0] cnt: 0
    wait_queue: xprt_sending[1] cnt: 64887
    wait_queue: xprt_sending[2] cnt: 0
    wait_queue: xprt_sending[3] cnt: 0
    rpc_wait_queue[xprt_sending].qlen: 64887 maxpriority: 3
    wait_queue: xprt_pending[0] cnt: 524
    wait_queue: xprt_pending[1] cnt: 0
    wait_queue: xprt_pending[2] cnt: 0
    wait_queue: xprt_pending[3] cnt: 0
    rpc_wait_queue[xprt_pending].qlen: 524 maxpriority: 0
    wait_queue: xprt_backlog[0] cnt: 0
    wait_queue: xprt_backlog[1] cnt: 685801
    wait_queue: xprt_backlog[2] cnt: 0
    wait_queue: xprt_backlog[3] cnt: 0
    rpc_wait_queue[xprt_backlog].qlen: 30441 maxpriority: 3 [task cnt mismatch]
    
    There is no effect on operations when this overflow occurs. However
    it causes confusion when trying to diagnose the performance problem.
    
    Signed-off-by: Dai Ngo <[email protected]>
    Reviewed-by: Jeff Layton <[email protected]>
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    daimngo authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    43be051 View commit details
    Browse the repository at this point in the history
  45. Revert "ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default"

    [ Upstream commit cb98555 ]
    
    This reverts commit d528486, which was
    originally put in place to work around a s2idle failure on this platform
    where the NVMe device was inaccessible upon resume.
    
    After extended testing, we found that the firmware's implementation of S3
    is buggy and intermittently fails to wake up the system. We need to revert
    to s2idle mode.
    
    The NVMe issue has now been solved more precisely in the commit titled
    "PCI: Disable D3cold on Asus B1400 PCI-NVMe bridge"
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215742
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Daniel Drake <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Acked-by: Jian-Hong Pan <[email protected]>
    Acked-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dsd authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    aaefa79 View commit details
    Browse the repository at this point in the history
  46. libperf evlist: Avoid out-of-bounds access

    [ Upstream commit 1947b92 ]
    
    Parallel testing appears to show a race between allocating and setting
    evsel ids. As there is a bounds check on the xyarray it yields a segv
    like:
    
    ```
    AddressSanitizer:DEADLYSIGNAL
    
    =================================================================
    
    ==484408==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010
    
    ==484408==The signal is caused by a WRITE memory access.
    
    ==484408==Hint: address points to the zero page.
    
        #0 0x55cef5d4eff4 in perf_evlist__id_hash tools/lib/perf/evlist.c:256
        #1 0x55cef5d4f132 in perf_evlist__id_add tools/lib/perf/evlist.c:274
        #2 0x55cef5d4f545 in perf_evlist__id_add_fd tools/lib/perf/evlist.c:315
        #3 0x55cef5a1923f in store_evsel_ids util/evsel.c:3130
        #4 0x55cef5a19400 in evsel__store_ids util/evsel.c:3147
        #5 0x55cef5888204 in __run_perf_stat tools/perf/builtin-stat.c:832
        #6 0x55cef5888c06 in run_perf_stat tools/perf/builtin-stat.c:960
        #7 0x55cef58932db in cmd_stat tools/perf/builtin-stat.c:2878
    ...
    ```
    
    Avoid this crash by early exiting the perf_evlist__id_add_fd and
    perf_evlist__id_add is the access is out-of-bounds.
    
    Signed-off-by: Ian Rogers <[email protected]>
    Cc: Yang Jihong <[email protected]>
    Signed-off-by: Namhyung Kim <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    captain5050 authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    b7d153b View commit details
    Browse the repository at this point in the history
  47. input/touchscreen: imagis: Correct the maximum touch area value

    [ Upstream commit 54a62ed ]
    
    As specified in downstream IST3038B driver and proved by testing,
    the correct maximum reported value of touch area is 16.
    
    Signed-off-by: Markuss Broks <[email protected]>
    Signed-off-by: Karel Balej <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    nergzd723 authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    c87e811 View commit details
    Browse the repository at this point in the history
  48. block: prevent division by zero in blk_rq_stat_sum()

    [ Upstream commit 93f52fb ]
    
    The expression dst->nr_samples + src->nr_samples may
    have zero value on overflow. It is necessary to add
    a check to avoid division by zero.
    
    Found by Linux Verification Center (linuxtesting.org) with Svace.
    
    Signed-off-by: Roman Smirnov <[email protected]>
    Reviewed-by: Sergey Shtylyov <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Roman Smirnov authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    512a01d View commit details
    Browse the repository at this point in the history
  49. RDMA/cm: add timeout to cm_destroy_id wait

    [ Upstream commit 96d9cbe ]
    
    Add timeout to cm_destroy_id, so that userspace can trigger any data
    collection that would help in analyzing the cause of delay in destroying
    the cm_id.
    
    New noinline function helps dtrace/ebpf programs to hook on to it.
    Existing functionality isn't changed except triggering a probe-able new
    function at every timeout interval.
    
    We have seen cases where CM messages stuck with MAD layer (either due to
    software bug or faulty HCA), leading to cm_id getting stuck in the
    following call stack. This patch helps in resolving such issues faster.
    
    kernel: ... INFO: task XXXX:56778 blocked for more than 120 seconds.
    ...
    	Call Trace:
    	__schedule+0x2bc/0x895
    	schedule+0x36/0x7c
    	schedule_timeout+0x1f6/0x31f
     	? __slab_free+0x19c/0x2ba
    	wait_for_completion+0x12b/0x18a
    	? wake_up_q+0x80/0x73
    	cm_destroy_id+0x345/0x610 [ib_cm]
    	ib_destroy_cm_id+0x10/0x20 [ib_cm]
    	rdma_destroy_id+0xa8/0x300 [rdma_cm]
    	ucma_destroy_id+0x13e/0x190 [rdma_ucm]
    	ucma_write+0xe0/0x160 [rdma_ucm]
    	__vfs_write+0x3a/0x16d
    	vfs_write+0xb2/0x1a1
    	? syscall_trace_enter+0x1ce/0x2b8
    	SyS_write+0x5c/0xd3
    	do_syscall_64+0x79/0x1b9
    	entry_SYSCALL_64_after_hwframe+0x16d/0x0
    
    Signed-off-by: Manjunath Patil <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mbpatil369 authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    4097b1f View commit details
    Browse the repository at this point in the history
  50. Input: imagis - use FIELD_GET where applicable

    [ Upstream commit c0ca3db ]
    
    Instead of manually extracting certain bits from registers with binary
    ANDs and shifts, the FIELD_GET macro can be used. With this in mind, the
    *_SHIFT macros can be dropped.
    
    Signed-off-by: Duje Mihanović <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    LegoLivesMatter authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    055e406 View commit details
    Browse the repository at this point in the history
  51. Input: allocate keycode for Display refresh rate toggle

    [ Upstream commit cfeb98b ]
    
    Newer Lenovo Yogas and Legions with 60Hz/90Hz displays send a wmi event
    when Fn + R is pressed. This is intended for use to switch between the
    two refresh rates.
    
    Allocate a new KEY_REFRESH_RATE_TOGGLE keycode for it.
    
    Signed-off-by: Gergo Koteles <[email protected]>
    Acked-by: Dmitry Torokhov <[email protected]>
    Link: https://lore.kernel.org/r/15a5d08c84cf4d7b820de34ebbcf8ae2502fb3ca.1710065750.git.soyer@irl.hu
    Reviewed-by: Ilpo Järvinen <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    soyersoyer authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    70310e5 View commit details
    Browse the repository at this point in the history
  52. platform/x86: touchscreen_dmi: Add an extra entry for a variant of th…

    …e Chuwi Vi8 tablet
    
    [ Upstream commit 1266e2e ]
    
    Signed-off-by: Alban Boyé <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Ilpo Järvinen <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Blafy authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    44479c7 View commit details
    Browse the repository at this point in the history
  53. perf/x86/amd/lbr: Discard erroneous branch entries

    [ Upstream commit 29297ff ]
    
    The Revision Guide for AMD Family 19h Model 10-1Fh processors declares
    Erratum 1452 which states that non-branch entries may erroneously be
    recorded in the Last Branch Record (LBR) stack with the valid and
    spec bits set.
    
    Such entries can be recognized by inspecting bit 61 of the corresponding
    LastBranchStackToIp register. This bit is currently reserved but if found
    to be set, the associated branch entry should be discarded.
    
    Signed-off-by: Sandipan Das <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Link: https://bugzilla.kernel.org/attachment.cgi?id=305518
    Link: https://lore.kernel.org/r/3ad2aa305f7396d41a40e3f054f740d464b16b7f.1706526029.git.sandipan.das@amd.com
    Signed-off-by: Sasha Levin <[email protected]>
    sandip4n authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    39da708 View commit details
    Browse the repository at this point in the history
  54. ktest: force $buildonly = 1 for 'make_warnings_file' test type

    [ Upstream commit 07283c1 ]
    
    The test type "make_warnings_file" should have no mandatory configuration
    parameters other than the ones required by the "build" test type, because
    its purpose is to create a file with build warnings that may or may not be
    used by other subsequent tests. Currently, the only way to use it as a
    stand-alone test is by setting POWER_CYCLE, CONSOLE, SSH_USER,
    BUILD_TARGET, TARGET_IMAGE, REBOOT_TYPE and GRUB_MENU.
    
    Link: https://lkml.kernel.org/r/[email protected]
    
    Cc: John Hawley <[email protected]>
    Signed-off-by: Ricardo B. Marliere <[email protected]>
    Signed-off-by: Steven Rostedt <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rbmarliere authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    5e7da5b View commit details
    Browse the repository at this point in the history
  55. ring-buffer: use READ_ONCE() to read cpu_buffer->commit_page in concu…

    …rrent environment
    
    [ Upstream commit f1e30cb ]
    
    In function ring_buffer_iter_empty(), cpu_buffer->commit_page is read
    while other threads may change it. It may cause the time_stamp that read
    in the next line come from a different page. Use READ_ONCE() to avoid
    having to reason about compiler optimizations now and in future.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Signed-off-by: linke li <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    linke li authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    1e9f561 View commit details
    Browse the repository at this point in the history
  56. tools: iio: replace seekdir() in iio_generic_buffer

    [ Upstream commit 4e6500b ]
    
    Replace seekdir() with rewinddir() in order to fix a localized glibc bug.
    
    One of the glibc patches that stable Gentoo is using causes an improper
    directory stream positioning bug on 32bit arm. That in turn ends up as a
    floating point exception in iio_generic_buffer.
    
    The attached patch provides a fix by using an equivalent function which
    should not cause trouble for other distros and is easier to reason about
    in general as it obviously always goes back to to the start.
    
    https://sourceware.org/bugzilla/show_bug.cgi?id=31212
    
    Signed-off-by: Petre Rodan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rodan authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    63eaa43 View commit details
    Browse the repository at this point in the history
  57. bus: mhi: host: Add MHI_PM_SYS_ERR_FAIL state

    [ Upstream commit bce3f77 ]
    
    When processing a SYSERR, if the device does not respond to the MHI_RESET
    from the host, the host will be stuck in a difficult to recover state.
    The host will remain in MHI_PM_SYS_ERR_PROCESS and not clean up the host
    channels.  Clients will not be notified of the SYSERR via the destruction
    of their channel devices, which means clients may think that the device is
    still up.  Subsequent SYSERR events such as a device fatal error will not
    be processed as the state machine cannot transition from PROCESS back to
    DETECT.  The only way to recover from this is to unload the mhi module
    (wipe the state machine state) or for the mhi controller to initiate
    SHUTDOWN.
    
    This issue was discovered by stress testing soc_reset events on AIC100
    via the sysfs node.
    
    soc_reset is processed entirely in hardware.  When the register write
    hits the endpoint hardware, it causes the soc to reset without firmware
    involvement.  In stress testing, there is a rare race where soc_reset N
    will cause the soc to reset and PBL to signal SYSERR (fatal error).  If
    soc_reset N+1 is triggered before PBL can process the MHI_RESET from the
    host, then the soc will reset again, and re-run PBL from the beginning.
    This will cause PBL to lose all state.  PBL will be waiting for the host
    to respond to the new syserr, but host will be stuck expecting the
    previous MHI_RESET to be processed.
    
    Additionally, the AMSS EE firmware (QSM) was hacked to synthetically
    reproduce the issue by simulating a FW hang after the QSM issued a
    SYSERR.  In this case, soc_reset would not recover the device.
    
    For this failure case, to recover the device, we need a state similar to
    PROCESS, but can transition to DETECT.  There is not a viable existing
    state to use.  POR has the needed transitions, but assumes the device is
    in a good state and could allow the host to attempt to use the device.
    Allowing PROCESS to transition to DETECT invites the possibility of
    parallel SYSERR processing which could get the host and device out of
    sync.
    
    Thus, invent a new state - MHI_PM_SYS_ERR_FAIL
    
    This essentially a holding state.  It allows us to clean up the host
    elements that are based on the old state of the device (channels), but
    does not allow us to directly advance back to an operational state.  It
    does allow the detection and processing of another SYSERR which may
    recover the device, or allows the controller to do a clean shutdown.
    
    Signed-off-by: Jeffrey Hugo <[email protected]>
    Reviewed-by: Carl Vanderlip <[email protected]>
    Reviewed-by: Manivannan Sadhasivam <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Manivannan Sadhasivam <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    quic-jhugo authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    7dbf082 View commit details
    Browse the repository at this point in the history
  58. usb: gadget: uvc: mark incomplete frames with UVC_STREAM_ERR

    [ Upstream commit 2a3b7af ]
    
    If an frame was transmitted incomplete to the host, we set the
    UVC_STREAM_ERR bit in the header for the last request that is going
    to be queued. This way the host will know that it should drop the
    frame instead of trying to display the corrupted content.
    
    Signed-off-by: Michael Grzeschik <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mgrzeschik authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    893b256 View commit details
    Browse the repository at this point in the history
  59. thunderbolt: Keep the domain powered when USB4 port is in redrive mode

    [ Upstream commit a75e068 ]
    
    If a DiplayPort cable is directly connected to the host routers USB4
    port, there is no tunnel involved but the port is in "redrive" mode
    meaning that it is re-driving the DisplayPort signals from its
    DisplayPort source. In this case we need to keep the domain powered on
    otherwise once the domain enters D3cold the connected monitor blanks
    too.
    
    Since this happens only on Intel Barlow Ridge add a quirk that takes
    runtime PM reference if we detect that the USB4 port entered redrive
    mode (and release it once it exits the mode).
    
    Signed-off-by: Mika Westerberg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    westeri authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    f692c54 View commit details
    Browse the repository at this point in the history
  60. usb: typec: tcpci: add generic tcpci fallback compatible

    [ Upstream commit 8774ea7 ]
    
    The driver already support the tcpci binding for the i2c_device_id so
    add the support for the of_device_id too.
    
    Signed-off-by: Marco Felsch <[email protected]>
    Reviewed-by: Heikki Krogerus <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Marco Felsch authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    57e6634 View commit details
    Browse the repository at this point in the history
  61. usb: sl811-hcd: only defined function checkdone if QUIRK2 is defined

    [ Upstream commit 12f371e ]
    
    Function checkdone is only required if QUIRK2 is defined, so add
    appropriate #if / #endif around the function.
    
    Cleans up clang scan build warning:
    drivers/usb/host/sl811-hcd.c:588:18: warning: unused function
    'checkdone' [-Wunused-function]
    
    Signed-off-by: Colin Ian King <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ColinIanKing authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    409289d View commit details
    Browse the repository at this point in the history
  62. thermal/of: Assume polling-delay(-passive) 0 when absent

    [ Upstream commit 4881640 ]
    
    Currently, thermal zones associated with providers that have interrupts
    for signaling hot/critical trips are required to set a polling-delay
    of 0 to indicate no polling. This feels a bit backwards.
    
    Change the code such that "no polling delay" also means "no polling".
    
    Suggested-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Konrad Dybcio <[email protected]>
    Reviewed-by: Dmitry Baryshkov <[email protected]>
    Reviewed-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Daniel Lezcano <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    konradybcio authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    103c0f9 View commit details
    Browse the repository at this point in the history
  63. ASoC: soc-core.c: Skip dummy codec when adding platforms

    [ Upstream commit 23fb6bc ]
    
    When pcm_runtime is adding platform components it will scan all
    registered components. In case of DPCM FE/BE some DAI links will
    configure dummy platform. However both dummy codec and dummy platform
    are using "snd-soc-dummy" as component->name. Dummy codec should be
    skipped when adding platforms otherwise there'll be overflow and UBSAN
    complains.
    
    Reported-by: Zhipeng Wang <[email protected]>
    Signed-off-by: Chancel Liu <[email protected]>
    Link: https://msgid.link/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Chancel Liu authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    8b84926 View commit details
    Browse the repository at this point in the history
  64. fbdev: viafb: fix typo in hw_bitblt_1 and hw_bitblt_2

    [ Upstream commit bc87bb3 ]
    
    There are some actions with value 'tmp' but 'dst_addr' is checked instead.
    It is obvious that a copy-paste error was made here and the value
    of variable 'tmp' should be checked here.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Signed-off-by: Aleksandr Burakov <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Aleksandr Burakov authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    f8a7b7b View commit details
    Browse the repository at this point in the history
  65. io_uring: clear opcode specific data for an early failure

    [ Upstream commit e21e1c4 ]
    
    If failure happens before the opcode prep handler is called, ensure that
    we clear the opcode specific area of the request, which holds data
    specific to that request type. This prevents errors where opcode
    handlers either don't get to clear per-request private data since prep
    isn't even called.
    
    Reported-and-tested-by: [email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    axboe authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    5245a6d View commit details
    Browse the repository at this point in the history
  66. drivers/nvme: Add quirks for device 126f:2262

    [ Upstream commit e89086c ]
    
    This commit adds NVME_QUIRK_NO_DEEPEST_PS and NVME_QUIRK_BOGUS_NID for
    device [126f:2262], which appears to be a generic VID:PID pair used for
    many SSDs based on the Silicon Motion SM2262/SM2262EN controller.
    
    Two of my SSDs with this VID:PID pair exhibit the same behavior:
    
      * They frequently have trouble exiting the deepest power state (5),
        resulting in the entire disk unresponsive.
        Verified by setting nvme_core.default_ps_max_latency_us=10000 and
        observing them behaving normally.
      * They produce all-zero nguid and eui64 with `nvme id-ns` command.
    
    The offending products are:
    
      * HP SSD EX950 1TB
      * HIKVISION C2000Pro 2TB
    
    Signed-off-by: Jiawei Fu <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>
    Reviewed-by: Sagi Grimberg <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    iBug authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    30044c6 View commit details
    Browse the repository at this point in the history
  67. fbmon: prevent division by zero in fb_videomode_from_videomode()

    [ Upstream commit c2d9532 ]
    
    The expression htotal * vtotal can have a zero value on
    overflow. It is necessary to prevent division by zero like in
    fb_var_to_videomode().
    
    Found by Linux Verification Center (linuxtesting.org) with Svace.
    
    Signed-off-by: Roman Smirnov <[email protected]>
    Reviewed-by: Sergey Shtylyov <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Roman Smirnov authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    664206f View commit details
    Browse the repository at this point in the history
  68. netfilter: nf_tables: release batch on table validation from abort path

    commit a45e688 upstream.
    
    Unlike early commit path stage which triggers a call to abort, an
    explicit release of the batch is required on abort, otherwise mutex is
    released and commit_list remains in place.
    
    Add WARN_ON_ONCE to ensure commit_list is empty from the abort path
    before releasing the mutex.
    
    After this patch, commit_list is always assumed to be empty before
    grabbing the mutex, therefore
    
      03c1f1e ("netfilter: Cleanup nft_net->module_list from nf_tables_exit_net()")
    
    only needs to release the pending modules for registration.
    
    Cc: [email protected]
    Fixes: c0391b6 ("netfilter: nf_tables: missing validation from the abort path")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    fcd1993 View commit details
    Browse the repository at this point in the history
  69. netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path

    commit 0d459e2 upstream.
    
    The commit mutex should not be released during the critical section
    between nft_gc_seq_begin() and nft_gc_seq_end(), otherwise, async GC
    worker could collect expired objects and get the released commit lock
    within the same GC sequence.
    
    nf_tables_module_autoload() temporarily releases the mutex to load
    module dependencies, then it goes back to replay the transaction again.
    Move it at the end of the abort phase after nft_gc_seq_end() is called.
    
    Cc: [email protected]
    Fixes: 7203443 ("netfilter: nf_tables: GC transaction race with abort path")
    Reported-by: Kuan-Ting Chen <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    8d3a58a View commit details
    Browse the repository at this point in the history
  70. netfilter: nf_tables: discard table flag update with pending basechai…

    …n deletion
    
    commit 1bc83a0 upstream.
    
    Hook unregistration is deferred to the commit phase, same occurs with
    hook updates triggered by the table dormant flag. When both commands are
    combined, this results in deleting a basechain while leaving its hook
    still registered in the core.
    
    Fixes: 179d9ba ("netfilter: nf_tables: fix table flag updates")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    2aeb805 View commit details
    Browse the repository at this point in the history
  71. tty: n_gsm: require CAP_NET_ADMIN to attach N_GSM0710 ldisc

    commit 67c3775 upstream.
    
    Any unprivileged user can attach N_GSM0710 ldisc, but it requires
    CAP_NET_ADMIN to create a GSM network anyway.
    
    Require initial namespace CAP_NET_ADMIN to do that.
    
    Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: Salvatore Bonaccorso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Thadeu Lima de Souza Cascardo authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    2b85977 View commit details
    Browse the repository at this point in the history
  72. gcc-plugins/stackleak: Avoid .head.text section

    commit e7d24c0 upstream.
    
    The .head.text section carries the startup code that runs with the MMU
    off or with a translation of memory that deviates from the ordinary one.
    So avoid instrumentation with the stackleak plugin, which already avoids
    .init.text and .noinstr.text entirely.
    
    Fixes: 48204ab ("x86/sme: Move early SME kernel encryption handling into .head.text")
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-lkp/[email protected]
    Signed-off-by: Ard Biesheuvel <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ardbiesheuvel authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    cf0650a View commit details
    Browse the repository at this point in the history
  73. Revert "scsi: sd: usb_storage: uas: Access media prior to querying de…

    …vice properties"
    
    This reverts commit b73dd5f which is
    commit 321da3d upstream.
    
    It is known to cause problems and has asked to be dropped.
    
    Link: https://lore.kernel.org/r/[email protected]
    Cc: Tasos Sahanidis <[email protected]>
    Cc: Ewan D. Milne <[email protected]>
    Cc: Bart Van Assche <[email protected]>
    Cc: Tasos Sahanidis <[email protected]>
    Cc: Martin K. Petersen <[email protected]>
    Cc: James Bottomley <[email protected]>
    Cc: Sasha Levin <[email protected]>
    Reported-by: John David Anglin <[email protected]>
    Reported-by: Cyril Brulebois <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    f1465ff View commit details
    Browse the repository at this point in the history
  74. Revert "scsi: core: Add struct for args to execution functions"

    This reverts commit cf33e6c which is
    commit d094956 upstream.
    
    It is known to cause problems and has asked to be dropped.
    
    Link: https://lore.kernel.org/r/[email protected]
    Cc: Tasos Sahanidis <[email protected]>
    Cc: Ewan D. Milne <[email protected]>
    Cc: Bart Van Assche <[email protected]>
    Cc: Tasos Sahanidis <[email protected]>
    Cc: Martin K. Petersen <[email protected]>
    Cc: James Bottomley <[email protected]>
    Cc: Sasha Levin <[email protected]>
    Reported-by: John David Anglin <[email protected]>
    Reported-by: Cyril Brulebois <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    345b6b8 View commit details
    Browse the repository at this point in the history
  75. scsi: sd: usb_storage: uas: Access media prior to querying device pro…

    …perties
    
    [ Upstream commit 321da3d ]
    
    It has been observed that some USB/UAS devices return generic properties
    hardcoded in firmware for mode pages for a period of time after a device
    has been discovered. The reported properties are either garbage or they do
    not accurately reflect the characteristics of the physical storage device
    attached in the case of a bridge.
    
    Prior to commit 1e02939 ("scsi: sd: Reorganize DIF/DIX code to
    avoid calling revalidate twice") we would call revalidate several
    times during device discovery. As a result, incorrect values would
    eventually get replaced with ones accurately describing the attached
    storage. When we did away with the redundant revalidate pass, several
    cases were reported where devices reported nonsensical values or would
    end up in write-protected state.
    
    An initial attempt at addressing this issue involved introducing a
    delayed second revalidate invocation. However, this approach still
    left some devices reporting incorrect characteristics.
    
    Tasos Sahanidis debugged the problem further and identified that
    introducing a READ operation prior to MODE SENSE fixed the problem and that
    it wasn't a timing issue. Issuing a READ appears to cause the devices to
    update their state to reflect the actual properties of the storage
    media. Device properties like vendor, model, and storage capacity appear to
    be correctly reported from the get-go. It is unclear why these devices
    defer populating the remaining characteristics.
    
    Match the behavior of a well known commercial operating system and
    trigger a READ operation prior to querying device characteristics to
    force the device to populate the mode pages.
    
    The additional READ is triggered by a flag set in the USB storage and
    UAS drivers. We avoid issuing the READ for other transport classes
    since some storage devices identify Linux through our particular
    discovery command sequence.
    
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: 1e02939 ("scsi: sd: Reorganize DIF/DIX code to avoid calling revalidate twice")
    Cc: [email protected]
    Reported-by: Tasos Sahanidis <[email protected]>
    Reviewed-by: Ewan D. Milne <[email protected]>
    Reviewed-by: Bart Van Assche <[email protected]>
    Tested-by: Tasos Sahanidis <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    martinkpetersen authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    3a9c459 View commit details
    Browse the repository at this point in the history
  76. virtio: reenable config if freezing device failed

    commit 310227f upstream.
    
    Currently, we don't reenable the config if freezing the device failed.
    
    For example, virtio-mem currently doesn't support suspend+resume, and
    trying to freeze the device will always fail. Afterwards, the device
    will no longer respond to resize requests, because it won't get notified
    about config changes.
    
    Let's fix this by re-enabling the config if freezing fails.
    
    Fixes: 22b7050 ("virtio: defer config changed notifications")
    Cc: <[email protected]>
    Cc: "Michael S. Tsirkin" <[email protected]>
    Cc: Jason Wang <[email protected]>
    Cc: Xuan Zhuo <[email protected]>
    Signed-off-by: David Hildenbrand <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    davidhildenbrand authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    649e564 View commit details
    Browse the repository at this point in the history
  77. randomize_kstack: Improve entropy diffusion

    [ Upstream commit 9c573cd ]
    
    The kstack_offset variable was really only ever using the low bits for
    kernel stack offset entropy. Add a ror32() to increase bit diffusion.
    
    Suggested-by: Arnd Bergmann <[email protected]>
    Fixes: 39218ff ("stack: Optionally randomize kernel stack offset each syscall")
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kees authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    e80b498 View commit details
    Browse the repository at this point in the history
  78. platform/x86: intel-vbtn: Update tablet mode switch at end of probe

    [ Upstream commit 434e578 ]
    
    ACER Vivobook Flip (TP401NAS) virtual intel switch is implemented as
    follow:
    
       Device (VGBI)
       {
           Name (_HID, EisaId ("INT33D6") ...
           Name (VBDS, Zero)
           Method (_STA, 0, Serialized)  // _STA: Status ...
           Method (VBDL, 0, Serialized)
           {
               PB1E |= 0x20
               VBDS |= 0x40
           }
           Method (VGBS, 0, Serialized)
           {
               Return (VBDS) /* \_SB_.PCI0.SBRG.EC0_.VGBI.VBDS */
           }
           ...
        }
    
    By default VBDS is set to 0. At boot it is set to clamshell (bit 6 set)
    only after method VBDL is executed.
    
    Since VBDL is now evaluated in the probe routine later, after the device
    is registered, the retrieved value of VBDS was still 0 ("tablet mode")
    when setting up the virtual switch.
    
    Make sure to evaluate VGBS after VBDL, to ensure the
    convertible boots in clamshell mode, the expected default.
    
    Fixes: 2617317 ("platform/x86: intel-vbtn: Eval VBDL after registering our notifier")
    Signed-off-by: Gwendal Grignou <[email protected]>
    Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>
    Reviewed-by: Hans de Goede <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Ilpo Järvinen <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    gwendalcr authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    00e34ff View commit details
    Browse the repository at this point in the history
  79. Bluetooth: btintel: Fixe build regression

    commit 6e62ebf upstream.
    
    This fixes the following build regression:
    
    drivers-bluetooth-btintel.c-btintel_read_version()-warn:
    passing-zero-to-PTR_ERR
    
    Fixes: b79e040 ("Bluetooth: btintel: Fix null ptr deref in btintel_read_version")
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Vudentz authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    21f5cfe View commit details
    Browse the repository at this point in the history
  80. net: mpls: error out if inner headers are not set

    commit 025f8ad upstream.
    
    mpls_gso_segment() assumes skb_inner_network_header() returns
    a valid result:
    
      mpls_hlen = skb_inner_network_header(skb) - skb_network_header(skb);
      if (unlikely(!mpls_hlen || mpls_hlen % MPLS_HLEN))
            goto out;
      if (unlikely(!pskb_may_pull(skb, mpls_hlen)))
    
    With syzbot reproducer, skb_inner_network_header() yields 0,
    skb_network_header() returns 108, so this will
    "pskb_may_pull(skb, -108)))" which triggers a newly added
    DEBUG_NET_WARN_ON_ONCE() check:
    
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 5068 at include/linux/skbuff.h:2723 pskb_may_pull_reason include/linux/skbuff.h:2723 [inline]
    WARNING: CPU: 0 PID: 5068 at include/linux/skbuff.h:2723 pskb_may_pull include/linux/skbuff.h:2739 [inline]
    WARNING: CPU: 0 PID: 5068 at include/linux/skbuff.h:2723 mpls_gso_segment+0x773/0xaa0 net/mpls/mpls_gso.c:34
    [..]
     skb_mac_gso_segment+0x383/0x740 net/core/gso.c:53
     nsh_gso_segment+0x40a/0xad0 net/nsh/nsh.c:108
     skb_mac_gso_segment+0x383/0x740 net/core/gso.c:53
     __skb_gso_segment+0x324/0x4c0 net/core/gso.c:124
     skb_gso_segment include/net/gso.h:83 [inline]
     [..]
     sch_direct_xmit+0x11a/0x5f0 net/sched/sch_generic.c:327
     [..]
     packet_sendmsg+0x46a9/0x6130 net/packet/af_packet.c:3113
     [..]
    
    First iteration of this patch made mpls_hlen signed and changed
    test to error out to "mpls_hlen <= 0 || ..".
    
    Eric Dumazet said:
     > I was thinking about adding a debug check in skb_inner_network_header()
     > if inner_network_header is zero (that would mean it is not 'set' yet),
     > but this would trigger even after your patch.
    
    So add new skb_inner_network_header_was_set() helper and use that.
    
    The syzbot reproducer injects data via packet socket. The skb that gets
    allocated and passed down the stack has ->protocol set to NSH (0x894f)
    and gso_type set to SKB_GSO_UDP | SKB_GSO_DODGY.
    
    This gets passed to skb_mac_gso_segment(), which sees NSH as ptype to
    find a callback for.  nsh_gso_segment() retrieves next type:
    
            proto = tun_p_to_eth_p(nsh_hdr(skb)->np);
    
    ... which is MPLS (TUN_P_MPLS_UC). It updates skb->protocol and then
    calls mpls_gso_segment().  Inner offsets are all 0, so mpls_gso_segment()
    ends up with a negative header size.
    
    In case more callers rely on silent handling of such large may_pull values
    we could also 'legalize' this behaviour, either replacing the debug check
    with (len > INT_MAX) test or removing it and instead adding a comment
    before existing
    
     if (unlikely(len > skb->len))
        return SKB_DROP_REASON_PKT_TOO_SMALL;
    
    test in pskb_may_pull_reason(), saying that this check also implicitly
    takes care of callers that miscompute header sizes.
    
    Cc: Simon Horman <[email protected]>
    Fixes: 219eee9 ("net: skbuff: add overflow debug check to pull/push helpers")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/netdev/[email protected]/raw
    Signed-off-by: Florian Westphal <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Florian Westphal authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    cea93da View commit details
    Browse the repository at this point in the history
  81. VMCI: Fix possible memcpy() run-time warning in vmci_datagram_invoke_…

    …guest_handler()
    
    commit e606e4b upstream.
    
    The changes are similar to those given in the commit 19b070f
    ("VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()").
    
    Fix filling of the msg and msg_payload in dg_info struct, which prevents a
    possible "detected field-spanning write" of memcpy warning that is issued
    by the tracking mechanism __fortify_memcpy_chk.
    
    Signed-off-by: Vasiliy Kovalev <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Vasiliy Kovalev authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    eea65ed View commit details
    Browse the repository at this point in the history
  82. Revert "drm/amd/amdgpu: Fix potential ioremap() memory leaks in amdgp…

    …u_device_init()"
    
    commit 03c6284 upstream.
    
    This patch causes the following iounmap erorr and calltrace
    iounmap: bad address 00000000d0b3631f
    
    The original patch was unjustified because amdgpu_device_fini_sw() will
    always cleanup the rmmio mapping.
    
    This reverts commit eb4f139.
    
    Signed-off-by: Ma Jun <[email protected]>
    Suggested-by: Christian König <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Ma Jun authored and gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    c5f9fe2 View commit details
    Browse the repository at this point in the history
  83. Linux 6.1.86

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Pavel Machek (CIP) <[email protected]>
    Tested-by: SeongJae Park <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: kernelci.org bot <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Tested-by: Mateusz Jończyk <[email protected]>
    Tested-by: Kelsey Steele <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    cd5d98c View commit details
    Browse the repository at this point in the history
  84. base packaging

    Kernel Builder (gloin) committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    55b48e6 View commit details
    Browse the repository at this point in the history
  85. UBUNTU: SAUCE: kbuild: add -fcf-protection=none when using retpoline …

    …flags
    
    BugLink: [Replace -fcf-protection=none patch with new version]
    
    The gcc -fcf-protection=branch option is not compatible with
    -mindirect-branch=thunk-extern. The latter is used when
    CONFIG_RETPOLINE is selected, and this will fail to build with
    a gcc which has -fcf-protection=branch enabled by default. Adding
    -fcf-protection=none when building with retpoline support to
    prevents such build failures.
    
    Signed-off-by: Seth Forshee <[email protected]>
    Seth Forshee authored and Kernel Builder (gloin) committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    bab2abc View commit details
    Browse the repository at this point in the history
  86. UBUNTU: SAUCE: add vmlinux.strip to BOOT_TARGETS1 on powerpc

    Signed-off-by: Andy Whitcroft <[email protected]>
    Andy Whitcroft authored and Kernel Builder (gloin) committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    078025b View commit details
    Browse the repository at this point in the history
  87. UBUNTU: SAUCE: tools/hv/lsvmbus -- add manual page

    BugLink: http://bugs.launchpad.net/bugs/1585311
    
    Signed-off-by: Andy Whitcroft <[email protected]>
    Acked-by: Tim Gardner <[email protected]>
    Acked-by: Brad Figg <[email protected]>
    Signed-off-by: Kamal Mostafa <[email protected]>
    Andy Whitcroft authored and Kernel Builder (gloin) committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    1daa955 View commit details
    Browse the repository at this point in the history
  88. debian changelog

    Kernel Builder (gloin) committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    3fb87a5 View commit details
    Browse the repository at this point in the history
  89. configs (based on Ubuntu-6.1.0-16.16)

    Kernel Builder (gloin) committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    1df49dc View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2024

  1. System76 Linux

    jackpot51 committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    f995a39 View commit details
    Browse the repository at this point in the history
  2. ALSA: hda/realtek - Reapply pin fixup for oryp5

    The pin fixup is required to detect headset microphones on the oryp5.
    
    Fixes: 80690a2 ("ALSA: hda/realtek - Add quirk for Tuxedo XC 1509")
    Signed-off-by: Tim Crawford <[email protected]>
    crawfxrd authored and jackpot51 committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    88ab5bb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    83b2c8c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a8d63d4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8a36c56 View commit details
    Browse the repository at this point in the history
  6. Adds an ALSA mapping for Gigabyte Pro WiFi Rev 2.1

    This patch was written by Takashi Iwai, I am just
    commiting it into the pop-os kernel before this
    is upstreamed
    13r0ck authored and jackpot51 committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    be10705 View commit details
    Browse the repository at this point in the history
  7. Mixer-Maps: Add alternate ALC4080

    Asus released motherboard(s) with an alternate ALC4080 that lacks
    a SPDIF jack, and requires applying this map.
    13r0ck authored and jackpot51 committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    2c8c64f View commit details
    Browse the repository at this point in the history
  8. Rewrite mixer map for TRX40 Aorus Master

    The Aorus Xtreme uses the same ID for audio controller, but the
    maps are very different. This successfully fixes all of the
    audio jacks on the back.
    13r0ck authored and jackpot51 committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    5bbfc4a View commit details
    Browse the repository at this point in the history
  9. ALSA: hda - Improve 3.5mm hotplug w/ROG strix B550

    When plugging of unplugging an audio jack on this motherbaord,
    sometimes the audio jacks would stop appearing to
    pipewire/pulseaudio. Interestingly `cat`-ing out the file
    `/proc/asound/<card number>/codec#0`, and or restarting pipewire
    fixes the issue temporarily.
    
    This PR improves the current functionality by making hotplug with
    one 3.5mm jack work, it still breaks if hotplug is between multiple
    jacks though.
    13r0ck authored and jackpot51 committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    0da7f22 View commit details
    Browse the repository at this point in the history
  10. Downgrade to gcc-11

    jackpot51 committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    e86f47b View commit details
    Browse the repository at this point in the history
  11. Revert "misc: rtsx: rts522a rts5228 rts5261 support Runtime PM" (#193)

    This reverts commit 86f4c65.
    13r0ck authored and jackpot51 committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    496bd20 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    873721f View commit details
    Browse the repository at this point in the history
  13. DROP ON REBASE: 6.1.86-76060186.202404130737 based on 6.1.86-060186.2…

    …02404130737
    
    Signed-off-by: Jeremy Soller <[email protected]>
    jackpot51 committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    ee923f6 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2024

  1. Downgrade to gcc-10

    jackpot51 committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    665fe91 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e99b2e9 View commit details
    Browse the repository at this point in the history