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

NAS-123761 / 24.04 / Update to v6.1.49 to fix CVEs #111

Merged
merged 745 commits into from
Aug 29, 2023
Merged
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Aug 16, 2023

  1. net: tls: avoid discarding data on record close

    commit 6b47808 upstream.
    
    TLS records end with a 16B tag. For TLS device offload we only
    need to make space for this tag in the stream, the device will
    generate and replace it with the actual calculated tag.
    
    Long time ago the code would just re-reference the head frag
    which mostly worked but was suboptimal because it prevented TCP
    from combining the record into a single skb frag. I'm not sure
    if it was correct as the first frag may be shorter than the tag.
    
    The commit under fixes tried to replace that with using the page
    frag and if the allocation failed rolling back the data, if record
    was long enough. It achieves better fragment coalescing but is
    also buggy.
    
    We don't roll back the iterator, so unless we're at the end of
    send we'll skip the data we designated as tag and start the
    next record as if the rollback never happened.
    There's also the possibility that the record was constructed
    with MSG_MORE and the data came from a different syscall and
    we already told the user space that we "got it".
    
    Allocate a single dummy page and use it as fallback.
    
    Found by code inspection, and proven by forcing allocation
    failures.
    
    Fixes: e7b159a ("net/tls: remove the record tail optimization")
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kuba-moo authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    059ec82 View commit details
    Browse the repository at this point in the history
  2. net: marvell: prestera: fix handling IPv4 routes with nhid

    commit 2aa71b4 upstream.
    
    Fix handling IPv4 routes referencing a nexthop via its id by replacing
    calls to fib_info_nh() with fib_info_nhc().
    
    Trying to add an IPv4 route referencing a nextop via nhid:
    
        $ ip link set up swp5
        $ ip a a 10.0.0.1/24 dev swp5
        $ ip nexthop add dev swp5 id 20 via 10.0.0.2
        $ ip route add 10.0.1.0/24 nhid 20
    
    triggers warnings when trying to handle the route:
    
    [  528.805763] ------------[ cut here ]------------
    [  528.810437] WARNING: CPU: 3 PID: 53 at include/net/nexthop.h:468 __prestera_fi_is_direct+0x2c/0x68 [prestera]
    [  528.820434] Modules linked in: prestera_pci act_gact act_police sch_ingress cls_u32 cls_flower prestera arm64_delta_tn48m_dn_led(O) arm64_delta_tn48m_dn_cpld(O) [last unloaded: prestera_pci]
    [  528.837485] CPU: 3 PID: 53 Comm: kworker/u8:3 Tainted: G           O       6.4.5 #1
    [  528.845178] Hardware name: delta,tn48m-dn (DT)
    [  528.849641] Workqueue: prestera_ordered __prestera_router_fib_event_work [prestera]
    [  528.857352] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  528.864347] pc : __prestera_fi_is_direct+0x2c/0x68 [prestera]
    [  528.870135] lr : prestera_k_arb_fib_evt+0xb20/0xd50 [prestera]
    [  528.876007] sp : ffff80000b20bc90
    [  528.879336] x29: ffff80000b20bc90 x28: 0000000000000000 x27: ffff0001374d3a48
    [  528.886510] x26: ffff000105604000 x25: ffff000134af8a28 x24: ffff0001374d3800
    [  528.893683] x23: ffff000101c89148 x22: ffff000101c89000 x21: ffff000101c89200
    [  528.900855] x20: ffff00013641fda0 x19: ffff800009d01088 x18: 0000000000000059
    [  528.908027] x17: 0000000000000277 x16: 0000000000000000 x15: 0000000000000000
    [  528.915198] x14: 0000000000000003 x13: 00000000000fe400 x12: 0000000000000000
    [  528.922371] x11: 0000000000000002 x10: 0000000000000aa0 x9 : ffff8000013d2020
    [  528.929543] x8 : 0000000000000018 x7 : 000000007b1703f8 x6 : 000000001ca72f86
    [  528.936715] x5 : 0000000033399ea7 x4 : 0000000000000000 x3 : ffff0001374d3acc
    [  528.943886] x2 : 0000000000000000 x1 : ffff00010200de00 x0 : ffff000134ae3f80
    [  528.951058] Call trace:
    [  528.953516]  __prestera_fi_is_direct+0x2c/0x68 [prestera]
    [  528.958952]  __prestera_router_fib_event_work+0x100/0x158 [prestera]
    [  528.965348]  process_one_work+0x208/0x488
    [  528.969387]  worker_thread+0x4c/0x430
    [  528.973068]  kthread+0x120/0x138
    [  528.976313]  ret_from_fork+0x10/0x20
    [  528.979909] ---[ end trace 0000000000000000 ]---
    [  528.984998] ------------[ cut here ]------------
    [  528.989645] WARNING: CPU: 3 PID: 53 at include/net/nexthop.h:468 __prestera_fi_is_direct+0x2c/0x68 [prestera]
    [  528.999628] Modules linked in: prestera_pci act_gact act_police sch_ingress cls_u32 cls_flower prestera arm64_delta_tn48m_dn_led(O) arm64_delta_tn48m_dn_cpld(O) [last unloaded: prestera_pci]
    [  529.016676] CPU: 3 PID: 53 Comm: kworker/u8:3 Tainted: G        W  O       6.4.5 #1
    [  529.024368] Hardware name: delta,tn48m-dn (DT)
    [  529.028830] Workqueue: prestera_ordered __prestera_router_fib_event_work [prestera]
    [  529.036539] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  529.043533] pc : __prestera_fi_is_direct+0x2c/0x68 [prestera]
    [  529.049318] lr : __prestera_k_arb_fc_apply+0x280/0x2f8 [prestera]
    [  529.055452] sp : ffff80000b20bc60
    [  529.058781] x29: ffff80000b20bc60 x28: 0000000000000000 x27: ffff0001374d3a48
    [  529.065953] x26: ffff000105604000 x25: ffff000134af8a28 x24: ffff0001374d3800
    [  529.073126] x23: ffff000101c89148 x22: ffff000101c89148 x21: ffff00013641fda0
    [  529.080299] x20: ffff000101c89000 x19: ffff000101c89020 x18: 0000000000000059
    [  529.087471] x17: 0000000000000277 x16: 0000000000000000 x15: 0000000000000000
    [  529.094642] x14: 0000000000000003 x13: 00000000000fe400 x12: 0000000000000000
    [  529.101814] x11: 0000000000000002 x10: 0000000000000aa0 x9 : ffff8000013cee80
    [  529.108985] x8 : 0000000000000018 x7 : 000000007b1703f8 x6 : 0000000000000018
    [  529.116157] x5 : 00000000d3497eb6 x4 : ffff000105604081 x3 : 000000008e979557
    [  529.123329] x2 : 0000000000000000 x1 : ffff00010200de00 x0 : ffff000134ae3f80
    [  529.130501] Call trace:
    [  529.132958]  __prestera_fi_is_direct+0x2c/0x68 [prestera]
    [  529.138394]  prestera_k_arb_fib_evt+0x6b8/0xd50 [prestera]
    [  529.143918]  __prestera_router_fib_event_work+0x100/0x158 [prestera]
    [  529.150313]  process_one_work+0x208/0x488
    [  529.154348]  worker_thread+0x4c/0x430
    [  529.158030]  kthread+0x120/0x138
    [  529.161274]  ret_from_fork+0x10/0x20
    [  529.164867] ---[ end trace 0000000000000000 ]---
    
    and results in a non offloaded route:
    
        $ ip route
        10.0.0.0/24 dev swp5 proto kernel scope link src 10.0.0.1 rt_trap
        10.0.1.0/24 nhid 20 via 10.0.0.2 dev swp5 rt_trap
    
    When creating a route referencing a nexthop via its ID, the nexthop will
    be stored in a separate nh pointer instead of the array of nexthops in
    the fib_info struct. This causes issues since fib_info_nh() only handles
    the nexthops array, but not the separate nh pointer, and will loudly
    WARN about it.
    
    In contrast fib_info_nhc() handles both, but returns a fib_nh_common
    pointer instead of a fib_nh pointer. Luckily we only ever access fields
    from the fib_nh_common parts, so we can just replace all instances of
    fib_info_nh() with fib_info_nhc() and access the fields via their
    fib_nh_common names.
    
    This allows handling IPv4 routes with an external nexthop, and they now
    get offloaded as expected:
    
        $ ip route
        10.0.0.0/24 dev swp5 proto kernel scope link src 10.0.0.1 rt_trap
        10.0.1.0/24 nhid 20 via 10.0.0.2 dev swp5 offload rt_offload
    
    Fixes: 396b80c ("net: marvell: prestera: Add neighbour cache accounting")
    Signed-off-by: Jonas Gorski <[email protected]>
    Acked-by: Elad Nachman <[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]>
    KanjiMonster authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    a3e5f3b View commit details
    Browse the repository at this point in the history
  3. net: phy: at803x: remove set/get wol callbacks for AR8032

    commit d7791ce upstream.
    
    Since the AR8032 part does not support wol, remove related callbacks
    from it.
    
    Fixes: 5800091 ("net: phy: at803x: add support for AR8032 PHY")
    Signed-off-by: Li Yang <[email protected]>
    Cc: David Bauer <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Li Yang authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    001b7d6 View commit details
    Browse the repository at this point in the history
  4. net: dsa: ocelot: call dsa_tag_8021q_unregister() under rtnl_lock() o…

    …n driver remove
    
    commit a94c16a upstream.
    
    When the tagging protocol in current use is "ocelot-8021q" and we unbind
    the driver, we see this splat:
    
    $ echo '0000:00:00.2' > /sys/bus/pci/drivers/fsl_enetc/unbind
    mscc_felix 0000:00:00.5 swp0: left promiscuous mode
    sja1105 spi2.0: Link is Down
    DSA: tree 1 torn down
    mscc_felix 0000:00:00.5 swp2: left promiscuous mode
    sja1105 spi2.2: Link is Down
    DSA: tree 3 torn down
    fsl_enetc 0000:00:00.2 eno2: left promiscuous mode
    mscc_felix 0000:00:00.5: Link is Down
    ------------[ cut here ]------------
    RTNL: assertion failed at net/dsa/tag_8021q.c (409)
    WARNING: CPU: 1 PID: 329 at net/dsa/tag_8021q.c:409 dsa_tag_8021q_unregister+0x12c/0x1a0
    Modules linked in:
    CPU: 1 PID: 329 Comm: bash Not tainted 6.5.0-rc3+ #771
    pc : dsa_tag_8021q_unregister+0x12c/0x1a0
    lr : dsa_tag_8021q_unregister+0x12c/0x1a0
    Call trace:
     dsa_tag_8021q_unregister+0x12c/0x1a0
     felix_tag_8021q_teardown+0x130/0x150
     felix_teardown+0x3c/0xd8
     dsa_tree_teardown_switches+0xbc/0xe0
     dsa_unregister_switch+0x168/0x260
     felix_pci_remove+0x30/0x60
     pci_device_remove+0x4c/0x100
     device_release_driver_internal+0x188/0x288
     device_links_unbind_consumers+0xfc/0x138
     device_release_driver_internal+0xe0/0x288
     device_driver_detach+0x24/0x38
     unbind_store+0xd8/0x108
     drv_attr_store+0x30/0x50
    ---[ end trace 0000000000000000 ]---
    ------------[ cut here ]------------
    RTNL: assertion failed at net/8021q/vlan_core.c (376)
    WARNING: CPU: 1 PID: 329 at net/8021q/vlan_core.c:376 vlan_vid_del+0x1b8/0x1f0
    CPU: 1 PID: 329 Comm: bash Tainted: G        W          6.5.0-rc3+ #771
    pc : vlan_vid_del+0x1b8/0x1f0
    lr : vlan_vid_del+0x1b8/0x1f0
     dsa_tag_8021q_unregister+0x8c/0x1a0
     felix_tag_8021q_teardown+0x130/0x150
     felix_teardown+0x3c/0xd8
     dsa_tree_teardown_switches+0xbc/0xe0
     dsa_unregister_switch+0x168/0x260
     felix_pci_remove+0x30/0x60
     pci_device_remove+0x4c/0x100
     device_release_driver_internal+0x188/0x288
     device_links_unbind_consumers+0xfc/0x138
     device_release_driver_internal+0xe0/0x288
     device_driver_detach+0x24/0x38
     unbind_store+0xd8/0x108
     drv_attr_store+0x30/0x50
    DSA: tree 0 torn down
    
    This was somewhat not so easy to spot, because "ocelot-8021q" is not the
    default tagging protocol, and thus, not everyone who tests the unbinding
    path may have switched to it beforehand. The default
    felix_tag_npi_teardown() does not require rtnl_lock() to be held.
    
    Fixes: 7c83a7c ("net: dsa: add a second tagger for Ocelot switches based on tag_8021q")
    Signed-off-by: Vladimir Oltean <[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]>
    vladimiroltean authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    758dbcf View commit details
    Browse the repository at this point in the history
  5. net: hns3: refactor hclge_mac_link_status_wait for interface reuse

    commit 08469da upstream.
    
    Some nic configurations could only be performed after link is down. So this
    patch refactor this API for reuse.
    
    Signed-off-by: Jie Wang <[email protected]>
    Signed-off-by: Jijie Shao <[email protected]>
    Reviewed-by: Leon Romanovsky <[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]>
    Jie Wang authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    667ce6a View commit details
    Browse the repository at this point in the history
  6. net: hns3: add wait until mac link down

    commit 6265e24 upstream.
    
    In some configure flow of hns3 driver, for example, change mtu, it will
    disable MAC through firmware before configuration. But firmware disables
    MAC asynchronously. The rx traffic may be not stopped in this case.
    
    So fixes it by waiting until mac link is down.
    
    Fixes: a9775bb ("net: hns3: fix set and get link ksettings issue")
    Signed-off-by: Jie Wang <[email protected]>
    Signed-off-by: Jijie Shao <[email protected]>
    Reviewed-by: Leon Romanovsky <[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]>
    Jie Wang authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    59bad91 View commit details
    Browse the repository at this point in the history
  7. net: hns3: fix deadlock issue when externel_lb and reset are executed…

    … together
    
    commit ac6257a upstream.
    
    When externel_lb and reset are executed together, a deadlock may
    occur:
    [ 3147.217009] INFO: task kworker/u321:0:7 blocked for more than 120 seconds.
    [ 3147.230483] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [ 3147.238999] task:kworker/u321:0  state:D stack:    0 pid:    7 ppid:     2 flags:0x00000008
    [ 3147.248045] Workqueue: hclge hclge_service_task [hclge]
    [ 3147.253957] Call trace:
    [ 3147.257093]  __switch_to+0x7c/0xbc
    [ 3147.261183]  __schedule+0x338/0x6f0
    [ 3147.265357]  schedule+0x50/0xe0
    [ 3147.269185]  schedule_preempt_disabled+0x18/0x24
    [ 3147.274488]  __mutex_lock.constprop.0+0x1d4/0x5dc
    [ 3147.279880]  __mutex_lock_slowpath+0x1c/0x30
    [ 3147.284839]  mutex_lock+0x50/0x60
    [ 3147.288841]  rtnl_lock+0x20/0x2c
    [ 3147.292759]  hclge_reset_prepare+0x68/0x90 [hclge]
    [ 3147.298239]  hclge_reset_subtask+0x88/0xe0 [hclge]
    [ 3147.303718]  hclge_reset_service_task+0x84/0x120 [hclge]
    [ 3147.309718]  hclge_service_task+0x2c/0x70 [hclge]
    [ 3147.315109]  process_one_work+0x1d0/0x490
    [ 3147.319805]  worker_thread+0x158/0x3d0
    [ 3147.324240]  kthread+0x108/0x13c
    [ 3147.328154]  ret_from_fork+0x10/0x18
    
    In externel_lb process, the hns3 driver call napi_disable()
    first, then the reset happen, then the restore process of the
    externel_lb will fail, and will not call napi_enable(). When
    doing externel_lb again, napi_disable() will be double call,
    cause a deadlock of rtnl_lock().
    
    This patch use the HNS3_NIC_STATE_DOWN state to protect the
    calling of napi_disable() and napi_enable() in externel_lb
    process, just as the usage in ndo_stop() and ndo_start().
    
    Fixes: 04b6ba1 ("net: hns3: add support for external loopback test")
    Signed-off-by: Yonglong Liu <[email protected]>
    Signed-off-by: Jijie Shao <[email protected]>
    Reviewed-by: Leon Romanovsky <[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]>
    liuyonglong86 authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    743f7c1 View commit details
    Browse the repository at this point in the history
  8. nexthop: Fix infinite nexthop dump when using maximum nexthop ID

    commit 913f60c upstream.
    
    A netlink dump callback can return a positive number to signal that more
    information needs to be dumped or zero to signal that the dump is
    complete. In the second case, the core netlink code will append the
    NLMSG_DONE message to the skb in order to indicate to user space that
    the dump is complete.
    
    The nexthop dump callback always returns a positive number if nexthops
    were filled in the provided skb, even if the dump is complete. This
    means that a dump will span at least two recvmsg() calls as long as
    nexthops are present. In the last recvmsg() call the dump callback will
    not fill in any nexthops because the previous call indicated that the
    dump should restart from the last dumped nexthop ID plus one.
    
     # ip nexthop add id 1 blackhole
     # strace -e sendto,recvmsg -s 5 ip nexthop
     sendto(3, [[{nlmsg_len=24, nlmsg_type=RTM_GETNEXTHOP, nlmsg_flags=NLM_F_REQUEST|NLM_F_DUMP, nlmsg_seq=1691394315, nlmsg_pid=0}, {nh_family=AF_UNSPEC, nh_scope=RT_SCOPE_UNIVERSE, nh_protocol=RTPROT_UNSPEC, nh_flags=0}], {nlmsg_len=0, nlmsg_type=0 /* NLMSG_??? */, nlmsg_flags=0, nlmsg_seq=0, nlmsg_pid=0}], 152, 0, NULL, 0) = 152
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 36
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=36, nlmsg_type=RTM_NEWNEXTHOP, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691394315, nlmsg_pid=343}, {nh_family=AF_INET, nh_scope=RT_SCOPE_UNIVERSE, nh_protocol=RTPROT_UNSPEC, nh_flags=0}, [[{nla_len=8, nla_type=NHA_ID}, 1], {nla_len=4, nla_type=NHA_BLACKHOLE}]], iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 36
     id 1 blackhole
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 20
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=20, nlmsg_type=NLMSG_DONE, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691394315, nlmsg_pid=343}, 0], iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 20
     +++ exited with 0 +++
    
    This behavior is both inefficient and buggy. If the last nexthop to be
    dumped had the maximum ID of 0xffffffff, then the dump will restart from
    0 (0xffffffff + 1) and never end:
    
     # ip nexthop add id $((2**32-1)) blackhole
     # ip nexthop
     id 4294967295 blackhole
     id 4294967295 blackhole
     [...]
    
    Fix by adjusting the dump callback to return zero when the dump is
    complete. After the fix only one recvmsg() call is made and the
    NLMSG_DONE message is appended to the RTM_NEWNEXTHOP response:
    
     # ip nexthop add id $((2**32-1)) blackhole
     # strace -e sendto,recvmsg -s 5 ip nexthop
     sendto(3, [[{nlmsg_len=24, nlmsg_type=RTM_GETNEXTHOP, nlmsg_flags=NLM_F_REQUEST|NLM_F_DUMP, nlmsg_seq=1691394080, nlmsg_pid=0}, {nh_family=AF_UNSPEC, nh_scope=RT_SCOPE_UNIVERSE, nh_protocol=RTPROT_UNSPEC, nh_flags=0}], {nlmsg_len=0, nlmsg_type=0 /* NLMSG_??? */, nlmsg_flags=0, nlmsg_seq=0, nlmsg_pid=0}], 152, 0, NULL, 0) = 152
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 56
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[[{nlmsg_len=36, nlmsg_type=RTM_NEWNEXTHOP, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691394080, nlmsg_pid=342}, {nh_family=AF_INET, nh_scope=RT_SCOPE_UNIVERSE, nh_protocol=RTPROT_UNSPEC, nh_flags=0}, [[{nla_len=8, nla_type=NHA_ID}, 4294967295], {nla_len=4, nla_type=NHA_BLACKHOLE}]], [{nlmsg_len=20, nlmsg_type=NLMSG_DONE, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691394080, nlmsg_pid=342}, 0]], iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 56
     id 4294967295 blackhole
     +++ exited with 0 +++
    
    Note that if the NLMSG_DONE message cannot be appended because of size
    limitations, then another recvmsg() will be needed, but the core netlink
    code will not invoke the dump callback and simply reply with a
    NLMSG_DONE message since it knows that the callback previously returned
    zero.
    
    Add a test that fails before the fix:
    
     # ./fib_nexthops.sh -t basic
     [...]
     TEST: Maximum nexthop ID dump                                       [FAIL]
     [...]
    
    And passes after it:
    
     # ./fib_nexthops.sh -t basic
     [...]
     TEST: Maximum nexthop ID dump                                       [ OK ]
     [...]
    
    Fixes: ab84be7 ("net: Initial nexthop code")
    Reported-by: Petr Machata <[email protected]>
    Closes: https://lore.kernel.org/netdev/[email protected]/
    Signed-off-by: Ido Schimmel <[email protected]>
    Reviewed-by: Petr Machata <[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]>
    idosch authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    0b10d8d View commit details
    Browse the repository at this point in the history
  9. nexthop: Make nexthop bucket dump more efficient

    commit f10d3d9 upstream.
    
    rtm_dump_nexthop_bucket_nh() is used to dump nexthop buckets belonging
    to a specific resilient nexthop group. The function returns a positive
    return code (the skb length) upon both success and failure.
    
    The above behavior is problematic. When a complete nexthop bucket dump
    is requested, the function that walks the different nexthops treats the
    non-zero return code as an error. This causes buckets belonging to
    different resilient nexthop groups to be dumped using different buffers
    even if they can all fit in the same buffer:
    
     # ip link add name dummy1 up type dummy
     # ip nexthop add id 1 dev dummy1
     # ip nexthop add id 10 group 1 type resilient buckets 1
     # ip nexthop add id 20 group 1 type resilient buckets 1
     # strace -e recvmsg -s 0 ip nexthop bucket
     [...]
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[...], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 64
     id 10 index 0 idle_time 10.27 nhid 1
     [...]
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[...], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 64
     id 20 index 0 idle_time 6.44 nhid 1
     [...]
    
    Fix by only returning a non-zero return code when an error occurred and
    restarting the dump from the bucket index we failed to fill in. This
    allows buckets belonging to different resilient nexthop groups to be
    dumped using the same buffer:
    
     # ip link add name dummy1 up type dummy
     # ip nexthop add id 1 dev dummy1
     # ip nexthop add id 10 group 1 type resilient buckets 1
     # ip nexthop add id 20 group 1 type resilient buckets 1
     # strace -e recvmsg -s 0 ip nexthop bucket
     [...]
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[...], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 128
     id 10 index 0 idle_time 30.21 nhid 1
     id 20 index 0 idle_time 26.7 nhid 1
     [...]
    
    While this change is more of a performance improvement change than an
    actual bug fix, it is a prerequisite for a subsequent patch that does
    fix a bug.
    
    Fixes: 8a1bbab ("nexthop: Add netlink handlers for bucket dump")
    Signed-off-by: Ido Schimmel <[email protected]>
    Reviewed-by: Petr Machata <[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]>
    idosch authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    8d6df2c View commit details
    Browse the repository at this point in the history
  10. nexthop: Fix infinite nexthop bucket dump when using maximum nexthop ID

    commit 8743aef upstream.
    
    A netlink dump callback can return a positive number to signal that more
    information needs to be dumped or zero to signal that the dump is
    complete. In the second case, the core netlink code will append the
    NLMSG_DONE message to the skb in order to indicate to user space that
    the dump is complete.
    
    The nexthop bucket dump callback always returns a positive number if
    nexthop buckets were filled in the provided skb, even if the dump is
    complete. This means that a dump will span at least two recvmsg() calls
    as long as nexthop buckets are present. In the last recvmsg() call the
    dump callback will not fill in any nexthop buckets because the previous
    call indicated that the dump should restart from the last dumped nexthop
    ID plus one.
    
     # ip link add name dummy1 up type dummy
     # ip nexthop add id 1 dev dummy1
     # ip nexthop add id 10 group 1 type resilient buckets 2
     # strace -e sendto,recvmsg -s 5 ip nexthop bucket
     sendto(3, [[{nlmsg_len=24, nlmsg_type=RTM_GETNEXTHOPBUCKET, nlmsg_flags=NLM_F_REQUEST|NLM_F_DUMP, nlmsg_seq=1691396980, nlmsg_pid=0}, {family=AF_UNSPEC, data="\x00\x00\x00\x00\x00"...}], {nlmsg_len=0, nlmsg_type=0 /* NLMSG_??? */, nlmsg_flags=0, nlmsg_seq=0, nlmsg_pid=0}], 152, 0, NULL, 0) = 152
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 128
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[[{nlmsg_len=64, nlmsg_type=RTM_NEWNEXTHOPBUCKET, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691396980, nlmsg_pid=347}, {family=AF_UNSPEC, data="\x00\x00\x00\x00\x00"...}], [{nlmsg_len=64, nlmsg_type=RTM_NEWNEXTHOPBUCKET, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691396980, nlmsg_pid=347}, {family=AF_UNSPEC, data="\x00\x00\x00\x00\x00"...}]], iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 128
     id 10 index 0 idle_time 6.66 nhid 1
     id 10 index 1 idle_time 6.66 nhid 1
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 20
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=20, nlmsg_type=NLMSG_DONE, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691396980, nlmsg_pid=347}, 0], iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 20
     +++ exited with 0 +++
    
    This behavior is both inefficient and buggy. If the last nexthop to be
    dumped had the maximum ID of 0xffffffff, then the dump will restart from
    0 (0xffffffff + 1) and never end:
    
     # ip link add name dummy1 up type dummy
     # ip nexthop add id 1 dev dummy1
     # ip nexthop add id $((2**32-1)) group 1 type resilient buckets 2
     # ip nexthop bucket
     id 4294967295 index 0 idle_time 5.55 nhid 1
     id 4294967295 index 1 idle_time 5.55 nhid 1
     id 4294967295 index 0 idle_time 5.55 nhid 1
     id 4294967295 index 1 idle_time 5.55 nhid 1
     [...]
    
    Fix by adjusting the dump callback to return zero when the dump is
    complete. After the fix only one recvmsg() call is made and the
    NLMSG_DONE message is appended to the RTM_NEWNEXTHOPBUCKET responses:
    
     # ip link add name dummy1 up type dummy
     # ip nexthop add id 1 dev dummy1
     # ip nexthop add id $((2**32-1)) group 1 type resilient buckets 2
     # strace -e sendto,recvmsg -s 5 ip nexthop bucket
     sendto(3, [[{nlmsg_len=24, nlmsg_type=RTM_GETNEXTHOPBUCKET, nlmsg_flags=NLM_F_REQUEST|NLM_F_DUMP, nlmsg_seq=1691396737, nlmsg_pid=0}, {family=AF_UNSPEC, data="\x00\x00\x00\x00\x00"...}], {nlmsg_len=0, nlmsg_type=0 /* NLMSG_??? */, nlmsg_flags=0, nlmsg_seq=0, nlmsg_pid=0}], 152, 0, NULL, 0) = 152
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 148
     recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[[{nlmsg_len=64, nlmsg_type=RTM_NEWNEXTHOPBUCKET, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691396737, nlmsg_pid=350}, {family=AF_UNSPEC, data="\x00\x00\x00\x00\x00"...}], [{nlmsg_len=64, nlmsg_type=RTM_NEWNEXTHOPBUCKET, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691396737, nlmsg_pid=350}, {family=AF_UNSPEC, data="\x00\x00\x00\x00\x00"...}], [{nlmsg_len=20, nlmsg_type=NLMSG_DONE, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=1691396737, nlmsg_pid=350}, 0]], iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 148
     id 4294967295 index 0 idle_time 6.61 nhid 1
     id 4294967295 index 1 idle_time 6.61 nhid 1
     +++ exited with 0 +++
    
    Note that if the NLMSG_DONE message cannot be appended because of size
    limitations, then another recvmsg() will be needed, but the core netlink
    code will not invoke the dump callback and simply reply with a
    NLMSG_DONE message since it knows that the callback previously returned
    zero.
    
    Add a test that fails before the fix:
    
     # ./fib_nexthops.sh -t basic_res
     [...]
     TEST: Maximum nexthop ID dump                                       [FAIL]
     [...]
    
    And passes after it:
    
     # ./fib_nexthops.sh -t basic_res
     [...]
     TEST: Maximum nexthop ID dump                                       [ OK ]
     [...]
    
    Fixes: 8a1bbab ("nexthop: Add netlink handlers for bucket dump")
    Signed-off-by: Ido Schimmel <[email protected]>
    Reviewed-by: Petr Machata <[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]>
    idosch authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    87d7e14 View commit details
    Browse the repository at this point in the history
  11. net: hns3: fix strscpy causing content truncation issue

    commit 5e3d206 upstream.
    
    hns3_dbg_fill_content()/hclge_dbg_fill_content() is aim to integrate some
    items to a string for content, and we add '\n' and '\0' in the last
    two bytes of content.
    
    strscpy() will add '\0' in the last byte of destination buffer(one of
    items), it result in finishing content print ahead of schedule and some
    dump content truncation.
    
    One Error log shows as below:
    cat mac_list/uc
    UC MAC_LIST:
    
    Expected:
    UC MAC_LIST:
    FUNC_ID  MAC_ADDR            STATE
    pf       00:2b:19:05:03:00   ACTIVE
    
    The destination buffer is length-bounded and not required to be
    NUL-terminated, so just change strscpy() to memcpy() to fix it.
    
    Fixes: 1cf3d55 ("net: hns3: fix strncpy() not using dest-buf length as length issue")
    Signed-off-by: Hao Chen <[email protected]>
    Signed-off-by: Jijie Shao <[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]>
    Hao Chen authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    c4f7de3 View commit details
    Browse the repository at this point in the history
  12. dmaengine: mcf-edma: Fix a potential un-allocated memory access

    commit 0a46781 upstream.
    
    When 'mcf_edma' is allocated, some space is allocated for a
    flexible array at the end of the struct. 'chans' item are allocated, that is
    to say 'pdata->dma_channels'.
    
    Then, this number of item is stored in 'mcf_edma->n_chans'.
    
    A few lines later, if 'mcf_edma->n_chans' is 0, then a default value of 64
    is set.
    
    This ends to no space allocated by devm_kzalloc() because chans was 0, but
    64 items are read and/or written in some not allocated memory.
    
    Change the logic to define a default value before allocating the memory.
    
    Fixes: e7a3ff9 ("dmaengine: fsl-edma: add ColdFire mcf5441x edma support")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Link: https://lore.kernel.org/r/f55d914407c900828f6fad3ea5fa791a5f17b9a4.1685172449.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tititiou36 authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    dff2200 View commit details
    Browse the repository at this point in the history
  13. dmaengine: owl-dma: Modify mismatched function name

    commit 74d7221 upstream.
    
    No functional modification involved.
    
    drivers/dma/owl-dma.c:208: warning: expecting prototype for struct owl_dma_pchan. Prototype was for struct owl_dma_vchan instead HDRTEST usr/include/sound/asequencer.h
    
    Fixes: 47e2057 ("dmaengine: Add Actions Semi Owl family S900 DMA driver")
    Signed-off-by: Zhang Jianhua <[email protected]>
    Reviewed-by: Randy Dunlap <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Zhang Jianhua authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    ab06983 View commit details
    Browse the repository at this point in the history
  14. net/mlx5: Allow 0 for total host VFs

    commit 2dc2b39 upstream.
    
    When querying eswitch functions 0 is a valid number of host VFs. After
    introducing ARM SRIOV falling through to getting the max value from PCI
    results in using the total VFs allowed on the ARM for the host.
    
    Fixes: 86eec50 ("net/mlx5: Support querying max VFs from device");
    Signed-off-by: Daniel Jurgens <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Daniel Jurgens authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    a824d01 View commit details
    Browse the repository at this point in the history
  15. net/mlx5: LAG, Check correct bucket when modifying LAG

    commit 86ed7b7 upstream.
    
    Cited patch introduced buckets in hash mode, but missed to update
    the ports/bucket check when modifying LAG.
    Fix the check.
    
    Fixes: 352899f ("net/mlx5: Lag, use buckets in hash mode")
    Signed-off-by: Shay Drory <[email protected]>
    Reviewed-by: Maor Gottlieb <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    shayshyi authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    4276f3e View commit details
    Browse the repository at this point in the history
  16. net/mlx5: Skip clock update work when device is in error state

    commit d006207 upstream.
    
    When device is in error state, marked by the flag
    MLX5_DEVICE_STATE_INTERNAL_ERROR, the HW and PCI may not be accessible
    and so clock update work should be skipped. Furthermore, such access
    through PCI in error state, after calling mlx5_pci_disable_device() can
    result in failing to recover from pci errors.
    
    Fixes: ef9814d ("net/mlx5e: Add HW timestamping (TS) support")
    Reported-and-tested-by: Ganesh G R <[email protected]>
    Closes: https://lore.kernel.org/netdev/[email protected]
    Signed-off-by: Moshe Shemesh <[email protected]>
    Reviewed-by: Aya Levin <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mosheshemesh2 authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    88ec484 View commit details
    Browse the repository at this point in the history
  17. net/mlx5: Reload auxiliary devices in pci error handlers

    commit aab8e1a upstream.
    
    Handling pci errors should fully teardown and load back auxiliary
    devices, same as done through mlx5 health recovery flow.
    
    Fixes: 72ed5d5 ("net/mlx5: Suspend auxiliary devices only in case of PCI device suspend")
    Signed-off-by: Moshe Shemesh <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mosheshemesh2 authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    ad0f73c View commit details
    Browse the repository at this point in the history
  18. ibmvnic: Enforce stronger sanity checks on login response

    commit db17ba7 upstream.
    
    Ensure that all offsets in a login response buffer are within the size
    of the allocated response buffer. Any offsets or lengths that surpass
    the allocation are likely the result of an incomplete response buffer.
    In these cases, a full reset is necessary.
    
    When attempting to login, the ibmvnic device will allocate a response
    buffer and pass a reference to the VIOS. The VIOS will then send the
    ibmvnic device a LOGIN_RSP CRQ to signal that the buffer has been filled
    with data. If the ibmvnic device does not get a response in 20 seconds,
    the old buffer is freed and a new login request is sent. With 2
    outstanding requests, any LOGIN_RSP CRQ's could be for the older
    login request. If this is the case then the login response buffer (which
    is for the newer login request) could be incomplete and contain invalid
    data. Therefore, we must enforce strict sanity checks on the response
    buffer values.
    
    Testing has shown that the `off_rxadd_buff_size` value is filled in last
    by the VIOS and will be the smoking gun for these circumstances.
    
    Until VIOS can implement a mechanism for tracking outstanding response
    buffers and a method for mapping a LOGIN_RSP CRQ to a particular login
    response buffer, the best ibmvnic can do in this situation is perform a
    full reset.
    
    Fixes: dff515a ("ibmvnic: Harden device login requests")
    Signed-off-by: Nick Child <[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]>
    Nick Child authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    2c5dd88 View commit details
    Browse the repository at this point in the history
  19. ibmvnic: Unmap DMA login rsp buffer on send login fail

    commit 411c565 upstream.
    
    If the LOGIN CRQ fails to send then we must DMA unmap the response
    buffer. Previously, if the CRQ failed then the memory was freed without
    DMA unmapping.
    
    Fixes: c98d9cc ("ibmvnic: send_login should check for crq errors")
    Signed-off-by: Nick Child <[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]>
    Nick Child authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    24556c1 View commit details
    Browse the repository at this point in the history
  20. ibmvnic: Handle DMA unmapping of login buffs in release functions

    commit d78a671 upstream.
    
    Rather than leaving the DMA unmapping of the login buffers to the
    login response handler, move this work into the login release functions.
    Previously, these functions were only used for freeing the allocated
    buffers. This could lead to issues if there are more than one
    outstanding login buffer requests, which is possible if a login request
    times out.
    
    If a login request times out, then there is another call to send login.
    The send login function makes a call to the login buffer release
    function. In the past, this freed the buffers but did not DMA unmap.
    Therefore, the VIOS could still write to the old login (now freed)
    buffer. It is for this reason that it is a good idea to leave the DMA
    unmap call to the login buffers release function.
    
    Since the login buffer release functions now handle DMA unmapping,
    remove the duplicate DMA unmapping in handle_login_rsp().
    
    Fixes: dff515a ("ibmvnic: Harden device login requests")
    Signed-off-by: Nick Child <[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]>
    Nick Child authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    31ccd1b View commit details
    Browse the repository at this point in the history
  21. ibmvnic: Do partial reset on login failure

    commit 23cc5f6 upstream.
    
    Perform a partial reset before sending a login request if any of the
    following are true:
     1. If a previous request times out. This can be dangerous because the
     	VIOS could still receive the old login request at any point after
     	the timeout. Therefore, it is best to re-register the CRQ's  and
     	sub-CRQ's before retrying.
     2. If the previous request returns an error that is not described in
     	PAPR. PAPR provides procedures if the login returns with partial
     	success or aborted return codes (section L.5.1) but other values
    	do not have a defined procedure. Previously, these conditions
    	just returned error from the login function rather than trying
    	to resolve the issue.
     	This can cause further issues since most callers of the login
     	function are not prepared to handle an error when logging in. This
     	improper cleanup can lead to the device being permanently DOWN'd.
     	For example, if the VIOS believes that the device is already logged
     	in then it will return INVALID_STATE (-7). If we never re-register
     	CRQ's then it will always think that the device is already logged
     	in. This leaves the device inoperable.
    
    The partial reset involves freeing the sub-CRQs, freeing the CRQ then
    registering and initializing a new CRQ and sub-CRQs. This essentially
    restarts all communication with VIOS to allow for a fresh login attempt
    that will be unhindered by any previous failed attempts.
    
    Fixes: dff515a ("ibmvnic: Harden device login requests")
    Signed-off-by: Nick Child <[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]>
    Nick Child authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    206ccf4 View commit details
    Browse the repository at this point in the history
  22. ibmvnic: Ensure login failure recovery is safe from other resets

    commit 6db541a upstream.
    
    If a login request fails, the recovery process should be protected
    against parallel resets. It is a known issue that freeing and
    registering CRQ's in quick succession can result in a failover CRQ from
    the VIOS. Processing a failover during login recovery is dangerous for
    two reasons:
     1. This will result in two parallel initialization processes, this can
     cause serious issues during login.
     2. It is possible that the failover CRQ is received but never executed.
     We get notified of a pending failover through a transport event CRQ.
     The reset is not performed until a INIT CRQ request is received.
     Previously, if CRQ init fails during login recovery, then the ibmvnic
     irq is freed and the login process returned error. If failover_pending
     is true (a transport event was received), then the ibmvnic device
     would never be able to process the reset since it cannot receive the
     CRQ_INIT request due to the irq being freed. This leaved the device
     in a inoperable state.
    
    Therefore, the login failure recovery process must be hardened against
    these possible issues. Possible failovers (due to quick CRQ free and
    init) must be avoided and any issues during re-initialization should be
    dealt with instead of being propagated up the stack. This logic is
    similar to that of ibmvnic_probe().
    
    Fixes: dff515a ("ibmvnic: Harden device login requests")
    Signed-off-by: Nick Child <[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]>
    Nick Child authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    5e17b8e View commit details
    Browse the repository at this point in the history
  23. gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent

    commit 33f83d1 upstream.
    
    The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA,
    which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the
    correct value of 11 so that access to necessary device registers is
    properly requested in the ws16c48_probe() callback by the
    devm_request_region() function call.
    
    Fixes: 2c05a0f ("gpio: ws16c48: Implement and utilize register structures")
    Cc: [email protected]
    Cc: Paul Demetrotion <[email protected]>
    Signed-off-by: William Breathitt Gray <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vilhelmgray authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    227bd2c View commit details
    Browse the repository at this point in the history
  24. gpio: sim: mark the GPIO chip as a one that can sleep

    commit 5a78d5d upstream.
    
    Simulated chips use a mutex for synchronization in driver callbacks so
    they must not be called from interrupt context. Set the can_sleep field
    of the GPIO chip to true to force users to only use threaded irqs.
    
    Fixes: cb8c474 ("gpio: sim: new testing module")
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Bartosz Golaszewski authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    b8cd871 View commit details
    Browse the repository at this point in the history
  25. btrfs: wait for actual caching progress during allocation

    commit fc1f91b upstream.
    
    Recently we've been having mysterious hangs while running generic/475 on
    the CI system.  This turned out to be something like this:
    
      Task 1
      dmsetup suspend --nolockfs
      -> __dm_suspend
       -> dm_wait_for_completion
        -> dm_wait_for_bios_completion
         -> Unable to complete because of IO's on a plug in Task 2
    
      Task 2
      wb_workfn
      -> wb_writeback
       -> blk_start_plug
        -> writeback_sb_inodes
         -> Infinite loop unable to make an allocation
    
      Task 3
      cache_block_group
      ->read_extent_buffer_pages
       ->Waiting for IO to complete that can't be submitted because Task 1
         suspended the DM device
    
    The problem here is that we need Task 2 to be scheduled completely for
    the blk plug to flush.  Normally this would happen, we normally wait for
    the block group caching to finish (Task 3), and this schedule would
    result in the block plug flushing.
    
    However if there's enough free space available from the current caching
    to satisfy the allocation we won't actually wait for the caching to
    complete.  This check however just checks that we have enough space, not
    that we can make the allocation.  In this particular case we were trying
    to allocate 9MiB, and we had 10MiB of free space, but we didn't have
    9MiB of contiguous space to allocate, and thus the allocation failed and
    we looped.
    
    We specifically don't cycle through the FFE loop until we stop finding
    cached block groups because we don't want to allocate new block groups
    just because we're caching, so we short circuit the normal loop once we
    hit LOOP_CACHING_WAIT and we found a caching block group.
    
    This is normally fine, except in this particular case where the caching
    thread can't make progress because the DM device has been suspended.
    
    Fix this by not only waiting for free space to >= the amount of space we
    want to allocate, but also that we make some progress in caching from
    the time we start waiting.  This will keep us from busy looping when the
    caching is taking a while but still theoretically has enough space for
    us to allocate from, and fixes this particular case by forcing us to
    actually sleep and wait for forward progress, which will flush the plug.
    
    With this fix we're no longer hanging with generic/475.
    
    CC: [email protected] # 6.1+
    Reviewed-by: Boris Burkov <[email protected]>
    Signed-off-by: Josef Bacik <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    josefbacik authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    4e18c82 View commit details
    Browse the repository at this point in the history
  26. btrfs: don't stop integrity writeback too early

    commit effa24f upstream.
    
    extent_write_cache_pages stops writing pages as soon as nr_to_write hits
    zero.  That is the right thing for opportunistic writeback, but incorrect
    for data integrity writeback, which needs to ensure that no dirty pages
    are left in the range.  Thus only stop the writeback for WB_SYNC_NONE
    if nr_to_write hits 0.
    
    This is a port of write_cache_pages changes in commit 05fe478
    ("mm: write_cache_pages integrity fix").
    
    Note that I've only trigger the problem with other changes to the btrfs
    writeback code, but this condition seems worthwhile fixing anyway.
    
    CC: [email protected] # 4.14+
    Reviewed-by: Josef Bacik <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    [ updated comment ]
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Christoph Hellwig authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    504d81c View commit details
    Browse the repository at this point in the history
  27. btrfs: properly clear end of the unreserved range in cow_file_range

    commit 12b2d64 upstream.
    
    When the call to btrfs_reloc_clone_csums in cow_file_range returns an
    error, we jump to the out_unlock label with the extent_reserved variable
    set to false.   The cleanup at the label will then call
    extent_clear_unlock_delalloc on the range from start to end.  But we've
    already added cur_alloc_size to start before the jump, so there might no
    range be left from the newly incremented start to end.  Move the check for
    'start < end' so that it is reached by also for the !extent_reserved case.
    
    CC: [email protected] # 6.1+
    Fixes: a315e68 ("Btrfs: fix invalid attempt to free reserved space on failure to cow range")
    Reviewed-by: Josef Bacik <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Christoph Hellwig authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    7112abc View commit details
    Browse the repository at this point in the history
  28. btrfs: exit gracefully if reloc roots don't match

    commit 05d7ce5 upstream.
    
    [BUG]
    Syzbot reported a crash that an ASSERT() got triggered inside
    prepare_to_merge().
    
    [CAUSE]
    The root cause of the triggered ASSERT() is we can have a race between
    quota tree creation and relocation.
    
    This leads us to create a duplicated quota tree in the
    btrfs_read_fs_root() path, and since it's treated as fs tree, it would
    have ROOT_SHAREABLE flag, causing us to create a reloc tree for it.
    
    The bug itself is fixed by a dedicated patch for it, but this already
    taught us the ASSERT() is not something straightforward for
    developers.
    
    [ENHANCEMENT]
    Instead of using an ASSERT(), let's handle it gracefully and output
    extra info about the mismatch reloc roots to help debug.
    
    Also with the above ASSERT() removed, we can trigger ASSERT(0)s inside
    merge_reloc_roots() later.
    Also replace those ASSERT(0)s with WARN_ON()s.
    
    CC: [email protected] # 5.15+
    Reported-by: [email protected]
    Reviewed-by: Filipe Manana <[email protected]>
    Signed-off-by: Qu Wenruo <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    adam900710 authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    9d04716 View commit details
    Browse the repository at this point in the history
  29. btrfs: reject invalid reloc tree root keys with stack dump

    commit 6ebcd02 upstream.
    
    [BUG]
    Syzbot reported a crash that an ASSERT() got triggered inside
    prepare_to_merge().
    
    That ASSERT() makes sure the reloc tree is properly pointed back by its
    subvolume tree.
    
    [CAUSE]
    After more debugging output, it turns out we had an invalid reloc tree:
    
      BTRFS error (device loop1): reloc tree mismatch, root 8 has no reloc root, expect reloc root key (-8, 132, 8) gen 17
    
    Note the above root key is (TREE_RELOC_OBJECTID, ROOT_ITEM,
    QUOTA_TREE_OBJECTID), meaning it's a reloc tree for quota tree.
    
    But reloc trees can only exist for subvolumes, as for non-subvolume
    trees, we just COW the involved tree block, no need to create a reloc
    tree since those tree blocks won't be shared with other trees.
    
    Only subvolumes tree can share tree blocks with other trees (thus they
    have BTRFS_ROOT_SHAREABLE flag).
    
    Thus this new debug output proves my previous assumption that corrupted
    on-disk data can trigger that ASSERT().
    
    [FIX]
    Besides the dedicated fix and the graceful exit, also let tree-checker to
    check such root keys, to make sure reloc trees can only exist for subvolumes.
    
    CC: [email protected] # 5.15+
    Reported-by: [email protected]
    Reviewed-by: Filipe Manana <[email protected]>
    Signed-off-by: Qu Wenruo <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    adam900710 authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    3ae93b3 View commit details
    Browse the repository at this point in the history
  30. btrfs: set cache_block_group_error if we find an error

    commit 92fb94b upstream.
    
    We set cache_block_group_error if btrfs_cache_block_group() returns an
    error, this is because we could end up not finding space to allocate and
    mistakenly return -ENOSPC, and which could then abort the transaction
    with the incorrect errno, and in the case of ENOSPC result in a
    WARN_ON() that will trip up tests like generic/475.
    
    However there's the case where multiple threads can be racing, one
    thread gets the proper error, and the other thread doesn't actually call
    btrfs_cache_block_group(), it instead sees ->cached ==
    BTRFS_CACHE_ERROR.  Again the result is the same, we fail to allocate
    our space and return -ENOSPC.  Instead we need to set
    cache_block_group_error to -EIO in this case to make sure that if we do
    not make our allocation we get the appropriate error returned back to
    the caller.
    
    CC: [email protected] # 4.14+
    Signed-off-by: Josef Bacik <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    josefbacik authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    bf67802 View commit details
    Browse the repository at this point in the history
  31. nvme-tcp: fix potential unbalanced freeze & unfreeze

    commit 99dc264 upstream.
    
    Move start_freeze into nvme_tcp_configure_io_queues(), and there is
    at least two benefits:
    
    1) fix unbalanced freeze and unfreeze, since re-connection work may
    fail or be broken by removal
    
    2) IO during error recovery can be failfast quickly because nvme fabrics
    unquiesces queues after teardown.
    
    One side-effect is that !mpath request may timeout during connecting
    because of queue topo change, but that looks not one big deal:
    
    1) same problem exists with current code base
    
    2) compared with !mpath, mpath use case is dominant
    
    Fixes: 2875b0a ("nvme-tcp: fix controller reset hang during traffic")
    Cc: [email protected]
    Signed-off-by: Ming Lei <[email protected]>
    Tested-by: Yi Zhang <[email protected]>
    Reviewed-by: Sagi Grimberg <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Ming Lei authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    cddbaa8 View commit details
    Browse the repository at this point in the history
  32. nvme-rdma: fix potential unbalanced freeze & unfreeze

    commit 29b434d upstream.
    
    Move start_freeze into nvme_rdma_configure_io_queues(), and there is
    at least two benefits:
    
    1) fix unbalanced freeze and unfreeze, since re-connection work may
    fail or be broken by removal
    
    2) IO during error recovery can be failfast quickly because nvme fabrics
    unquiesces queues after teardown.
    
    One side-effect is that !mpath request may timeout during connecting
    because of queue topo change, but that looks not one big deal:
    
    1) same problem exists with current code base
    
    2) compared with !mpath, mpath use case is dominant
    
    Fixes: 9f98772 ("nvme-rdma: fix controller reset hang during traffic")
    Cc: [email protected]
    Signed-off-by: Ming Lei <[email protected]>
    Tested-by: Yi Zhang <[email protected]>
    Reviewed-by: Sagi Grimberg <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Ming Lei authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    c21fddc View commit details
    Browse the repository at this point in the history
  33. netfilter: nf_tables: report use refcount overflow

    commit 1689f25 upstream.
    
    Overflow use refcount checks are not complete.
    
    Add helper function to deal with object reference counter tracking.
    Report -EMFILE in case UINT_MAX is reached.
    
    nft_use_dec() splats in case that reference counter underflows,
    which should not ever happen.
    
    Add nft_use_inc_restore() and nft_use_dec_restore() which are used
    to restore reference counter from error and abort paths.
    
    Use u32 in nft_flowtable and nft_object since helper functions cannot
    work on bitfields.
    
    Remove the few early incomplete checks now that the helper functions
    are in place and used to check for refcount overflow.
    
    Fixes: 9651851 ("netfilter: add nftables")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ummakynes authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    f3f0f95 View commit details
    Browse the repository at this point in the history
  34. scsi: core: Fix legacy /proc parsing buffer overflow

    commit 9426d3c upstream.
    
    (lightly modified commit message mostly by Linus Torvalds)
    
    The parsing code for /proc/scsi/scsi is disgusting and broken.  We should
    have just used 'sscanf()' or something simple like that, but the logic may
    actually predate our kernel sscanf library routine for all I know.  It
    certainly predates both git and BK histories.
    
    And we can't change it to be something sane like that now, because the
    string matching at the start is done case-insensitively, and the separator
    parsing between numbers isn't done at all, so *any* separator will work,
    including a possible terminating NUL character.
    
    This interface is root-only, and entirely for legacy use, so there is
    absolutely no point in trying to tighten up the parsing.  Because any
    separator has traditionally worked, it's entirely possible that people have
    used random characters rather than the suggested space.
    
    So don't bother to try to pretty it up, and let's just make a minimal patch
    that can be back-ported and we can forget about this whole sorry thing for
    another two decades.
    
    Just make it at least not read past the end of the supplied data.
    
    Link: https://lore.kernel.org/linux-scsi/[email protected]/
    Cc: Linus Torvalds <[email protected]>
    Cc: Martin K Petersen <[email protected]>
    Cc: James Bottomley <[email protected]>
    Cc: Willy Tarreau <[email protected]>
    Cc: [email protected]
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Tony Battersby <[email protected]>
    Signed-off-by: Martin K Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    abattersby authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    0e1605e View commit details
    Browse the repository at this point in the history
  35. scsi: storvsc: Fix handling of virtual Fibre Channel timeouts

    commit 175544a upstream.
    
    Hyper-V provides the ability to connect Fibre Channel LUNs to the host
    system and present them in a guest VM as a SCSI device. I/O to the vFC
    device is handled by the storvsc driver. The storvsc driver includes a
    partial integration with the FC transport implemented in the generic
    portion of the Linux SCSI subsystem so that FC attributes can be displayed
    in /sys.  However, the partial integration means that some aspects of vFC
    don't work properly. Unfortunately, a full and correct integration isn't
    practical because of limitations in what Hyper-V provides to the guest.
    
    In particular, in the context of Hyper-V storvsc, the FC transport timeout
    function fc_eh_timed_out() causes a kernel panic because it can't find the
    rport and dereferences a NULL pointer. The original patch that added the
    call from storvsc_eh_timed_out() to fc_eh_timed_out() is faulty in this
    regard.
    
    In many cases a timeout is due to a transient condition, so the situation
    can be improved by just continuing to wait like with other I/O requests
    issued by storvsc, and avoiding the guaranteed panic. For a permanent
    failure, continuing to wait may result in a hung thread instead of a panic,
    which again may be better.
    
    So fix the panic by removing the storvsc call to fc_eh_timed_out().  This
    allows storvsc to keep waiting for a response.  The change has been tested
    by users who experienced a panic in fc_eh_timed_out() due to transient
    timeouts, and it solves their problem.
    
    In the future we may want to deprecate the vFC functionality in storvsc
    since it can't be fully fixed. But it has current users for whom it is
    working well enough, so it should probably stay for a while longer.
    
    Fixes: 3930d73 ("scsi: storvsc: use default I/O timeout handler for FC devices")
    Cc: [email protected]
    Signed-off-by: Michael Kelley <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kelleymh authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    ed70fa5 View commit details
    Browse the repository at this point in the history
  36. scsi: ufs: renesas: Fix private allocation

    commit b6d128f upstream.
    
    Should use devm_kzalloc() for struct ufs_renesas_priv because the
    .initialized should be false as default.
    
    Fixes: d695202 ("scsi: ufs: ufs-renesas: Add support for Renesas R-Car UFS controller")
    Signed-off-by: Yoshihiro Shimoda <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Bart Van Assche <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    shimoday authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    8282d0b View commit details
    Browse the repository at this point in the history
  37. scsi: 53c700: Check that command slot is not NULL

    commit 8366d1f upstream.
    
    Add a check for the command slot value to avoid dereferencing a NULL
    pointer.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Co-developed-by: Vladimir Telezhnikov <[email protected]>
    Signed-off-by: Vladimir Telezhnikov <[email protected]>
    Signed-off-by: Alexandra Diupina <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Alexandra Diupina authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    9fdb273 View commit details
    Browse the repository at this point in the history
  38. scsi: snic: Fix possible memory leak if device_add() fails

    commit 41320b1 upstream.
    
    If device_add() returns error, the name allocated by dev_set_name() needs
    be freed. As the comment of device_add() says, put_device() should be used
    to give up the reference in the error path. So fix this by calling
    put_device(), then the name can be freed in kobject_cleanp().
    
    Fixes: c8806b6 ("snic: driver for Cisco SCSI HBA")
    Signed-off-by: Zhu Wang <[email protected]>
    Acked-by: Narsimhulu Musini <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    PeterZhu789 authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    7723a5d View commit details
    Browse the repository at this point in the history
  39. scsi: core: Fix possible memory leak if device_add() fails

    commit 04b5b5c upstream.
    
    If device_add() returns error, the name allocated by dev_set_name() needs
    be freed. As the comment of device_add() says, put_device() should be used
    to decrease the reference count in the error path. So fix this by calling
    put_device(), then the name can be freed in kobject_cleanp().
    
    Fixes: ee959b0 ("SCSI: convert struct class_device to struct device")
    Signed-off-by: Zhu Wang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Bart Van Assche <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    PeterZhu789 authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    b191ff1 View commit details
    Browse the repository at this point in the history
  40. scsi: fnic: Replace return codes in fnic_clean_pending_aborts()

    commit 5a43b07 upstream.
    
    fnic_clean_pending_aborts() was returning a non-zero value irrespective of
    failure or success.  This caused the caller of this function to assume that
    the device reset had failed, even though it would succeed in most cases. As
    a consequence, a successful device reset would escalate to host reset.
    
    Reviewed-by: Sesidhar Baddela <[email protected]>
    Tested-by: Karan Tilak Kumar <[email protected]>
    Signed-off-by: Karan Tilak Kumar <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Karan Tilak Kumar authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    fb00449 View commit details
    Browse the repository at this point in the history
  41. scsi: qedi: Fix firmware halt over suspend and resume

    commit 1516ee0 upstream.
    
    While performing certain power-off sequences, PCI drivers are called to
    suspend and resume their underlying devices through PCI PM (power
    management) interface. However the hardware does not support PCI PM
    suspend/resume operations so system wide suspend/resume leads to bad MFW
    (management firmware) state which causes various follow-up errors in driver
    when communicating with the device/firmware.
    
    To fix this driver implements PCI PM suspend handler to indicate
    unsupported operation to the PCI subsystem explicitly, thus avoiding system
    to go into suspended/standby mode.
    
    Fixes: ace7f46 ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    njavali authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    a9518f4 View commit details
    Browse the repository at this point in the history
  42. scsi: qedf: Fix firmware halt over suspend and resume

    commit ef222f5 upstream.
    
    While performing certain power-off sequences, PCI drivers are called to
    suspend and resume their underlying devices through PCI PM (power
    management) interface. However the hardware does not support PCI PM
    suspend/resume operations so system wide suspend/resume leads to bad MFW
    (management firmware) state which causes various follow-up errors in driver
    when communicating with the device/firmware.
    
    To fix this driver implements PCI PM suspend handler to indicate
    unsupported operation to the PCI subsystem explicitly, thus avoiding system
    to go into suspended/standby mode.
    
    Fixes: 61d8658 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
    Signed-off-by: Saurav Kashyap <[email protected]>
    Signed-off-by: Nilesh Javali <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    njavali authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    38b0020 View commit details
    Browse the repository at this point in the history
  43. platform/x86: serial-multi-instantiate: Auto detect IRQ resource for …

    …CSC3551
    
    commit 676b7c5 upstream.
    
    The current code assumes that the CSC3551(multiple cs35l41) always have
    its interrupt pin connected to GPIO thus the IRQ can be acquired with
    acpi_dev_gpio_irq_get. However on some newer laptop models this is no
    longer the case as they have the CSC3551's interrupt pin connected to
    APIC. This causes smi_i2c_probe to fail on these machines.
    
    To support these machines, a new macro IRQ_RESOURCE_AUTO was introduced
    for cs35l41 smi_node, and smi_get_irq function was modified so it tries
    to get GPIO irq resource first and if failed, tries to get
    APIC irq resource for cs35l41.
    
    This patch affects only the cs35l41's probing and brings no negative
    influence on machines that indeed have the cs35l41's interrupt pin
    connected to GPIO.
    
    Signed-off-by: David Xu <[email protected]>
    Link: https://lore.kernel.org/r/SY4P282MB18350CD8288687B87FFD2243E037A@SY4P282MB1835.AUSP282.PROD.OUTLOOK.COM
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    xuwd1 authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    afc4ddd View commit details
    Browse the repository at this point in the history
  44. ACPI: scan: Create platform device for CS35L56

    commit 1cd0302 upstream.
    
    The ACPI device CSC3556 is a Cirrus Logic CS35L56 mono amplifier which
    is used in multiples, and can be connected either to I2C or SPI.
    
    There will be multiple instances under the same Device() node. Add it
    to ignore_serial_bus_ids and handle it in the serial-multi-instantiate
    driver.
    
    There can be a 5th I2cSerialBusV2, but this is an alias address and doesn't
    represent a real device. Ignore this by having a dummy 5th entry in the
    serial-multi-instantiate instance list with the name of a non-existent
    driver, on the same pattern as done for bsg2150.
    
    Signed-off-by: Simon Trimmer <[email protected]>
    Signed-off-by: Richard Fitzgerald <[email protected]>
    Acked-by: Rafael J. Wysocki <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    simontrimmer authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    cbce265 View commit details
    Browse the repository at this point in the history
  45. alpha: remove __init annotation from exported page_is_ram()

    commit 6ccbd7f upstream.
    
    EXPORT_SYMBOL and __init is a bad combination because the .init.text
    section is freed up after the initialization.
    
    Commit c5a1303 ("ACPI/APEI: Add parameter check before error
    injection") exported page_is_ram(), hence the __init annotation should
    be removed.
    
    This fixes the modpost warning in ARCH=alpha builds:
    
      WARNING: modpost: vmlinux: page_is_ram: EXPORT_SYMBOL used for init symbol. Remove __init or EXPORT_SYMBOL.
    
    Fixes: c5a1303 ("ACPI/APEI: Add parameter check before error injection")
    Signed-off-by: Masahiro Yamada <[email protected]>
    Reviewed-by: Randy Dunlap <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    masahir0y authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    3ae919c View commit details
    Browse the repository at this point in the history
  46. sch_netem: fix issues in netem_change() vs get_dist_table()

    commit 11b7331 upstream.
    
    In blamed commit, I missed that get_dist_table() was allocating
    memory using GFP_KERNEL, and acquiring qdisc lock to perform
    the swap of newly allocated table with current one.
    
    In this patch, get_dist_table() is allocating memory and
    copy user data before we acquire the qdisc lock.
    
    Then we perform swap operations while being protected by the lock.
    
    Note that after this patch netem_change() no longer can do partial changes.
    If an error is returned, qdisc conf is left unchanged.
    
    Fixes: 2174a08 ("sch_netem: acquire qdisc lock in netem_change()")
    Reported-by: syzbot <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Stephen Hemminger <[email protected]>
    Acked-by: Jamal Hadi Salim <[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: Fedor Pchelkin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Eric Dumazet authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    4346a66 View commit details
    Browse the repository at this point in the history
  47. drm/amd/pm/smu7: move variables to where they are used

    commit 63a9ab2 upstream.
    
    Move variable declarations to where they are used.  Fixes
    a segfault on smu7 V0 structures where some tables don't
    exist.
    
    Cc: Evan Quan <[email protected]>
    Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2388
    Fixes: b1a9557 ("drm/amd/pm: fulfill powerplay peak profiling mode shader/memory clock settings")
    Reviewed-by: Evan Quan <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    alexdeucher authored and gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    5525c28 View commit details
    Browse the repository at this point in the history
  48. Linux 6.1.46

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Bagas Sanjaya <[email protected]>
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Conor Dooley <[email protected]>
    Tested-by: Thierry Reding <[email protected]>
    Tested-by: SeongJae Park <[email protected]>
    Tested-by: Salvatore Bonaccorso <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Allen Pais <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    6c44e13 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2023

  1. mmc: sdhci-f-sdh30: Replace with sdhci_pltfm

    [ Upstream commit 5def5c1 ]
    
    Even if sdhci_pltfm_pmops is specified for PM, this driver doesn't apply
    sdhci_pltfm, so the structure is not correctly referenced in PM functions.
    This applies sdhci_pltfm to this driver to fix this issue.
    
    - Call sdhci_pltfm_init() instead of sdhci_alloc_host() and
      other functions that covered by sdhci_pltfm.
    - Move ops and quirks to sdhci_pltfm_data
    - Replace sdhci_priv() with own private function sdhci_f_sdh30_priv().
    
    Fixes: 87a5074 ("mmc: sdhci: host: add new f_sdh30")
    Signed-off-by: Kunihiko Hayashi <[email protected]>
    Acked-by: Adrian Hunter <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    khayash1 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    78721c8 View commit details
    Browse the repository at this point in the history
  2. cpuidle: psci: Extend information in log about OSI/PC mode

    [ Upstream commit 668057b ]
    
    It's useful to understand whether we are using OS-initiated (OSI) mode or
    Platform Coordinated (PC) mode, when initializing the CPU PM domains.
    Therefore, let's extend the print in the log after a successful probe with
    this information.
    
    Signed-off-by: Ulf Hansson <[email protected]>
    Acked-by: Sudeep Holla <[email protected]
    Acked-by: Dmitry Baryshkov <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Stable-dep-of: 12acb34 ("cpuidle: psci: Move enabling OSI mode after power domains creation")
    Signed-off-by: Sasha Levin <[email protected]>
    storulf authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ad1fa1a View commit details
    Browse the repository at this point in the history
  3. cpuidle: psci: Move enabling OSI mode after power domains creation

    [ Upstream commit 12acb34 ]
    
    A switch from OSI to PC mode is only possible if all CPUs other than the
    calling one are OFF, either through a call to CPU_OFF or not yet booted.
    
    Currently OSI mode is enabled before power domains are created. In cases
    where CPUidle states are not using hierarchical CPU topology the bail out
    path tries to switch back to PC mode which gets denied by firmware since
    other CPUs are online at this point and creates inconsistent state as
    firmware is in OSI mode and Linux in PC mode.
    
    This change moves enabling OSI mode after power domains are created,
    this would makes sure that hierarchical CPU topology is used before
    switching firmware to OSI mode.
    
    Cc: [email protected]
    Fixes: 70c179b ("cpuidle: psci: Allow PM domain to be initialized even if no OSI mode")
    Signed-off-by: Maulik Shah <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    quic-maulik authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8a214f8 View commit details
    Browse the repository at this point in the history
  4. zsmalloc: consolidate zs_pool's migrate_lock and size_class's locks

    [ Upstream commit c0547d0 ]
    
    Currently, zsmalloc has a hierarchy of locks, which includes a pool-level
    migrate_lock, and a lock for each size class.  We have to obtain both
    locks in the hotpath in most cases anyway, except for zs_malloc.  This
    exception will no longer exist when we introduce a LRU into the zs_pool
    for the new writeback functionality - we will need to obtain a pool-level
    lock to synchronize LRU handling even in zs_malloc.
    
    In preparation for zsmalloc writeback, consolidate these locks into a
    single pool-level lock, which drastically reduces the complexity of
    synchronization in zsmalloc.
    
    We have also benchmarked the lock consolidation to see the performance
    effect of this change on zram.
    
    First, we ran a synthetic FS workload on a server machine with 36 cores
    (same machine for all runs), using
    
    fs_mark  -d  ../zram1mnt  -s  100000  -n  2500  -t  32  -k
    
    before and after for btrfs and ext4 on zram (FS usage is 80%).
    
    Here is the result (unit is file/second):
    
    With lock consolidation (btrfs):
    Average: 13520.2, Median: 13531.0, Stddev: 137.5961482019028
    
    Without lock consolidation (btrfs):
    Average: 13487.2, Median: 13575.0, Stddev: 309.08283679298665
    
    With lock consolidation (ext4):
    Average: 16824.4, Median: 16839.0, Stddev: 89.97388510006668
    
    Without lock consolidation (ext4)
    Average: 16958.0, Median: 16986.0, Stddev: 194.7370021336469
    
    As you can see, we observe a 0.3% regression for btrfs, and a 0.9%
    regression for ext4. This is a small, barely measurable difference in my
    opinion.
    
    For a more realistic scenario, we also tries building the kernel on zram.
    Here is the time it takes (in seconds):
    
    With lock consolidation (btrfs):
    real
    Average: 319.6, Median: 320.0, Stddev: 0.8944271909999159
    user
    Average: 6894.2, Median: 6895.0, Stddev: 25.528415540334656
    sys
    Average: 521.4, Median: 522.0, Stddev: 1.51657508881031
    
    Without lock consolidation (btrfs):
    real
    Average: 319.8, Median: 320.0, Stddev: 0.8366600265340756
    user
    Average: 6896.6, Median: 6899.0, Stddev: 16.04057355583023
    sys
    Average: 520.6, Median: 521.0, Stddev: 1.140175425099138
    
    With lock consolidation (ext4):
    real
    Average: 320.0, Median: 319.0, Stddev: 1.4142135623730951
    user
    Average: 6896.8, Median: 6878.0, Stddev: 28.621670111997307
    sys
    Average: 521.2, Median: 521.0, Stddev: 1.7888543819998317
    
    Without lock consolidation (ext4)
    real
    Average: 319.6, Median: 319.0, Stddev: 0.8944271909999159
    user
    Average: 6886.2, Median: 6887.0, Stddev: 16.93221781102523
    sys
    Average: 520.4, Median: 520.0, Stddev: 1.140175425099138
    
    The difference is entirely within the noise of a typical run on zram.
    This hardly justifies the complexity of maintaining both the pool lock and
    the class lock.  In fact, for writeback, we would need to introduce yet
    another lock to prevent data races on the pool's LRU, further complicating
    the lock handling logic.  IMHO, it is just better to collapse all of these
    into a single pool-level lock.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Nhat Pham <[email protected]>
    Suggested-by: Johannes Weiner <[email protected]>
    Acked-by: Minchan Kim <[email protected]>
    Acked-by: Johannes Weiner <[email protected]>
    Reviewed-by: Sergey Senozhatsky <[email protected]>
    Cc: Dan Streetman <[email protected]>
    Cc: Nitin Gupta <[email protected]>
    Cc: Seth Jennings <[email protected]>
    Cc: Vitaly Wool <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Stable-dep-of: 4b5d1e4 ("zsmalloc: fix races between modifications of fullness and isolated")
    Signed-off-by: Sasha Levin <[email protected]>
    nhatsmrt authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    802b34e View commit details
    Browse the repository at this point in the history
  5. zsmalloc: fix races between modifications of fullness and isolated

    [ Upstream commit 4b5d1e4 ]
    
    We encountered many kernel exceptions of VM_BUG_ON(zspage->isolated ==
    0) in dec_zspage_isolation() and BUG_ON(!pages[1]) in zs_unmap_object()
    lately.  This issue only occurs when migration and reclamation occur at
    the same time.
    
    With our memory stress test, we can reproduce this issue several times
    a day.  We have no idea why no one else encountered this issue.  BTW,
    we switched to the new kernel version with this defect a few months
    ago.
    
    Since fullness and isolated share the same unsigned int, modifications of
    them should be protected by the same lock.
    
    [[email protected]: move comment]
      Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: c4549b8 ("zsmalloc: remove zspage isolation for migration")
    Signed-off-by: Andrew Yang <[email protected]>
    Reviewed-by: Sergey Senozhatsky <[email protected]>
    Cc: AngeloGioacchino Del Regno <[email protected]>
    Cc: Matthias Brugger <[email protected]>
    Cc: Minchan Kim <[email protected]>
    Cc: Sebastian Andrzej Siewior <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    QQXanadu authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f872672 View commit details
    Browse the repository at this point in the history
  6. selftests: forwarding: tc_actions: cleanup temporary files when test …

    …is aborted
    
    [ Upstream commit f585317 ]
    
    remove temporary files created by 'mirred_egress_to_ingress_tcp' test
    in the cleanup() handler. Also, change variable names to avoid clashing
    with globals from lib.sh.
    
    Suggested-by: Paolo Abeni <[email protected]>
    Signed-off-by: Davide Caratti <[email protected]>
    Link: https://lore.kernel.org/r/091649045a017fc00095ecbb75884e5681f7025f.1676368027.git.dcaratti@redhat.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: 5e86706 ("selftests: forwarding: tc_actions: Use ncat instead of nc")
    Signed-off-by: Sasha Levin <[email protected]>
    dcaratti authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    306a5dd View commit details
    Browse the repository at this point in the history
  7. selftests: forwarding: tc_actions: Use ncat instead of nc

    [ Upstream commit 5e86706 ]
    
    The test relies on 'nc' being the netcat version from the nmap project.
    While this seems to be the case on Fedora, it is not the case on Ubuntu,
    resulting in failures such as [1].
    
    Fix by explicitly using the 'ncat' utility from the nmap project and the
    skip the test in case it is not installed.
    
    [1]
     # timeout set to 0
     # selftests: net/forwarding: tc_actions.sh
     # TEST: gact drop and ok (skip_hw)                                    [ OK ]
     # TEST: mirred egress flower redirect (skip_hw)                       [ OK ]
     # TEST: mirred egress flower mirror (skip_hw)                         [ OK ]
     # TEST: mirred egress matchall mirror (skip_hw)                       [ OK ]
     # TEST: mirred_egress_to_ingress (skip_hw)                            [ OK ]
     # nc: invalid option -- '-'
     # usage: nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl]
     #         [-m minttl] [-O length] [-P proxy_username] [-p source_port]
     #         [-q seconds] [-s sourceaddr] [-T keyword] [-V rtable] [-W recvlimit]
     #         [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]]
     #         [destination] [port]
     # nc: invalid option -- '-'
     # usage: nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl]
     #         [-m minttl] [-O length] [-P proxy_username] [-p source_port]
     #         [-q seconds] [-s sourceaddr] [-T keyword] [-V rtable] [-W recvlimit]
     #         [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]]
     #         [destination] [port]
     # TEST: mirred_egress_to_ingress_tcp (skip_hw)                        [FAIL]
     #       server output check failed
     # INFO: Could not test offloaded functionality
     not ok 80 selftests: net/forwarding: tc_actions.sh # exit=1
    
    Fixes: ca22da2 ("act_mirred: use the backlog for nested calls to mirred ingress")
    Reported-by: Mirsad Todorovac <[email protected]>
    Closes: https://lore.kernel.org/netdev/[email protected]/
    Signed-off-by: Ido Schimmel <[email protected]>
    Reviewed-by: Petr Machata <[email protected]>
    Tested-by: Mirsad Todorovac <[email protected]>
    Reviewed-by: Hangbin Liu <[email protected]>
    Acked-by: Nikolay Aleksandrov <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    idosch authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    0fc3c55 View commit details
    Browse the repository at this point in the history
  8. net/smc: replace mutex rmbs_lock and sndbufs_lock with rw_semaphore

    [ Upstream commit aff7bfe ]
    
    It's clear that rmbs_lock and sndbufs_lock are aims to protect the
    rmbs list or the sndbufs list.
    
    During connection establieshment, smc_buf_get_slot() will always
    be invoked, and it only performs read semantics in rmbs list and
    sndbufs list.
    
    Based on the above considerations, we replace mutex with rw_semaphore.
    Only smc_buf_get_slot() use down_read() to allow smc_buf_get_slot()
    run concurrently, other part use down_write() to keep exclusive
    semantics.
    
    Signed-off-by: D. Wythe <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: 833bac7 ("net/smc: Fix setsockopt and sysctl to specify same buffer size again")
    Signed-off-by: Sasha Levin <[email protected]>
    D. Wythe authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    206381c View commit details
    Browse the repository at this point in the history
  9. net/smc: Fix setsockopt and sysctl to specify same buffer size again

    [ Upstream commit 833bac7 ]
    
    Commit 0227f05 ("net/smc: Unbind r/w buffer size from clcsock
    and make them tunable") introduced the net.smc.rmem and net.smc.wmem
    sysctls to specify the size of buffers to be used for SMC type
    connections. This created a regression for users that specified the
    buffer size via setsockopt() as the effective buffer size was now
    doubled.
    
    Re-introduce the division by 2 in the SMC buffer create code and level
    this out by duplicating the net.smc.[rw]mem values used for initializing
    sk_rcvbuf/sk_sndbuf at socket creation time. This gives users of both
    methods (setsockopt or sysctl) the effective buffer size that they
    expect.
    
    Initialize net.smc.[rw]mem from its own constant of 64kB, respectively.
    Internal performance tests show that this value is a good compromise
    between throughput/latency and memory consumption. Also, this decouples
    it from any tuning that was done to net.ipv4.tcp_[rw]mem[1] before the
    module for SMC protocol was loaded. Check that no more than INT_MAX / 2
    is assigned to net.smc.[rw]mem, in order to avoid any overflow condition
    when that is doubled for use in sk_sndbuf or sk_rcvbuf.
    
    While at it, drop the confusing sk_buf_size variable from
    __smc_buf_create and name "compressed" buffer size variables more
    consistently.
    
    Background:
    
    Before the commit mentioned above, SMC's buffer allocator in
    __smc_buf_create() always used half of the sockets' sk_rcvbuf/sk_sndbuf
    value as initial value to search for appropriate buffers. If the search
    resorted to using a bigger buffer when all buffers of the specified
    size were busy, the duplicate of the used effective buffer size is
    stored back to sk_rcvbuf/sk_sndbuf.
    
    When available, buffers of exactly the size that a user had specified as
    input to setsockopt() were used, despite setsockopt()'s documentation in
    "man 7 socket" talking of a mandatory duplication:
    
    [...]
           SO_SNDBUF
                  Sets  or  gets the maximum socket send buffer in bytes.
                  The kernel doubles this value (to allow space for book‐
                  keeping  overhead)  when it is set using setsockopt(2),
                  and this doubled value is  returned  by  getsockopt(2).
                  The     default     value     is     set     by     the
                  /proc/sys/net/core/wmem_default file  and  the  maximum
                  allowed value is set by the /proc/sys/net/core/wmem_max
                  file.  The minimum (doubled) value for this  option  is
                  2048.
    [...]
    
    Fixes: 0227f05 ("net/smc: Unbind r/w buffer size from clcsock and make them tunable")
    Co-developed-by: Jan Karcher <[email protected]>
    Signed-off-by: Jan Karcher <[email protected]>
    Reviewed-by: Wenjia Zhang <[email protected]>
    Reviewed-by: Tony Lu <[email protected]>
    Signed-off-by: Gerd Bayer <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Gerd Bayer authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    0d52759 View commit details
    Browse the repository at this point in the history
  10. net: phy: at803x: Use devm_regulator_get_enable_optional()

    [ Upstream commit 988e8d9 ]
    
    Use devm_regulator_get_enable_optional() instead of hand writing it. It
    saves some line of code.
    
    Signed-off-by: Christophe JAILLET <[email protected]>
    Reviewed-by: Andrew Lunn <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: e58f302 ("net: phy: at803x: fix the wol setting functions")
    Signed-off-by: Sasha Levin <[email protected]>
    tititiou36 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    7dcc894 View commit details
    Browse the repository at this point in the history
  11. net: phy: at803x: fix the wol setting functions

    [ Upstream commit e58f302 ]
    
    In commit 7beecaf ("net: phy: at803x: improve the WOL feature"), it
    seems not correct to use a wol_en bit in a 1588 Control Register which is
    only available on AR8031/AR8033(share the same phy_id) to determine if WoL
    is enabled.  Change it back to use AT803X_INTR_ENABLE_WOL for determining
    the WoL status which is applicable on all chips supporting wol. Also update
    the at803x_set_wol() function to only update the 1588 register on chips
    having it.  After this change, disabling wol at probe from commit
    d7cd5e0 ("net: phy: at803x: disable WOL at probe") is no longer
    needed.  Change it to just disable the WoL bit in 1588 register for
    AR8031/AR8033 to be aligned with AT803X_INTR_ENABLE_WOL in probe.
    
    Fixes: 7beecaf ("net: phy: at803x: improve the WOL feature")
    Signed-off-by: Li Yang <[email protected]>
    Reviewed-by: Viorel Suman <[email protected]>
    Reviewed-by: Wei Fang <[email protected]>
    Reviewed-by: Russell King (Oracle) <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Li Yang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    caa2d40 View commit details
    Browse the repository at this point in the history
  12. drm/amdgpu: fix calltrace warning in amddrm_buddy_fini

    [ Upstream commit 0138250 ]
    
    The following call trace is observed when removing the amdgpu driver, which
    is caused by that BOs allocated for psp are not freed until removing.
    
    [61811.450562] RIP: 0010:amddrm_buddy_fini.cold+0x29/0x47 [amddrm_buddy]
    [61811.450577] Call Trace:
    [61811.450577]  <TASK>
    [61811.450579]  amdgpu_vram_mgr_fini+0x135/0x1c0 [amdgpu]
    [61811.450728]  amdgpu_ttm_fini+0x207/0x290 [amdgpu]
    [61811.450870]  amdgpu_bo_fini+0x27/0xa0 [amdgpu]
    [61811.451012]  gmc_v9_0_sw_fini+0x4a/0x60 [amdgpu]
    [61811.451166]  amdgpu_device_fini_sw+0x117/0x520 [amdgpu]
    [61811.451306]  amdgpu_driver_release_kms+0x16/0x30 [amdgpu]
    [61811.451447]  devm_drm_dev_init_release+0x4d/0x80 [drm]
    [61811.451466]  devm_action_release+0x15/0x20
    [61811.451469]  release_nodes+0x40/0xb0
    [61811.451471]  devres_release_all+0x9b/0xd0
    [61811.451473]  __device_release_driver+0x1bb/0x2a0
    [61811.451476]  driver_detach+0xf3/0x140
    [61811.451479]  bus_remove_driver+0x6c/0xf0
    [61811.451481]  driver_unregister+0x31/0x60
    [61811.451483]  pci_unregister_driver+0x40/0x90
    [61811.451486]  amdgpu_exit+0x15/0x447 [amdgpu]
    
    For smu v13_0_2, if the GPU supports xgmi, refer to
    
    commit f5c7e77 ("drm/amdgpu: Adjust removal control flow for smu v13_0_2"),
    
    it will run gpu recover in AMDGPU_RESET_FOR_DEVICE_REMOVE mode when removing,
    which makes all devices in hive list have hw reset but no resume except the
    basic ip blocks, then other ip blocks will not call .hw_fini according to
    ip_block.status.hw.
    
    Since psp_free_shared_bufs just includes some software operations, so move
    it to psp_sw_fini.
    
    Reviewed-by: Guchun Chen <[email protected]>
    Reviewed-by: Feifei Xu <[email protected]>
    Signed-off-by: Longlong Yao <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Longlong Yao authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ab6f446 View commit details
    Browse the repository at this point in the history
  13. drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1

    [ Upstream commit 87c2213 ]
    
    The type of size is unsigned int, if size is 0x40000000, there will
    be an integer overflow, size will be zero after size *= sizeof(uint32_t),
    will cause uninitialized memory to be referenced later.
    
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: hackyzh002 <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    hackyzh002 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9f55d30 View commit details
    Browse the repository at this point in the history
  14. drm/amdgpu: fix memory leak in mes self test

    [ Upstream commit 31d7c3a ]
    
    The fences associated with mes queue have to be freed
    up during amdgpu_ring_fini.
    
    Signed-off-by: Jack Xiao <[email protected]>
    Reviewed-by: Hawking Zhang <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jack Xiao authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ce3288d View commit details
    Browse the repository at this point in the history
  15. ASoC: Intel: sof_sdw: add quirk for MTL RVP

    [ Upstream commit 289e1df ]
    
    We should use RT711_JD2_100K for on board rt711.
    
    Signed-off-by: Bard Liao <[email protected]
    Signed-off-by: Pierre-Louis Bossart <[email protected]
    Reviewed-by: Ranjani Sridharan <[email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    bardliao authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    3f498ae View commit details
    Browse the repository at this point in the history
  16. ASoC: Intel: sof_sdw: add quirk for LNL RVP

    [ Upstream commit dfe25fe ]
    
    We should use RT711_JD2_100K for on board rt711
    
    Signed-off-by: Peter Ujfalusi <[email protected]
    Signed-off-by: Pierre-Louis Bossart <[email protected]
    Reviewed-by: Bard Liao <[email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    ujfalusi authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5c23d9b View commit details
    Browse the repository at this point in the history
  17. PCI: tegra194: Fix possible array out of bounds access

    [ Upstream commit 205b3d0 ]
    
    Add check to fix the possible array out of bounds violation by
    making speed equal to GEN1_CORE_CLK_FREQ when its value is more
    than the size of "pcie_gen_freq" array. This array has size of
    four but possible speed (CLS) values are from "0 to 0xF". So,
    "speed - 1" values are "-1 to 0xE".
    
    Suggested-by: Bjorn Helgaas <[email protected]>
    Signed-off-by: Sumit Gupta <[email protected]>
    Link: https://lore.kernel.org/lkml/[email protected]/
    Acked-by: Lorenzo Pieralisi <[email protected]>
    Signed-off-by: Thierry Reding <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Sumit Gupta authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ea88c6c View commit details
    Browse the repository at this point in the history
  18. ASoC: SOF: amd: Add pci revision id check

    [ Upstream commit 1d4a846 ]
    
    Add pci revision id check for renoir and rembrandt platforms.
    
    Signed-off-by: Venkata Prasad Potturu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Venkata-Prasad-Potturu authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f934cad View commit details
    Browse the repository at this point in the history
  19. drm/stm: ltdc: fix late dereference check

    [ Upstream commit 898a9e3 ]
    
    In ltdc_crtc_set_crc_source(), struct drm_crtc was dereferenced in a
    container_of() before the pointer check. This could cause a kernel panic.
    
    Fix this smatch warning:
    drivers/gpu/drm/stm/ltdc.c:1124 ltdc_crtc_set_crc_source() warn: variable dereferenced before check 'crtc' (see line 1119)
    
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/lkml/[email protected]/
    Reported-by: Dan Carpenter <[email protected]>
    Closes: https://lore.kernel.org/lkml/[email protected]/
    Signed-off-by: Raphael Gallais-Pou <[email protected]>
    Acked-by: Philippe Cornu <[email protected]>
    Signed-off-by: Philippe Cornu <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    rgallaispouSTM authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    340dba1 View commit details
    Browse the repository at this point in the history
  20. drm: rcar-du: remove R-Car H3 ES1.* workarounds

    [ Upstream commit 2da4b72 ]
    
    R-Car H3 ES1.* was only available to an internal development group and
    needed a lot of quirks and workarounds. These become a maintenance
    burden now, so our development group decided to remove upstream support
    for this SoC and prevent booting it. Public users only have ES2 onwards.
    
    Signed-off-by: Wolfram Sang <[email protected]>
    Reviewed-by: Kieran Bingham <[email protected]>
    Reviewed-by: Laurent Pinchart <[email protected]>
    Signed-off-by: Laurent Pinchart <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Wolfram Sang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    633ac56 View commit details
    Browse the repository at this point in the history
  21. ASoC: amd: vangogh: Add check for acp config flags in vangogh platform

    [ Upstream commit e89f45e ]
    
    We have SOF and generic ACP support enabled for Vangogh platform
    on some machines. Since we have same PCI id used for probing,
    add check for machine configuration flag to avoid conflict with
    newer pci drivers. Such machine flag has been initialized via
    dmi match on few Vangogh based machines. If no flag is
    specified probe and register older platform device.
    
    Signed-off-by: Venkata Prasad Potturu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Venkata-Prasad-Potturu authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    a7d4d28 View commit details
    Browse the repository at this point in the history
  22. ARM: dts: imx6dl: prtrvt, prtvt7, prti6q, prtwd2: fix USB related war…

    …nings
    
    [ Upstream commit 1d14bd9 ]
    
    Fix USB-related warnings in prtrvt, prtvt7, prti6q and prtwd2 device trees
    by disabling unused usbphynop1 and usbphynop2 USB PHYs and providing proper
    configuration for the over-current detection. This fixes the following
    warnings with the current kernel:
     usb_phy_generic usbphynop1: dummy supplies not allowed for exclusive requests
     usb_phy_generic usbphynop2: dummy supplies not allowed for exclusive requests
     imx_usb 2184200.usb: No over current polarity defined
    
    By the way, fix over-current detection on usbotg port for prtvt7, prti6q
    and prtwd2 boards. Only prtrvt do not have OC on USB OTG port.
    
    Signed-off-by: Oleksij Rempel <[email protected]>
    Signed-off-by: Shawn Guo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    olerem authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    31149bb View commit details
    Browse the repository at this point in the history
  23. ASoC: Intel: sof_sdw_rt_sdca_jack_common: test SOF_JACK_JDSRC in _exit

    [ Upstream commit 526a187 ]
    
    if (!SOF_RT711_JDSRC(sof_sdw_quirk)) is tested in rt711_sdca_add_codec_
    device_props(), and we don't add software node to the device if jack
    source is not set. We need to do the same test in
    sof_sdw_rt711_sdca_exit(), and avoid removing software node if jack
    source is not set.
    
    Signed-off-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]>
    bardliao authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    c01ec45 View commit details
    Browse the repository at this point in the history
  24. ASoC: Intel: sof_sdw: Add support for Rex soundwire

    [ Upstream commit 164e5dc ]
    
    Add rex entry in the soundwire quirk table
    
    Reviewed-by: Ranjani Sridharan <[email protected]>
    Signed-off-by: Bard Liao <[email protected]>
    Signed-off-by: Yong Zhi <[email protected]>
    Signed-off-by: Uday M Bhat <[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]>
    udaymb authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b3e662e View commit details
    Browse the repository at this point in the history
  25. iopoll: Call cpu_relax() in busy loops

    [ Upstream commit b407460 ]
    
    It is considered good practice to call cpu_relax() in busy loops, see
    Documentation/process/volatile-considered-harmful.rst.  This can not
    only lower CPU power consumption or yield to a hyperthreaded twin
    processor, but also allows an architecture to mitigate hardware issues
    (e.g. ARM Erratum 754327 for Cortex-A9 prior to r2p0) in the
    architecture-specific cpu_relax() implementation.
    
    In addition, cpu_relax() is also a compiler barrier.  It is not
    immediately obvious that the @op argument "function" will result in an
    actual function call (e.g. in case of inlining).
    
    Where a function call is a C sequence point, this is lost on inlining.
    Therefore, with agressive enough optimization it might be possible for
    the compiler to hoist the:
    
            (val) = op(args);
    
    "load" out of the loop because it doesn't see the value changing. The
    addition of cpu_relax() would inhibit this.
    
    As the iopoll helpers lack calls to cpu_relax(), people are sometimes
    reluctant to use them, and may fall back to open-coded polling loops
    (including cpu_relax() calls) instead.
    
    Fix this by adding calls to cpu_relax() to the iopoll helpers:
      - For the non-atomic case, it is sufficient to call cpu_relax() in
        case of a zero sleep-between-reads value, as a call to
        usleep_range() is a safe barrier otherwise.  However, it doesn't
        hurt to add the call regardless, for simplicity, and for similarity
        with the atomic case below.
      - For the atomic case, cpu_relax() must be called regardless of the
        sleep-between-reads value, as there is no guarantee all
        architecture-specific implementations of udelay() handle this.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Peter Zijlstra (Intel) <[email protected]>
    Acked-by: Arnd Bergmann <[email protected]>
    Reviewed-by: Tony Lindgren <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Link: https://lore.kernel.org/r/45c87bec3397fdd704376807f0eec5cc71be440f.1685692810.git.geert+renesas@glider.be
    Signed-off-by: Sasha Levin <[email protected]>
    geertu authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ff1b4b1 View commit details
    Browse the repository at this point in the history
  26. ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusion

    [ Upstream commit f751b99 ]
    
    The functionality described in Commit 61bef9e ("ASoC: SOF: Intel: hda: enforce exclusion between HDaudio and SoundWire")
    does not seem to be properly implemented with two issues that need to
    be corrected.
    
    a) The test used is incorrect when DisplayAudio codecs are not supported.
    
    b) Conversely when only Display Audio codecs can be found, we do want
    to start the SoundWire links, if any. That will help add the relevant
    topologies and machine descriptors, and identify cases where the
    SoundWire information in ACPI needs to be modified with a quirk.
    
    Signed-off-by: Pierre-Louis Bossart <[email protected]>
    Reviewed-by: Bard Liao <[email protected]>
    Reviewed-by: Ranjani Sridharan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    plbossart authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    3dd5c90 View commit details
    Browse the repository at this point in the history
  27. dma-remap: use kvmalloc_array/kvfree for larger dma memory remap

    [ Upstream commit 51ff97d ]
    
    If dma_direct_alloc() alloc memory in size of 64MB, the inner function
    dma_common_contiguous_remap() will allocate 128KB memory by invoking
    the function kmalloc_array(). and the kmalloc_array seems to fail to try to
    allocate 128KB mem.
    
    Call trace:
    [14977.928623] qcrosvm: page allocation failure: order:5, mode:0x40cc0
    [14977.928638] dump_backtrace.cfi_jt+0x0/0x8
    [14977.928647] dump_stack_lvl+0x80/0xb8
    [14977.928652] warn_alloc+0x164/0x200
    [14977.928657] __alloc_pages_slowpath+0x9f0/0xb4c
    [14977.928660] __alloc_pages+0x21c/0x39c
    [14977.928662] kmalloc_order+0x48/0x108
    [14977.928666] kmalloc_order_trace+0x34/0x154
    [14977.928668] __kmalloc+0x548/0x7e4
    [14977.928673] dma_direct_alloc+0x11c/0x4f8
    [14977.928678] dma_alloc_attrs+0xf4/0x138
    [14977.928680] gh_vm_ioctl_set_fw_name+0x3c4/0x610 [gunyah]
    [14977.928698] gh_vm_ioctl+0x90/0x14c [gunyah]
    [14977.928705] __arm64_sys_ioctl+0x184/0x210
    
    work around by doing kvmalloc_array instead.
    
    Signed-off-by: Gao Xu <[email protected]>
    Reviewed-by: Suren Baghdasaryan <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    gaoxu authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b7a34e3 View commit details
    Browse the repository at this point in the history
  28. accel/habanalabs: add pci health check during heartbeat

    [ Upstream commit d8b9cea ]
    
    Currently upon a heartbeat failure, we don't know if the failure
    is due to firmware hang or due to a bad PCI link. Hence, we
    are reading a PCI config space register with a known value (vendor ID)
    so we will know which of the two possibilities caused the heartbeat
    failure.
    
    Signed-off-by: Ofir Bitton <[email protected]>
    Reviewed-by: Oded Gabbay <[email protected]>
    Signed-off-by: Oded Gabbay <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ofirbitt authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d7933b9 View commit details
    Browse the repository at this point in the history
  29. HID: logitech-hidpp: Add USB and Bluetooth IDs for the Logitech G915 …

    …TKL Keyboard
    
    [ Upstream commit 48aea8b ]
    
    Adds the USB and Bluetooth IDs for the Logitech G915 TKL keyboard, for device detection
    For this device, this provides battery reporting on top of hid-generic
    
    Reviewed-by: Bastien Nocera <[email protected]>
    Signed-off-by: Stuart Hayhurst <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    stuarthayhurst authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    83c2266 View commit details
    Browse the repository at this point in the history
  30. iommu/amd: Introduce Disable IRTE Caching Support

    [ Upstream commit 6641903 ]
    
    An Interrupt Remapping Table (IRT) stores interrupt remapping configuration
    for each device. In a normal operation, the AMD IOMMU caches the table
    to optimize subsequent data accesses. This requires the IOMMU driver to
    invalidate IRT whenever it updates the table. The invalidation process
    includes issuing an INVALIDATE_INTERRUPT_TABLE command following by
    a COMPLETION_WAIT command.
    
    However, there are cases in which the IRT is updated at a high rate.
    For example, for IOMMU AVIC, the IRTE[IsRun] bit is updated on every
    vcpu scheduling (i.e. amd_iommu_update_ga()). On system with large
    amount of vcpus and VFIO PCI pass-through devices, the invalidation
    process could potentially become a performance bottleneck.
    
    Introducing a new kernel boot option:
    
        amd_iommu=irtcachedis
    
    which disables IRTE caching by setting the IRTCachedis bit in each IOMMU
    Control register, and bypass the IRT invalidation process.
    
    Reviewed-by: Jerry Snitselaar <[email protected]>
    Co-developed-by: Alejandro Jimenez <[email protected]>
    Signed-off-by: Alejandro Jimenez <[email protected]>
    Signed-off-by: Suravee Suthikulpanit <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Joerg Roedel <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ssuthiku-amd authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    96522cf View commit details
    Browse the repository at this point in the history
  31. drm/amdgpu: install stub fence into potential unused fence pointers

    [ Upstream commit 187916e ]
    
    When using cpu to update page tables, vm update fences are unused.
    Install stub fence into these fence pointers instead of NULL
    to avoid NULL dereference when calling dma_fence_wait() on them.
    
    Suggested-by: Christian König <[email protected]>
    Signed-off-by: Lang Yu <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Lang Yu authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    78b2511 View commit details
    Browse the repository at this point in the history
  32. drm/amd/display: Apply 60us prefetch for DCFCLK <= 300Mhz

    [ Upstream commit 7e60ab4 ]
    
    [Description]
    - Previously we wanted to apply extra 60us of prefetch for min DCFCLK
      (200Mhz), but DCFCLK can be calculated to be 201Mhz which underflows
      also without the extra prefetch
    - Instead, apply the the extra 60us prefetch for any DCFCLK freq <=
      300Mhz
    
    Reviewed-by: Nevenko Stupar <[email protected]>
    Reviewed-by: Jun Lei <[email protected]>
    Acked-by: Tom Chung <[email protected]>
    Signed-off-by: Alvin Lee <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Alvin Lee authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    fbd9332 View commit details
    Browse the repository at this point in the history
  33. RDMA/mlx5: Return the firmware result upon destroying QP/RQ

    [ Upstream commit 22664c0 ]
    
    Previously when destroying a QP/RQ, the result of the firmware
    destruction function was ignored and upper layers weren't informed
    about the failure.
    Which in turn could lead to various problems since when upper layer
    isn't aware of the failure it continues its operation thinking that the
    related QP/RQ was successfully destroyed while it actually wasn't,
    which could lead to the below kernel WARN.
    
    Currently, we return the correct firmware destruction status to upper
    layers which in case of the RQ would be mlx5_ib_destroy_wq() which
    was already capable of handling RQ destruction failure or in case of
    a QP to destroy_qp_common(), which now would actually warn upon qp
    destruction failure.
    
    WARNING: CPU: 3 PID: 995 at drivers/infiniband/core/rdma_core.c:940 uverbs_destroy_ufile_hw+0xcb/0xe0 [ib_uverbs]
    Modules linked in: xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi rdma_cm ib_umad ib_ipoib iw_cm ib_cm mlx5_ib ib_uverbs ib_core overlay mlx5_core fuse
    CPU: 3 PID: 995 Comm: python3 Not tainted 5.16.0-rc5+ #1
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
    RIP: 0010:uverbs_destroy_ufile_hw+0xcb/0xe0 [ib_uverbs]
    Code: 41 5c 41 5d 41 5e e9 44 34 f0 e0 48 89 df e8 4c 77 ff ff 49 8b 86 10 01 00 00 48 85 c0 74 a1 4c 89 e7 ff d0 eb 9a 0f 0b eb c1 <0f> 0b be 04 00 00 00 48 89 df e8 b6 f6 ff ff e9 75 ff ff ff 90 0f
    RSP: 0018:ffff8881533e3e78 EFLAGS: 00010287
    RAX: ffff88811b2cf3e0 RBX: ffff888106209700 RCX: 0000000000000000
    RDX: ffff888106209780 RSI: ffff8881533e3d30 RDI: ffff888109b101a0
    RBP: 0000000000000001 R08: ffff888127cb381c R09: 0de9890000000009
    R10: ffff888127cb3800 R11: 0000000000000000 R12: ffff888106209780
    R13: ffff888106209750 R14: ffff888100f20660 R15: 0000000000000000
    FS:  00007f8be353b740(0000) GS:ffff88852c980000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f8bd5b117c0 CR3: 000000012cd8a004 CR4: 0000000000370ea0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     <TASK>
     ib_uverbs_close+0x1a/0x90 [ib_uverbs]
     __fput+0x82/0x230
     task_work_run+0x59/0x90
     exit_to_user_mode_prepare+0x138/0x140
     syscall_exit_to_user_mode+0x1d/0x50
     ? __x64_sys_close+0xe/0x40
     do_syscall_64+0x4a/0x90
     entry_SYSCALL_64_after_hwframe+0x44/0xae
    RIP: 0033:0x7f8be3ae0abb
    Code: 03 00 00 00 0f 05 48 3d 00 f0 ff ff 77 41 c3 48 83 ec 18 89 7c 24 0c e8 83 43 f9 ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 c1 43 f9 ff 8b 44
    RSP: 002b:00007ffdb51909c0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
    RAX: 0000000000000000 RBX: 0000557bb7f7c020 RCX: 00007f8be3ae0abb
    RDX: 0000557bb7c74010 RSI: 0000557bb7f14ca0 RDI: 0000000000000005
    RBP: 0000557bb7fbd598 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000293 R12: 0000557bb7fbd5b8
    R13: 0000557bb7fbd5a8 R14: 0000000000001000 R15: 0000557bb7f7c020
     </TASK>
    
    Signed-off-by: Patrisious Haddad <[email protected]>
    Link: https://lore.kernel.org/r/c6df677f931d18090bafbe7f7dbb9524047b7d9b.1685953497.git.leon@kernel.org
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    PatrisiousHaddad authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5fe7815 View commit details
    Browse the repository at this point in the history
  34. drm/amd/display: Skip DPP DTO update if root clock is gated

    [ Upstream commit 30f90f3 ]
    
    [Why]
    Hardware implements root clock gating by utilizing the DPP DTO registers
    with a special case of DTO enabled, phase = 0, modulo = 1. This
    conflicts with our policy to always update the DPPDTO for cases where
    it's expected to be disabled.
    
    The pipes unexpectedly enter a higher power state than expected because
    of this programming flow.
    
    [How]
    Guard the upper layers of HWSS against this hardware quirk with
    programming the register with an internal state flag in DCCG.
    
    While technically acting as global state for the DCCG, HWSS shouldn't be
    expected to understand the hardware quirk for having DTO disabled
    causing more power than DTO enabled with this specific setting.
    
    This also prevents sequencing errors from occuring in the future if
    we have to program DPP DTO in multiple locations.
    
    Acked-by: Stylon Wang <[email protected]>
    Signed-off-by: Nicholas Kazlauskas <[email protected]>
    Reviewed-by: Jun Lei <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Nicholas Kazlauskas authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5447155 View commit details
    Browse the repository at this point in the history
  35. drm/amd/display: Enable dcn314 DPP RCO

    [ Upstream commit 17fbdbd ]
    
    [Why and How]
    Add back debug bits enabling RCO for dcn314 as underflow
    associated with this change has been resolved
    
    Acked-by: Stylon Wang <[email protected]>
    Signed-off-by: Daniel Miess <[email protected]>
    Reviewed-by: Jun Lei <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Daniel Miess authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    359ec09 View commit details
    Browse the repository at this point in the history
  36. ASoC: SOF: core: Free the firmware trace before calling snd_sof_shutd…

    …own()
    
    [ Upstream commit d389dcb ]
    
    The shutdown is called on reboot/shutdown of the machine.
    At this point the firmware tracing cannot be used anymore but in case of
    IPC3 it is using and keeping a DMA channel active (dtrace).
    
    For Tiger Lake platforms we have a quirk in place to fix rare reboot issues
    when a DMA was active before rebooting the system.
    If the tracing is enabled this quirk will be always used and a print
    appears on the kernel log which might be misleading or not even correct.
    
    Release the fw tracing before executing the shutdown to make sure that this
    known DMA user is cleared away.
    
    Reviewed-by: Kai Vehmanen <[email protected]>
    Reviewed-by: Daniel Baluta <[email protected]>
    Reviewed-by: Ranjani Sridharan <[email protected]>
    Reviewed-by: Rander Wang <[email protected]>
    Reviewed-by: Bard Liao <[email protected]>
    Signed-off-by: Peter Ujfalusi <[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]>
    ujfalusi authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    0559717 View commit details
    Browse the repository at this point in the history
  37. HID: intel-ish-hid: ipc: Add Arrow Lake PCI device ID

    [ Upstream commit 4982126 ]
    
    Add device ID of Arrow Lake-H into ishtp support list.
    
    Signed-off-by: Even Xu <[email protected]>
    Acked-by: Srinivas Pandruvada <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Evenxf authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    de840f7 View commit details
    Browse the repository at this point in the history
  38. ALSA: hda/realtek: Add quirks for ROG ALLY CS35l41 audio

    [ Upstream commit 724418b ]
    
    This requires a patched ACPI table or a firmware from ASUS to work because
    the system does not come with the _DSD field for the CSC3551.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=217550
    Signed-off-by: Matthew Anderson <[email protected]>
    Tested-by: Philip Mueller <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ruineka authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    a783230 View commit details
    Browse the repository at this point in the history
  39. smb: client: fix warning in cifs_smb3_do_mount()

    [ Upstream commit 12c30f3 ]
    
    This fixes the following warning reported by kernel test robot
    
      fs/smb/client/cifsfs.c:982 cifs_smb3_do_mount() warn: possible
      memory leak of 'cifs_sb'
    
    Link: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pcacjr authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    945f4a7 View commit details
    Browse the repository at this point in the history
  40. cifs: fix session state check in reconnect to avoid use-after-free issue

    [ Upstream commit 99f2807 ]
    
    Don't collect exiting session in smb2_reconnect_server(), because it
    will be released soon.
    
    Note that the exiting session will stay in server->smb_ses_list until
    it complete the cifs_free_ipc() and logoff() and then delete itself
    from the list.
    
    Signed-off-by: Winston Wen <[email protected]>
    Reviewed-by: Shyam Prasad N <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    winnscode authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    7e4f5c3 View commit details
    Browse the repository at this point in the history
  41. serial: stm32: Ignore return value of uart_remove_one_port() in .remo…

    …ve()
    
    [ Upstream commit 6bd6cd2 ]
    
    Returning early from stm32_usart_serial_remove() results in a resource
    leak as several cleanup functions are not called. The driver core ignores
    the return value and there is no possibility to clean up later.
    
    uart_remove_one_port() only returns non-zero if there is some
    inconsistency (i.e. stm32_usart_driver.state[port->line].uart_port == NULL).
    This should never happen, and even if it does it's a bad idea to exit
    early in the remove callback without cleaning up.
    
    This prepares changing the prototype of struct platform_driver::remove to
    return void. See commit 5c5a768 ("platform: Provide a remove callback
    that returns no value") for further details about this quest.
    
    Signed-off-by: Uwe Kleine-König <[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]>
    Uwe Kleine-König authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    bda3f46 View commit details
    Browse the repository at this point in the history
  42. led: qcom-lpg: Fix resource leaks in for_each_available_child_of_node…

    …() loops
    
    [ Upstream commit 8f38f8f ]
    
    Ensure child node references are decremented properly in the error path.
    
    Signed-off-by: Lu Hongfei <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Lu Hongfei authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    6c9317f View commit details
    Browse the repository at this point in the history
  43. media: v4l2-mem2mem: add lock to protect parameter num_rdy

    [ Upstream commit 56b5c3e ]
    
    Getting below error when using KCSAN to check the driver. Adding lock to
    protect parameter num_rdy when getting the value with function:
    v4l2_m2m_num_src_bufs_ready/v4l2_m2m_num_dst_bufs_ready.
    
    kworker/u16:3: [name:report&]BUG: KCSAN: data-race in v4l2_m2m_buf_queue
    kworker/u16:3: [name:report&]
    
    kworker/u16:3: [name:report&]read-write to 0xffffff8105f35b94 of 1 bytes by task 20865 on cpu 7:
    kworker/u16:3:  v4l2_m2m_buf_queue+0xd8/0x10c
    
    Signed-off-by: Pina Chen <[email protected]>
    Signed-off-by: Yunfei Dong <[email protected]>
    Signed-off-by: Hans Verkuil <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    yunfei-mtk authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    c71aa5f View commit details
    Browse the repository at this point in the history
  44. media: camss: set VFE bpl_alignment to 16 for sdm845 and sm8250

    [ Upstream commit d5b7eb4 ]
    
    From the experiments with camera sensors using SGRBG10_1X10/3280x2464 and
    SRGGB10_1X10/3280x2464 formats, it becomes clear that on sdm845 and sm8250
    VFE outputs the lines padded to a length multiple of 16 bytes. As in the
    current driver the value of the bpl_alignment is set to 8 bytes, the frames
    captured in formats with the bytes-per-line value being not a multiple of
    16 get corrupted.
    
    Set the bpl_alignment of the camss video output device to 16 for sdm845 and
    sm8250 to fix that.
    
    Signed-off-by: Andrey Konovalov <[email protected]>
    Tested-by: Bryan O'Donoghue <[email protected]>
    Acked-by: Bryan O'Donoghue <[email protected]>
    Signed-off-by: Hans Verkuil <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    andrey-konovalov authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    54a55c3 View commit details
    Browse the repository at this point in the history
  45. usb: gadget: u_serial: Avoid spinlock recursion in __gs_console_push

    [ Upstream commit e599046 ]
    
    When serial console over USB is enabled, gs_console_connect
    queues gs_console_work, where it acquires the spinlock and
    queues the usb request, and this request goes to gadget layer.
    Now consider a situation where gadget layer prints something
    to dmesg, this will eventually call gs_console_write() which
    requires cons->lock. And this causes spinlock recursion. Avoid
    this by excluding usb_ep_queue from the spinlock.
    
     spin_lock_irqsave //needs cons->lock
     gs_console_write
    	.
    	.
     _printk
     __warn_printk
     dev_warn/pr_err
    	.
    	.
     [USB Gadget Layer]
    	.
    	.
     usb_ep_queue
     gs_console_work
     __gs_console_push // acquires cons->lock
     process_one_work
    
    Signed-off-by: Prashanth K <[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]>
    Prashanth K authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    4903887 View commit details
    Browse the repository at this point in the history
  46. usb: gadget: uvc: queue empty isoc requests if no video buffer is ava…

    …ilable
    
    [ Upstream commit c3ff12a ]
    
    ISOC transfers expect a certain cadence of requests being queued. Not
    keeping up with the expected rate of requests results in missed ISOC
    transfers (EXDEV). The application layer may or may not produce video
    frames to match this expectation, so uvc gadget driver must handle cases
    where the application is not queuing up buffers fast enough to fulfill
    ISOC requirements.
    
    Currently, uvc gadget driver waits for new video buffer to become available
    before queuing up usb requests. With this patch the gadget driver queues up
    0 length usb requests whenever there are no video buffers available. The
    USB controller's complete callback is used as the limiter for how quickly
    the 0 length packets will be queued. Video buffers are still queued as
    soon as they become available.
    
    Link: https://lore.kernel.org/CAMHf4WKbi6KBPQztj9FA4kPvESc1fVKrC8G73-cs6tTeQby9=w@mail.gmail.com/
    Signed-off-by: Avichal Rakesh <[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]>
    Avichal Rakesh authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    28d9008 View commit details
    Browse the repository at this point in the history
  47. media: platform: mediatek: vpu: fix NULL ptr dereference

    [ Upstream commit 3df55cd ]
    
    If pdev is NULL, then it is still dereferenced.
    
    This fixes this smatch warning:
    
    drivers/media/platform/mediatek/vpu/mtk_vpu.c:570 vpu_load_firmware() warn: address of NULL pointer 'pdev'
    
    Signed-off-by: Hans Verkuil <[email protected]>
    Cc: Yunfei Dong <[email protected]>
    Signed-off-by: Mauro Carvalho Chehab <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Hans Verkuil authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b7bd48f View commit details
    Browse the repository at this point in the history
  48. thunderbolt: Read retimer NVM authentication status prior tb_retimer_…

    …set_inbound_sbtx()
    
    [ Upstream commit 1402ba0 ]
    
    According to the USB4 retimer guide the correct order is immediately
    after sending ENUMERATE_RETIMERS so update the code to follow this.
    
    Signed-off-by: Mika Westerberg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    westeri authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    809625f View commit details
    Browse the repository at this point in the history
  49. usb: chipidea: imx: don't request QoS for imx8ulp

    [ Upstream commit 9a070e8 ]
    
    Use dedicated imx8ulp usb compatible to remove QoS request
    since imx8ulp has no such limitation of imx7ulp: DMA will
    not work if system enters idle.
    
    Signed-off-by: Xu Yang <[email protected]>
    Signed-off-by: Li Jun <[email protected]>
    Acked-by: Peter Chen <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Xu Yang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    31f8efe View commit details
    Browse the repository at this point in the history
  50. usb: chipidea: imx: add missing USB PHY DPDM wakeup setting

    [ Upstream commit 53d061c ]
    
    USB PHY DPDM wakeup bit is enabled by default, when USB wakeup
    is not required(/sys/.../wakeup is disabled), this bit should be
    disabled, otherwise we will have unexpected wakeup if do USB device
    connect/disconnect while system sleep.
    This bit can be enabled for both host and device mode.
    
    Signed-off-by: Li Jun <[email protected]>
    Signed-off-by: Xu Yang <[email protected]>
    Acked-by: Peter Chen <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Xu Yang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8277a21 View commit details
    Browse the repository at this point in the history
  51. gfs2: Fix possible data races in gfs2_show_options()

    [ Upstream commit 6fa0a72 ]
    
    Some fields such as gt_logd_secs of the struct gfs2_tune are accessed
    without holding the lock gt_spin in gfs2_show_options():
    
      val = sdp->sd_tune.gt_logd_secs;
      if (val != 30)
        seq_printf(s, ",commit=%d", val);
    
    And thus can cause data races when gfs2_show_options() and other functions
    such as gfs2_reconfigure() are concurrently executed:
    
      spin_lock(&gt->gt_spin);
      gt->gt_logd_secs = newargs->ar_commit;
    
    To fix these possible data races, the lock sdp->sd_tune.gt_spin is
    acquired before accessing the fields of gfs2_tune and released after these
    accesses.
    
    Further changes by Andreas:
    
    - Don't hold the spin lock over the seq_printf operations.
    
    Reported-by: BassCheck <[email protected]>
    Signed-off-by: Tuo Li <[email protected]>
    Signed-off-by: Andreas Gruenbacher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    lituo1996 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    a4f7152 View commit details
    Browse the repository at this point in the history
  52. pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource…

    …_db()
    
    [ Upstream commit c85fd94 ]
    
    When nonstatic_release_resource_db() frees all resources associated
    with an PCMCIA socket, it forgets to free socket_data too, causing
    a memory leak observable with kmemleak:
    
    unreferenced object 0xc28d1000 (size 64):
      comm "systemd-udevd", pid 297, jiffies 4294898478 (age 194.484s)
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 f0 85 0e c3 00 00 00 00  ................
        00 00 00 00 0c 10 8d c2 00 00 00 00 00 00 00 00  ................
      backtrace:
        [<ffda4245>] __kmem_cache_alloc_node+0x2d7/0x4a0
        [<7e51f0c8>] kmalloc_trace+0x31/0xa4
        [<d52b4ca0>] nonstatic_init+0x24/0x1a4 [pcmcia_rsrc]
        [<a2f13e08>] pcmcia_register_socket+0x200/0x35c [pcmcia_core]
        [<a728be1b>] yenta_probe+0x4d8/0xa70 [yenta_socket]
        [<c48fac39>] pci_device_probe+0x99/0x194
        [<84b7c690>] really_probe+0x181/0x45c
        [<8060fe6e>] __driver_probe_device+0x75/0x1f4
        [<b9b76f43>] driver_probe_device+0x28/0xac
        [<648b766f>] __driver_attach+0xeb/0x1e4
        [<6e9659eb>] bus_for_each_dev+0x61/0xb4
        [<25a669f3>] driver_attach+0x1e/0x28
        [<d8671d6b>] bus_add_driver+0x102/0x20c
        [<df0d323c>] driver_register+0x5b/0x120
        [<942cd8a4>] __pci_register_driver+0x44/0x4c
        [<e536027e>] __UNIQUE_ID___addressable_cleanup_module188+0x1c/0xfffff000 [iTCO_vendor_support]
    
    Fix this by freeing socket_data too.
    
    Tested on a Acer Travelmate 4002WLMi by manually binding/unbinding
    the yenta_cardbus driver (yenta_socket).
    
    Signed-off-by: Armin Wolf <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Wer-Wolf authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e8a80cf View commit details
    Browse the repository at this point in the history
  53. thunderbolt: Add Intel Barlow Ridge PCI ID

    [ Upstream commit 6f14a21 ]
    
    Intel Barlow Ridge is the first USB4 v2 controller from Intel. The
    controller exposes standard USB4 PCI class ID in typical configurations,
    however there is a way to configure it so that it uses a special class
    ID to allow using s different driver than the Windows inbox one. For
    this reason add the Barlow Ridge PCI ID to the Linux driver too so that
    the driver can attach regardless of the class ID.
    
    Tested-by: Pengfei Xu <[email protected]>
    Signed-off-by: Mika Westerberg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    westeri authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    acb9038 View commit details
    Browse the repository at this point in the history
  54. thunderbolt: Limit Intel Barlow Ridge USB3 bandwidth

    [ Upstream commit f2bfa94 ]
    
    Intel Barlow Ridge discrete USB4 host router has the same limitation as
    the previous generations so make sure the USB3 bandwidth limitation
    quirk is applied to Barlow Ridge too.
    
    Signed-off-by: Gil Fine <[email protected]>
    Signed-off-by: Mika Westerberg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    westeri authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ef87750 View commit details
    Browse the repository at this point in the history
  55. firewire: net: fix use after free in fwnet_finish_incoming_packet()

    [ Upstream commit 3ff2567 ]
    
    The netif_rx() function frees the skb so we can't dereference it to
    save the skb->len.
    
    Signed-off-by: Zhang Shurong <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Sakamoto <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ZhangShurong authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9040adc View commit details
    Browse the repository at this point in the history
  56. watchdog: sp5100_tco: support Hygon FCH/SCH (Server Controller Hub)

    [ Upstream commit 009637d ]
    
    Add PCI_VENDOR_ID_HYGON(Hygon vendor id [0x1d94]) in this driver
    
    Signed-off-by: Yuechao Zhao <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Wim Van Sebroeck <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yuechao Zhao authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    de8677c View commit details
    Browse the repository at this point in the history
  57. Bluetooth: L2CAP: Fix use-after-free

    [ Upstream commit f752a0b ]
    
    Fix potential use-after-free in l2cap_le_command_rej.
    
    Signed-off-by: Zhengping Jiang <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Zhengping Jiang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    149daab View commit details
    Browse the repository at this point in the history
  58. Bluetooth: btusb: Add MT7922 bluetooth ID for the Asus Ally

    [ Upstream commit fa01eba ]
    
    Adding the device ID from the Asus Ally gets the bluetooth working
    on the device.
    
    Signed-off-by: Matthew Anderson <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ruineka authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d92613a View commit details
    Browse the repository at this point in the history
  59. ceph: try to dump the msgs when decoding fails

    [ Upstream commit 8b0da5c ]
    
    When the msgs are corrupted we need to dump them and then it will
    be easier to dig what has happened and where the issue is.
    
    Signed-off-by: Xiubo Li <[email protected]>
    Reviewed-by: Milind Changire <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    lxbsz authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    3a89f3b View commit details
    Browse the repository at this point in the history
  60. drm/amdgpu: Fix potential fence use-after-free v2

    [ Upstream commit 2e54154 ]
    
    fence Decrements the reference count before exiting.
    Avoid Race Vulnerabilities for fence use-after-free.
    
    v2 (chk): actually fix the use after free and not just move it.
    
    Signed-off-by: shanzhulig <[email protected]>
    Signed-off-by: Christian König <[email protected]>
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    MiniMangosteen authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    dd0b3b3 View commit details
    Browse the repository at this point in the history
  61. fs/ntfs3: Enhance sanity check while generating attr_list

    [ Upstream commit fdec309 ]
    
    ni_create_attr_list uses WARN_ON to catch error cases while generating
    attribute list, which only prints out stack trace and may not be enough.
    This repalces them with more proper error handling flow.
    
    [   59.666332] BUG: kernel NULL pointer dereference, address: 000000000000000e
    [   59.673268] #PF: supervisor read access in kernel mode
    [   59.678354] #PF: error_code(0x0000) - not-present page
    [   59.682831] PGD 8000000005ff1067 P4D 8000000005ff1067 PUD 7dee067 PMD 0
    [   59.688556] Oops: 0000 [#1] PREEMPT SMP KASAN PTI
    [   59.692642] CPU: 0 PID: 198 Comm: poc Tainted: G    B   W          6.2.0-rc1+ #4
    [   59.698868] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    [   59.708795] RIP: 0010:ni_create_attr_list+0x505/0x860
    [   59.713657] Code: 7e 10 e8 5e d0 d0 ff 45 0f b7 76 10 48 8d 7b 16 e8 00 d1 d0 ff 66 44 89 73 16 4d 8d 75 0e 4c 89 f7 e8 3f d0 d0 ff 4c 8d8
    [   59.731559] RSP: 0018:ffff88800a56f1e0 EFLAGS: 00010282
    [   59.735691] RAX: 0000000000000001 RBX: ffff88800b7b5088 RCX: ffffffffb83079fe
    [   59.741792] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffffbb7f9fc0
    [   59.748423] RBP: ffff88800a56f3a8 R08: ffff88800b7b50a0 R09: fffffbfff76ff3f9
    [   59.754654] R10: ffffffffbb7f9fc7 R11: fffffbfff76ff3f8 R12: ffff88800b756180
    [   59.761552] R13: 0000000000000000 R14: 000000000000000e R15: 0000000000000050
    [   59.768323] FS:  00007feaa8c96440(0000) GS:ffff88806d400000(0000) knlGS:0000000000000000
    [   59.776027] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   59.781395] CR2: 00007f3a2e0b1000 CR3: 000000000a5bc000 CR4: 00000000000006f0
    [   59.787607] Call Trace:
    [   59.790271]  <TASK>
    [   59.792488]  ? __pfx_ni_create_attr_list+0x10/0x10
    [   59.797235]  ? kernel_text_address+0xd3/0xe0
    [   59.800856]  ? unwind_get_return_address+0x3e/0x60
    [   59.805101]  ? __kasan_check_write+0x18/0x20
    [   59.809296]  ? preempt_count_sub+0x1c/0xd0
    [   59.813421]  ni_ins_attr_ext+0x52c/0x5c0
    [   59.817034]  ? __pfx_ni_ins_attr_ext+0x10/0x10
    [   59.821926]  ? __vfs_setxattr+0x121/0x170
    [   59.825718]  ? __vfs_setxattr_noperm+0x97/0x300
    [   59.829562]  ? __vfs_setxattr_locked+0x145/0x170
    [   59.833987]  ? vfs_setxattr+0x137/0x2a0
    [   59.836732]  ? do_setxattr+0xce/0x150
    [   59.839807]  ? setxattr+0x126/0x140
    [   59.842353]  ? path_setxattr+0x164/0x180
    [   59.845275]  ? __x64_sys_setxattr+0x71/0x90
    [   59.848838]  ? do_syscall_64+0x3f/0x90
    [   59.851898]  ? entry_SYSCALL_64_after_hwframe+0x72/0xdc
    [   59.857046]  ? stack_depot_save+0x17/0x20
    [   59.860299]  ni_insert_attr+0x1ba/0x420
    [   59.863104]  ? __pfx_ni_insert_attr+0x10/0x10
    [   59.867069]  ? preempt_count_sub+0x1c/0xd0
    [   59.869897]  ? _raw_spin_unlock_irqrestore+0x2b/0x50
    [   59.874088]  ? __create_object+0x3ae/0x5d0
    [   59.877865]  ni_insert_resident+0xc4/0x1c0
    [   59.881430]  ? __pfx_ni_insert_resident+0x10/0x10
    [   59.886355]  ? kasan_save_alloc_info+0x1f/0x30
    [   59.891117]  ? __kasan_kmalloc+0x8b/0xa0
    [   59.894383]  ntfs_set_ea+0x90d/0xbf0
    [   59.897703]  ? __pfx_ntfs_set_ea+0x10/0x10
    [   59.901011]  ? kernel_text_address+0xd3/0xe0
    [   59.905308]  ? __kernel_text_address+0x16/0x50
    [   59.909811]  ? unwind_get_return_address+0x3e/0x60
    [   59.914898]  ? __pfx_stack_trace_consume_entry+0x10/0x10
    [   59.920250]  ? arch_stack_walk+0xa2/0x100
    [   59.924560]  ? filter_irq_stacks+0x27/0x80
    [   59.928722]  ntfs_setxattr+0x405/0x440
    [   59.932512]  ? __pfx_ntfs_setxattr+0x10/0x10
    [   59.936634]  ? kvmalloc_node+0x2d/0x120
    [   59.940378]  ? kasan_save_stack+0x41/0x60
    [   59.943870]  ? kasan_save_stack+0x2a/0x60
    [   59.947719]  ? kasan_set_track+0x29/0x40
    [   59.951417]  ? kasan_save_alloc_info+0x1f/0x30
    [   59.955733]  ? __kasan_kmalloc+0x8b/0xa0
    [   59.959598]  ? __kmalloc_node+0x68/0x150
    [   59.963163]  ? kvmalloc_node+0x2d/0x120
    [   59.966490]  ? vmemdup_user+0x2b/0xa0
    [   59.969060]  __vfs_setxattr+0x121/0x170
    [   59.972456]  ? __pfx___vfs_setxattr+0x10/0x10
    [   59.976008]  __vfs_setxattr_noperm+0x97/0x300
    [   59.981562]  __vfs_setxattr_locked+0x145/0x170
    [   59.986100]  vfs_setxattr+0x137/0x2a0
    [   59.989964]  ? __pfx_vfs_setxattr+0x10/0x10
    [   59.993616]  ? __kasan_check_write+0x18/0x20
    [   59.997425]  do_setxattr+0xce/0x150
    [   60.000304]  setxattr+0x126/0x140
    [   60.002967]  ? __pfx_setxattr+0x10/0x10
    [   60.006471]  ? __virt_addr_valid+0xcb/0x140
    [   60.010461]  ? __call_rcu_common.constprop.0+0x1c7/0x330
    [   60.016037]  ? debug_smp_processor_id+0x1b/0x30
    [   60.021008]  ? kasan_quarantine_put+0x5b/0x190
    [   60.025545]  ? putname+0x84/0xa0
    [   60.027910]  ? __kasan_slab_free+0x11e/0x1b0
    [   60.031483]  ? putname+0x84/0xa0
    [   60.033986]  ? preempt_count_sub+0x1c/0xd0
    [   60.036876]  ? __mnt_want_write+0xae/0x100
    [   60.040738]  ? mnt_want_write+0x8f/0x150
    [   60.044317]  path_setxattr+0x164/0x180
    [   60.048096]  ? __pfx_path_setxattr+0x10/0x10
    [   60.052096]  ? strncpy_from_user+0x175/0x1c0
    [   60.056482]  ? debug_smp_processor_id+0x1b/0x30
    [   60.059848]  ? fpregs_assert_state_consistent+0x6b/0x80
    [   60.064557]  __x64_sys_setxattr+0x71/0x90
    [   60.068892]  do_syscall_64+0x3f/0x90
    [   60.072868]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
    [   60.077523] RIP: 0033:0x7feaa86e4469
    [   60.080915] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 088
    [   60.097353] RSP: 002b:00007ffdbd8311e8 EFLAGS: 00000286 ORIG_RAX: 00000000000000bc
    [   60.103386] RAX: ffffffffffffffda RBX: 9461c5e290baac00 RCX: 00007feaa86e4469
    [   60.110322] RDX: 00007ffdbd831fe0 RSI: 00007ffdbd831305 RDI: 00007ffdbd831263
    [   60.116808] RBP: 00007ffdbd836180 R08: 0000000000000001 R09: 00007ffdbd836268
    [   60.123879] R10: 000000000000007d R11: 0000000000000286 R12: 0000000000400500
    [   60.130540] R13: 00007ffdbd836260 R14: 0000000000000000 R15: 0000000000000000
    [   60.136553]  </TASK>
    [   60.138818] Modules linked in:
    [   60.141839] CR2: 000000000000000e
    [   60.144831] ---[ end trace 0000000000000000 ]---
    [   60.149058] RIP: 0010:ni_create_attr_list+0x505/0x860
    [   60.153975] Code: 7e 10 e8 5e d0 d0 ff 45 0f b7 76 10 48 8d 7b 16 e8 00 d1 d0 ff 66 44 89 73 16 4d 8d 75 0e 4c 89 f7 e8 3f d0 d0 ff 4c 8d8
    [   60.172443] RSP: 0018:ffff88800a56f1e0 EFLAGS: 00010282
    [   60.176246] RAX: 0000000000000001 RBX: ffff88800b7b5088 RCX: ffffffffb83079fe
    [   60.182752] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffffbb7f9fc0
    [   60.189949] RBP: ffff88800a56f3a8 R08: ffff88800b7b50a0 R09: fffffbfff76ff3f9
    [   60.196950] R10: ffffffffbb7f9fc7 R11: fffffbfff76ff3f8 R12: ffff88800b756180
    [   60.203671] R13: 0000000000000000 R14: 000000000000000e R15: 0000000000000050
    [   60.209595] FS:  00007feaa8c96440(0000) GS:ffff88806d400000(0000) knlGS:0000000000000000
    [   60.216299] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   60.222276] CR2: 00007f3a2e0b1000 CR3: 000000000a5bc000 CR4: 00000000000006f0
    
    Signed-off-by: Edward Lo <[email protected]>
    Signed-off-by: Konstantin Komarov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Edward Lo authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    4246bbe View commit details
    Browse the repository at this point in the history
  62. fs: ntfs3: Fix possible null-pointer dereferences in mi_read()

    [ Upstream commit 97498cd ]
    
    In a previous commit 2681631 ("fs/ntfs3: Add null pointer check to
    attr_load_runs_vcn"), ni can be NULL in attr_load_runs_vcn(), and thus it
    should be checked before being used.
    
    However, in the call stack of this commit, mft_ni in mi_read() is
    aliased with ni in attr_load_runs_vcn(), and it is also used in
    mi_read() at two places:
    
    mi_read()
      rw_lock = &mft_ni->file.run_lock -> No check
      attr_load_runs_vcn(mft_ni, ...)
        ni (namely mft_ni) is checked in the previous commit
      attr_load_runs_vcn(..., &mft_ni->file.run) -> No check
    
    Thus, to avoid possible null-pointer dereferences, the related checks
    should be added.
    
    These bugs are reported by a static analysis tool implemented by myself,
    and they are found by extending a known bug fixed in the previous commit.
    Thus, they could be theoretical bugs.
    
    Signed-off-by: Jia-Ju Bai <[email protected]>
    Signed-off-by: Konstantin Komarov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jia-Ju Bai authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    1e22055 View commit details
    Browse the repository at this point in the history
  63. fs/ntfs3: Mark ntfs dirty when on-disk struct is corrupted

    [ Upstream commit e0f363a ]
    
    Signed-off-by: Konstantin Komarov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    aalexandrovich authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9e79f3e View commit details
    Browse the repository at this point in the history
  64. ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760

    [ Upstream commit 73f1c75 ]
    
    These models use NSIWAY amplifiers for internal speaker, but cannot put
    sound outside from these amplifiers. So eapd verbs are needed to initialize
    the amplifiers. They can be added during boot to get working sound out
    of internal speaker.
    
    Signed-off-by: dengxiang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dengxiang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    63e0b5d View commit details
    Browse the repository at this point in the history
  65. ALSA: hda: fix a possible null-pointer dereference due to data race i…

    …n snd_hdac_regmap_sync()
    
    [ Upstream commit 1f4a08f ]
    
    The variable codec->regmap is often protected by the lock
    codec->regmap_lock when is accessed. However, it is accessed without
    holding the lock when is accessed in snd_hdac_regmap_sync():
    
      if (codec->regmap)
    
    In my opinion, this may be a harmful race, because if codec->regmap is
    set to NULL right after the condition is checked, a null-pointer
    dereference can occur in the called function regcache_sync():
    
      map->lock(map->lock_arg); --> Line 360 in drivers/base/regmap/regcache.c
    
    To fix this possible null-pointer dereference caused by data race, the
    mutex_lock coverage is extended to protect the if statement as well as the
    function call to regcache_sync().
    
    [ Note: the lack of the regmap_lock itself is harmless for the current
      codec driver implementations, as snd_hdac_regmap_sync() is only for
      PM runtime resume that is prohibited during the codec probe.
      But the change makes the whole code more consistent, so it's merged
      as is -- tiwai ]
    
    Reported-by: BassCheck <[email protected]>
    Signed-off-by: Tuo Li <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    lituo1996 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    cdd412b View commit details
    Browse the repository at this point in the history
  66. ALSA: hda/realtek: Add quirk for ASUS ROG GX650P

    [ Upstream commit 8cc87c0 ]
    
    Adds the required quirk to enable the Cirrus amp and correct pins
    on the ASUS ROG GV601V series which uses an I2C connected Cirrus amp.
    
    While this works if the related _DSD properties are made available, these
    aren't included in the ACPI of these laptops (yet).
    
    Signed-off-by: Luke D. Jones <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    flukejones authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    c48616e View commit details
    Browse the repository at this point in the history
  67. ALSA: hda/realtek: Add quirk for ASUS ROG GA402X

    [ Upstream commit 9abc77f ]
    
    Adds the required quirk to enable the Cirrus amp and correct pins
    on the ASUS ROG GA402X series which uses an I2C connected Cirrus amp.
    
    While this works if the related _DSD properties are made available, these
    aren't included in the ACPI of these laptops (yet).
    
    Signed-off-by: Luke D. Jones <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    flukejones authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    2b248cf View commit details
    Browse the repository at this point in the history
  68. ALSA: hda/realtek: Add quirk for ASUS ROG GZ301V

    [ Upstream commit 5251605 ]
    
    Adds the required quirk to enable the Cirrus amp and correct pins
    on the ASUS ROG GZ301V series which uses an SPI connected Cirrus amp.
    
    While this works if the related _DSD properties are made available, these
    aren't included in the ACPI of these laptops (yet).
    
    Signed-off-by: Luke D. Jones <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    flukejones authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    6d06cf0 View commit details
    Browse the repository at this point in the history
  69. powerpc/kasan: Disable KCOV in KASAN code

    [ Upstream commit ccb381e ]
    
    As per the generic KASAN code in mm/kasan, disable KCOV with
    KCOV_INSTRUMENT := n in the makefile.
    
    This fixes a ppc64 boot hang when KCOV and KASAN are enabled.
    kasan_early_init() gets called before a PACA is initialised, but the
    KCOV hook expects a valid PACA.
    
    Suggested-by: Christophe Leroy <[email protected]>
    Signed-off-by: Benjamin Gray <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    BenjaminGrayNp1 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    a1ceb87 View commit details
    Browse the repository at this point in the history
  70. Bluetooth: MGMT: Use correct address for memcpy()

    [ Upstream commit d1f0a98 ]
    
    In function ‘fortify_memcpy_chk’,
        inlined from ‘get_conn_info_complete’ at net/bluetooth/mgmt.c:7281:2:
    include/linux/fortify-string.h:592:25: error: call to
    ‘__read_overflow2_field’ declared with attribute warning: detected read
    beyond size of field (2nd parameter); maybe use struct_group()?
    [-Werror=attribute-warning]
      592 |                         __read_overflow2_field(q_size_field, size);
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    
    This is due to the wrong member is used for memcpy(). Use correct one.
    
    Signed-off-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    andy-shev authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    356fe90 View commit details
    Browse the repository at this point in the history
  71. ring-buffer: Do not swap cpu_buffer during resize process

    [ Upstream commit 8a96c02 ]
    
    When ring_buffer_swap_cpu was called during resize process,
    the cpu buffer was swapped in the middle, resulting in incorrect state.
    Continuing to run in the wrong state will result in oops.
    
    This issue can be easily reproduced using the following two scripts:
    /tmp # cat test1.sh
    //#! /bin/sh
    for i in `seq 0 100000`
    do
             echo 2000 > /sys/kernel/debug/tracing/buffer_size_kb
             sleep 0.5
             echo 5000 > /sys/kernel/debug/tracing/buffer_size_kb
             sleep 0.5
    done
    /tmp # cat test2.sh
    //#! /bin/sh
    for i in `seq 0 100000`
    do
            echo irqsoff > /sys/kernel/debug/tracing/current_tracer
            sleep 1
            echo nop > /sys/kernel/debug/tracing/current_tracer
            sleep 1
    done
    /tmp # ./test1.sh &
    /tmp # ./test2.sh &
    
    A typical oops log is as follows, sometimes with other different oops logs.
    
    [  231.711293] WARNING: CPU: 0 PID: 9 at kernel/trace/ring_buffer.c:2026 rb_update_pages+0x378/0x3f8
    [  231.713375] Modules linked in:
    [  231.714735] CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G        W          6.5.0-rc1-00276-g20edcec23f92 #15
    [  231.716750] Hardware name: linux,dummy-virt (DT)
    [  231.718152] Workqueue: events update_pages_handler
    [  231.719714] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  231.721171] pc : rb_update_pages+0x378/0x3f8
    [  231.722212] lr : rb_update_pages+0x25c/0x3f8
    [  231.723248] sp : ffff800082b9bd50
    [  231.724169] x29: ffff800082b9bd50 x28: ffff8000825f7000 x27: 0000000000000000
    [  231.726102] x26: 0000000000000001 x25: fffffffffffff010 x24: 0000000000000ff0
    [  231.728122] x23: ffff0000c3a0b600 x22: ffff0000c3a0b5c0 x21: fffffffffffffe0a
    [  231.730203] x20: ffff0000c3a0b600 x19: ffff0000c0102400 x18: 0000000000000000
    [  231.732329] x17: 0000000000000000 x16: 0000000000000000 x15: 0000ffffe7aa8510
    [  231.734212] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000002
    [  231.736291] x11: ffff8000826998a8 x10: ffff800082b9baf0 x9 : ffff800081137558
    [  231.738195] x8 : fffffc00030e82c8 x7 : 0000000000000000 x6 : 0000000000000001
    [  231.740192] x5 : ffff0000ffbafe00 x4 : 0000000000000000 x3 : 0000000000000000
    [  231.742118] x2 : 00000000000006aa x1 : 0000000000000001 x0 : ffff0000c0007208
    [  231.744196] Call trace:
    [  231.744892]  rb_update_pages+0x378/0x3f8
    [  231.745893]  update_pages_handler+0x1c/0x38
    [  231.746893]  process_one_work+0x1f0/0x468
    [  231.747852]  worker_thread+0x54/0x410
    [  231.748737]  kthread+0x124/0x138
    [  231.749549]  ret_from_fork+0x10/0x20
    [  231.750434] ---[ end trace 0000000000000000 ]---
    [  233.720486] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
    [  233.721696] Mem abort info:
    [  233.721935]   ESR = 0x0000000096000004
    [  233.722283]   EC = 0x25: DABT (current EL), IL = 32 bits
    [  233.722596]   SET = 0, FnV = 0
    [  233.722805]   EA = 0, S1PTW = 0
    [  233.723026]   FSC = 0x04: level 0 translation fault
    [  233.723458] Data abort info:
    [  233.723734]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
    [  233.724176]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
    [  233.724589]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    [  233.725075] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000104943000
    [  233.725592] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
    [  233.726231] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
    [  233.726720] Modules linked in:
    [  233.727007] CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G        W          6.5.0-rc1-00276-g20edcec23f92 #15
    [  233.727777] Hardware name: linux,dummy-virt (DT)
    [  233.728225] Workqueue: events update_pages_handler
    [  233.728655] pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  233.729054] pc : rb_update_pages+0x1a8/0x3f8
    [  233.729334] lr : rb_update_pages+0x154/0x3f8
    [  233.729592] sp : ffff800082b9bd50
    [  233.729792] x29: ffff800082b9bd50 x28: ffff8000825f7000 x27: 0000000000000000
    [  233.730220] x26: 0000000000000000 x25: ffff800082a8b840 x24: ffff0000c0102418
    [  233.730653] x23: 0000000000000000 x22: fffffc000304c880 x21: 0000000000000003
    [  233.731105] x20: 00000000000001f4 x19: ffff0000c0102400 x18: ffff800082fcbc58
    [  233.731727] x17: 0000000000000000 x16: 0000000000000001 x15: 0000000000000001
    [  233.732282] x14: ffff8000825fe0c8 x13: 0000000000000001 x12: 0000000000000000
    [  233.732709] x11: ffff8000826998a8 x10: 0000000000000ae0 x9 : ffff8000801b760c
    [  233.733148] x8 : fefefefefefefeff x7 : 0000000000000018 x6 : ffff0000c03298c0
    [  233.733553] x5 : 0000000000000002 x4 : 0000000000000000 x3 : 0000000000000000
    [  233.733972] x2 : ffff0000c3a0b600 x1 : 0000000000000000 x0 : 0000000000000000
    [  233.734418] Call trace:
    [  233.734593]  rb_update_pages+0x1a8/0x3f8
    [  233.734853]  update_pages_handler+0x1c/0x38
    [  233.735148]  process_one_work+0x1f0/0x468
    [  233.735525]  worker_thread+0x54/0x410
    [  233.735852]  kthread+0x124/0x138
    [  233.736064]  ret_from_fork+0x10/0x20
    [  233.736387] Code: 92400000 910006b5 aa000021 aa0303f7 (f9400060)
    [  233.736959] ---[ end trace 0000000000000000 ]---
    
    After analysis, the seq of the error is as follows [1-5]:
    
    int ring_buffer_resize(struct trace_buffer *buffer, unsigned long size,
    			int cpu_id)
    {
    	for_each_buffer_cpu(buffer, cpu) {
    		cpu_buffer = buffer->buffers[cpu];
    		//1. get cpu_buffer, aka cpu_buffer(A)
    		...
    		...
    		schedule_work_on(cpu,
    		 &cpu_buffer->update_pages_work);
    		//2. 'update_pages_work' is queue on 'cpu', cpu_buffer(A) is passed to
    		// update_pages_handler, do the update process, set 'update_done' in
    		// complete(&cpu_buffer->update_done) and to wakeup resize process.
    	//---->
    		//3. Just at this moment, ring_buffer_swap_cpu is triggered,
    		//cpu_buffer(A) be swaped to cpu_buffer(B), the max_buffer.
    		//ring_buffer_swap_cpu is called as the 'Call trace' below.
    
    		Call trace:
    		 dump_backtrace+0x0/0x2f8
    		 show_stack+0x18/0x28
    		 dump_stack+0x12c/0x188
    		 ring_buffer_swap_cpu+0x2f8/0x328
    		 update_max_tr_single+0x180/0x210
    		 check_critical_timing+0x2b4/0x2c8
    		 tracer_hardirqs_on+0x1c0/0x200
    		 trace_hardirqs_on+0xec/0x378
    		 el0_svc_common+0x64/0x260
    		 do_el0_svc+0x90/0xf8
    		 el0_svc+0x20/0x30
    		 el0_sync_handler+0xb0/0xb8
    		 el0_sync+0x180/0x1c0
    	//<----
    
    	/* wait for all the updates to complete */
    	for_each_buffer_cpu(buffer, cpu) {
    		cpu_buffer = buffer->buffers[cpu];
    		//4. get cpu_buffer, cpu_buffer(B) is used in the following process,
    		//the state of cpu_buffer(A) and cpu_buffer(B) is totally wrong.
    		//for example, cpu_buffer(A)->update_done will leave be set 1, and will
    		//not 'wait_for_completion' at the next resize round.
    		  if (!cpu_buffer->nr_pages_to_update)
    			continue;
    
    		if (cpu_online(cpu))
    			wait_for_completion(&cpu_buffer->update_done);
    		cpu_buffer->nr_pages_to_update = 0;
    	}
    	...
    }
    	//5. the state of cpu_buffer(A) and cpu_buffer(B) is totally wrong,
    	//Continuing to run in the wrong state, then oops occurs.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Signed-off-by: Chen Lin <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Chen Lin authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    128c06a View commit details
    Browse the repository at this point in the history
  72. igc: read before write to SRRCTL register

    [ Upstream commit 3ce29c1 ]
    
    igc_configure_rx_ring() function will be called as part of XDP program
    setup. If Rx hardware timestamp is enabled prio to XDP program setup,
    this timestamp enablement will be overwritten when buffer size is
    written into SRRCTL register.
    
    Thus, this commit read the register value before write to SRRCTL
    register. This commit is tested by using xdp_hw_metadata bpf selftest
    tool. The tool enables Rx hardware timestamp and then attach XDP program
    to igc driver. It will display hardware timestamp of UDP packet with
    port number 9092. Below are detail of test steps and results.
    
    Command on DUT:
      sudo ./xdp_hw_metadata <interface name>
    
    Command on Link Partner:
      echo -n skb | nc -u -q1 <destination IPv4 addr> 9092
    
    Result before this patch:
      skb hwtstamp is not found!
    
    Result after this patch:
      found skb hwtstamp = 1677800973.642836757
    
    Optionally, read PHC to confirm the values obtained are almost the same:
    Command:
      sudo ./testptp -d /dev/ptp0 -g
    Result:
      clock time: 1677800973.913598978 or Fri Mar  3 07:49:33 2023
    
    Fixes: fc9df2a ("igc: Enable RX via AF_XDP zero-copy")
    Cc: <[email protected]> # 5.14+
    Signed-off-by: Song Yoong Siang <[email protected]>
    Reviewed-by: Jacob Keller <[email protected]>
    Reviewed-by: Jesper Dangaard Brouer <[email protected]>
    Tested-by: Jesper Dangaard Brouer <[email protected]>
    Tested-by: Naama Meir <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Reviewed-by: Leon Romanovsky <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    yoongsiang2 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    48f0671 View commit details
    Browse the repository at this point in the history
  73. drm/amd/display: save restore hdcp state when display is unplugged fr…

    …om mst hub
    
    [ Upstream commit 82986fd ]
    
    [Why]
    connector hdcp properties are lost after display is
    unplgged from mst hub. connector is destroyed with
    dm_dp_mst_connector_destroy. when display is plugged
    back, hdcp is not desired and it wouldnt be enabled.
    
    [How]
    save hdcp properties into hdcp_work within
    amdgpu_dm_atomic_commit_tail. If the same display is
    plugged back with same display index, its hdcp
    properties will be retrieved from hdcp_work within
    dm_dp_mst_get_modes.
    
    Acked-by: Aurabindo Pillai <[email protected]>
    Signed-off-by: hersen wu <[email protected]>
    Reviewed-by: Bhawanpreet Lakha <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Stable-dep-of: cdff36a ("drm/amd/display: fix access hdcp_workqueue assert")
    Signed-off-by: Sasha Levin <[email protected]>
    hersen wu authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d90f97c View commit details
    Browse the repository at this point in the history
  74. drm/amd/display: phase3 mst hdcp for multiple displays

    [ Upstream commit e8fd3ee ]
    
    [Why]
    multiple display hdcp are enabled within event_property_validate,
    event_property_update by looping all displays on mst hub. when
    one of display on mst hub in unplugged or disabled, hdcp are
    disabled for all displays on mst hub within hdcp_reset_display
    by looping all displays of mst link. for displays still active,
    their encryption status are off. kernel driver will not run hdcp
    authentication again. therefore, hdcp are not enabled automatically.
    
    [How]
    within is_content_protection_different, check drm_crtc_state changes
    of all displays on mst hub, if need, triger hdcp_update_display to
    re-run hdcp authentication.
    
    Acked-by: Aurabindo Pillai <[email protected]>
    Signed-off-by: hersen wu <[email protected]>
    Reviewed-by: Bhawanpreet Lakha <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Stable-dep-of: cdff36a ("drm/amd/display: fix access hdcp_workqueue assert")
    Signed-off-by: Sasha Levin <[email protected]>
    hersen wu authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    81e6cf4 View commit details
    Browse the repository at this point in the history
  75. drm/amd/display: fix access hdcp_workqueue assert

    [ Upstream commit cdff36a ]
    
    [Why] hdcp are enabled for asics from raven. for old asics
    which hdcp are not enabled, hdcp_workqueue are null. some
    access to hdcp work queue are not guarded with pointer check.
    
    [How] add hdcp_workqueue pointer check before access workqueue.
    
    Reviewed-by: Bhawanpreet Lakha <[email protected]>
    Acked-by: Qingqing Zhuo <[email protected]>
    Signed-off-by: Hersen Wu <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Hersen Wu authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    402f1d8 View commit details
    Browse the repository at this point in the history
  76. KVM: arm64: vgic-v4: Make the doorbell request robust w.r.t preemption

    [ Upstream commit b321c31 ]
    
    Xiang reports that VMs occasionally fail to boot on GICv4.1 systems when
    running a preemptible kernel, as it is possible that a vCPU is blocked
    without requesting a doorbell interrupt.
    
    The issue is that any preemption that occurs between vgic_v4_put() and
    schedule() on the block path will mark the vPE as nonresident and *not*
    request a doorbell irq. This occurs because when the vcpu thread is
    resumed on its way to block, vcpu_load() will make the vPE resident
    again. Once the vcpu actually blocks, we don't request a doorbell
    anymore, and the vcpu won't be woken up on interrupt delivery.
    
    Fix it by tracking that we're entering WFI, and key the doorbell
    request on that flag. This allows us not to make the vPE resident
    when going through a preempt/schedule cycle, meaning we don't lose
    any state.
    
    Cc: [email protected]
    Fixes: 8e01d9a ("KVM: arm64: vgic-v4: Move the GICv4 residency flow to be driven by vcpu_load/put")
    Reported-by: Xiang Chen <[email protected]>
    Suggested-by: Zenghui Yu <[email protected]>
    Tested-by: Xiang Chen <[email protected]>
    Co-developed-by: Oliver Upton <[email protected]>
    Signed-off-by: Marc Zyngier <[email protected]>
    Acked-by: Zenghui Yu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Oliver Upton <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Marc Zyngier authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    3d2d051 View commit details
    Browse the repository at this point in the history
  77. ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node

    [ Upstream commit ee70b90 ]
    
    Property name "phy-3p0-supply" is used instead of "phy-reg_3p0-supply".
    
    Fixes: 9f30b6b ("ARM: dts: imx: Add basic dtsi file for imx6sll")
    cc: <[email protected]>
    Signed-off-by: Xu Yang <[email protected]>
    Signed-off-by: Shawn Guo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Xu Yang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e41170d View commit details
    Browse the repository at this point in the history
  78. fbdev/hyperv-fb: Do not set struct fb_info.apertures

    [ Upstream commit 81d2393 ]
    
    Generic fbdev drivers use the apertures field in struct fb_info to
    control ownership of the framebuffer memory and graphics device. Do
    not set the values in hyperv-fb.
    
    Signed-off-by: Thomas Zimmermann <[email protected]>
    Reviewed-by: Javier Martinez Canillas <[email protected]>
    Reviewed-by: Michael Kelley <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Stable-dep-of: 5ae3716 ("video/aperture: Only remove sysfb on the default vga pci device")
    Signed-off-by: Sasha Levin <[email protected]>
    Thomas Zimmermann authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f83ab81 View commit details
    Browse the repository at this point in the history
  79. video/aperture: Only remove sysfb on the default vga pci device

    [ Upstream commit 5ae3716 ]
    
    Instead of calling aperture_remove_conflicting_devices() to remove the
    conflicting devices, just call to aperture_detach_devices() to detach
    the device that matches the same PCI BAR / aperture range. Since the
    former is just a wrapper of the latter plus a sysfb_disable() call,
    and now that's done in this function but only for the primary devices.
    
    This fixes a regression introduced by commit ee7a69a ("fbdev:
    Disable sysfb device registration when removing conflicting FBs"),
    where we remove the sysfb when loading a driver for an unrelated pci
    device, resulting in the user losing their efifb console or similar.
    
    Note that in practice this only is a problem with the nvidia blob,
    because that's the only gpu driver people might install which does not
    come with an fbdev driver of it's own. For everyone else the real gpu
    driver will restore a working console.
    
    Also note that in the referenced bug there's confusion that this same
    bug also happens on amdgpu. But that was just another amdgpu specific
    regression, which just happened to happen at roughly the same time and
    with the same user-observable symptoms. That bug is fixed now, see
    https://bugzilla.kernel.org/show_bug.cgi?id=216331#c15
    
    Note that we should not have any such issues on non-pci multi-gpu
    issues, because I could only find two such cases:
    - SoC with some external panel over spi or similar. These panel
      drivers do not use drm_aperture_remove_conflicting_framebuffers(),
      so no problem.
    - vga+mga, which is a direct console driver and entirely bypasses all
      this.
    
    For the above reasons the cc: stable is just notionally, this patch
    will need a backport and that's up to nvidia if they care enough.
    
    v2:
    - Explain a bit better why other multi-gpu that aren't pci shouldn't
      have any issues with making all this fully pci specific.
    
    v3
    - polish commit message (Javier)
    
    v4:
    - Fix commit message style (i.e., commit 1234 ("..."))
    - fix Daniel's S-o-b address
    
    v5:
    - add back an S-o-b tag with Daniel's Intel address
    
    Fixes: ee7a69a ("fbdev: Disable sysfb device registration when removing conflicting FBs")
    Tested-by: Aaron Plattner <[email protected]>
    Reviewed-by: Javier Martinez Canillas <[email protected]>
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=216303#c28
    Signed-off-by: Daniel Vetter <[email protected]>
    Signed-off-by: Daniel Vetter <[email protected]>
    Signed-off-by: Thomas Zimmermann <[email protected]>
    Cc: Aaron Plattner <[email protected]>
    Cc: Javier Martinez Canillas <[email protected]>
    Cc: Thomas Zimmermann <[email protected]>
    Cc: Helge Deller <[email protected]>
    Cc: Sam Ravnborg <[email protected]>
    Cc: Alex Deucher <[email protected]>
    Cc: <[email protected]> # v5.19+ (if someone else does the backport)
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    danvet authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    485ec8f View commit details
    Browse the repository at this point in the history
  80. btrfs: move out now unused BG from the reclaim list

    [ Upstream commit a9f1897 ]
    
    An unused block group is easy to remove to free up space and should be
    reclaimed fast. Such block group can often already be a target of the
    reclaim process. As we check list_empty(&bg->bg_list), we keep it in the
    reclaim list. That block group is never reclaimed until the file system
    is filled e.g. up to 75%.
    
    Instead, we can move unused block group to the unused list and delete it
    fast.
    
    Fixes: 18bb8bb ("btrfs: zoned: automatically reclaim zones")
    CC: [email protected] # 5.15+
    Reviewed-by: Filipe Manana <[email protected]>
    Reviewed-by: Johannes Thumshirn <[email protected]>
    Signed-off-by: Naohiro Aota <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    naota authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    01eca70 View commit details
    Browse the repository at this point in the history
  81. btrfs: convert btrfs_block_group::needs_free_space to runtime flag

    [ Upstream commit 0d7764f ]
    
    We already have flags in block group to track various status bits,
    convert needs_free_space as well and reduce size of btrfs_block_group.
    
    Reviewed-by: Anand Jain <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Stable-dep-of: 0657b20 ("btrfs: fix use-after-free of new block group that became unused")
    Signed-off-by: Sasha Levin <[email protected]>
    kdave authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    94cde94 View commit details
    Browse the repository at this point in the history
  82. btrfs: convert btrfs_block_group::seq_zone to runtime flag

    [ Upstream commit 961f5b8 ]
    
    In zoned mode the sequential status of zone can be also tracked in the
    runtime flags of block group.
    
    Reviewed-by: Anand Jain <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Stable-dep-of: 0657b20 ("btrfs: fix use-after-free of new block group that became unused")
    Signed-off-by: Sasha Levin <[email protected]>
    kdave authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    29cebf8 View commit details
    Browse the repository at this point in the history
  83. btrfs: fix use-after-free of new block group that became unused

    [ Upstream commit 0657b20 ]
    
    If a task creates a new block group and that block group becomes unused
    before we finish its creation, at btrfs_create_pending_block_groups(),
    then when btrfs_mark_bg_unused() is called against the block group, we
    assume that the block group is currently in the list of block groups to
    reclaim, and we move it out of the list of new block groups and into the
    list of unused block groups. This has two consequences:
    
    1) We move it out of the list of new block groups associated to the
       current transaction. So the block group creation is not finished and
       if we attempt to delete the bg because it's unused, we will not find
       the block group item in the extent tree (or the new block group tree),
       its device extent items in the device tree etc, resulting in the
       deletion to fail due to the missing items;
    
    2) We don't increment the reference count on the block group when we
       move it to the list of unused block groups, because we assumed the
       block group was on the list of block groups to reclaim, and in that
       case it already has the correct reference count. However the block
       group was on the list of new block groups, in which case no extra
       reference was taken because it's local to the current task. This
       later results in doing an extra reference count decrement when
       removing the block group from the unused list, eventually leading the
       reference count to 0.
    
    This second case was caught when running generic/297 from fstests, which
    produced the following assertion failure and stack trace:
    
      [589.559] assertion failed: refcount_read(&block_group->refs) == 1, in fs/btrfs/block-group.c:4299
      [589.559] ------------[ cut here ]------------
      [589.559] kernel BUG at fs/btrfs/block-group.c:4299!
      [589.560] invalid opcode: 0000 [#1] PREEMPT SMP PTI
      [589.560] CPU: 8 PID: 2819134 Comm: umount Tainted: G        W          6.4.0-rc6-btrfs-next-134+ #1
      [589.560] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
      [589.560] RIP: 0010:btrfs_free_block_groups+0x449/0x4a0 [btrfs]
      [589.561] Code: 68 62 da c0 (...)
      [589.561] RSP: 0018:ffffa55a8c3b3d98 EFLAGS: 00010246
      [589.561] RAX: 0000000000000058 RBX: ffff8f030d7f2000 RCX: 0000000000000000
      [589.562] RDX: 0000000000000000 RSI: ffffffff953f0878 RDI: 00000000ffffffff
      [589.562] RBP: ffff8f030d7f2088 R08: 0000000000000000 R09: ffffa55a8c3b3c50
      [589.562] R10: 0000000000000001 R11: 0000000000000001 R12: ffff8f05850b4c00
      [589.562] R13: ffff8f030d7f2090 R14: ffff8f05850b4cd8 R15: dead000000000100
      [589.563] FS:  00007f497fd2e840(0000) GS:ffff8f09dfc00000(0000) knlGS:0000000000000000
      [589.563] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [589.563] CR2: 00007f497ff8ec10 CR3: 0000000271472006 CR4: 0000000000370ee0
      [589.563] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [589.564] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [589.564] Call Trace:
      [589.564]  <TASK>
      [589.565]  ? __die_body+0x1b/0x60
      [589.565]  ? die+0x39/0x60
      [589.565]  ? do_trap+0xeb/0x110
      [589.565]  ? btrfs_free_block_groups+0x449/0x4a0 [btrfs]
      [589.566]  ? do_error_trap+0x6a/0x90
      [589.566]  ? btrfs_free_block_groups+0x449/0x4a0 [btrfs]
      [589.566]  ? exc_invalid_op+0x4e/0x70
      [589.566]  ? btrfs_free_block_groups+0x449/0x4a0 [btrfs]
      [589.567]  ? asm_exc_invalid_op+0x16/0x20
      [589.567]  ? btrfs_free_block_groups+0x449/0x4a0 [btrfs]
      [589.567]  ? btrfs_free_block_groups+0x449/0x4a0 [btrfs]
      [589.567]  close_ctree+0x35d/0x560 [btrfs]
      [589.568]  ? fsnotify_sb_delete+0x13e/0x1d0
      [589.568]  ? dispose_list+0x3a/0x50
      [589.568]  ? evict_inodes+0x151/0x1a0
      [589.568]  generic_shutdown_super+0x73/0x1a0
      [589.569]  kill_anon_super+0x14/0x30
      [589.569]  btrfs_kill_super+0x12/0x20 [btrfs]
      [589.569]  deactivate_locked_super+0x2e/0x70
      [589.569]  cleanup_mnt+0x104/0x160
      [589.570]  task_work_run+0x56/0x90
      [589.570]  exit_to_user_mode_prepare+0x160/0x170
      [589.570]  syscall_exit_to_user_mode+0x22/0x50
      [589.570]  ? __x64_sys_umount+0x12/0x20
      [589.571]  do_syscall_64+0x48/0x90
      [589.571]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
      [589.571] RIP: 0033:0x7f497ff0a567
      [589.571] Code: af 98 0e (...)
      [589.572] RSP: 002b:00007ffc98347358 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
      [589.572] RAX: 0000000000000000 RBX: 00007f49800b8264 RCX: 00007f497ff0a567
      [589.572] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000557f558abfa0
      [589.573] RBP: 0000557f558a6ba0 R08: 0000000000000000 R09: 00007ffc98346100
      [589.573] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
      [589.573] R13: 0000557f558abfa0 R14: 0000557f558a6cb0 R15: 0000557f558a6dd0
      [589.573]  </TASK>
      [589.574] Modules linked in: dm_snapshot dm_thin_pool (...)
      [589.576] ---[ end trace 0000000000000000 ]---
    
    Fix this by adding a runtime flag to the block group to tell that the
    block group is still in the list of new block groups, and therefore it
    should not be moved to the list of unused block groups, at
    btrfs_mark_bg_unused(), until the flag is cleared, when we finish the
    creation of the block group at btrfs_create_pending_block_groups().
    
    Fixes: a9f1897 ("btrfs: move out now unused BG from the reclaim list")
    CC: [email protected] # 5.15+
    Signed-off-by: Filipe Manana <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    fdmanana authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    6297644 View commit details
    Browse the repository at this point in the history
  84. virtio-mmio: don't break lifecycle of vm_dev

    [ Upstream commit 55c91fe ]
    
    vm_dev has a separate lifecycle because it has a 'struct device'
    embedded. Thus, having a release callback for it is correct.
    
    Allocating the vm_dev struct with devres totally breaks this protection,
    though. Instead of waiting for the vm_dev release callback, the memory
    is freed when the platform_device is removed. Resulting in a
    use-after-free when finally the callback is to be called.
    
    To easily see the problem, compile the kernel with
    CONFIG_DEBUG_KOBJECT_RELEASE and unbind with sysfs.
    
    The fix is easy, don't use devres in this case.
    
    Found during my research about object lifetime problems.
    
    Fixes: 7eb781b ("virtio_mmio: add cleanup for virtio_mmio_probe")
    Signed-off-by: Wolfram Sang <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Wolfram Sang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    af5818c View commit details
    Browse the repository at this point in the history
  85. vduse: Use proper spinlock for IRQ injection

    [ Upstream commit 7ca26ef ]
    
    The IRQ injection work used spin_lock_irq() to protect the
    scheduling of the softirq, but spin_lock_bh() should be
    used.
    
    With spin_lock_irq(), we noticed delay of more than 6
    seconds between the time a NAPI polling work is scheduled
    and the time it is executed.
    
    Fixes: c8a6153 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
    Cc: [email protected]
    
    Suggested-by: Jason Wang <[email protected]>
    Signed-off-by: Maxime Coquelin <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Acked-by: Jason Wang <[email protected]>
    Reviewed-by: Xie Yongji <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mcoquelin authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e706675 View commit details
    Browse the repository at this point in the history
  86. vdpa/mlx5: Fix mr->initialized semantics

    [ Upstream commit 9ee8110 ]
    
    The mr->initialized flag is shared between the control vq and data vq
    part of the mr init/uninit. But if the control vq and data vq get placed
    in different ASIDs, it can happen that initializing the control vq will
    prevent the data vq mr from being initialized.
    
    This patch consolidates the control and data vq init parts into their
    own init functions. The mr->initialized will now be used for the data vq
    only. The control vq currently doesn't need a flag.
    
    The uninitializing part is also taken care of: mlx5_vdpa_destroy_mr got
    split into data and control vq functions which are now also ASID aware.
    
    Fixes: 8fcd20c ("vdpa/mlx5: Support different address spaces for control and data")
    Signed-off-by: Dragos Tatulea <[email protected]>
    Reviewed-by: Eugenio Pérez <[email protected]>
    Reviewed-by: Gal Pressman <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Acked-by: Jason Wang <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dtatulea authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    bb4983e View commit details
    Browse the repository at this point in the history
  87. vdpa/mlx5: Delete control vq iotlb in destroy_mr only when necessary

    [ Upstream commit ad03a0f ]
    
    mlx5_vdpa_destroy_mr can be called from .set_map with data ASID after
    the control virtqueue ASID iotlb has been populated. The control vq
    iotlb must not be cleared, since it will not be populated again.
    
    So call the ASID aware destroy function which makes sure that the
    right vq resource is destroyed.
    
    Fixes: 8fcd20c ("vdpa/mlx5: Support different address spaces for control and data")
    Signed-off-by: Eugenio Pérez <[email protected]>
    Reviewed-by: Gal Pressman <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Acked-by: Jason Wang <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    eugpermar authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    cba26ab View commit details
    Browse the repository at this point in the history
  88. cifs: fix potential oops in cifs_oplock_break

    [ Upstream commit e8f5f84 ]
    
    With deferred close we can have closes that race with lease breaks,
    and so with the current checks for whether to send the lease response,
    oplock_response(), this can mean that an unmount (kill_sb) can occur
    just before we were checking if the tcon->ses is valid.  See below:
    
    [Fri Aug  4 04:12:50 2023] RIP: 0010:cifs_oplock_break+0x1f7/0x5b0 [cifs]
    [Fri Aug  4 04:12:50 2023] Code: 7d a8 48 8b 7d c0 c0 e9 02 48 89 45 b8 41 89 cf e8 3e f5 ff ff 4c 89 f7 41 83 e7 01 e8 82 b3 03 f2 49 8b 45 50 48 85 c0 74 5e <48> 83 78 60 00 74 57 45 84 ff 75 52 48 8b 43 98 48 83 eb 68 48 39
    [Fri Aug  4 04:12:50 2023] RSP: 0018:ffffb30607ddbdf8 EFLAGS: 00010206
    [Fri Aug  4 04:12:50 2023] RAX: 632d223d32612022 RBX: ffff97136944b1e0 RCX: 0000000080100009
    [Fri Aug  4 04:12:50 2023] RDX: 0000000000000001 RSI: 0000000080100009 RDI: ffff97136944b188
    [Fri Aug  4 04:12:50 2023] RBP: ffffb30607ddbe58 R08: 0000000000000001 R09: ffffffffc08e0900
    [Fri Aug  4 04:12:50 2023] R10: 0000000000000001 R11: 000000000000000f R12: ffff97136944b138
    [Fri Aug  4 04:12:50 2023] R13: ffff97149147c000 R14: ffff97136944b188 R15: 0000000000000000
    [Fri Aug  4 04:12:50 2023] FS:  0000000000000000(0000) GS:ffff9714f7c00000(0000) knlGS:0000000000000000
    [Fri Aug  4 04:12:50 2023] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [Fri Aug  4 04:12:50 2023] CR2: 00007fd8de9c7590 CR3: 000000011228e000 CR4: 0000000000350ef0
    [Fri Aug  4 04:12:50 2023] Call Trace:
    [Fri Aug  4 04:12:50 2023]  <TASK>
    [Fri Aug  4 04:12:50 2023]  process_one_work+0x225/0x3d0
    [Fri Aug  4 04:12:50 2023]  worker_thread+0x4d/0x3e0
    [Fri Aug  4 04:12:50 2023]  ? process_one_work+0x3d0/0x3d0
    [Fri Aug  4 04:12:50 2023]  kthread+0x12a/0x150
    [Fri Aug  4 04:12:50 2023]  ? set_kthread_struct+0x50/0x50
    [Fri Aug  4 04:12:50 2023]  ret_from_fork+0x22/0x30
    [Fri Aug  4 04:12:50 2023]  </TASK>
    
    To fix this change the ordering of the checks before sending the oplock_response
    to first check if the openFileList is empty.
    
    Fixes: da787d5 ("SMB3: Do not send lease break acknowledgment if all file handles have been closed")
    Suggested-by: Bharath SM <[email protected]>
    Reviewed-by: Bharath SM <[email protected]>
    Reviewed-by: Shyam Prasad N <[email protected]>
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Steve French authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5ee28bc View commit details
    Browse the repository at this point in the history
  89. i2c: bcm-iproc: Fix bcm_iproc_i2c_isr deadlock issue

    commit 4caf4cb upstream.
    
    iproc_i2c_rd_reg() and iproc_i2c_wr_reg() are called from both
    interrupt context (e.g. bcm_iproc_i2c_isr) and process context
    (e.g. bcm_iproc_i2c_suspend). Therefore, interrupts should be
    disabled to avoid potential deadlock. To prevent this scenario,
    use spin_lock_irqsave().
    
    Fixes: 9a10387 ("i2c: iproc: add NIC I2C support")
    Signed-off-by: Chengfeng Ye <[email protected]>
    Acked-by: Ray Jui <[email protected]>
    Reviewed-by: Andi Shyti <[email protected]>
    Signed-off-by: Wolfram Sang <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Ychame authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    db0416c View commit details
    Browse the repository at this point in the history
  90. i2c: hisi: Only handle the interrupt of the driver's transfer

    commit fff67c1 upstream.
    
    The controller may be shared with other port, for example the firmware.
    Handle the interrupt from other sources will cause crash since some
    data are not initialized. So only handle the interrupt of the driver's
    transfer and discard others.
    
    Fixes: d62fbdb ("i2c: add support for HiSilicon I2C controller")
    Signed-off-by: Yicong Yang <[email protected]>
    Reviewed-by: Andi Shyti <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Wolfram Sang <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Yicong Yang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ba24901 View commit details
    Browse the repository at this point in the history
  91. i2c: tegra: Fix i2c-tegra DMA config option processing

    commit 27ec43c upstream.
    
    Tegra processors prior to Tegra186 used APB DMA for I2C requiring
    CONFIG_TEGRA20_APB_DMA=y while Tegra186 and later use GPC DMA requiring
    CONFIG_TEGRA186_GPC_DMA=y.
    
    The check for if the processor uses APB DMA is inverted and so the wrong
    DMA config options are checked.
    
    This means if CONFIG_TEGRA20_APB_DMA=y but CONFIG_TEGRA186_GPC_DMA=n
    with a Tegra186 or later processor the driver will incorrectly think DMA is
    enabled and attempt to request DMA channels that will never be availible,
    leaving the driver in a perpetual EPROBE_DEFER state.
    
    Fixes: 48cb635 ("i2c: tegra: Add GPCDMA support")
    Signed-off-by: Parker Newman <[email protected]>
    Acked-by: Andi Shyti <[email protected]>
    Acked-by: Akhil R <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Wolfram Sang <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pnewman-cti authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    3461e64 View commit details
    Browse the repository at this point in the history
  92. fbdev: mmp: fix value check in mmphw_probe()

    commit 0872b2c upstream.
    
    in mmphw_probe(), check the return value of clk_prepare_enable()
    and return the error code if clk_prepare_enable() returns an
    unexpected value.
    
    Fixes: d63028c ("video: mmp display controller support")
    Signed-off-by: Yuanjun Gong <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    AnnYugawa authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9fedcd0 View commit details
    Browse the repository at this point in the history
  93. powerpc/rtas_flash: allow user copy to flash block cache objects

    commit 4f31759 upstream.
    
    With hardened usercopy enabled (CONFIG_HARDENED_USERCOPY=y), using the
    /proc/powerpc/rtas/firmware_update interface to prepare a system
    firmware update yields a BUG():
    
      kernel BUG at mm/usercopy.c:102!
      Oops: Exception in kernel mode, sig: 5 [#1]
      LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
      Modules linked in:
      CPU: 0 PID: 2232 Comm: dd Not tainted 6.5.0-rc3+ #2
      Hardware name: IBM,8408-E8E POWER8E (raw) 0x4b0201 0xf000004 of:IBM,FW860.50 (SV860_146) hv:phyp pSeries
      NIP:  c0000000005991d0 LR: c0000000005991cc CTR: 0000000000000000
      REGS: c0000000148c76a0 TRAP: 0700   Not tainted  (6.5.0-rc3+)
      MSR:  8000000000029033 <SF,EE,ME,IR,DR,RI,LE>  CR: 24002242  XER: 0000000c
      CFAR: c0000000001fbd34 IRQMASK: 0
      [ ... GPRs omitted ... ]
      NIP usercopy_abort+0xa0/0xb0
      LR  usercopy_abort+0x9c/0xb0
      Call Trace:
        usercopy_abort+0x9c/0xb0 (unreliable)
        __check_heap_object+0x1b4/0x1d0
        __check_object_size+0x2d0/0x380
        rtas_flash_write+0xe4/0x250
        proc_reg_write+0xfc/0x160
        vfs_write+0xfc/0x4e0
        ksys_write+0x90/0x160
        system_call_exception+0x178/0x320
        system_call_common+0x160/0x2c4
    
    The blocks of the firmware image are copied directly from user memory
    to objects allocated from flash_block_cache, so flash_block_cache must
    be created using kmem_cache_create_usercopy() to mark it safe for user
    access.
    
    Fixes: 6d07d1c ("usercopy: Restrict non-usercopy caches to size 0")
    Signed-off-by: Nathan Lynch <[email protected]>
    Reviewed-by: Kees Cook <[email protected]>
    [mpe: Trim and indent oops]
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://msgid.link/20230810-rtas-flash-vs-hardened-usercopy-v2-1-dcf63793a938@linux.ibm.com
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    nathanlynch authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b8fee83 View commit details
    Browse the repository at this point in the history
  94. vdpa: Add features attr to vdpa_nl_policy for nlattr length check

    commit 79c8651 upstream.
    
    The vdpa_nl_policy structure is used to validate the nlattr when parsing
    the incoming nlmsg. It will ensure the attribute being described produces
    a valid nlattr pointer in info->attrs before entering into each handler
    in vdpa_nl_ops.
    
    That is to say, the missing part in vdpa_nl_policy may lead to illegal
    nlattr after parsing, which could lead to OOB read just like CVE-2023-3773.
    
    This patch adds the missing nla_policy for vdpa features attr to avoid
    such bugs.
    
    Fixes: 90fea5a ("vdpa: device feature provisioning")
    Signed-off-by: Lin Ma <[email protected]>
    Cc: [email protected]
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    f0rm2l1n authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    44b508c View commit details
    Browse the repository at this point in the history
  95. vdpa: Add queue index attr to vdpa_nl_policy for nlattr length check

    commit b3003e1 upstream.
    
    The vdpa_nl_policy structure is used to validate the nlattr when parsing
    the incoming nlmsg. It will ensure the attribute being described produces
    a valid nlattr pointer in info->attrs before entering into each handler
    in vdpa_nl_ops.
    
    That is to say, the missing part in vdpa_nl_policy may lead to illegal
    nlattr after parsing, which could lead to OOB read just like CVE-2023-3773.
    
    This patch adds the missing nla_policy for vdpa queue index attr to avoid
    such bugs.
    
    Fixes: 13b00b1 ("vdpa: Add support for querying vendor statistics")
    Signed-off-by: Lin Ma <[email protected]>
    Cc: [email protected]
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    f0rm2l1n authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8ad9bc2 View commit details
    Browse the repository at this point in the history
  96. vdpa: Add max vqp attr to vdpa_nl_policy for nlattr length check

    commit 5d6ba60 upstream.
    
    The vdpa_nl_policy structure is used to validate the nlattr when parsing
    the incoming nlmsg. It will ensure the attribute being described produces
    a valid nlattr pointer in info->attrs before entering into each handler
    in vdpa_nl_ops.
    
    That is to say, the missing part in vdpa_nl_policy may lead to illegal
    nlattr after parsing, which could lead to OOB read just like CVE-2023-3773.
    
    This patch adds the missing nla_policy for vdpa max vqp attr to avoid
    such bugs.
    
    Fixes: ad69dd0 ("vdpa: Introduce query of device config layout")
    Signed-off-by: Lin Ma <[email protected]>
    Cc: [email protected]
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    f0rm2l1n authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ff71709 View commit details
    Browse the repository at this point in the history
  97. vdpa: Enable strict validation for netlinks ops

    commit f46c1e1 upstream.
    
    The previous patches added the missing nla policies that were required for
    validation to work.
    
    Now strict validation on netlink ops can be enabled. This patch does it.
    
    Signed-off-by: Dragos Tatulea <[email protected]>
    Cc: [email protected]
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dtatulea authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d6aa03b View commit details
    Browse the repository at this point in the history
  98. tty: n_gsm: fix the UAF caused by race condition in gsm_cleanup_mux

    commit 3c4f833 upstream.
    
    In commit 9b9c819 ("tty: n_gsm: fix UAF in gsm_cleanup_mux"), the UAF
    problem is not completely fixed. There is a race condition in
    gsm_cleanup_mux(), which caused this UAF.
    
    The UAF problem is triggered by the following race:
    task[5046]                     task[5054]
    -----------------------        -----------------------
    gsm_cleanup_mux();
    dlci = gsm->dlci[0];
    mutex_lock(&gsm->mutex);
                                   gsm_cleanup_mux();
    			       dlci = gsm->dlci[0]; //Didn't take the lock
    gsm_dlci_release(gsm->dlci[i]);
    gsm->dlci[i] = NULL;
    mutex_unlock(&gsm->mutex);
                                   mutex_lock(&gsm->mutex);
    			       dlci->dead = true; //UAF
    
    Fix it by assigning values after mutex_lock().
    
    Link: https://syzkaller.appspot.com/text?tag=CrashReport&x=176188b5a80000
    Cc: stable <[email protected]>
    Fixes: 9b9c819 ("tty: n_gsm: fix UAF in gsm_cleanup_mux")
    Fixes: aa371e9 ("tty: n_gsm: fix restart handling via CLD command")
    Signed-off-by: Yi Yang <[email protected]>
    Co-developed-by: Qiumiao Zhang <[email protected]>
    Signed-off-by: Qiumiao Zhang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Yi Yang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    31311a9 View commit details
    Browse the repository at this point in the history
  99. tty: serial: fsl_lpuart: Clear the error flags by writing 1 for lpuar…

    …t32 platforms
    
    commit 2820698 upstream.
    
    Do not read the data register to clear the error flags for lpuart32
    platforms, the additional read may cause the receive FIFO underflow
    since the DMA has already read the data register.
    Actually all lpuart32 platforms support write 1 to clear those error
    bits, let's use this method to better clear the error flags.
    
    Fixes: 42b6876 ("serial: fsl_lpuart: DMA support for 32-bit variant")
    Cc: stable <[email protected]>
    Signed-off-by: Sherry Sun <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Sherry Sun authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    0693c8f View commit details
    Browse the repository at this point in the history
  100. btrfs: fix incorrect splitting in btrfs_drop_extent_map_range

    commit c962098 upstream.
    
    In production we were seeing a variety of WARN_ON()'s in the extent_map
    code, specifically in btrfs_drop_extent_map_range() when we have to call
    add_extent_mapping() for our second split.
    
    Consider the following extent map layout
    
    	PINNED
    	[0 16K)  [32K, 48K)
    
    and then we call btrfs_drop_extent_map_range for [0, 36K), with
    skip_pinned == true.  The initial loop will have
    
    	start = 0
    	end = 36K
    	len = 36K
    
    we will find the [0, 16k) extent, but since we are pinned we will skip
    it, which has this code
    
    	start = em_end;
    	if (end != (u64)-1)
    		len = start + len - em_end;
    
    em_end here is 16K, so now the values are
    
    	start = 16K
    	len = 16K + 36K - 16K = 36K
    
    len should instead be 20K.  This is a problem when we find the next
    extent at [32K, 48K), we need to split this extent to leave [36K, 48k),
    however the code for the split looks like this
    
    	split->start = start + len;
    	split->len = em_end - (start + len);
    
    In this case we have
    
    	em_end = 48K
    	split->start = 16K + 36K       // this should be 16K + 20K
    	split->len = 48K - (16K + 36K) // this overflows as 16K + 36K is 52K
    
    and now we have an invalid extent_map in the tree that potentially
    overlaps other entries in the extent map.  Even in the non-overlapping
    case we will have split->start set improperly, which will cause problems
    with any block related calculations.
    
    We don't actually need len in this loop, we can simply use end as our
    end point, and only adjust start up when we find a pinned extent we need
    to skip.
    
    Adjust the logic to do this, which keeps us from inserting an invalid
    extent map.
    
    We only skip_pinned in the relocation case, so this is relatively rare,
    except in the case where you are running relocation a lot, which can
    happen with auto relocation on.
    
    Fixes: 55ef689 ("Btrfs: Fix btrfs_drop_extent_cache for skip pinned case")
    CC: [email protected] # 4.14+
    Reviewed-by: Filipe Manana <[email protected]>
    Signed-off-by: Josef Bacik <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    josefbacik authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9f68e21 View commit details
    Browse the repository at this point in the history
  101. btrfs: fix BUG_ON condition in btrfs_cancel_balance

    commit 29eefa6 upstream.
    
    Pausing and canceling balance can race to interrupt balance lead to BUG_ON
    panic in btrfs_cancel_balance. The BUG_ON condition in btrfs_cancel_balance
    does not take this race scenario into account.
    
    However, the race condition has no other side effects. We can fix that.
    
    Reproducing it with panic trace like this:
    
      kernel BUG at fs/btrfs/volumes.c:4618!
      RIP: 0010:btrfs_cancel_balance+0x5cf/0x6a0
      Call Trace:
       <TASK>
       ? do_nanosleep+0x60/0x120
       ? hrtimer_nanosleep+0xb7/0x1a0
       ? sched_core_clone_cookie+0x70/0x70
       btrfs_ioctl_balance_ctl+0x55/0x70
       btrfs_ioctl+0xa46/0xd20
       __x64_sys_ioctl+0x7d/0xa0
       do_syscall_64+0x38/0x80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd
    
      Race scenario as follows:
      > mutex_unlock(&fs_info->balance_mutex);
      > --------------------
      > .......issue pause and cancel req in another thread
      > --------------------
      > ret = __btrfs_balance(fs_info);
      >
      > mutex_lock(&fs_info->balance_mutex);
      > if (ret == -ECANCELED && atomic_read(&fs_info->balance_pause_req)) {
      >         btrfs_info(fs_info, "balance: paused");
      >         btrfs_exclop_balance(fs_info, BTRFS_EXCLOP_BALANCE_PAUSED);
      > }
    
    CC: [email protected] # 4.19+
    Signed-off-by: xiaoshoukui <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    xiaoshoukui authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ceb9ba8 View commit details
    Browse the repository at this point in the history
  102. i2c: designware: Correct length byte validation logic

    commit 49d4db3 upstream.
    
    Commit 0daede8 ("i2c: designware: Convert driver to using regmap API")
    changes the logic to validate the whole 32-bit return value of
    DW_IC_DATA_CMD register instead of 8-bit LSB without reason.
    
    Later, commit f53f15b ("i2c: designware: Get right data length"),
    introduced partial fix but not enough because the "tmp > 0" still test
    tmp as 32-bit value and is wrong in case the IC_DATA_CMD[11] is set.
    
    Revert the logic to just before commit 0daede8
    ("i2c: designware: Convert driver to using regmap API").
    
    Fixes: f53f15b ("i2c: designware: Get right data length")
    Fixes: 0daede8 ("i2c: designware: Convert driver to using regmap API")
    Cc: [email protected]
    Signed-off-by: Tam Nguyen <[email protected]>
    Signed-off-by: Quan Nguyen <[email protected]>
    Acked-by: Jarkko Nikula <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Andi Shyti <[email protected]>
    Signed-off-by: Wolfram Sang <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    qnguyen-ampere authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5211496 View commit details
    Browse the repository at this point in the history
  103. i2c: designware: Handle invalid SMBus block data response length value

    commit 69f035c upstream.
    
    In the I2C_FUNC_SMBUS_BLOCK_DATA case, the invalid length byte value
    (outside of 1-32) of the SMBus block data response from the Slave device
    is not correctly handled by the I2C Designware driver.
    
    In case IC_EMPTYFIFO_HOLD_MASTER_EN==1, which cannot be detected
    from the registers, the Master can be disabled only if the STOP bit
    is set. Without STOP bit set, the Master remains active, holding the bus
    until receiving a block data response length. This hangs the bus and
    is unrecoverable.
    
    Avoid this by issuing another dump read to reach the stop condition when
    an invalid length byte is received.
    
    Cc: [email protected]
    Signed-off-by: Tam Nguyen <[email protected]>
    Acked-by: Jarkko Nikula <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Andi Shyti <[email protected]>
    Signed-off-by: Wolfram Sang <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Tam Nguyen authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5a47c2f View commit details
    Browse the repository at this point in the history
  104. net: xfrm: Fix xfrm_address_filter OOB read

    [ Upstream commit dfa73c1 ]
    
    We found below OOB crash:
    
    [   44.211730] ==================================================================
    [   44.212045] BUG: KASAN: slab-out-of-bounds in memcmp+0x8b/0xb0
    [   44.212045] Read of size 8 at addr ffff88800870f320 by task poc.xfrm/97
    [   44.212045]
    [   44.212045] CPU: 0 PID: 97 Comm: poc.xfrm Not tainted 6.4.0-rc7-00072-gdad9774deaf1-dirty #4
    [   44.212045] Call Trace:
    [   44.212045]  <TASK>
    [   44.212045]  dump_stack_lvl+0x37/0x50
    [   44.212045]  print_report+0xcc/0x620
    [   44.212045]  ? __virt_addr_valid+0xf3/0x170
    [   44.212045]  ? memcmp+0x8b/0xb0
    [   44.212045]  kasan_report+0xb2/0xe0
    [   44.212045]  ? memcmp+0x8b/0xb0
    [   44.212045]  kasan_check_range+0x39/0x1c0
    [   44.212045]  memcmp+0x8b/0xb0
    [   44.212045]  xfrm_state_walk+0x21c/0x420
    [   44.212045]  ? __pfx_dump_one_state+0x10/0x10
    [   44.212045]  xfrm_dump_sa+0x1e2/0x290
    [   44.212045]  ? __pfx_xfrm_dump_sa+0x10/0x10
    [   44.212045]  ? __kernel_text_address+0xd/0x40
    [   44.212045]  ? kasan_unpoison+0x27/0x60
    [   44.212045]  ? mutex_lock+0x60/0xe0
    [   44.212045]  ? __pfx_mutex_lock+0x10/0x10
    [   44.212045]  ? kasan_save_stack+0x22/0x50
    [   44.212045]  netlink_dump+0x322/0x6c0
    [   44.212045]  ? __pfx_netlink_dump+0x10/0x10
    [   44.212045]  ? mutex_unlock+0x7f/0xd0
    [   44.212045]  ? __pfx_mutex_unlock+0x10/0x10
    [   44.212045]  __netlink_dump_start+0x353/0x430
    [   44.212045]  xfrm_user_rcv_msg+0x3a4/0x410
    [   44.212045]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
    [   44.212045]  ? __pfx_xfrm_user_rcv_msg+0x10/0x10
    [   44.212045]  ? __pfx_xfrm_dump_sa+0x10/0x10
    [   44.212045]  ? __pfx_xfrm_dump_sa_done+0x10/0x10
    [   44.212045]  ? __stack_depot_save+0x382/0x4e0
    [   44.212045]  ? filter_irq_stacks+0x1c/0x70
    [   44.212045]  ? kasan_save_stack+0x32/0x50
    [   44.212045]  ? kasan_save_stack+0x22/0x50
    [   44.212045]  ? kasan_set_track+0x25/0x30
    [   44.212045]  ? __kasan_slab_alloc+0x59/0x70
    [   44.212045]  ? kmem_cache_alloc_node+0xf7/0x260
    [   44.212045]  ? kmalloc_reserve+0xab/0x120
    [   44.212045]  ? __alloc_skb+0xcf/0x210
    [   44.212045]  ? netlink_sendmsg+0x509/0x700
    [   44.212045]  ? sock_sendmsg+0xde/0xe0
    [   44.212045]  ? __sys_sendto+0x18d/0x230
    [   44.212045]  ? __x64_sys_sendto+0x71/0x90
    [   44.212045]  ? do_syscall_64+0x3f/0x90
    [   44.212045]  ? entry_SYSCALL_64_after_hwframe+0x72/0xdc
    [   44.212045]  ? netlink_sendmsg+0x509/0x700
    [   44.212045]  ? sock_sendmsg+0xde/0xe0
    [   44.212045]  ? __sys_sendto+0x18d/0x230
    [   44.212045]  ? __x64_sys_sendto+0x71/0x90
    [   44.212045]  ? do_syscall_64+0x3f/0x90
    [   44.212045]  ? entry_SYSCALL_64_after_hwframe+0x72/0xdc
    [   44.212045]  ? kasan_save_stack+0x22/0x50
    [   44.212045]  ? kasan_set_track+0x25/0x30
    [   44.212045]  ? kasan_save_free_info+0x2e/0x50
    [   44.212045]  ? __kasan_slab_free+0x10a/0x190
    [   44.212045]  ? kmem_cache_free+0x9c/0x340
    [   44.212045]  ? netlink_recvmsg+0x23c/0x660
    [   44.212045]  ? sock_recvmsg+0xeb/0xf0
    [   44.212045]  ? __sys_recvfrom+0x13c/0x1f0
    [   44.212045]  ? __x64_sys_recvfrom+0x71/0x90
    [   44.212045]  ? do_syscall_64+0x3f/0x90
    [   44.212045]  ? entry_SYSCALL_64_after_hwframe+0x72/0xdc
    [   44.212045]  ? copyout+0x3e/0x50
    [   44.212045]  netlink_rcv_skb+0xd6/0x210
    [   44.212045]  ? __pfx_xfrm_user_rcv_msg+0x10/0x10
    [   44.212045]  ? __pfx_netlink_rcv_skb+0x10/0x10
    [   44.212045]  ? __pfx_sock_has_perm+0x10/0x10
    [   44.212045]  ? mutex_lock+0x8d/0xe0
    [   44.212045]  ? __pfx_mutex_lock+0x10/0x10
    [   44.212045]  xfrm_netlink_rcv+0x44/0x50
    [   44.212045]  netlink_unicast+0x36f/0x4c0
    [   44.212045]  ? __pfx_netlink_unicast+0x10/0x10
    [   44.212045]  ? netlink_recvmsg+0x500/0x660
    [   44.212045]  netlink_sendmsg+0x3b7/0x700
    [   44.212045]  ? __pfx_netlink_sendmsg+0x10/0x10
    [   44.212045]  ? __pfx_netlink_sendmsg+0x10/0x10
    [   44.212045]  sock_sendmsg+0xde/0xe0
    [   44.212045]  __sys_sendto+0x18d/0x230
    [   44.212045]  ? __pfx___sys_sendto+0x10/0x10
    [   44.212045]  ? rcu_core+0x44a/0xe10
    [   44.212045]  ? __rseq_handle_notify_resume+0x45b/0x740
    [   44.212045]  ? _raw_spin_lock_irq+0x81/0xe0
    [   44.212045]  ? __pfx___rseq_handle_notify_resume+0x10/0x10
    [   44.212045]  ? __pfx_restore_fpregs_from_fpstate+0x10/0x10
    [   44.212045]  ? __pfx_blkcg_maybe_throttle_current+0x10/0x10
    [   44.212045]  ? __pfx_task_work_run+0x10/0x10
    [   44.212045]  __x64_sys_sendto+0x71/0x90
    [   44.212045]  do_syscall_64+0x3f/0x90
    [   44.212045]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
    [   44.212045] RIP: 0033:0x44b7da
    [   44.212045] RSP: 002b:00007ffdc8838548 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
    [   44.212045] RAX: ffffffffffffffda RBX: 00007ffdc8839978 RCX: 000000000044b7da
    [   44.212045] RDX: 0000000000000038 RSI: 00007ffdc8838770 RDI: 0000000000000003
    [   44.212045] RBP: 00007ffdc88385b0 R08: 00007ffdc883858c R09: 000000000000000c
    [   44.212045] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
    [   44.212045] R13: 00007ffdc8839968 R14: 00000000004c37d0 R15: 0000000000000001
    [   44.212045]  </TASK>
    [   44.212045]
    [   44.212045] Allocated by task 97:
    [   44.212045]  kasan_save_stack+0x22/0x50
    [   44.212045]  kasan_set_track+0x25/0x30
    [   44.212045]  __kasan_kmalloc+0x7f/0x90
    [   44.212045]  __kmalloc_node_track_caller+0x5b/0x140
    [   44.212045]  kmemdup+0x21/0x50
    [   44.212045]  xfrm_dump_sa+0x17d/0x290
    [   44.212045]  netlink_dump+0x322/0x6c0
    [   44.212045]  __netlink_dump_start+0x353/0x430
    [   44.212045]  xfrm_user_rcv_msg+0x3a4/0x410
    [   44.212045]  netlink_rcv_skb+0xd6/0x210
    [   44.212045]  xfrm_netlink_rcv+0x44/0x50
    [   44.212045]  netlink_unicast+0x36f/0x4c0
    [   44.212045]  netlink_sendmsg+0x3b7/0x700
    [   44.212045]  sock_sendmsg+0xde/0xe0
    [   44.212045]  __sys_sendto+0x18d/0x230
    [   44.212045]  __x64_sys_sendto+0x71/0x90
    [   44.212045]  do_syscall_64+0x3f/0x90
    [   44.212045]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
    [   44.212045]
    [   44.212045] The buggy address belongs to the object at ffff88800870f300
    [   44.212045]  which belongs to the cache kmalloc-64 of size 64
    [   44.212045] The buggy address is located 32 bytes inside of
    [   44.212045]  allocated 36-byte region [ffff88800870f300, ffff88800870f324)
    [   44.212045]
    [   44.212045] The buggy address belongs to the physical page:
    [   44.212045] page:00000000e4de16ee refcount:1 mapcount:0 mapping:000000000 ...
    [   44.212045] flags: 0x100000000000200(slab|node=0|zone=1)
    [   44.212045] page_type: 0xffffffff()
    [   44.212045] raw: 0100000000000200 ffff888004c41640 dead000000000122 0000000000000000
    [   44.212045] raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000
    [   44.212045] page dumped because: kasan: bad access detected
    [   44.212045]
    [   44.212045] Memory state around the buggy address:
    [   44.212045]  ffff88800870f200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
    [   44.212045]  ffff88800870f280: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
    [   44.212045] >ffff88800870f300: 00 00 00 00 04 fc fc fc fc fc fc fc fc fc fc fc
    [   44.212045]                                ^
    [   44.212045]  ffff88800870f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [   44.212045]  ffff88800870f400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [   44.212045] ==================================================================
    
    By investigating the code, we find the root cause of this OOB is the lack
    of checks in xfrm_dump_sa(). The buggy code allows a malicious user to pass
    arbitrary value of filter->splen/dplen. Hence, with crafted xfrm states,
    the attacker can achieve 8 bytes heap OOB read, which causes info leak.
    
      if (attrs[XFRMA_ADDRESS_FILTER]) {
        filter = kmemdup(nla_data(attrs[XFRMA_ADDRESS_FILTER]),
            sizeof(*filter), GFP_KERNEL);
        if (filter == NULL)
          return -ENOMEM;
        // NO MORE CHECKS HERE !!!
      }
    
    This patch fixes the OOB by adding necessary boundary checks, just like
    the code in pfkey_dump() function.
    
    Fixes: d362309 ("ipsec: add support of limited SA dump")
    Signed-off-by: Lin Ma <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    f0rm2l1n authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9a00562 View commit details
    Browse the repository at this point in the history
  105. net: af_key: fix sadb_x_filter validation

    [ Upstream commit 75065a8 ]
    
    When running xfrm_state_walk_init(), the xfrm_address_filter being used
    is okay to have a splen/dplen that equals to sizeof(xfrm_address_t)<<3.
    This commit replaces >= to > to make sure the boundary checking is
    correct.
    
    Fixes: 37bd224 ("af_key: pfkey_dump needs parameter validation")
    Signed-off-by: Lin Ma <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    f0rm2l1n authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    479884b View commit details
    Browse the repository at this point in the history
  106. net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure

    [ Upstream commit d1e0e61 ]
    
    According to all consumers code of attrs[XFRMA_SEC_CTX], like
    
    * verify_sec_ctx_len(), convert to xfrm_user_sec_ctx*
    * xfrm_state_construct(), call security_xfrm_state_alloc whose prototype
    is int security_xfrm_state_alloc(.., struct xfrm_user_sec_ctx *sec_ctx);
    * copy_from_user_sec_ctx(), convert to xfrm_user_sec_ctx *
    ...
    
    It seems that the expected parsing result for XFRMA_SEC_CTX should be
    structure xfrm_user_sec_ctx, and the current xfrm_sec_ctx is confusing
    and misleading (Luckily, they happen to have same size 8 bytes).
    
    This commit amend the policy structure to xfrm_user_sec_ctx to avoid
    ambiguity.
    
    Fixes: cf5cb79 ("[XFRM] netlink: Establish an attribute policy")
    Signed-off-by: Lin Ma <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    f0rm2l1n authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    71dfe71 View commit details
    Browse the repository at this point in the history
  107. xfrm: fix slab-use-after-free in decode_session6

    [ Upstream commit 53223f2 ]
    
    When the xfrm device is set to the qdisc of the sfb type, the cb field
    of the sent skb may be modified during enqueuing. Then,
    slab-use-after-free may occur when the xfrm device sends IPv6 packets.
    
    The stack information is as follows:
    BUG: KASAN: slab-use-after-free in decode_session6+0x103f/0x1890
    Read of size 1 at addr ffff8881111458ef by task swapper/3/0
    CPU: 3 PID: 0 Comm: swapper/3 Not tainted 6.4.0-next-20230707 #409
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014
    Call Trace:
    <IRQ>
    dump_stack_lvl+0xd9/0x150
    print_address_description.constprop.0+0x2c/0x3c0
    kasan_report+0x11d/0x130
    decode_session6+0x103f/0x1890
    __xfrm_decode_session+0x54/0xb0
    xfrmi_xmit+0x173/0x1ca0
    dev_hard_start_xmit+0x187/0x700
    sch_direct_xmit+0x1a3/0xc30
    __qdisc_run+0x510/0x17a0
    __dev_queue_xmit+0x2215/0x3b10
    neigh_connected_output+0x3c2/0x550
    ip6_finish_output2+0x55a/0x1550
    ip6_finish_output+0x6b9/0x1270
    ip6_output+0x1f1/0x540
    ndisc_send_skb+0xa63/0x1890
    ndisc_send_rs+0x132/0x6f0
    addrconf_rs_timer+0x3f1/0x870
    call_timer_fn+0x1a0/0x580
    expire_timers+0x29b/0x4b0
    run_timer_softirq+0x326/0x910
    __do_softirq+0x1d4/0x905
    irq_exit_rcu+0xb7/0x120
    sysvec_apic_timer_interrupt+0x97/0xc0
    </IRQ>
    <TASK>
    asm_sysvec_apic_timer_interrupt+0x1a/0x20
    RIP: 0010:intel_idle_hlt+0x23/0x30
    Code: 1f 84 00 00 00 00 00 f3 0f 1e fa 41 54 41 89 d4 0f 1f 44 00 00 66 90 0f 1f 44 00 00 0f 00 2d c4 9f ab 00 0f 1f 44 00 00 fb f4 <fa> 44 89 e0 41 5c c3 66 0f 1f 44 00 00 f3 0f 1e fa 41 54 41 89 d4
    RSP: 0018:ffffc90000197d78 EFLAGS: 00000246
    RAX: 00000000000a83c3 RBX: ffffe8ffffd09c50 RCX: ffffffff8a22d8e5
    RDX: 0000000000000001 RSI: ffffffff8d3f8080 RDI: ffffe8ffffd09c50
    RBP: ffffffff8d3f8080 R08: 0000000000000001 R09: ffffed1026ba6d9d
    R10: ffff888135d36ceb R11: 0000000000000001 R12: 0000000000000001
    R13: ffffffff8d3f8100 R14: 0000000000000001 R15: 0000000000000000
    cpuidle_enter_state+0xd3/0x6f0
    cpuidle_enter+0x4e/0xa0
    do_idle+0x2fe/0x3c0
    cpu_startup_entry+0x18/0x20
    start_secondary+0x200/0x290
    secondary_startup_64_no_verify+0x167/0x16b
    </TASK>
    Allocated by task 939:
    kasan_save_stack+0x22/0x40
    kasan_set_track+0x25/0x30
    __kasan_slab_alloc+0x7f/0x90
    kmem_cache_alloc_node+0x1cd/0x410
    kmalloc_reserve+0x165/0x270
    __alloc_skb+0x129/0x330
    inet6_ifa_notify+0x118/0x230
    __ipv6_ifa_notify+0x177/0xbe0
    addrconf_dad_completed+0x133/0xe00
    addrconf_dad_work+0x764/0x1390
    process_one_work+0xa32/0x16f0
    worker_thread+0x67d/0x10c0
    kthread+0x344/0x440
    ret_from_fork+0x1f/0x30
    The buggy address belongs to the object at ffff888111145800
    which belongs to the cache skbuff_small_head of size 640
    The buggy address is located 239 bytes inside of
    freed 640-byte region [ffff888111145800, ffff888111145a80)
    
    As commit f855691 ("xfrm6: Fix the nexthdr offset in
    _decode_session6.") showed, xfrm_decode_session was originally intended
    only for the receive path. IP6CB(skb)->nhoff is not set during
    transmission. Therefore, set the cb field in the skb to 0 before
    sending packets.
    
    Fixes: f855691 ("xfrm6: Fix the nexthdr offset in _decode_session6.")
    Signed-off-by: Zhengchao Shao <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zhengchaoshao authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    0d27567 View commit details
    Browse the repository at this point in the history
  108. ip6_vti: fix slab-use-after-free in decode_session6

    [ Upstream commit 9fd41f1 ]
    
    When ipv6_vti device is set to the qdisc of the sfb type, the cb field
    of the sent skb may be modified during enqueuing. Then,
    slab-use-after-free may occur when ipv6_vti device sends IPv6 packets.
    
    The stack information is as follows:
    BUG: KASAN: slab-use-after-free in decode_session6+0x103f/0x1890
    Read of size 1 at addr ffff88802e08edc2 by task swapper/0/0
    CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-next-20230707-00001-g84e2cad7f979 #410
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014
    Call Trace:
    <IRQ>
    dump_stack_lvl+0xd9/0x150
    print_address_description.constprop.0+0x2c/0x3c0
    kasan_report+0x11d/0x130
    decode_session6+0x103f/0x1890
    __xfrm_decode_session+0x54/0xb0
    vti6_tnl_xmit+0x3e6/0x1ee0
    dev_hard_start_xmit+0x187/0x700
    sch_direct_xmit+0x1a3/0xc30
    __qdisc_run+0x510/0x17a0
    __dev_queue_xmit+0x2215/0x3b10
    neigh_connected_output+0x3c2/0x550
    ip6_finish_output2+0x55a/0x1550
    ip6_finish_output+0x6b9/0x1270
    ip6_output+0x1f1/0x540
    ndisc_send_skb+0xa63/0x1890
    ndisc_send_rs+0x132/0x6f0
    addrconf_rs_timer+0x3f1/0x870
    call_timer_fn+0x1a0/0x580
    expire_timers+0x29b/0x4b0
    run_timer_softirq+0x326/0x910
    __do_softirq+0x1d4/0x905
    irq_exit_rcu+0xb7/0x120
    sysvec_apic_timer_interrupt+0x97/0xc0
    </IRQ>
    Allocated by task 9176:
    kasan_save_stack+0x22/0x40
    kasan_set_track+0x25/0x30
    __kasan_slab_alloc+0x7f/0x90
    kmem_cache_alloc_node+0x1cd/0x410
    kmalloc_reserve+0x165/0x270
    __alloc_skb+0x129/0x330
    netlink_sendmsg+0x9b1/0xe30
    sock_sendmsg+0xde/0x190
    ____sys_sendmsg+0x739/0x920
    ___sys_sendmsg+0x110/0x1b0
    __sys_sendmsg+0xf7/0x1c0
    do_syscall_64+0x39/0xb0
    entry_SYSCALL_64_after_hwframe+0x63/0xcd
    Freed by task 9176:
    kasan_save_stack+0x22/0x40
    kasan_set_track+0x25/0x30
    kasan_save_free_info+0x2b/0x40
    ____kasan_slab_free+0x160/0x1c0
    slab_free_freelist_hook+0x11b/0x220
    kmem_cache_free+0xf0/0x490
    skb_free_head+0x17f/0x1b0
    skb_release_data+0x59c/0x850
    consume_skb+0xd2/0x170
    netlink_unicast+0x54f/0x7f0
    netlink_sendmsg+0x926/0xe30
    sock_sendmsg+0xde/0x190
    ____sys_sendmsg+0x739/0x920
    ___sys_sendmsg+0x110/0x1b0
    __sys_sendmsg+0xf7/0x1c0
    do_syscall_64+0x39/0xb0
    entry_SYSCALL_64_after_hwframe+0x63/0xcd
    The buggy address belongs to the object at ffff88802e08ed00
    which belongs to the cache skbuff_small_head of size 640
    The buggy address is located 194 bytes inside of
    freed 640-byte region [ffff88802e08ed00, ffff88802e08ef80)
    
    As commit f855691 ("xfrm6: Fix the nexthdr offset in
    _decode_session6.") showed, xfrm_decode_session was originally intended
    only for the receive path. IP6CB(skb)->nhoff is not set during
    transmission. Therefore, set the cb field in the skb to 0 before
    sending packets.
    
    Fixes: f855691 ("xfrm6: Fix the nexthdr offset in _decode_session6.")
    Signed-off-by: Zhengchao Shao <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zhengchaoshao authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    55ad230 View commit details
    Browse the repository at this point in the history
  109. ip_vti: fix potential slab-use-after-free in decode_session6

    [ Upstream commit 6018a26 ]
    
    When ip_vti device is set to the qdisc of the sfb type, the cb field
    of the sent skb may be modified during enqueuing. Then,
    slab-use-after-free may occur when ip_vti device sends IPv6 packets.
    As commit f855691 ("xfrm6: Fix the nexthdr offset in
    _decode_session6.") showed, xfrm_decode_session was originally intended
    only for the receive path. IP6CB(skb)->nhoff is not set during
    transmission. Therefore, set the cb field in the skb to 0 before
    sending packets.
    
    Fixes: f855691 ("xfrm6: Fix the nexthdr offset in _decode_session6.")
    Signed-off-by: Zhengchao Shao <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zhengchaoshao authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    2b05bf5 View commit details
    Browse the repository at this point in the history
  110. xfrm: add NULL check in xfrm_update_ae_params

    [ Upstream commit 00374d9 ]
    
    Normally, x->replay_esn and x->preplay_esn should be allocated at
    xfrm_alloc_replay_state_esn(...) in xfrm_state_construct(...), hence the
    xfrm_update_ae_params(...) is okay to update them. However, the current
    implementation of xfrm_new_ae(...) allows a malicious user to directly
    dereference a NULL pointer and crash the kernel like below.
    
    BUG: kernel NULL pointer dereference, address: 0000000000000000
    PGD 8253067 P4D 8253067 PUD 8e0e067 PMD 0
    Oops: 0002 [#1] PREEMPT SMP KASAN NOPTI
    CPU: 0 PID: 98 Comm: poc.npd Not tainted 6.4.0-rc7-00072-gdad9774deaf1 #8
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.o4
    RIP: 0010:memcpy_orig+0xad/0x140
    Code: e8 4c 89 5f e0 48 8d 7f e0 73 d2 83 c2 20 48 29 d6 48 29 d7 83 fa 10 72 34 4c 8b 06 4c 8b 4e 08 c
    RSP: 0018:ffff888008f57658 EFLAGS: 00000202
    RAX: 0000000000000000 RBX: ffff888008bd0000 RCX: ffffffff8238e571
    RDX: 0000000000000018 RSI: ffff888007f64844 RDI: 0000000000000000
    RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000000 R12: ffff888008f57818
    R13: ffff888007f64aa4 R14: 0000000000000000 R15: 0000000000000000
    FS:  00000000014013c0(0000) GS:ffff88806d600000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000000 CR3: 00000000054d8000 CR4: 00000000000006f0
    Call Trace:
     <TASK>
     ? __die+0x1f/0x70
     ? page_fault_oops+0x1e8/0x500
     ? __pfx_is_prefetch.constprop.0+0x10/0x10
     ? __pfx_page_fault_oops+0x10/0x10
     ? _raw_spin_unlock_irqrestore+0x11/0x40
     ? fixup_exception+0x36/0x460
     ? _raw_spin_unlock_irqrestore+0x11/0x40
     ? exc_page_fault+0x5e/0xc0
     ? asm_exc_page_fault+0x26/0x30
     ? xfrm_update_ae_params+0xd1/0x260
     ? memcpy_orig+0xad/0x140
     ? __pfx__raw_spin_lock_bh+0x10/0x10
     xfrm_update_ae_params+0xe7/0x260
     xfrm_new_ae+0x298/0x4e0
     ? __pfx_xfrm_new_ae+0x10/0x10
     ? __pfx_xfrm_new_ae+0x10/0x10
     xfrm_user_rcv_msg+0x25a/0x410
     ? __pfx_xfrm_user_rcv_msg+0x10/0x10
     ? __alloc_skb+0xcf/0x210
     ? stack_trace_save+0x90/0xd0
     ? filter_irq_stacks+0x1c/0x70
     ? __stack_depot_save+0x39/0x4e0
     ? __kasan_slab_free+0x10a/0x190
     ? kmem_cache_free+0x9c/0x340
     ? netlink_recvmsg+0x23c/0x660
     ? sock_recvmsg+0xeb/0xf0
     ? __sys_recvfrom+0x13c/0x1f0
     ? __x64_sys_recvfrom+0x71/0x90
     ? do_syscall_64+0x3f/0x90
     ? entry_SYSCALL_64_after_hwframe+0x72/0xdc
     ? copyout+0x3e/0x50
     netlink_rcv_skb+0xd6/0x210
     ? __pfx_xfrm_user_rcv_msg+0x10/0x10
     ? __pfx_netlink_rcv_skb+0x10/0x10
     ? __pfx_sock_has_perm+0x10/0x10
     ? mutex_lock+0x8d/0xe0
     ? __pfx_mutex_lock+0x10/0x10
     xfrm_netlink_rcv+0x44/0x50
     netlink_unicast+0x36f/0x4c0
     ? __pfx_netlink_unicast+0x10/0x10
     ? netlink_recvmsg+0x500/0x660
     netlink_sendmsg+0x3b7/0x700
    
    This Null-ptr-deref bug is assigned CVE-2023-3772. And this commit
    adds additional NULL check in xfrm_update_ae_params to fix the NPD.
    
    Fixes: d8647b7 ("xfrm: Add user interface for esn and big anti-replay windows")
    Signed-off-by: Lin Ma <[email protected]>
    Reviewed-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    f0rm2l1n authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    87b655f View commit details
    Browse the repository at this point in the history
  111. xfrm: add forgotten nla_policy for XFRMA_MTIMER_THRESH

    [ Upstream commit 5e24247 ]
    
    The previous commit 4e484b3 ("xfrm: rate limit SA mapping change
    message to user space") added one additional attribute named
    XFRMA_MTIMER_THRESH and described its type at compat_policy
    (net/xfrm/xfrm_compat.c).
    
    However, the author forgot to also describe the nla_policy at
    xfrma_policy (net/xfrm/xfrm_user.c). Hence, this suppose NLA_U32 (4
    bytes) value can be faked as empty (0 bytes) by a malicious user, which
    leads to 4 bytes overflow read and heap information leak when parsing
    nlattrs.
    
    To exploit this, one malicious user can spray the SLUB objects and then
    leverage this 4 bytes OOB read to leak the heap data into
    x->mapping_maxage (see xfrm_update_ae_params(...)), and leak it to
    userspace via copy_to_user_state_extra(...).
    
    The above bug is assigned CVE-2023-3773. To fix it, this commit just
    completes the nla_policy description for XFRMA_MTIMER_THRESH, which
    enforces the length check and avoids such OOB read.
    
    Fixes: 4e484b3 ("xfrm: rate limit SA mapping change message to user space")
    Signed-off-by: Lin Ma <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Reviewed-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    f0rm2l1n authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    a442cd1 View commit details
    Browse the repository at this point in the history
  112. virtio_net: notify MAC address change on device initialization

    [ Upstream commit 9f62d22 ]
    
    In virtnet_probe(), if the device doesn't provide a MAC address the
    driver assigns a random one.
    As we modify the MAC address we need to notify the device to allow it
    to update all the related information.
    
    The problem can be seen with vDPA and mlx5_vdpa driver as it doesn't
    assign a MAC address by default. The virtio_net device uses a random
    MAC address (we can see it with "ip link"), but we can't ping a net
    namespace from another one using the virtio-vdpa device because the
    new MAC address has not been provided to the hardware:
    RX packets are dropped since they don't go through the receive filters,
    TX packets go through unaffected.
    
    Signed-off-by: Laurent Vivier <[email protected]>
    Acked-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: 51b8131 ("virtio-net: set queues after driver_ok")
    Signed-off-by: Sasha Levin <[email protected]>
    vivier authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    45085ba View commit details
    Browse the repository at this point in the history
  113. virtio-net: set queues after driver_ok

    [ Upstream commit 51b8131 ]
    
    Commit 2526612 ("virtio-net: fix race between set queues and
    probe") tries to fix the race between set queues and probe by calling
    _virtnet_set_queues() before DRIVER_OK is set. This violates virtio
    spec. Fixing this by setting queues after virtio_device_ready().
    
    Note that rtnl needs to be held for userspace requests to change the
    number of queues. So we are serialized in this way.
    
    Fixes: 2526612 ("virtio-net: fix race between set queues and probe")
    Reported-by: Dragos Tatulea <[email protected]>
    Acked-by: Michael S. Tsirkin <[email protected]>
    Signed-off-by: Jason Wang <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jasowang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    120a89c View commit details
    Browse the repository at this point in the history
  114. net: pcs: Add missing put_device call in miic_create

    [ Upstream commit 829c652 ]
    
    The reference of pdev->dev is taken by of_find_device_by_node, so
    it should be released when not need anymore.
    
    Fixes: 7dc54d3 ("net: pcs: add Renesas MII converter driver")
    Signed-off-by: Xiang Yang <[email protected]>
    Reviewed-by: Vladimir Oltean <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Xiang Yang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    a41e5a7 View commit details
    Browse the repository at this point in the history
  115. net: phy: fix IRQ-based wake-on-lan over hibernate / power off

    [ Upstream commit cc941e5 ]
    
    Uwe reports:
    "Most PHYs signal WoL using an interrupt. So disabling interrupts [at
    shutdown] breaks WoL at least on PHYs covered by the marvell driver."
    
    Discussing with Ioana, the problem which was trying to be solved was:
    "The board in question is a LS1021ATSN which has two AR8031 PHYs that
    share an interrupt line. In case only one of the PHYs is probed and
    there are pending interrupts on the PHY#2 an IRQ storm will happen
    since there is no entity to clear the interrupt from PHY#2's registers.
    PHY#1's driver will get stuck in .handle_interrupt() indefinitely."
    
    Further confirmation that "the two AR8031 PHYs are on the same MDIO
    bus."
    
    With WoL using interrupts to wake the system, in such a case, the
    system will begin booting with an asserted interrupt. Thus, we need to
    cope with an interrupt asserted during boot.
    
    Solve this instead by disabling interrupts during PHY probe. This will
    ensure in Ioana's situation that both PHYs of the same type sharing an
    interrupt line on a common MDIO bus will have their interrupt outputs
    disabled when the driver probes the device, but before we hook in any
    interrupt handlers - thus avoiding the interrupt storm.
    
    A better fix would be for platform firmware to disable the interrupting
    devices at source during boot, before control is handed to the kernel.
    
    Fixes: e2f016c ("net: phy: add a shutdown procedure")
    Link: [email protected]
    Reported-by: Uwe Kleine-König <[email protected]>
    Signed-off-by: Russell King (Oracle) <[email protected]>
    Reviewed-by: Andrew Lunn <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Russell King (Oracle) authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    cd4460b View commit details
    Browse the repository at this point in the history
  116. selftests: mirror_gre_changes: Tighten up the TTL test match

    [ Upstream commit 855067d ]
    
    This test verifies whether the encapsulated packets have the correct
    configured TTL. It does so by sending ICMP packets through the test
    topology and mirroring them to a gretap netdevice. On a busy host
    however, more than just the test ICMP packets may end up flowing
    through the topology, get mirrored, and counted. This leads to
    potential spurious failures as the test observes much more mirrored
    packets than the sent test packets, and assumes a bug.
    
    Fix this by tightening up the mirror action match. Change it from
    matchall to a flower classifier matching on ICMP packets specifically.
    
    Fixes: 4531567 ("selftests: forwarding: Test changes in mirror-to-gretap")
    Signed-off-by: Petr Machata <[email protected]>
    Tested-by: Mirsad Todorovac <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pmachata authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    2f07f13 View commit details
    Browse the repository at this point in the history
  117. drm/panel: simple: Fix AUO G121EAN01 panel timings according to the docs

    [ Upstream commit e8470c0 ]
    
    Commit 03e909a ("drm/panel: simple: Add support for AUO G121EAN01.4
    panel") added support for this panel model, but the timings it implements
    are very different from what the datasheet describes. I checked both the
    G121EAN01.0 datasheet from [0] and the G121EAN01.4 one from [1] and they
    all have the same timings: for example the LVDS clock typical value is 74.4
    MHz, not 66.7 MHz as implemented.
    
    Replace the timings with the ones from the documentation. These timings
    have been tested and the clock frequencies verified with an oscilloscope to
    ensure they are correct.
    
    Also use struct display_timing instead of struct drm_display_mode in order
    to also specify the minimum and maximum values.
    
    [0] https://embedded.avnet.com/product/g121ean01-0/
    [1] https://embedded.avnet.com/product/g121ean01-4/
    
    Fixes: 03e909a ("drm/panel: simple: Add support for AUO G121EAN01.4 panel")
    Signed-off-by: Luca Ceresoli <[email protected]>
    Reviewed-by: Neil Armstrong <[email protected]>
    Signed-off-by: Neil Armstrong <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    lucaceresoli authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    06af678 View commit details
    Browse the repository at this point in the history
  118. net: macb: In ZynqMP resume always configure PS GTR for non-wakeup so…

    …urce
    
    [ Upstream commit 6c461e3 ]
    
    On Zynq UltraScale+ MPSoC ubuntu platform when systemctl issues suspend,
    network manager bring down the interface and goes into suspend. When it
    wakes up it again enables the interface.
    
    This leads to xilinx-psgtr "PLL lock timeout" on interface bringup, as
    the power management controller power down the entire FPD (including
    SERDES) if none of the FPD devices are in use and serdes is not
    initialized on resume.
    
    $ sudo rtcwake -m no -s 120 -v
    $ sudo systemctl suspend  <this does ifconfig eth1 down>
    $ ifconfig eth1 up
    xilinx-psgtr fd400000.phy: lane 0 (type 10, protocol 5): PLL lock timeout
    phy phy-fd400000.phy.0: phy poweron failed --> -110
    
    macb driver is called in this way:
    1. macb_close: Stop network interface. In this function, it
       reset MACB IP and disables PHY and network interface.
    
    2. macb_suspend: It is called in kernel suspend flow. But because
       network interface has been disabled(netif_running(ndev) is
       false), it does nothing and returns directly;
    
    3. System goes into suspend state. Some time later, system is
       waken up by RTC wakeup device;
    
    4. macb_resume: It does nothing because network interface has
       been disabled;
    
    5. macb_open: It is called to enable network interface again. ethernet
       interface is initialized in this API but serdes which is power-off
       by PMUFW during FPD-off suspend is not initialized again and so
       we hit GT PLL lock issue on open.
    
    To resolve this PLL timeout issue always do PS GTR initialization
    when ethernet device is configured as non-wakeup source.
    
    Fixes: f22bd29 ("net: macb: Fix ZynqMP SGMII non-wakeup source resume failure")
    Fixes: 8b73fa3 ("net: macb: Added ZynqMP-specific initialization")
    Signed-off-by: Radhey Shyam Pandey <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Radhey Shyam Pandey authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    58a54ba View commit details
    Browse the repository at this point in the history
  119. octeon_ep: cancel tx_timeout_task later in remove sequence

    [ Upstream commit 28458c8 ]
    
    tx_timeout_task is canceled too early when removing the driver. Nothing
    prevents .ndo_tx_timeout from triggering and queuing the work again.
    
    Better cancel it after the netdev is unregistered.
    It's harmless for octep_tx_timeout_task to run in the window between the
    unregistration and cancelation, because it checks netif_running.
    
    Fixes: 862cd65 ("octeon_ep: Add driver framework and device initialization")
    Signed-off-by: Michal Schmidt <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    michich authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    75c724e View commit details
    Browse the repository at this point in the history
  120. netfilter: nf_tables: fix false-positive lockdep splat

    [ Upstream commit b9f052d ]
    
    ->abort invocation may cause splat on debug kernels:
    
    WARNING: suspicious RCU usage
    net/netfilter/nft_set_pipapo.c:1697 suspicious rcu_dereference_check() usage!
    [..]
    rcu_scheduler_active = 2, debug_locks = 1
    1 lock held by nft/133554: [..] (nft_net->commit_mutex){+.+.}-{3:3}, at: nf_tables_valid_genid
    [..]
     lockdep_rcu_suspicious+0x1ad/0x260
     nft_pipapo_abort+0x145/0x180
     __nf_tables_abort+0x5359/0x63d0
     nf_tables_abort+0x24/0x40
     nfnetlink_rcv+0x1a0a/0x22c0
     netlink_unicast+0x73c/0x900
     netlink_sendmsg+0x7f0/0xc20
     ____sys_sendmsg+0x48d/0x760
    
    Transaction mutex is held, so parallel updates are not possible.
    Switch to _protected and check mutex is held for lockdep enabled builds.
    
    Fixes: 212ed75 ("netfilter: nf_tables: integrate pipapo into commit protocol")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Florian Westphal authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    a800fcd View commit details
    Browse the repository at this point in the history
  121. netfilter: nf_tables: deactivate catchall elements in next generation

    [ Upstream commit 90e5b34 ]
    
    When flushing, individual set elements are disabled in the next
    generation via the ->flush callback.
    
    Catchall elements are not disabled.  This is incorrect and may lead to
    double-deactivations of catchall elements which then results in memory
    leaks:
    
    WARNING: CPU: 1 PID: 3300 at include/net/netfilter/nf_tables.h:1172 nft_map_deactivate+0x549/0x730
    CPU: 1 PID: 3300 Comm: nft Not tainted 6.5.0-rc5+ #60
    RIP: 0010:nft_map_deactivate+0x549/0x730
     [..]
     ? nft_map_deactivate+0x549/0x730
     nf_tables_delset+0xb66/0xeb0
    
    (the warn is due to nft_use_dec() detecting underflow).
    
    Fixes: aaa3104 ("netfilter: nftables: add catch-all set element support")
    Reported-by: lonial con <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Florian Westphal authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    00ea7eb View commit details
    Browse the repository at this point in the history
  122. ipvs: fix racy memcpy in proc_do_sync_threshold

    [ Upstream commit 5310760 ]
    
    When two threads run proc_do_sync_threshold() in parallel,
    data races could happen between the two memcpy():
    
    Thread-1			Thread-2
    memcpy(val, valp, sizeof(val));
    				memcpy(valp, val, sizeof(val));
    
    This race might mess up the (struct ctl_table *) table->data,
    so we add a mutex lock to serialize them.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Link: https://lore.kernel.org/netdev/[email protected]/
    Signed-off-by: Sishuai Gong <[email protected]>
    Acked-by: Simon Horman <[email protected]>
    Acked-by: Julian Anastasov <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Sishuai Gong authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    7f8a160 View commit details
    Browse the repository at this point in the history
  123. netfilter: nft_dynset: disallow object maps

    [ Upstream commit 23185c6 ]
    
    Do not allow to insert elements from datapath to objects maps.
    
    Fixes: 8aeff92 ("netfilter: nf_tables: add stateful object reference to set elements")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ummakynes authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    7148bca View commit details
    Browse the repository at this point in the history
  124. net: phy: broadcom: stub c45 read/write for 54810

    [ Upstream commit 096516d ]
    
    The 54810 does not support c45. The mmd_phy_indirect accesses return
    arbirtary values leading to odd behavior like saying it supports EEE
    when it doesn't. We also see that reading/writing these non-existent
    MMD registers leads to phy instability in some cases.
    
    Fixes: b14995a ("net: phy: broadcom: Add BCM54810 PHY entry")
    Signed-off-by: Justin Chen <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ryceancurry authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    85bd0af View commit details
    Browse the repository at this point in the history
  125. team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves

    [ Upstream commit dafcbce ]
    
    Similar to commit 01f4fd2 ("bonding: Fix incorrect deletion of
    ETH_P_8021AD protocol vid from slaves"), we can trigger BUG_ON(!vlan_info)
    in unregister_vlan_dev() with the following testcase:
    
      # ip netns add ns1
      # ip netns exec ns1 ip link add team1 type team
      # ip netns exec ns1 ip link add team_slave type veth peer veth2
      # ip netns exec ns1 ip link set team_slave master team1
      # ip netns exec ns1 ip link add link team_slave name team_slave.10 type vlan id 10 protocol 802.1ad
      # ip netns exec ns1 ip link add link team1 name team1.10 type vlan id 10 protocol 802.1ad
      # ip netns exec ns1 ip link set team_slave nomaster
      # ip netns del ns1
    
    Add S-VLAN tag related features support to team driver. So the team driver
    will always propagate the VLAN info to its slaves.
    
    Fixes: 8ad227f ("net: vlan: add 802.1ad support")
    Suggested-by: Ido Schimmel <[email protected]>
    Signed-off-by: Ziyang Xuan <[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: Sasha Levin <[email protected]>
    Ziyang Xuan authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d5e4c0e View commit details
    Browse the repository at this point in the history
  126. net: openvswitch: reject negative ifindex

    [ Upstream commit a552bfa ]
    
    Recent changes in net-next (commit 759ab1e ("net: store netdevs
    in an xarray")) refactored the handling of pre-assigned ifindexes
    and let syzbot surface a latent problem in ovs. ovs does not validate
    ifindex, making it possible to create netdev ports with negative
    ifindex values. It's easy to repro with YNL:
    
    $ ./cli.py --spec netlink/specs/ovs_datapath.yaml \
             --do new \
    	 --json '{"upcall-pid": 1, "name":"my-dp"}'
    $ ./cli.py --spec netlink/specs/ovs_vport.yaml \
    	 --do new \
    	 --json '{"upcall-pid": "00000001", "name": "some-port0", "dp-ifindex":3,"ifindex":4294901760,"type":2}'
    
    $ ip link show
    -65536: some-port0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
        link/ether 7a:48:21:ad:0b:fb brd ff:ff:ff:ff:ff:ff
    ...
    
    Validate the inputs. Now the second command correctly returns:
    
    $ ./cli.py --spec netlink/specs/ovs_vport.yaml \
    	 --do new \
    	 --json '{"upcall-pid": "00000001", "name": "some-port0", "dp-ifindex":3,"ifindex":4294901760,"type":2}'
    
    lib.ynl.NlError: Netlink error: Numerical result out of range
    nl_len = 108 (92) nl_flags = 0x300 nl_type = 2
    	error: -34	extack: {'msg': 'integer out of range', 'unknown': [[type:4 len:36] b'\x0c\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x03\x00\xff\xff\xff\x7f\x00\x00\x00\x00\x08\x00\x01\x00\x08\x00\x00\x00'], 'bad-attr': '.ifindex'}
    
    Accept 0 since it used to be silently ignored.
    
    Fixes: 54c4ef3 ("openvswitch: allow specifying ifindex of new interfaces")
    Reported-by: [email protected]
    Reviewed-by: Leon Romanovsky <[email protected]>
    Reviewed-by: Aaron Conole <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    kuba-moo authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    c965a58 View commit details
    Browse the repository at this point in the history
  127. iavf: fix FDIR rule fields masks validation

    [ Upstream commit 751969e ]
    
    Return an error if a field's mask is neither full nor empty. When a mask
    is only partial the field is not being used for rule programming but it
    gives a wrong impression it is used. Fix by returning an error on any
    partial mask to make it clear they are not supported.
    The ip_ver assignment is moved earlier in code to allow using it in
    iavf_validate_fdir_fltr_masks.
    
    Fixes: 527691b ("iavf: Support IPv4 Flow Director filters")
    Fixes: e90cbc2 ("iavf: Support IPv6 Flow Director filters")
    Signed-off-by: Piotr Gardocki <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pgardocx authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ea749b5 View commit details
    Browse the repository at this point in the history
  128. i40e: fix misleading debug logs

    [ Upstream commit 2f2beb8 ]
    
    Change "write" into the actual "read" word.
    Change parameters description.
    
    Fixes: 7073f46 ("i40e: Add AQ commands for NVM Update for X722")
    Signed-off-by: Aleksandr Loktionov <[email protected]>
    Signed-off-by: Andrii Staikov <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    CuriousPanCake authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    7409243 View commit details
    Browse the repository at this point in the history
  129. net: dsa: mv88e6xxx: Wait for EEPROM done before HW reset

    [ Upstream commit 23d775f ]
    
    If the switch is reset during active EEPROM transactions, as in
    just after an SoC reset after power up, the I2C bus transaction
    may be cut short leaving the EEPROM internal I2C state machine
    in the wrong state.  When the switch is reset again, the bad
    state machine state may result in data being read from the wrong
    memory location causing the switch to enter unexpected mode
    rendering it inoperational.
    
    Fixes: a3dcb3e ("net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset")
    Signed-off-by: Alfred Lee <[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: Sasha Levin <[email protected]>
    l00g33k authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    df83af3 View commit details
    Browse the repository at this point in the history
  130. sfc: don't unregister flow_indr if it was never registered

    [ Upstream commit fa165e1 ]
    
    In efx_init_tc(), move the setting of efx->tc->up after the
     flow_indr_dev_register() call, so that if it fails, efx_fini_tc()
     won't call flow_indr_dev_unregister().
    
    Fixes: 5b2e12d ("sfc: bind indirect blocks for TC offload on EF100")
    Suggested-by: Pieter Jansen van Vuuren <[email protected]>
    Reviewed-by: Martin Habets <[email protected]>
    Signed-off-by: Edward Cree <[email protected]>
    Link: https://lore.kernel.org/r/a81284d7013aba74005277bd81104e4cfbea3f6f.1692114888.git.ecree.xilinx@gmail.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Edward Cree authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    3d82092 View commit details
    Browse the repository at this point in the history
  131. sock: Fix misuse of sk_under_memory_pressure()

    [ Upstream commit 2d0c88e ]
    
    The status of global socket memory pressure is updated when:
    
      a) __sk_mem_raise_allocated():
    
    	enter: sk_memory_allocated(sk) >  sysctl_mem[1]
    	leave: sk_memory_allocated(sk) <= sysctl_mem[0]
    
      b) __sk_mem_reduce_allocated():
    
    	leave: sk_under_memory_pressure(sk) &&
    		sk_memory_allocated(sk) < sysctl_mem[0]
    
    So the conditions of leaving global pressure are inconstant, which
    may lead to the situation that one pressured net-memcg prevents the
    global pressure from being cleared when there is indeed no global
    pressure, thus the global constrains are still in effect unexpectedly
    on the other sockets.
    
    This patch fixes this by ignoring the net-memcg's pressure when
    deciding whether should leave global memory pressure.
    
    Fixes: e1aab16 ("socket: initial cgroup code.")
    Signed-off-by: Abel Wu <[email protected]>
    Acked-by: Shakeel Butt <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Abel-WY authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    06b8f06 View commit details
    Browse the repository at this point in the history
  132. net: do not allow gso_size to be set to GSO_BY_FRAGS

    [ Upstream commit b616be6 ]
    
    One missing check in virtio_net_hdr_to_skb() allowed
    syzbot to crash kernels again [1]
    
    Do not allow gso_size to be set to GSO_BY_FRAGS (0xffff),
    because this magic value is used by the kernel.
    
    [1]
    general protection fault, probably for non-canonical address 0xdffffc000000000e: 0000 [#1] PREEMPT SMP KASAN
    KASAN: null-ptr-deref in range [0x0000000000000070-0x0000000000000077]
    CPU: 0 PID: 5039 Comm: syz-executor401 Not tainted 6.5.0-rc5-next-20230809-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
    RIP: 0010:skb_segment+0x1a52/0x3ef0 net/core/skbuff.c:4500
    Code: 00 00 00 e9 ab eb ff ff e8 6b 96 5d f9 48 8b 84 24 00 01 00 00 48 8d 78 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e ea 21 00 00 48 8b 84 24 00 01
    RSP: 0018:ffffc90003d3f1c8 EFLAGS: 00010202
    RAX: dffffc0000000000 RBX: 000000000001fffe RCX: 0000000000000000
    RDX: 000000000000000e RSI: ffffffff882a3115 RDI: 0000000000000070
    RBP: ffffc90003d3f378 R08: 0000000000000005 R09: 000000000000ffff
    R10: 000000000000ffff R11: 5ee4a93e456187d6 R12: 000000000001ffc6
    R13: dffffc0000000000 R14: 0000000000000008 R15: 000000000000ffff
    FS: 00005555563f2380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000020020000 CR3: 000000001626d000 CR4: 00000000003506f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
    <TASK>
    udp6_ufo_fragment+0x9d2/0xd50 net/ipv6/udp_offload.c:109
    ipv6_gso_segment+0x5c4/0x17b0 net/ipv6/ip6_offload.c:120
    skb_mac_gso_segment+0x292/0x610 net/core/gso.c:53
    __skb_gso_segment+0x339/0x710 net/core/gso.c:124
    skb_gso_segment include/net/gso.h:83 [inline]
    validate_xmit_skb+0x3a5/0xf10 net/core/dev.c:3625
    __dev_queue_xmit+0x8f0/0x3d60 net/core/dev.c:4329
    dev_queue_xmit include/linux/netdevice.h:3082 [inline]
    packet_xmit+0x257/0x380 net/packet/af_packet.c:276
    packet_snd net/packet/af_packet.c:3087 [inline]
    packet_sendmsg+0x24c7/0x5570 net/packet/af_packet.c:3119
    sock_sendmsg_nosec net/socket.c:727 [inline]
    sock_sendmsg+0xd9/0x180 net/socket.c:750
    ____sys_sendmsg+0x6ac/0x940 net/socket.c:2496
    ___sys_sendmsg+0x135/0x1d0 net/socket.c:2550
    __sys_sendmsg+0x117/0x1e0 net/socket.c:2579
    do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
    entry_SYSCALL_64_after_hwframe+0x63/0xcd
    RIP: 0033:0x7ff27cdb34d9
    
    Fixes: 3953c46 ("sk_buff: allow segmenting based on frag sizes")
    Reported-by: syzbot <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Xin Long <[email protected]>
    Cc: "Michael S. Tsirkin" <[email protected]>
    Cc: Jason Wang <[email protected]>
    Reviewed-by: Willem de Bruijn <[email protected]>
    Reviewed-by: Marcelo Ricardo Leitner <[email protected]>
    Reviewed-by: Xuan Zhuo <[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 Aug 23, 2023
    Configuration menu
    Copy the full SHA
    2e03a92 View commit details
    Browse the repository at this point in the history
  133. qede: fix firmware halt over suspend and resume

    [ Upstream commit 2eb9625 ]
    
    While performing certain power-off sequences, PCI drivers are
    called to suspend and resume their underlying devices through
    PCI PM (power management) interface. However this NIC hardware
    does not support PCI PM suspend/resume operations so system wide
    suspend/resume leads to bad MFW (management firmware) state which
    causes various follow-up errors in driver when communicating with
    the device/firmware afterwards.
    
    To fix this driver implements PCI PM suspend handler to indicate
    unsupported operation to the PCI subsystem explicitly, thus avoiding
    system to go into suspended/standby mode.
    
    Without this fix device/firmware does not recover unless system
    is power cycled.
    
    Fixes: 2950219 ("qede: Add basic network device support")
    Signed-off-by: Manish Chopra <[email protected]>
    Signed-off-by: Alok Prasad <[email protected]>
    Reviewed-by: John Meneghini <[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: Sasha Levin <[email protected]>
    manishc88 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    fbc7b1d View commit details
    Browse the repository at this point in the history
  134. ice: Block switchdev mode when ADQ is active and vice versa

    [ Upstream commit 43d00e1 ]
    
    ADQ and switchdev are not supported simultaneously. Enabling both at the
    same time can result in nullptr dereference.
    
    To prevent this, check if ADQ is active when changing devlink mode to
    switchdev mode, and check if switchdev is active when enabling ADQ.
    
    Fixes: fbc7b27 ("ice: enable ndo_setup_tc support for mqprio_qdisc")
    Signed-off-by: Marcin Szycik <[email protected]>
    Reviewed-by: Przemek Kitszel <[email protected]>
    Tested-by: Sujai Buvaneswaran <[email protected]>
    Signed-off-by: Tony Nguyen <[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: Sasha Levin <[email protected]>
    Marcin Szycik authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    1c82d1b View commit details
    Browse the repository at this point in the history
  135. bus: ti-sysc: Flush posted write on enable before reset

    [ Upstream commit 34539b4 ]
    
    The am335x devices started producing boot errors for resetting musb module
    in because of subtle timing changes:
    
    Unhandled fault: external abort on non-linefetch (0x1008)
    ...
    sysc_poll_reset_sysconfig from sysc_reset+0x109/0x12
    sysc_reset from sysc_probe+0xa99/0xeb0
    ...
    
    The fix is to flush posted write after enable before reset during
    probe. Note that some devices also need to specify the delay after enable
    with ti,sysc-delay-us, but this is not needed for musb on am335x based on
    my tests.
    
    Reported-by: kernelci.org bot <[email protected]>
    Closes: https://storage.kernelci.org/next/master/next-20230614/arm/multi_v7_defconfig+CONFIG_THUMB2_KERNEL=y/gcc-10/lab-cip/baseline-beaglebone-black.html
    Fixes: 596e795 ("bus: ti-sysc: Add support for software reset")
    Signed-off-by: Tony Lindgren <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tmlind authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    fae3868 View commit details
    Browse the repository at this point in the history
  136. arm64: dts: qcom: qrb5165-rb5: fix thermal zone conflict

    [ Upstream commit 798f1df ]
    
    The commit 3a78608 ("arm64: dts: qcom: Add missing "-thermal"
    suffix for thermal zones") renamed the thermal zone in the pm8150l.dtsi
    file to comply with the schema. However this resulted in a clash with
    the RB5 board file, which already contained the pm8150l-thermal zone for
    the on-board sensor. This resulted in the board file definition
    overriding the thermal zone defined in the PMIC include file (and thus
    the on-die PMIC temp alarm was not probing at all).
    
    Rename the thermal zone in qcom/qrb5165-rb5.dts to remove this override.
    
    Fixes: 3a78608 ("arm64: dts: qcom: Add missing "-thermal" suffix for thermal zones")
    Signed-off-by: Dmitry Baryshkov <[email protected]>
    Reviewed-by: Konrad Dybcio <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    lumag authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9657a75 View commit details
    Browse the repository at this point in the history
  137. arm64: dts: rockchip: Disable HS400 for eMMC on ROCK Pi 4

    [ Upstream commit cee5727 ]
    
    There is some instablity with some eMMC modules on ROCK Pi 4 SBCs running
    in HS400 mode. This ends up resulting in some block errors after a while
    or after a "heavy" operation utilising the eMMC (e.g. resizing a
    filesystem). An example of these errors is as follows:
    
        [  289.171014] mmc1: running CQE recovery
        [  290.048972] mmc1: running CQE recovery
        [  290.054834] mmc1: running CQE recovery
        [  290.060817] mmc1: running CQE recovery
        [  290.061337] blk_update_request: I/O error, dev mmcblk1, sector 1411072 op 0x1:(WRITE) flags 0x800 phys_seg 36 prio class 0
        [  290.061370] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:348: I/O error 10 writing to inode 29547 starting block 176466)
        [  290.061484] Buffer I/O error on device mmcblk1p1, logical block 172288
        [  290.061531] Buffer I/O error on device mmcblk1p1, logical block 172289
        [  290.061551] Buffer I/O error on device mmcblk1p1, logical block 172290
        [  290.061574] Buffer I/O error on device mmcblk1p1, logical block 172291
        [  290.061592] Buffer I/O error on device mmcblk1p1, logical block 172292
        [  290.061615] Buffer I/O error on device mmcblk1p1, logical block 172293
        [  290.061632] Buffer I/O error on device mmcblk1p1, logical block 172294
        [  290.061654] Buffer I/O error on device mmcblk1p1, logical block 172295
        [  290.061673] Buffer I/O error on device mmcblk1p1, logical block 172296
        [  290.061695] Buffer I/O error on device mmcblk1p1, logical block 172297
    
    Disabling the Command Queue seems to stop the CQE recovery from running,
    but doesn't seem to improve the I/O errors. Until this can be investigated
    further, disable HS400 mode on the ROCK Pi 4 SBCs to at least stop I/O
    errors from occurring.
    
    While we are here, set the eMMC maximum clock frequency to 1.5MHz to
    follow the ROCK 4C+.
    
    Fixes: 1b5715c ("arm64: dts: rockchip: add ROCK Pi 4 DTS support")
    Signed-off-by: Christopher Obbard <[email protected]>
    Tested-By: Folker Schwesinger <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Heiko Stuebner <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    obbardc authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    52d3607 View commit details
    Browse the repository at this point in the history
  138. arm64: dts: rockchip: Disable HS400 for eMMC on ROCK 4C+

    [ Upstream commit 2bd1d2d ]
    
    There is some instablity with some eMMC modules on ROCK Pi 4 SBCs running
    in HS400 mode. This ends up resulting in some block errors after a while
    or after a "heavy" operation utilising the eMMC (e.g. resizing a
    filesystem). An example of these errors is as follows:
    
        [  289.171014] mmc1: running CQE recovery
        [  290.048972] mmc1: running CQE recovery
        [  290.054834] mmc1: running CQE recovery
        [  290.060817] mmc1: running CQE recovery
        [  290.061337] blk_update_request: I/O error, dev mmcblk1, sector 1411072 op 0x1:(WRITE) flags 0x800 phys_seg 36 prio class 0
        [  290.061370] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:348: I/O error 10 writing to inode 29547 starting block 176466)
        [  290.061484] Buffer I/O error on device mmcblk1p1, logical block 172288
        [  290.061531] Buffer I/O error on device mmcblk1p1, logical block 172289
        [  290.061551] Buffer I/O error on device mmcblk1p1, logical block 172290
        [  290.061574] Buffer I/O error on device mmcblk1p1, logical block 172291
        [  290.061592] Buffer I/O error on device mmcblk1p1, logical block 172292
        [  290.061615] Buffer I/O error on device mmcblk1p1, logical block 172293
        [  290.061632] Buffer I/O error on device mmcblk1p1, logical block 172294
        [  290.061654] Buffer I/O error on device mmcblk1p1, logical block 172295
        [  290.061673] Buffer I/O error on device mmcblk1p1, logical block 172296
        [  290.061695] Buffer I/O error on device mmcblk1p1, logical block 172297
    
    Disabling the Command Queue seems to stop the CQE recovery from running,
    but doesn't seem to improve the I/O errors. Until this can be investigated
    further, disable HS400 mode on the ROCK Pi 4 SBCs to at least stop I/O
    errors from occurring.
    
    Fixes: 2464503 ("arm64: dts: rockchip: rk3399: Radxa ROCK 4C+")
    Signed-off-by: Christopher Obbard <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Heiko Stuebner <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    obbardc authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    66d761a View commit details
    Browse the repository at this point in the history
  139. ARM: dts: imx: align LED node names with dtschema

    [ Upstream commit 4b0d1f2 ]
    
    The node names should be generic and DT schema expects certain pattern:
    
      imx50-kobo-aura.dtb: gpio-leds: 'on' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+'
      imx6dl-yapp4-draco.dtb: led-controller@30: 'chan@0', 'chan@1', 'chan@2' do not match any of the regexes: '^led@[0-8]$', '^multi-led@[0-8]$', 'pinctrl-[0-9]+'
    
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Shawn Guo <[email protected]>
    Stable-dep-of: 762b700 ("ARM: dts: imx6: phytec: fix RTC interrupt level")
    Signed-off-by: Sasha Levin <[email protected]>
    krzk authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d2d6d51 View commit details
    Browse the repository at this point in the history
  140. ARM: dts: imx6: phytec: fix RTC interrupt level

    [ Upstream commit 762b700 ]
    
    RTC interrupt level should be set to "LOW". This was revealed by the
    introduction of commit:
    
      f181987 ("rtc: m41t80: use IRQ flags obtained from fwnode")
    
    which changed the way IRQ type is obtained.
    
    Signed-off-by: Andrej Picej <[email protected]>
    Reviewed-by: Stefan Riedmüller <[email protected]>
    Fixes: 800d595 ("ARM: dts: imx6: Add initial support for phyBOARD-Mira")
    Signed-off-by: Shawn Guo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    andrejpicej authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ca69bb1 View commit details
    Browse the repository at this point in the history
  141. arm64: dts: imx8mm: Drop CSI1 PHY reference clock configuration

    [ Upstream commit f02b533 ]
    
    The CSI1 PHY reference clock is limited to 125 MHz according to:
    i.MX 8M Mini Applications Processor Reference Manual, Rev. 3, 11/2020
    Table 5-1. Clock Root Table (continued) / page 307
    Slice Index n = 123 .
    
    Currently the IMX8MM_CLK_CSI1_PHY_REF clock is configured to be
    fed directly from 1 GHz PLL2 , which overclocks them. Instead, drop
    the configuration altogether, which defaults the clock to 24 MHz REF
    clock input, which for the PHY reference clock is just fine.
    
    Based on a patch from Marek Vasut for the imx8mn.
    
    Fixes: e523b7c ("arm64: dts: imx8mm: Add CSI nodes")
    Signed-off-by: Fabio Estevam <[email protected]>
    Reviewed-by: Marek Vasut <[email protected]>
    Reviewed-by: Marco Felsch <[email protected]>
    Reviewed-by: Adam Ford <[email protected]>
    Signed-off-by: Shawn Guo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Fabio Estevam authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    6777c43 View commit details
    Browse the repository at this point in the history
  142. ARM: dts: imx: Set default tuning step for imx6sx usdhc

    [ Upstream commit 0a2b96e ]
    
    If the tuning step is not set, the tuning step is set to 1.
    For some sd cards, the following Tuning timeout will occur.
    
    Tuning failed, falling back to fixed sampling clock
    
    So set the default tuning step. This refers to the NXP vendor's
    commit below:
    
    https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/
    arch/arm/boot/dts/imx6sx.dtsi#L1108-L1109
    
    Fixes: 1e336aa ("mmc: sdhci-esdhc-imx: correct the tuning start tap and step setting")
    Signed-off-by: Xiaolei Wang <[email protected]>
    Reviewed-by: Fabio Estevam <[email protected]>
    Signed-off-by: Shawn Guo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    xiaoleiwang123456 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9ba52bd View commit details
    Browse the repository at this point in the history
  143. arm64: dts: imx93: Fix anatop node size

    [ Upstream commit 78e869d ]
    
    Although the memory map of i.MX93 reference manual rev. 2 claims that
    analog top has start address of 0x44480000 and end address of 0x4448ffff,
    this overlaps with TMU memory area starting at 0x44482000, as stated in
    section 73.6.1.
    As PLL configuration registers start at addresses up to 0x44481400, as used
    by clk-imx93, reduce the anatop size to 0x2000, so exclude the TMU area
    but keep all PLL registers inside.
    
    Fixes: ec8b5b5 ("arm64: dts: freescale: Add i.MX93 dtsi support")
    Signed-off-by: Alexander Stein <[email protected]>
    Reviewed-by: Peng Fan <[email protected]>
    Reviewed-by: Jacky Bai <[email protected]>
    Signed-off-by: Shawn Guo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tq-steina authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    2b34636 View commit details
    Browse the repository at this point in the history
  144. ASoC: rt5665: add missed regulator_bulk_disable

    [ Upstream commit c163108 ]
    
    The driver forgets to call regulator_bulk_disable()
    
    Add the missed call to fix it.
    
    Fixes: 33ada14 ("ASoC: add rt5665 codec driver")
    Signed-off-by: Zhang Shurong <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ZhangShurong authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f045100 View commit details
    Browse the repository at this point in the history
  145. ASoC: meson: axg-tdm-formatter: fix channel slot allocation

    [ Upstream commit c1f848f ]
    
    When the tdm lane mask is computed, the driver currently fills the 1st lane
    before moving on to the next. If the stream has less channels than the
    lanes can accommodate, slots will be disabled on the last lanes.
    
    Unfortunately, the HW distribute channels in a different way. It distribute
    channels in pair on each lanes before moving on the next slots.
    
    This difference leads to problems if a device has an interface with more
    than 1 lane and with more than 2 slots per lane.
    
    For example: a playback interface with 2 lanes and 4 slots each (total 8
    slots - zero based numbering)
    - Playing a 8ch stream:
      - All slots activated by the driver
      - channel #2 will be played on lane #1 - slot #0 following HW placement
    - Playing a 4ch stream:
      - Lane #1 disabled by the driver
      - channel #2 will be played on lane #0 - slot #2
    
    This behaviour is obviously not desirable.
    
    Change the way slots are activated on the TDM lanes to follow what the HW
    does and make sure each channel always get mapped to the same slot/lane.
    
    Fixes: 1a11d88 ("ASoC: meson: add tdm formatter base driver")
    Signed-off-by: Jerome Brunet <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jbrun3t authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    7b04146 View commit details
    Browse the repository at this point in the history
  146. ALSA: hda/realtek: Add quirks for HP G11 Laptops

    [ Upstream commit fb8cce6 ]
    
    These HP G11 laptops use Realtek HDA codec combined with
    2xCS35L41 Amplifiers using SPI or I2C with External Boost.
    
    Laptop 103c8c26 has been removed as this has been replaced
    by this new series of laptops.
    
    Fixes: 3e10f6c ("ALSA: hda/realtek: Add quirk for HP EliteBook G10 laptops")
    Signed-off-by: Stefan Binding <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Stefan Binding authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    6c889d2 View commit details
    Browse the repository at this point in the history
  147. soc: aspeed: uart-routing: Use __sysfs_match_string

    [ Upstream commit e4ad279 ]
    
    The existing use of match_string() caused it to reject 'echo foo' due
    to the implicitly appended newline, which was somewhat ergonomically
    awkward and inconsistent with typical sysfs behavior.  Using the
    __sysfs_* variant instead provides more convenient and consistent
    linefeed-agnostic behavior.
    
    Signed-off-by: Zev Weiss <[email protected]>
    Fixes: c680797 ("soc: aspeed: Add UART routing support")
    Reviewed-by: Joel Stanley <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Joel Stanley <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zevweiss authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    15db1e5 View commit details
    Browse the repository at this point in the history
  148. soc: aspeed: socinfo: Add kfree for kstrdup

    [ Upstream commit 6e6d847 ]
    
    Add kfree() in the later error handling in order to avoid memory leak.
    
    Fixes: e0218dc ("soc: aspeed: Add soc info driver")
    Signed-off-by: Jiasheng Jiang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Joel Stanley <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    JiangJias authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b662856 View commit details
    Browse the repository at this point in the history
  149. ALSA: hda/realtek - Remodified 3k pull low procedure

    [ Upstream commit 46cdff2 ]
    
    Set spec->en_3kpull_low default to true.
    Then fillback ALC236 and ALC257 to false.
    
    Additional note: this addresses a regression caused by the previous
    fix 69ea4c9 ("ALSA: hda/realtek - remove 3k pull low procedure").
    The previous workaround was applied too widely without necessity,
    which resulted in the pop noise at PM again.  This patch corrects the
    condition and restores the old behavior for the devices that don't
    suffer from the original problem.
    
    Fixes: 69ea4c9 ("ALSA: hda/realtek - remove 3k pull low procedure")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=217732
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Kailang Yang <[email protected]>
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    KailangYang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ea65d78 View commit details
    Browse the repository at this point in the history
  150. riscv: uaccess: Return the number of bytes effectively not copied

    [ Upstream commit 4b05b99 ]
    
    It was reported that the riscv kernel hangs while executing the test
    in [1].
    
    Indeed, the test hangs when trying to write a buffer to a file. The
    problem is that the riscv implementation of raw_copy_from_user() does not
    return the correct number of bytes not written when an exception happens
    and is fixed up, instead it always returns the initial size to copy,
    even if some bytes were actually copied.
    
    generic_perform_write() pre-faults the user pages and bails out if nothing
    can be written, otherwise it will access the userspace buffer: here the
    riscv implementation keeps returning it was not able to copy any byte
    though the pre-faulting indicates otherwise. So generic_perform_write()
    keeps retrying to access the user memory and ends up in an infinite
    loop.
    
    Note that before the commit mentioned in [1] that introduced this
    regression, it worked because generic_perform_write() would bail out if
    only one byte could not be written.
    
    So fix this by returning the number of bytes effectively not written in
    __asm_copy_[to|from]_user() and __clear_user(), as it is expected.
    
    Link: https://lore.kernel.org/linux-riscv/20230309151841.bomov6hq3ybyp42a@debian/ [1]
    Fixes: ebcbd75 ("riscv: Fix the bug in memory access fixup code")
    Reported-by: Bo YU <[email protected]>
    Closes: https://lore.kernel.org/linux-riscv/20230309151841.bomov6hq3ybyp42a@debian/#t
    Reported-by: Aurelien Jarno <[email protected]>
    Closes: https://lore.kernel.org/linux-riscv/[email protected]/
    Signed-off-by: Alexandre Ghiti <[email protected]>
    Reviewed-by: Björn Töpel <[email protected]>
    Tested-by: Aurelien Jarno <[email protected]>
    Reviewed-by: Aurelien Jarno <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Alexandre Ghiti authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    af7ca7a View commit details
    Browse the repository at this point in the history
  151. serial: 8250: Fix oops for port->pm on uart_change_pm()

    [ Upstream commit dfe2aeb ]
    
    Unloading a hardware specific 8250 driver can produce error "Unable to
    handle kernel paging request at virtual address" about ten seconds after
    unloading the driver. This happens on uart_hangup() calling
    uart_change_pm().
    
    Turns out commit 04e8279 ("serial: 8250: Reinit port->pm on port
    specific driver unbind") was only a partial fix. If the hardware specific
    driver has initialized port->pm function, we need to clear port->pm too.
    Just reinitializing port->ops does not do this. Otherwise serial8250_pm()
    will call port->pm() instead of serial8250_do_pm().
    
    Fixes: 04e8279 ("serial: 8250: Reinit port->pm on port specific driver unbind")
    Signed-off-by: Tony Lindgren <[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]>
    tmlind authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    0c05493 View commit details
    Browse the repository at this point in the history
  152. ALSA: usb-audio: Add support for Mythware XA001AU capture and playbac…

    …k interfaces.
    
    commit 788449a upstream.
    
    This patch adds a USB quirk for Mythware XA001AU USB interface.
    
    Signed-off-by: dengxiang <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dengxiang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    bfd25f5 View commit details
    Browse the repository at this point in the history
  153. cifs: Release folio lock on fscache read hit.

    commit 69513dd upstream.
    
    Under the current code, when cifs_readpage_worker is called, the call
    contract is that the callee should unlock the page. This is documented
    in the read_folio section of Documentation/filesystems/vfs.rst as:
    
    > The filesystem should unlock the folio once the read has completed,
    > whether it was successful or not.
    
    Without this change, when fscache is in use and cache hit occurs during
    a read, the page lock is leaked, producing the following stack on
    subsequent reads (via mmap) to the page:
    
    $ cat /proc/3890/task/12864/stack
    [<0>] folio_wait_bit_common+0x124/0x350
    [<0>] filemap_read_folio+0xad/0xf0
    [<0>] filemap_fault+0x8b1/0xab0
    [<0>] __do_fault+0x39/0x150
    [<0>] do_fault+0x25c/0x3e0
    [<0>] __handle_mm_fault+0x6ca/0xc70
    [<0>] handle_mm_fault+0xe9/0x350
    [<0>] do_user_addr_fault+0x225/0x6c0
    [<0>] exc_page_fault+0x84/0x1b0
    [<0>] asm_exc_page_fault+0x27/0x30
    
    This requires a reboot to resolve; it is a deadlock.
    
    Note however that the call to cifs_readpage_from_fscache does mark the
    page clean, but does not free the folio lock. This happens in
    __cifs_readpage_from_fscache on success. Releasing the lock at that
    point however is not appropriate as cifs_readahead also calls
    cifs_readpage_from_fscache and *does* unconditionally release the lock
    after its return. This change therefore effectively makes
    cifs_readpage_worker work like cifs_readahead.
    
    Signed-off-by: Russell Harmon <[email protected]>
    Acked-by: Paulo Alcantara (SUSE) <[email protected]>
    Reviewed-by: David Howells <[email protected]>
    Cc: [email protected]
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Russell Harmon via samba-technical authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9e72538 View commit details
    Browse the repository at this point in the history
  154. virtio-net: Zero max_tx_vq field for VIRTIO_NET_CTRL_MQ_HASH_CONFIG case

    commit 2c507ce upstream.
    
    Kernel uses `struct virtio_net_ctrl_rss` to save command-specific-data
    for both the VIRTIO_NET_CTRL_MQ_HASH_CONFIG and
    VIRTIO_NET_CTRL_MQ_RSS_CONFIG commands.
    
    According to the VirtIO standard, "Field reserved MUST contain zeroes.
    It is defined to make the structure to match the layout of
    virtio_net_rss_config structure, defined in 5.1.6.5.7.".
    
    Yet for the VIRTIO_NET_CTRL_MQ_HASH_CONFIG command case, the `max_tx_vq`
    field in struct virtio_net_ctrl_rss, which corresponds to the
    `reserved` field in struct virtio_net_hash_config, is not zeroed,
    thereby violating the VirtIO standard.
    
    This patch solves this problem by zeroing this field in
    virtnet_init_default_rss().
    
    Cc: Andrew Melnychenko <[email protected]>
    Cc: [email protected]
    Fixes: c7114b1 ("drivers/net/virtio_net: Added basic RSS support.")
    Signed-off-by: Hawkins Jiawei <[email protected]>
    Acked-by: Jason Wang <[email protected]>
    Acked-by: Eugenio Pérez <[email protected]>
    Acked-by: Michael S. Tsirkin <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Michael S. Tsirkin <[email protected]>
    Reviewed-by: Xuan Zhuo <[email protected]>
    Acked-by: Jason Wang <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    JiaweiHawk authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    fc66f81 View commit details
    Browse the repository at this point in the history
  155. arm64: dts: rockchip: Fix Wifi/Bluetooth on ROCK Pi 4 boards

    commit ebceec2 upstream.
    
    This patch fixes an issue affecting the Wifi/Bluetooth connectivity on
    ROCK Pi 4 boards. Commit f471b1b ("arm64: dts: rockchip: Fix Bluetooth
    on ROCK Pi 4 boards") introduced a problem with the clock configuration.
    Specifically, the clock-names property of the sdio-pwrseq node was not
    updated to 'lpo', causing the driver to wait indefinitely for the wrong clock
    signal 'ext_clock' instead of the expected one 'lpo'. This prevented the proper
    initialization of Wifi/Bluetooth chip on ROCK Pi 4 boards.
    
    To address this, this patch updates the clock-names property of the
    sdio-pwrseq node to "lpo" to align with the changes made to the bluetooth node.
    
    This patch has been tested on ROCK Pi 4B.
    
    Fixes: f471b1b ("arm64: dts: rockchip: Fix Bluetooth on ROCK Pi 4 boards")
    Cc: [email protected]
    Signed-off-by: Yogesh Hegde <[email protected]>
    Link: https://lore.kernel.org/r/ZLbATQRjOl09aLAp@zephyrusG14
    Signed-off-by: Heiko Stuebner <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Yogesh Hegde authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    65bcb07 View commit details
    Browse the repository at this point in the history
  156. blk-crypto: dynamically allocate fallback profile

    commit c984ff1 upstream.
    
    blk_crypto_profile_init() calls lockdep_register_key(), which warns and
    does not register if the provided memory is a static object.
    blk-crypto-fallback currently has a static blk_crypto_profile and calls
    blk_crypto_profile_init() thereupon, resulting in the warning and
    failure to register.
    
    Fortunately it is simple enough to use a dynamically allocated profile
    and make lockdep function correctly.
    
    Fixes: 2fb48d8 ("blk-crypto: use dynamic lock class for blk_crypto_profile::lock")
    Cc: [email protected]
    Signed-off-by: Sweet Tea Dorminy <[email protected]>
    Reviewed-by: Eric Biggers <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sweettea authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8ad3bfd View commit details
    Browse the repository at this point in the history
  157. mmc: wbsd: fix double mmc_free_host() in wbsd_init()

    commit d830354 upstream.
    
    mmc_free_host() has already be called in wbsd_free_mmc(),
    remove the mmc_free_host() in error path in wbsd_init().
    
    Fixes: dc5b9b5 ("mmc: wbsd: fix return value check of mmc_add_host()")
    Signed-off-by: Yang Yingliang <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Yang Yingliang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    dccd07b View commit details
    Browse the repository at this point in the history
  158. mmc: block: Fix in_flight[issue_type] value error

    commit 4b430d4 upstream.
    
    For a completed request, after the mmc_blk_mq_complete_rq(mq, req)
    function is executed, the bitmap_tags corresponding to the
    request will be cleared, that is, the request will be regarded as
    idle. If the request is acquired by a different type of process at
    this time, the issue_type of the request may change. It further
    caused the value of mq->in_flight[issue_type] to be abnormal,
    and a large number of requests could not be sent.
    
    p1:					      p2:
    mmc_blk_mq_complete_rq
      blk_mq_free_request
    					      blk_mq_get_request
    					        blk_mq_rq_ctx_init
    mmc_blk_mq_dec_in_flight
      mmc_issue_type(mq, req)
    
    This strategy can ensure the consistency of issue_type
    before and after executing mmc_blk_mq_complete_rq.
    
    Fixes: 8119697 ("mmc: block: Add blk-mq support")
    Cc: [email protected]
    Signed-off-by: Yibin Ding <[email protected]>
    Acked-by: Adrian Hunter <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Yibin Ding authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5818da4 View commit details
    Browse the repository at this point in the history
  159. drm/qxl: fix UAF on handle creation

    commit c611589 upstream.
    
    qxl_mode_dumb_create() dereferences the qobj returned by
    qxl_gem_object_create_with_handle(), but the handle is the only one
    holding a reference to it.
    
    A potential attacker could guess the returned handle value and closes it
    between the return of qxl_gem_object_create_with_handle() and the qobj
    usage, triggering a use-after-free scenario.
    
    Reproducer:
    
    int dri_fd =-1;
    struct drm_mode_create_dumb arg = {0};
    
    void gem_close(int handle);
    
    void* trigger(void* ptr)
    {
    	int ret;
    	arg.width = arg.height = 0x20;
    	arg.bpp = 32;
    	ret = ioctl(dri_fd, DRM_IOCTL_MODE_CREATE_DUMB, &arg);
    	if(ret)
    	{
    		perror("[*] DRM_IOCTL_MODE_CREATE_DUMB Failed");
    		exit(-1);
    	}
    	gem_close(arg.handle);
    	while(1) {
    		struct drm_mode_create_dumb args = {0};
    		args.width = args.height = 0x20;
    		args.bpp = 32;
    		ret = ioctl(dri_fd, DRM_IOCTL_MODE_CREATE_DUMB, &args);
    		if (ret) {
    			perror("[*] DRM_IOCTL_MODE_CREATE_DUMB Failed");
    			exit(-1);
    		}
    
    		printf("[*] DRM_IOCTL_MODE_CREATE_DUMB created, %d\n", args.handle);
    		gem_close(args.handle);
    	}
    	return NULL;
    }
    
    void gem_close(int handle)
    {
    	struct drm_gem_close args;
    	args.handle = handle;
    	int ret = ioctl(dri_fd, DRM_IOCTL_GEM_CLOSE, &args); // gem close handle
    	if (!ret)
    		printf("gem close handle %d\n", args.handle);
    }
    
    int main(void)
    {
    	dri_fd= open("/dev/dri/card0", O_RDWR);
    	printf("fd:%d\n", dri_fd);
    
    	if(dri_fd == -1)
    		return -1;
    
    	pthread_t tid1;
    
    	if(pthread_create(&tid1,NULL,trigger,NULL)){
    		perror("[*] thread_create tid1\n");
    		return -1;
    	}
    	while (1)
    	{
    		gem_close(arg.handle);
    	}
    	return 0;
    }
    
    This is a KASAN report:
    
    ==================================================================
    BUG: KASAN: slab-use-after-free in qxl_mode_dumb_create+0x3c2/0x400 linux/drivers/gpu/drm/qxl/qxl_dumb.c:69
    Write of size 1 at addr ffff88801136c240 by task poc/515
    
    CPU: 1 PID: 515 Comm: poc Not tainted 6.3.0 #3
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
    Call Trace:
    <TASK>
    __dump_stack linux/lib/dump_stack.c:88
    dump_stack_lvl+0x48/0x70 linux/lib/dump_stack.c:106
    print_address_description linux/mm/kasan/report.c:319
    print_report+0xd2/0x660 linux/mm/kasan/report.c:430
    kasan_report+0xd2/0x110 linux/mm/kasan/report.c:536
    __asan_report_store1_noabort+0x17/0x30 linux/mm/kasan/report_generic.c:383
    qxl_mode_dumb_create+0x3c2/0x400 linux/drivers/gpu/drm/qxl/qxl_dumb.c:69
    drm_mode_create_dumb linux/drivers/gpu/drm/drm_dumb_buffers.c:96
    drm_mode_create_dumb_ioctl+0x1f5/0x2d0 linux/drivers/gpu/drm/drm_dumb_buffers.c:102
    drm_ioctl_kernel+0x21d/0x430 linux/drivers/gpu/drm/drm_ioctl.c:788
    drm_ioctl+0x56f/0xcc0 linux/drivers/gpu/drm/drm_ioctl.c:891
    vfs_ioctl linux/fs/ioctl.c:51
    __do_sys_ioctl linux/fs/ioctl.c:870
    __se_sys_ioctl linux/fs/ioctl.c:856
    __x64_sys_ioctl+0x13d/0x1c0 linux/fs/ioctl.c:856
    do_syscall_x64 linux/arch/x86/entry/common.c:50
    do_syscall_64+0x5b/0x90 linux/arch/x86/entry/common.c:80
    entry_SYSCALL_64_after_hwframe+0x72/0xdc linux/arch/x86/entry/entry_64.S:120
    RIP: 0033:0x7ff5004ff5f7
    Code: 00 00 00 48 8b 05 99 c8 0d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 69 c8 0d 00 f7 d8 64 89 01 48
    
    RSP: 002b:00007ff500408ea8 EFLAGS: 00000286 ORIG_RAX: 0000000000000010
    RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff5004ff5f7
    RDX: 00007ff500408ec0 RSI: 00000000c02064b2 RDI: 0000000000000003
    RBP: 00007ff500408ef0 R08: 0000000000000000 R09: 000000000000002a
    R10: 0000000000000000 R11: 0000000000000286 R12: 00007fff1c6cdafe
    R13: 00007fff1c6cdaff R14: 00007ff500408fc0 R15: 0000000000802000
    </TASK>
    
    Allocated by task 515:
    kasan_save_stack+0x38/0x70 linux/mm/kasan/common.c:45
    kasan_set_track+0x25/0x40 linux/mm/kasan/common.c:52
    kasan_save_alloc_info+0x1e/0x40 linux/mm/kasan/generic.c:510
    ____kasan_kmalloc linux/mm/kasan/common.c:374
    __kasan_kmalloc+0xc3/0xd0 linux/mm/kasan/common.c:383
    kasan_kmalloc linux/./include/linux/kasan.h:196
    kmalloc_trace+0x48/0xc0 linux/mm/slab_common.c:1066
    kmalloc linux/./include/linux/slab.h:580
    kzalloc linux/./include/linux/slab.h:720
    qxl_bo_create+0x11a/0x610 linux/drivers/gpu/drm/qxl/qxl_object.c:124
    qxl_gem_object_create+0xd9/0x360 linux/drivers/gpu/drm/qxl/qxl_gem.c:58
    qxl_gem_object_create_with_handle+0xa1/0x180 linux/drivers/gpu/drm/qxl/qxl_gem.c:89
    qxl_mode_dumb_create+0x1cd/0x400 linux/drivers/gpu/drm/qxl/qxl_dumb.c:63
    drm_mode_create_dumb linux/drivers/gpu/drm/drm_dumb_buffers.c:96
    drm_mode_create_dumb_ioctl+0x1f5/0x2d0 linux/drivers/gpu/drm/drm_dumb_buffers.c:102
    drm_ioctl_kernel+0x21d/0x430 linux/drivers/gpu/drm/drm_ioctl.c:788
    drm_ioctl+0x56f/0xcc0 linux/drivers/gpu/drm/drm_ioctl.c:891
    vfs_ioctl linux/fs/ioctl.c:51
    __do_sys_ioctl linux/fs/ioctl.c:870
    __se_sys_ioctl linux/fs/ioctl.c:856
    __x64_sys_ioctl+0x13d/0x1c0 linux/fs/ioctl.c:856
    do_syscall_x64 linux/arch/x86/entry/common.c:50
    do_syscall_64+0x5b/0x90 linux/arch/x86/entry/common.c:80
    entry_SYSCALL_64_after_hwframe+0x72/0xdc linux/arch/x86/entry/entry_64.S:120
    
    Freed by task 515:
    kasan_save_stack+0x38/0x70 linux/mm/kasan/common.c:45
    kasan_set_track+0x25/0x40 linux/mm/kasan/common.c:52
    kasan_save_free_info+0x2e/0x60 linux/mm/kasan/generic.c:521
    ____kasan_slab_free linux/mm/kasan/common.c:236
    ____kasan_slab_free+0x180/0x1f0 linux/mm/kasan/common.c:200
    __kasan_slab_free+0x12/0x30 linux/mm/kasan/common.c:244
    kasan_slab_free linux/./include/linux/kasan.h:162
    slab_free_hook linux/mm/slub.c:1781
    slab_free_freelist_hook+0xd2/0x1a0 linux/mm/slub.c:1807
    slab_free linux/mm/slub.c:3787
    __kmem_cache_free+0x196/0x2d0 linux/mm/slub.c:3800
    kfree+0x78/0x120 linux/mm/slab_common.c:1019
    qxl_ttm_bo_destroy+0x140/0x1a0 linux/drivers/gpu/drm/qxl/qxl_object.c:49
    ttm_bo_release+0x678/0xa30 linux/drivers/gpu/drm/ttm/ttm_bo.c:381
    kref_put linux/./include/linux/kref.h:65
    ttm_bo_put+0x50/0x80 linux/drivers/gpu/drm/ttm/ttm_bo.c:393
    qxl_gem_object_free+0x3e/0x60 linux/drivers/gpu/drm/qxl/qxl_gem.c:42
    drm_gem_object_free+0x5c/0x90 linux/drivers/gpu/drm/drm_gem.c:974
    kref_put linux/./include/linux/kref.h:65
    __drm_gem_object_put linux/./include/drm/drm_gem.h:431
    drm_gem_object_put linux/./include/drm/drm_gem.h:444
    qxl_gem_object_create_with_handle+0x151/0x180 linux/drivers/gpu/drm/qxl/qxl_gem.c:100
    qxl_mode_dumb_create+0x1cd/0x400 linux/drivers/gpu/drm/qxl/qxl_dumb.c:63
    drm_mode_create_dumb linux/drivers/gpu/drm/drm_dumb_buffers.c:96
    drm_mode_create_dumb_ioctl+0x1f5/0x2d0 linux/drivers/gpu/drm/drm_dumb_buffers.c:102
    drm_ioctl_kernel+0x21d/0x430 linux/drivers/gpu/drm/drm_ioctl.c:788
    drm_ioctl+0x56f/0xcc0 linux/drivers/gpu/drm/drm_ioctl.c:891
    vfs_ioctl linux/fs/ioctl.c:51
    __do_sys_ioctl linux/fs/ioctl.c:870
    __se_sys_ioctl linux/fs/ioctl.c:856
    __x64_sys_ioctl+0x13d/0x1c0 linux/fs/ioctl.c:856
    do_syscall_x64 linux/arch/x86/entry/common.c:50
    do_syscall_64+0x5b/0x90 linux/arch/x86/entry/common.c:80
    entry_SYSCALL_64_after_hwframe+0x72/0xdc linux/arch/x86/entry/entry_64.S:120
    
    The buggy address belongs to the object at ffff88801136c000
    which belongs to the cache kmalloc-1k of size 1024
    The buggy address is located 576 bytes inside of
    freed 1024-byte region [ffff88801136c000, ffff88801136c400)
    
    The buggy address belongs to the physical page:
    page:0000000089fc329b refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11368
    head:0000000089fc329b order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
    flags: 0xfffffc0010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff)
    raw: 000fffffc0010200 ffff888007841dc0 dead000000000122 0000000000000000
    raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
    page dumped because: kasan: bad access detected
    
    Memory state around the buggy address:
    ffff88801136c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ffff88801136c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    >ffff88801136c200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ^
    ffff88801136c280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ffff88801136c300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ==================================================================
    Disabling lock debugging due to kernel taint
    
    Instead of returning a weak reference to the qxl_bo object, return the
    created drm_gem_object and let the caller decrement the reference count
    when it no longer needs it. As a convenience, if the caller is not
    interested in the gobj object, it can pass NULL to the parameter and the
    reference counting is descremented internally.
    
    The bug and the reproducer were originally found by the Zero Day Initiative project (ZDI-CAN-20940).
    
    Link: https://www.zerodayinitiative.com/
    Signed-off-by: Wander Lairson Costa <[email protected]>
    Cc: [email protected]
    Reviewed-by: Dave Airlie <[email protected]>
    Signed-off-by: Dave Airlie <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    walac authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    a1fa8f0 View commit details
    Browse the repository at this point in the history
  160. drm/i915/sdvo: fix panel_type initialization

    commit 2002eb6 upstream.
    
    Commit 3f9ffce ("drm/i915: Do panel VBT init early if the VBT
    declares an explicit panel type") started using -1 as the value for
    unset panel_type. It gets initialized in intel_panel_init_alloc(), but
    the SDVO code never calls it.
    
    Call intel_panel_init_alloc() to initialize the panel, including the
    panel_type.
    
    Reported-by: Tomi Leppänen <[email protected]>
    Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8896
    Fixes: 3f9ffce ("drm/i915: Do panel VBT init early if the VBT declares an explicit panel type")
    Cc: Ville Syrjälä <[email protected]>
    Cc: <[email protected]> # v6.1+
    Reviewed-by: Uma Shankar <[email protected]>
    Tested-by: Tomi Leppänen <[email protected]>
    Signed-off-by: Jani Nikula <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 26e6029)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jnikula authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    df1566c View commit details
    Browse the repository at this point in the history
  161. drm/amd: flush any delayed gfxoff on suspend entry

    commit a7b7d9e upstream.
    
    DCN 3.1.4 is reported to hang on s2idle entry if graphics activity
    is happening during entry.  This is because GFXOFF was scheduled as
    delayed but RLC gets disabled in s2idle entry sequence which will
    hang GFX IP if not already in GFXOFF.
    
    To help this problem, flush any delayed work for GFXOFF early in
    s2idle entry sequence to ensure that it's off when RLC is changed.
    
    commit 4b31b92 ("drm/amdgpu: complete gfxoff allow signal during
    suspend without delay") modified power gating flow so that if called
    in s0ix that it ensured that GFXOFF wasn't put in work queue but
    instead processed immediately.
    
    This is dead code due to commit 10cb67e ("drm/amdgpu: skip
    CG/PG for gfx during S0ix") because GFXOFF will now not be explicitly
    called as part of the suspend entry code.  Remove that dead code.
    
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Tim Huang <[email protected]>
    Reviewed-by: Lijo Lazar <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e1cbd56 View commit details
    Browse the repository at this point in the history
  162. drm/amdgpu: skip fence GFX interrupts disable/enable for S0ix

    commit f1740b1 upstream.
    
    GFX v11.0.1 reported fence fallback timer expired issue on
    SDMA and GFX rings after S0ix resume. This is generated by
    EOP interrupts are disabled when S0ix suspend but fails to
    re-enable when resume because of the GFX is in GFXOFF.
    
    [  203.349571] [drm] Fence fallback timer expired on ring sdma0
    [  203.349572] [drm] Fence fallback timer expired on ring gfx_0.0.0
    [  203.861635] [drm] Fence fallback timer expired on ring gfx_0.0.0
    
    For S0ix, GFX is in GFXOFF state, avoid to touch the GFX registers
    to configure the fence driver interrupts for rings that belong to GFX.
    The interrupts configuration will be restored by GFXOFF exit.
    
    Signed-off-by: Tim Huang <[email protected]>
    Reviewed-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Tim Huang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    9c8c2cf View commit details
    Browse the repository at this point in the history
  163. drm/amdgpu/pm: fix throttle_status for other than MP1 11.0.7

    commit 6a92761 upstream.
    
    Use the right metrics table version based on the firmware.
    
    Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2720
    Reviewed-by: Evan Quan <[email protected]>
    Signed-off-by: Umio Yasuno <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Umio-Yasuno authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    7de99bf View commit details
    Browse the repository at this point in the history
  164. ASoC: amd: vangogh: select CONFIG_SND_AMD_ACP_CONFIG

    commit 812a052 upstream.
    
    The vangogh driver just gained a link time dependency that now causes
    randconfig builds to fail:
    
    x86_64-linux-ld: sound/soc/amd/vangogh/pci-acp5x.o: in function `snd_acp5x_probe':
    pci-acp5x.c:(.text+0xbb): undefined reference to `snd_amd_acp_find_config'
    
    Fixes: e89f45e ("ASoC: amd: vangogh: Add check for acp config flags in vangogh platform")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    arndb authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b2f599c View commit details
    Browse the repository at this point in the history
  165. drm/amd/display: disable RCO for DCN314

    commit 85e41f1 upstream.
    
    [Why]
    RCO is causing error messages on some DCN314 systems
    
    [How]
    Force disable RCO for DCN314
    
    Fixes: 17fbdbd ("drm/amd/display: Enable dcn314 DPP RCO")
    Reviewed-by: Nicholas Kazlauskas <[email protected]>
    Acked-by: Hamza Mahfooz <[email protected]>
    Signed-off-by: Daniel Miess <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Daniel Miess authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d4008ea View commit details
    Browse the repository at this point in the history
  166. zsmalloc: allow only one active pool compaction context

    commit d2658f2 upstream.
    
    zsmalloc pool can be compacted concurrently by many contexts,
    e.g.
    
     cc1 handle_mm_fault()
          do_anonymous_page()
           __alloc_pages_slowpath()
            try_to_free_pages()
             do_try_to_free_pages(
              lru_gen_shrink_node()
               shrink_slab()
                do_shrink_slab()
                 zs_shrinker_scan()
                  zs_compact()
    
    Pool compaction is currently (basically) single-threaded as
    it is performed under pool->lock. Having multiple compaction
    threads results in unnecessary contention, as each thread
    competes for pool->lock. This, in turn, affects all zsmalloc
    operations such as zs_malloc(), zs_map_object(), zs_free(), etc.
    
    Introduce the pool->compaction_in_progress atomic variable,
    which ensures that only one compaction context can run at a
    time. This reduces overall pool->lock contention in (corner)
    cases when many contexts attempt to shrink zspool simultaneously.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: c0547d0 ("zsmalloc: consolidate zs_pool's migrate_lock and size_class's locks")
    Signed-off-by: Sergey Senozhatsky <[email protected]>
    Reviewed-by: Yosry Ahmed <[email protected]>
    Cc: Minchan Kim <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sergey-senozhatsky authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5274bf1 View commit details
    Browse the repository at this point in the history
  167. sched/fair: unlink misfit task from cpu overutilized

    commit e5ed055 upstream.
    
    By taking into account uclamp_min, the 1:1 relation between task misfit
    and cpu overutilized is no more true as a task with a small util_avg may
    not fit a high capacity cpu because of uclamp_min constraint.
    
    Add a new state in util_fits_cpu() to reflect the case that task would fit
    a CPU except for the uclamp_min hint which is a performance requirement.
    
    Use -1 to reflect that a CPU doesn't fit only because of uclamp_min so we
    can use this new value to take additional action to select the best CPU
    that doesn't match uclamp_min hint.
    
    When util_fits_cpu() returns -1, we will continue to look for a possible
    CPU with better performance, which replaces Capacity Inversion detection
    with capacity_orig_of() - thermal_load_avg to detect a capacity inversion.
    
    Signed-off-by: Vincent Guittot <[email protected]>
    Reviewed-and-tested-by: Qais Yousef <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Reviewed-by: Dietmar Eggemann <[email protected]>
    Tested-by: Kajetan Puchalski <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Qais Yousef (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vingu-linaro authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e8acf99 View commit details
    Browse the repository at this point in the history
  168. sched/fair: Remove capacity inversion detection

    commit a2e9061 upstream.
    
    Remove the capacity inversion detection which is now handled by
    util_fits_cpu() returning -1 when we need to continue to look for a
    potential CPU with better performance.
    
    This ends up almost reverting patches below except for some comments:
    commit da07d2f ("sched/fair: Fixes for capacity inversion detection")
    commit aa69c36 ("sched/fair: Consider capacity inversion in util_fits_cpu()")
    commit 44c7b80 ("sched/fair: Detect capacity inversion")
    
    Signed-off-by: Vincent Guittot <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Qais Yousef (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vingu-linaro authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8517d73 View commit details
    Browse the repository at this point in the history
  169. drm/amd/display: Implement workaround for writing to OTG_PIXEL_RATE_D…

    …IV register
    
    commit 74fa4c8 upstream.
    
    [Why and How]
    Current implementation requires FPGA builds to take a different
    code path from DCN32 to write to OTG_PIXEL_RATE_DIV. Now that
    we have a workaround to write to OTG_PIXEL_RATE_DIV register without
    blanking display on hotplug on DCN32, we can allow the code paths for
    FPGA to be exactly the same allowing for more consistent
    testing.
    
    Reviewed-by: Alvin Lee <[email protected]>
    Acked-by: Qingqing Zhuo <[email protected]>
    Signed-off-by: Saaem Rizvi <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: "Limonciello, Mario" <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Saaem Rizvi authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    4bdfe20 View commit details
    Browse the repository at this point in the history
  170. hugetlb: do not clear hugetlb dtor until allocating vmemmap

    commit 32c8771 upstream.
    
    Patch series "Fix hugetlb free path race with memory errors".
    
    In the discussion of Jiaqi Yan's series "Improve hugetlbfs read on
    HWPOISON hugepages" the race window was discovered.
    https://lore.kernel.org/linux-mm/20230616233447.GB7371@monkey/
    
    Freeing a hugetlb page back to low level memory allocators is performed
    in two steps.
    1) Under hugetlb lock, remove page from hugetlb lists and clear destructor
    2) Outside lock, allocate vmemmap if necessary and call low level free
    Between these two steps, the hugetlb page will appear as a normal
    compound page.  However, vmemmap for tail pages could be missing.
    If a memory error occurs at this time, we could try to update page
    flags non-existant page structs.
    
    A much more detailed description is in the first patch.
    
    The first patch addresses the race window.  However, it adds a
    hugetlb_lock lock/unlock cycle to every vmemmap optimized hugetlb page
    free operation.  This could lead to slowdowns if one is freeing a large
    number of hugetlb pages.
    
    The second path optimizes the update_and_free_pages_bulk routine to only
    take the lock once in bulk operations.
    
    The second patch is technically not a bug fix, but includes a Fixes tag
    and Cc stable to avoid a performance regression.  It can be combined with
    the first, but was done separately make reviewing easier.
    
    
    This patch (of 2):
    
    Freeing a hugetlb page and releasing base pages back to the underlying
    allocator such as buddy or cma is performed in two steps:
    - remove_hugetlb_folio() is called to remove the folio from hugetlb
      lists, get a ref on the page and remove hugetlb destructor.  This
      all must be done under the hugetlb lock.  After this call, the page
      can be treated as a normal compound page or a collection of base
      size pages.
    - update_and_free_hugetlb_folio() is called to allocate vmemmap if
      needed and the free routine of the underlying allocator is called
      on the resulting page.  We can not hold the hugetlb lock here.
    
    One issue with this scheme is that a memory error could occur between
    these two steps.  In this case, the memory error handling code treats
    the old hugetlb page as a normal compound page or collection of base
    pages.  It will then try to SetPageHWPoison(page) on the page with an
    error.  If the page with error is a tail page without vmemmap, a write
    error will occur when trying to set the flag.
    
    Address this issue by modifying remove_hugetlb_folio() and
    update_and_free_hugetlb_folio() such that the hugetlb destructor is not
    cleared until after allocating vmemmap.  Since clearing the destructor
    requires holding the hugetlb lock, the clearing is done in
    remove_hugetlb_folio() if the vmemmap is present.  This saves a
    lock/unlock cycle.  Otherwise, destructor is cleared in
    update_and_free_hugetlb_folio() after allocating vmemmap.
    
    Note that this will leave hugetlb pages in a state where they are marked
    free (by hugetlb specific page flag) and have a ref count.  This is not
    a normal state.  The only code that would notice is the memory error
    code, and it is set up to retry in such a case.
    
    A subsequent patch will create a routine to do bulk processing of
    vmemmap allocation.  This will eliminate a lock/unlock cycle for each
    hugetlb page in the case where we are freeing a large number of pages.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: ad2fa37 ("mm: hugetlb: alloc the vmemmap pages associated with each HugeTLB page")
    Signed-off-by: Mike Kravetz <[email protected]>
    Reviewed-by: Muchun Song <[email protected]>
    Tested-by: Naoya Horiguchi <[email protected]>
    Cc: Axel Rasmussen <[email protected]>
    Cc: James Houghton <[email protected]>
    Cc: Jiaqi Yan <[email protected]>
    Cc: Miaohe Lin <[email protected]>
    Cc: Michal Hocko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Mike Kravetz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    mjkravetz authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    1b4ce29 View commit details
    Browse the repository at this point in the history
  171. netfilter: set default timeout to 3 secs for sctp shutdown send and r…

    …ecv state
    
    commit 9bfab6d upstream.
    
    In SCTP protocol, it is using the same timer (T2 timer) for SHUTDOWN and
    SHUTDOWN_ACK retransmission. However in sctp conntrack the default timeout
    value for SCTP_CONNTRACK_SHUTDOWN_ACK_SENT state is 3 secs while it's 300
    msecs for SCTP_CONNTRACK_SHUTDOWN_SEND/RECV state.
    
    As Paolo Valerio noticed, this might cause unwanted expiration of the ct
    entry. In my test, with 1s tc netem delay set on the NAT path, after the
    SHUTDOWN is sent, the sctp ct entry enters SCTP_CONNTRACK_SHUTDOWN_SEND
    state. However, due to 300ms (too short) delay, when the SHUTDOWN_ACK is
    sent back from the peer, the sctp ct entry has expired and been deleted,
    and then the SHUTDOWN_ACK has to be dropped.
    
    Also, it is confusing these two sysctl options always show 0 due to all
    timeout values using sec as unit:
    
      net.netfilter.nf_conntrack_sctp_timeout_shutdown_recd = 0
      net.netfilter.nf_conntrack_sctp_timeout_shutdown_sent = 0
    
    This patch fixes it by also using 3 secs for sctp shutdown send and recv
    state in sctp conntrack, which is also RTO.initial value in SCTP protocol.
    
    Note that the very short time value for SCTP_CONNTRACK_SHUTDOWN_SEND/RECV
    was probably used for a rare scenario where SHUTDOWN is sent on 1st path
    but SHUTDOWN_ACK is replied on 2nd path, then a new connection started
    immediately on 1st path. So this patch also moves from SHUTDOWN_SEND/RECV
    to CLOSE when receiving INIT in the ORIGINAL direction.
    
    Fixes: 9fb9cbb ("[NETFILTER]: Add nf_conntrack subsystem.")
    Reported-by: Paolo Valerio <[email protected]>
    Signed-off-by: Xin Long <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    lxin authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    1be35f5 View commit details
    Browse the repository at this point in the history
  172. arm64/ptrace: Ensure that SME is set up for target when writing SSVE …

    …state
    
    commit 5d0a8d2 upstream.
    
    When we use NT_ARM_SSVE to either enable streaming mode or change the
    vector length for a process we do not currently do anything to ensure that
    there is storage allocated for the SME specific register state.  If the
    task had not previously used SME or we changed the vector length then
    the task will not have had TIF_SME set or backing storage for ZA/ZT
    allocated, resulting in inconsistent register sizes when saving state
    and spurious traps which flush the newly set register state.
    
    We should set TIF_SME to disable traps and ensure that storage is
    allocated for ZA and ZT if it is not already allocated.  This requires
    modifying sme_alloc() to make the flush of any existing register state
    optional so we don't disturb existing state for ZA and ZT.
    
    Fixes: e12310a ("arm64/sme: Implement ptrace support for streaming mode SVE registers")
    Reported-by: David Spickett <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>
    Cc: <[email protected]> # 5.19.x
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Catalin Marinas <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    broonie authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    21614ba View commit details
    Browse the repository at this point in the history
  173. drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11

    commit 730d44e upstream.
    
    For SMU v13.0.4/11, driver does not need to stop RLC for S0i3,
    the firmwares will handle that properly.
    
    Signed-off-by: Tim Huang <[email protected]>
    Reviewed-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Tim Huang authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8abce61 View commit details
    Browse the repository at this point in the history
  174. drm/amdgpu: keep irq count in amdgpu_irq_disable_all

    commit 8ffd6f0 upstream.
    
    This can clean up all irq warnings because of unbalanced
    amdgpu_irq_get/put when unplugging/unbinding device, and leave
    irq count decrease in each ip fini function.
    
    Signed-off-by: Guchun Chen <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Guchun Chen authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    ab63f88 View commit details
    Browse the repository at this point in the history
  175. af_unix: Fix null-ptr-deref in unix_stream_sendpage().

    Bing-Jhong Billy Jheng reported null-ptr-deref in unix_stream_sendpage()
    with detailed analysis and a nice repro.
    
    unix_stream_sendpage() tries to add data to the last skb in the peer's
    recv queue without locking the queue.
    
    If the peer's FD is passed to another socket and the socket's FD is
    passed to the peer, there is a loop between them.  If we close both
    sockets without receiving FD, the sockets will be cleaned up by garbage
    collection.
    
    The garbage collection iterates such sockets and unlinks skb with
    FD from the socket's receive queue under the queue's lock.
    
    So, there is a race where unix_stream_sendpage() could access an skb
    locklessly that is being released by garbage collection, resulting in
    use-after-free.
    
    To avoid the issue, unix_stream_sendpage() must lock the peer's recv
    queue.
    
    Note the issue does not exist in 6.5+ thanks to the recent sendpage()
    refactoring.
    
    This patch is originally written by Linus Torvalds.
    
    BUG: unable to handle page fault for address: ffff988004dd6870
    PF: supervisor read access in kernel mode
    PF: error_code(0x0000) - not-present page
    PGD 0 P4D 0
    PREEMPT SMP PTI
    CPU: 4 PID: 297 Comm: garbage_uaf Not tainted 6.1.46 #1
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    RIP: 0010:kmem_cache_alloc_node+0xa2/0x1e0
    Code: c0 0f 84 32 01 00 00 41 83 fd ff 74 10 48 8b 00 48 c1 e8 3a 41 39 c5 0f 85 1c 01 00 00 41 8b 44 24 28 49 8b 3c 24 48 8d 4a 40 <49> 8b 1c 06 4c 89 f0 65 48 0f c7 0f 0f 94 c0 84 c0 74 a1 41 8b 44
    RSP: 0018:ffffc9000079fac0 EFLAGS: 00000246
    RAX: 0000000000000070 RBX: 0000000000000005 RCX: 000000000001a284
    RDX: 000000000001a244 RSI: 0000000000400cc0 RDI: 000000000002eee0
    RBP: 0000000000400cc0 R08: 0000000000400cc0 R09: 0000000000000003
    R10: 0000000000000001 R11: 0000000000000000 R12: ffff888003970f00
    R13: 00000000ffffffff R14: ffff988004dd6800 R15: 00000000000000e8
    FS:  00007f174d6f3600(0000) GS:ffff88807db00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: ffff988004dd6870 CR3: 00000000092be000 CR4: 00000000007506e0
    PKRU: 55555554
    Call Trace:
     <TASK>
     ? __die_body.cold+0x1a/0x1f
     ? page_fault_oops+0xa9/0x1e0
     ? fixup_exception+0x1d/0x310
     ? exc_page_fault+0xa8/0x150
     ? asm_exc_page_fault+0x22/0x30
     ? kmem_cache_alloc_node+0xa2/0x1e0
     ? __alloc_skb+0x16c/0x1e0
     __alloc_skb+0x16c/0x1e0
     alloc_skb_with_frags+0x48/0x1e0
     sock_alloc_send_pskb+0x234/0x270
     unix_stream_sendmsg+0x1f5/0x690
     sock_sendmsg+0x5d/0x60
     ____sys_sendmsg+0x210/0x260
     ___sys_sendmsg+0x83/0xd0
     ? kmem_cache_alloc+0xc6/0x1c0
     ? avc_disable+0x20/0x20
     ? percpu_counter_add_batch+0x53/0xc0
     ? alloc_empty_file+0x5d/0xb0
     ? alloc_file+0x91/0x170
     ? alloc_file_pseudo+0x94/0x100
     ? __fget_light+0x9f/0x120
     __sys_sendmsg+0x54/0xa0
     do_syscall_64+0x3b/0x90
     entry_SYSCALL_64_after_hwframe+0x69/0xd3
    RIP: 0033:0x7f174d639a7d
    Code: 28 89 54 24 1c 48 89 74 24 10 89 7c 24 08 e8 8a c1 f4 ff 8b 54 24 1c 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 33 44 89 c7 48 89 44 24 08 e8 de c1 f4 ff 48
    RSP: 002b:00007ffcb563ea50 EFLAGS: 00000293 ORIG_RAX: 000000000000002e
    RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f174d639a7d
    RDX: 0000000000000000 RSI: 00007ffcb563eab0 RDI: 0000000000000007
    RBP: 00007ffcb563eb10 R08: 0000000000000000 R09: 00000000ffffffff
    R10: 00000000004040a0 R11: 0000000000000293 R12: 00007ffcb563ec28
    R13: 0000000000401398 R14: 0000000000403e00 R15: 00007f174d72c000
     </TASK>
    
    Fixes: 869e7c6 ("net: af_unix: implement stream sendpage support")
    Reported-by: Bing-Jhong Billy Jheng <[email protected]>
    Reviewed-by: Bing-Jhong Billy Jheng <[email protected]>
    Co-developed-by: Linus Torvalds <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    q2ven authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    790c2f9 View commit details
    Browse the repository at this point in the history
  176. drm/nouveau/disp: fix use-after-free in error handling of nouveau_con…

    …nector_create
    
    commit 1b254b7 upstream.
    
    We can't simply free the connector after calling drm_connector_init on it.
    We need to clean up the drm side first.
    
    It might not fix all regressions from commit 2b5d1c2
    ("drm/nouveau/disp: PIOR DP uses GPIO for HPD, not PMGR AUX interrupts"),
    but at least it fixes a memory corruption in error handling related to
    that commit.
    
    Link: https://lore.kernel.org/lkml/20230806213107.GFZNARG6moWpFuSJ9W@fat_crate.local/
    Fixes: 95983ae ("drm/nouveau/disp: add connector class")
    Signed-off-by: Karol Herbst <[email protected]>
    Reviewed-by: Lyude Paul <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Karol Herbst <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    karolherbst authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    3f27451 View commit details
    Browse the repository at this point in the history
  177. net: fix the RTO timer retransmitting skb every 1ms if linear option …

    …is enabled
    
    commit e4dd0d3 upstream.
    
    In the real workload, I encountered an issue which could cause the RTO
    timer to retransmit the skb per 1ms with linear option enabled. The amount
    of lost-retransmitted skbs can go up to 1000+ instantly.
    
    The root cause is that if the icsk_rto happens to be zero in the 6th round
    (which is the TCP_THIN_LINEAR_RETRIES value), then it will always be zero
    due to the changed calculation method in tcp_retransmit_timer() as follows:
    
    icsk->icsk_rto = min(icsk->icsk_rto << 1, TCP_RTO_MAX);
    
    Above line could be converted to
    icsk->icsk_rto = min(0 << 1, TCP_RTO_MAX) = 0
    
    Therefore, the timer expires so quickly without any doubt.
    
    I read through the RFC 6298 and found that the RTO value can be rounded
    up to a certain value, in Linux, say TCP_RTO_MIN as default, which is
    regarded as the lower bound in this patch as suggested by Eric.
    
    Fixes: 36e31b0 ("net: TCP thin linear timeouts")
    Suggested-by: Eric Dumazet <[email protected]>
    Signed-off-by: Jason Xing <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    JasonXing authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b2c55af View commit details
    Browse the repository at this point in the history
  178. mmc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove

    commit 58abdd8 upstream.
    
    The order of function calls in sdhci_f_sdh30_remove is wrong,
    let's call sdhci_pltfm_unregister first.
    
    Cc: Uwe Kleine-König <[email protected]>
    Fixes: 5def5c1 ("mmc: sdhci-f-sdh30: Replace with sdhci_pltfm")
    Signed-off-by: Yangtao Li <[email protected]>
    Reported-by: Uwe Kleine-König <[email protected]>
    Acked-by: Uwe Kleine-König <[email protected]>
    Acked-by: Adrian Hunter <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bbkzz authored and gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    0768ecc View commit details
    Browse the repository at this point in the history
  179. Linux 6.1.47

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Joel Fernandes (Google) <[email protected]>
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Bagas Sanjaya <[email protected]>
    Tested-by: SeongJae Park <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Sudip Mukherjee <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    802aacb View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2023

  1. x86/cpu: Fix __x86_return_thunk symbol type

    commit 77f6711 upstream.
    
    Commit
    
      fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation")
    
    reimplemented __x86_return_thunk with a mix of SYM_FUNC_START and
    SYM_CODE_END, this is not a sane combination.
    
    Since nothing should ever actually 'CALL' this, make it consistently
    CODE.
    
    Fixes: fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation")
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    6e4dd7d View commit details
    Browse the repository at this point in the history
  2. x86/cpu: Fix up srso_safe_ret() and __x86_return_thunk()

    commit af023ef upstream.
    
      vmlinux.o: warning: objtool: srso_untrain_ret() falls through to next function __x86_return_skl()
      vmlinux.o: warning: objtool: __x86_return_thunk() falls through to next function __x86_return_skl()
    
    This is because these functions (can) end with CALL, which objtool
    does not consider a terminating instruction. Therefore, replace the
    INT3 instruction (which is a non-fatal trap) with UD2 (which is a
    fatal-trap).
    
    This indicates execution will not continue past this point.
    
    Fixes: fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation")
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    8bb1ed3 View commit details
    Browse the repository at this point in the history
  3. x86/alternative: Make custom return thunk unconditional

    commit 095b830 upstream.
    
    There is infrastructure to rewrite return thunks to point to any
    random thunk one desires, unwrap that from CALL_THUNKS, which up to
    now was the sole user of that.
    
      [ bp: Make the thunks visible on 32-bit and add ifdeffery for the
        32-bit builds. ]
    
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    53ebbe1 View commit details
    Browse the repository at this point in the history
  4. x86/cpu: Clean up SRSO return thunk mess

    commit d43490d upstream.
    
    Use the existing configurable return thunk. There is absolute no
    justification for having created this __x86_return_thunk alternative.
    
    To clarify, the whole thing looks like:
    
    Zen3/4 does:
    
      srso_alias_untrain_ret:
    	  nop2
    	  lfence
    	  jmp srso_alias_return_thunk
    	  int3
    
      srso_alias_safe_ret: // aliasses srso_alias_untrain_ret just so
    	  add $8, %rsp
    	  ret
    	  int3
    
      srso_alias_return_thunk:
    	  call srso_alias_safe_ret
    	  ud2
    
    While Zen1/2 does:
    
      srso_untrain_ret:
    	  movabs $foo, %rax
    	  lfence
    	  call srso_safe_ret           (jmp srso_return_thunk ?)
    	  int3
    
      srso_safe_ret: // embedded in movabs instruction
    	  add $8,%rsp
              ret
              int3
    
      srso_return_thunk:
    	  call srso_safe_ret
    	  ud2
    
    While retbleed does:
    
      zen_untrain_ret:
    	  test $0xcc, %bl
    	  lfence
    	  jmp zen_return_thunk
              int3
    
      zen_return_thunk: // embedded in the test instruction
    	  ret
              int3
    
    Where Zen1/2 flush the BTB entry using the instruction decoder trick
    (test,movabs) Zen3/4 use BTB aliasing. SRSO adds a return sequence
    (srso_safe_ret()) which forces the function return instruction to
    speculate into a trap (UD2).  This RET will then mispredict and
    execution will continue at the return site read from the top of the
    stack.
    
    Pick one of three options at boot (evey function can only ever return
    once).
    
      [ bp: Fixup commit message uarch details and add them in a comment in
        the code too. Add a comment about the srso_select_mitigation()
        dependency on retbleed_select_mitigation(). Add moar ifdeffery for
        32-bit builds. Add a dummy srso_untrain_ret_alias() definition for
        32-bit alternatives needing the symbol. ]
    
    Fixes: fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation")
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    44dbc91 View commit details
    Browse the repository at this point in the history
  5. x86/cpu: Rename original retbleed methods

    commit d025b7b upstream.
    
    Rename the original retbleed return thunk and untrain_ret to
    retbleed_return_thunk() and retbleed_untrain_ret().
    
    No functional changes.
    
    Suggested-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    54dde78 View commit details
    Browse the repository at this point in the history
  6. x86/cpu: Rename srso_(.*)_alias to srso_alias_\1

    commit 42be649 upstream.
    
    For a more consistent namespace.
    
      [ bp: Fixup names in the doc too. ]
    
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    e6b40d2 View commit details
    Browse the repository at this point in the history
  7. x86/cpu: Cleanup the untrain mess

    commit e7c25c4 upstream.
    
    Since there can only be one active return_thunk, there only needs be
    one (matching) untrain_ret. It fundamentally doesn't make sense to
    allow multiple untrain_ret at the same time.
    
    Fold all the 3 different untrain methods into a single (temporary)
    helper stub.
    
    Fixes: fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation")
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    529a9f0 View commit details
    Browse the repository at this point in the history
  8. x86/srso: Explain the untraining sequences a bit more

    commit 9dbd23e upstream.
    
    The goal is to eventually have a proper documentation about all this.
    
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/20230814164447.GFZNpZ/64H4lENIe94@fat_crate.local
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bp3tk0v authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    c16d0b3 View commit details
    Browse the repository at this point in the history
  9. x86/static_call: Fix __static_call_fixup()

    commit 5409730 upstream.
    
    Christian reported spurious module load crashes after some of Song's
    module memory layout patches.
    
    Turns out that if the very last instruction on the very last page of the
    module is a 'JMP __x86_return_thunk' then __static_call_fixup() will
    trip a fault and die.
    
    And while the module rework made this slightly more likely to happen,
    it's always been possible.
    
    Fixes: ee88d36 ("x86,static_call: Use alternative RET encoding")
    Reported-by: Christian Bricart <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Acked-by: Josh Poimboeuf <[email protected]>
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    c1f8314 View commit details
    Browse the repository at this point in the history
  10. x86/retpoline: Don't clobber RFLAGS during srso_safe_ret()

    commit ba5ca5e upstream.
    
    Use LEA instead of ADD when adjusting %rsp in srso_safe_ret{,_alias}()
    so as to avoid clobbering flags.  Drop one of the INT3 instructions to
    account for the LEA consuming one more byte than the ADD.
    
    KVM's emulator makes indirect calls into a jump table of sorts, where
    the destination of each call is a small blob of code that performs fast
    emulation by executing the target instruction with fixed operands.
    
    E.g. to emulate ADC, fastop() invokes adcb_al_dl():
    
      adcb_al_dl:
        <+0>:  adc    %dl,%al
        <+2>:  jmp    <__x86_return_thunk>
    
    A major motivation for doing fast emulation is to leverage the CPU to
    handle consumption and manipulation of arithmetic flags, i.e. RFLAGS is
    both an input and output to the target of the call.  fastop() collects
    the RFLAGS result by pushing RFLAGS onto the stack and popping them back
    into a variable (held in %rdi in this case):
    
      asm("push %[flags]; popf; " CALL_NOSPEC " ; pushf; pop %[flags]\n"
    
      <+71>: mov    0xc0(%r8),%rdx
      <+78>: mov    0x100(%r8),%rcx
      <+85>: push   %rdi
      <+86>: popf
      <+87>: call   *%rsi
      <+89>: nop
      <+90>: nop
      <+91>: nop
      <+92>: pushf
      <+93>: pop    %rdi
    
    and then propagating the arithmetic flags into the vCPU's emulator state:
    
      ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK);
    
      <+64>:  and    $0xfffffffffffff72a,%r9
      <+94>:  and    $0x8d5,%edi
      <+109>: or     %rdi,%r9
      <+122>: mov    %r9,0x10(%r8)
    
    The failures can be most easily reproduced by running the "emulator"
    test in KVM-Unit-Tests.
    
    If you're feeling a bit of deja vu, see commit b63f20a
    ("x86/retpoline: Don't clobber RFLAGS during CALL_NOSPEC on i386").
    
    In addition, this breaks booting of clang-compiled guest on
    a gcc-compiled host where the host contains the %rsp-modifying SRSO
    mitigations.
    
      [ bp: Massage commit message, extend, remove addresses. ]
    
    Fixes: fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation")
    Closes: https://lore.kernel.org/all/[email protected]
    Reported-by: Srikanth Aithal <[email protected]>
    Reported-by: Nathan Chancellor <[email protected]>
    Signed-off-by: Sean Christopherson <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Tested-by: Nathan Chancellor <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/[email protected]/
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sean-jc authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    b41eb31 View commit details
    Browse the repository at this point in the history
  11. x86/CPU/AMD: Fix the DIV(0) initial fix attempt

    commit f58d6fb upstream.
    
    Initially, it was thought that doing an innocuous division in the #DE
    handler would take care to prevent any leaking of old data from the
    divider but by the time the fault is raised, the speculation has already
    advanced too far and such data could already have been used by younger
    operations.
    
    Therefore, do the innocuous division on every exit to userspace so that
    userspace doesn't see any potentially old data from integer divisions in
    kernel space.
    
    Do the same before VMRUN too, to protect host data from leaking into the
    guest too.
    
    Fixes: 77245f1 ("x86/CPU/AMD: Do not leak quotient data after a division by 0")
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bp3tk0v authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    e4679a0 View commit details
    Browse the repository at this point in the history
  12. x86/srso: Disable the mitigation on unaffected configurations

    commit e9fbc47 upstream.
    
    Skip the srso cmd line parsing which is not needed on Zen1/2 with SMT
    disabled and with the proper microcode applied (latter should be the
    case anyway) as those are not affected.
    
    Fixes: 5a15d83 ("x86/srso: Tie SBPB bit setting to microcode patch detection")
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bp3tk0v authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    dae93ed View commit details
    Browse the repository at this point in the history
  13. x86/retpoline,kprobes: Fix position of thunk sections with CONFIG_LTO…

    …_CLANG
    
    commit 79cd2a1 upstream.
    
    The linker script arch/x86/kernel/vmlinux.lds.S matches the thunk
    sections ".text.__x86.*" from arch/x86/lib/retpoline.S as follows:
    
      .text {
        [...]
        TEXT_TEXT
        [...]
        __indirect_thunk_start = .;
        *(.text.__x86.*)
        __indirect_thunk_end = .;
        [...]
      }
    
    Macro TEXT_TEXT references TEXT_MAIN which normally expands to only
    ".text". However, with CONFIG_LTO_CLANG, TEXT_MAIN becomes
    ".text .text.[0-9a-zA-Z_]*" which wrongly matches also the thunk
    sections. The output layout is then different than expected. For
    instance, the currently defined range [__indirect_thunk_start,
    __indirect_thunk_end] becomes empty.
    
    Prevent the problem by using ".." as the first separator, for example,
    ".text..__x86.indirect_thunk". This pattern is utilized by other
    explicit section names which start with one of the standard prefixes,
    such as ".text" or ".data", and that need to be individually selected in
    the linker script.
    
      [ nathan: Fix conflicts with SRSO and fold in fix issue brought up by
        Andrew Cooper in post-review:
        https://lore.kernel.org/[email protected] ]
    
    Fixes: dc5723b ("kbuild: add support for Clang LTO")
    Signed-off-by: Petr Pavlu <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Nathan Chancellor <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    petrpavlu authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    c8b056a View commit details
    Browse the repository at this point in the history
  14. objtool/x86: Fixup frame-pointer vs rethunk

    commit dbf4600 upstream.
    
    For stack-validation of a frame-pointer build, objtool validates that
    every CALL instruction is preceded by a frame-setup. The new SRSO
    return thunks violate this with their RSB stuffing trickery.
    
    Extend the __fentry__ exception to also cover the embedded_insn case
    used for this. This cures:
    
      vmlinux.o: warning: objtool: srso_untrain_ret+0xd: call without frame pointer save/setup
    
    Fixes: 4ae68b2 ("objtool/x86: Fix SRSO mess")
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Acked-by: Josh Poimboeuf <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    4da4aae View commit details
    Browse the repository at this point in the history
  15. x86/srso: Correct the mitigation status when SMT is disabled

    commit 6405b72 upstream.
    
    Specify how is SRSO mitigated when SMT is disabled. Also, correct the
    SMT check for that.
    
    Fixes: e9fbc47 ("x86/srso: Disable the mitigation on unaffected configurations")
    Suggested-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Acked-by: Josh Poimboeuf <[email protected]>
    Link: https://lore.kernel.org/r/20230814200813.p5czl47zssuej7nv@treble
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bp3tk0v authored and gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    7487244 View commit details
    Browse the repository at this point in the history
  16. Linux 6.1.48

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: SeongJae Park <[email protected]>
    Tested-by: Joel Fernandes (Google) <[email protected]>
    Tested-by: Sudip Mukherjee <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Conor Dooley <[email protected]>
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Bagas Sanjaya <[email protected]>
    Tested-by: Salvatore Bonaccorso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    cd363bb View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2023

  1. objtool/x86: Fix SRSO mess

    commit 4ae68b2 upstream.
    
    Objtool --rethunk does two things:
    
     - it collects all (tail) call's of __x86_return_thunk and places them
       into .return_sites. These are typically compiler generated, but
       RET also emits this same.
    
     - it fudges the validation of the __x86_return_thunk symbol; because
       this symbol is inside another instruction, it can't actually find
       the instruction pointed to by the symbol offset and gets upset.
    
    Because these two things pertained to the same symbol, there was no
    pressing need to separate these two separate things.
    
    However, alas, along comes SRSO and more crazy things to deal with
    appeared.
    
    The SRSO patch itself added the following symbol names to identify as
    rethunk:
    
      'srso_untrain_ret', 'srso_safe_ret' and '__ret'
    
    Where '__ret' is the old retbleed return thunk, 'srso_safe_ret' is a
    new similarly embedded return thunk, and 'srso_untrain_ret' is
    completely unrelated to anything the above does (and was only included
    because of that INT3 vs UD2 issue fixed previous).
    
    Clear things up by adding a second category for the embedded instruction
    thing.
    
    Fixes: fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation")
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Peter Zijlstra authored and gregkh committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    77c5766 View commit details
    Browse the repository at this point in the history
  2. Revert "f2fs: don't reset unchangable mount option in f2fs_remount()"

    This reverts commit e2fb24c which is
    commit 458c15d upstream.
    
    Something is currently broken in the f2fs code, Guenter has reported
    boot problems with it for a few releases now, so revert the most recent
    f2fs changes in the hope to get this back to a working filesystem.
    
    Reported-by: Guenter Roeck <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: Chao Yu <[email protected]>
    Cc: Jaegeuk Kim <[email protected]>
    Cc: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    76e18e6 View commit details
    Browse the repository at this point in the history
  3. Revert "f2fs: fix to set flush_merge opt and show noflush_merge"

    This reverts commit 6ba0594 which is
    commit 967eaad upstream.
    
    Something is currently broken in the f2fs code, Guenter has reported
    boot problems with it for a few releases now, so revert the most recent
    f2fs changes in the hope to get this back to a working filesystem.
    
    Reported-by: Guenter Roeck <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: Chao Yu <[email protected]>
    Cc: Jaegeuk Kim <[email protected]>
    Cc: Yangtao Li <[email protected]>
    Cc: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    c5bd205 View commit details
    Browse the repository at this point in the history
  4. Revert "f2fs: fix to do sanity check on direct node in truncate_dnode()"

    This reverts commit a78a8bc which is
    commit a6ec837 upstream.
    
    Something is currently broken in the f2fs code, Guenter has reported
    boot problems with it for a few releases now, so revert the most recent
    f2fs changes in the hope to get this back to a working filesystem.
    
    Reported-by: Guenter Roeck <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: Chao Yu <[email protected]>
    Cc: Jaegeuk Kim <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    db05f84 View commit details
    Browse the repository at this point in the history
  5. Linux 6.1.49

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Joel Fernandes (Google) <[email protected]>
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Sudip Mukherjee <[email protected]>
    Tested-by: Bagas Sanjaya <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Tested-by: Salvatore Bonaccorso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    024f76b View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2023

  1. Merge tag 'v6.1.49' into NAS-123761

    This is the 6.1.49 stable release
    
    Signed-off-by: Umer Saleem <[email protected]>
    usaleem-ix committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    2dcd9eb View commit details
    Browse the repository at this point in the history
  2. Bump changelog after merging v6.1.49

    Signed-off-by: Umer Saleem <[email protected]>
    usaleem-ix committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    99870fd View commit details
    Browse the repository at this point in the history