Skip to content
  1. Dec 16, 2022
    • Eelco Chaudron's avatar
      openvswitch: Fix flow lookup to use unmasked key · 68bb1010
      Eelco Chaudron authored
      The commit mentioned below causes the ovs_flow_tbl_lookup() function
      to be called with the masked key. However, it's supposed to be called
      with the unmasked key. This due to the fact that the datapath supports
      installing wider flows, and OVS relies on this behavior. For example
      if ipv4(src=1.1.1.1/192.0.0.0, dst=1.1.1.2/192.0.0.0) exists, a wider
      flow (smaller mask) of ipv4(src=192.1.1.1/128.0.0.0,dst=192.1.1.2/
      128.0.0.0) is allowed to be added.
      
      However, if we try to add a wildcard rule, the installation fails:
      
      $ ovs-appctl dpctl/add-flow system@myDP "in_port(1),eth_type(0x0800), \
        ipv4(src=1.1.1.1/192.0.0.0,dst=1.1.1.2/192.0.0.0,frag=no)" 2
      $ ovs-appctl dpctl/add-flow system@myDP "in_port(1),eth_type(0x0800), \
        ipv4(src=192.1.1.1/0.0.0.0,dst=49.1.1.2/0.0.0.0,frag=no)" 2
      ovs-vswitchd: updating flow table (File exists)
      
      The reason is that the key used to determine if the flow is already
      present in the system uses the original key ANDed with the mask.
      This results in the IP address not being part of the (miniflow) key,
      i.e., being substituted with an all-zero value. When doing the actual
      lookup, this results in the key wrongfully matching the first flow,
      and therefore the flow does not get installed.
      
      This change reverses the commit below, but rather than having the key
      on the stack, it's allocated.
      
      Fixes: 190aa3e7
      
       ("openvswitch: Fix Frame-size larger than 1024 bytes warning.")
      
      Signed-off-by: default avatarEelco Chaudron <echaudro@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      68bb1010
    • David S. Miller's avatar
      Merge branch 'devlink-fixes' · 3e31d209
      David S. Miller authored
      
      
      Jakub Kicinski says:
      
      ====================
      devlink: region snapshot locking fix and selftest adjustments
      
      Minor fix for region snapshot locking and adjustments to selftests.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e31d209
    • Jakub Kicinski's avatar
      selftests: devlink: add a warning for interfaces coming up · d1c4a346
      Jakub Kicinski authored
      
      
      NetworkManager (and other daemons) may bring the interface up
      and cause failures in quiescence checks. Print a helpful warning,
      and take the interface down again.
      
      I seem to forget about this every time I run these tests on a new VM.
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1c4a346
    • Jakub Kicinski's avatar
      selftests: devlink: fix the fd redirect in dummy_reporter_test · 2fc60e2f
      Jakub Kicinski authored
      $number + > bash means redirect FD $number, e.g. commonly
      used 2> redirects stderr (fd 2). The test uses 8192> to
      write the number 8192 to a file, this results in:
      
        ./devlink.sh: line 499: 8192: Bad file descriptor
      
      Oddly the test also papers over this issue by checking
      for failure (expecting an error rather than success)
      so it passes, anyway.
      
      Fixes: ff18176a
      
       ("selftests: Add a test of large binary to devlink health test")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2fc60e2f
    • Jakub Kicinski's avatar
      devlink: hold region lock when flushing snapshots · b4cafb3d
      Jakub Kicinski authored
      Netdevsim triggers a splat on reload, when it destroys regions
      with snapshots pending:
      
        WARNING: CPU: 1 PID: 787 at net/core/devlink.c:6291 devlink_region_snapshot_del+0x12e/0x140
        CPU: 1 PID: 787 Comm: devlink Not tainted 6.1.0-07460-g7ae9888d6e1c #580
        RIP: 0010:devlink_region_snapshot_del+0x12e/0x140
        Call Trace:
         <TASK>
         devl_region_destroy+0x70/0x140
         nsim_dev_reload_down+0x2f/0x60 [netdevsim]
         devlink_reload+0x1f7/0x360
         devlink_nl_cmd_reload+0x6ce/0x860
         genl_family_rcv_msg_doit.isra.0+0x145/0x1c0
      
      This is the locking assert in devlink_region_snapshot_del(),
      we're supposed to be holding the region->snapshot_lock here.
      
      Fixes: 2dec18ad
      
       ("net: devlink: remove region snapshots list dependency on devlink->lock")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b4cafb3d
    • Daniel Golle's avatar
      net: dsa: mt7530: remove redundant assignment · 32f1002e
      Daniel Golle authored
      Russell King correctly pointed out that the MAC_2500FD capability is
      already added for port 5 (if not in RGMII mode) and port 6 (which only
      supports SGMII) by mt7531_mac_port_get_caps. Remove the reduntant
      setting of this capability flag which was added by a previous commit.
      
      Fixes: e19de30d
      
       ("net: dsa: mt7530: add support for in-band link status")
      Reported-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      Link: https://lore.kernel.org/r/Y5qY7x6la5TxZxzX@makrotopia.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      32f1002e
  2. Dec 15, 2022
    • Vladimir Oltean's avatar
      net: dsa: mv88e6xxx: avoid reg_lock deadlock in mv88e6xxx_setup_port() · a7d82367
      Vladimir Oltean authored
      In the blamed commit, it was not noticed that one implementation of
      chip->info->ops->phylink_get_caps(), called by mv88e6xxx_get_caps(),
      may access hardware registers, and in doing so, it takes the
      mv88e6xxx_reg_lock(). Namely, this is mv88e6352_phylink_get_caps().
      
      This is a problem because mv88e6xxx_get_caps(), apart from being
      a top-level function (method invoked by dsa_switch_ops), is now also
      directly called from mv88e6xxx_setup_port(), which runs under the
      mv88e6xxx_reg_lock() taken by mv88e6xxx_setup(). Therefore, when running
      on mv88e6352, the reg_lock would be acquired a second time and the
      system would deadlock on driver probe.
      
      The things that mv88e6xxx_setup() can compete with in terms of register
      access with are the IRQ handlers and MDIO bus operations registered by
      mv88e6xxx_probe(). So there is a real need to acquire the register lock.
      
      The register lock can, in principle, be dropped and re-acquired pretty
      much at will within the driver, as long as no operations that involve
      waiting for indirect access to complete (essentially, callers of
      mv88e6xxx_smi_direct_wait() and mv88e6xxx_wait_mask()) are interrupted
      with the lock released. However, I would guess that in mv88e6xxx_setup(),
      the critical section is kept open for such a long time just in order to
      optimize away multiple lock/unlock operations on the registers.
      
      We could, in principle, drop the reg_lock right before the
      mv88e6xxx_setup_port() -> mv88e6xxx_get_caps() call, and
      re-acquire it immediately afterwards. But this would look ugly, because
      mv88e6xxx_setup_port() would release a lock which it didn't acquire, but
      the caller did.
      
      A cleaner solution to this issue comes from the observation that struct
      mv88e6xxxx_ops methods generally assume they are called with the
      reg_lock already acquired. Whereas mv88e6352_phylink_get_caps() is more
      the exception rather than the norm, in that it acquires the lock itself.
      
      Let's enforce the same locking pattern/convention for
      chip->info->ops->phylink_get_caps() as well, and make
      mv88e6xxx_get_caps(), the top-level function, acquire the register lock
      explicitly, for this one implementation that will access registers for
      port 4 to work properly.
      
      This means that mv88e6xxx_setup_port() will no longer call the top-level
      function, but the low-level mv88e6xxx_ops method which expects the
      correct calling context (register lock held).
      
      Compared to chip->info->ops->phylink_get_caps(), mv88e6xxx_get_caps()
      also fixes up the supported_interfaces bitmap for internal ports, since
      that can be done generically and does not require per-switch knowledge.
      That's code which will no longer execute, however mv88e6xxx_setup_port()
      doesn't need that. It just needs to look at the mac_capabilities bitmap.
      
      Fixes: cc1049cc
      
       ("net: dsa: mv88e6xxx: fix speed setting for CPU/DSA ports")
      Reported-by: default avatarMaksim Kiselev <bigunclemax@gmail.com>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Tested-by: default avatarMaksim Kiselev <bigunclemax@gmail.com>
      Link: https://lore.kernel.org/r/20221214110120.3368472-1-vladimir.oltean@nxp.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      a7d82367
    • Biju Das's avatar
      ravb: Fix "failed to switch device to config mode" message during unbind · c72a7e42
      Biju Das authored
      This patch fixes the error "ravb 11c20000.ethernet eth0: failed to switch
      device to config mode" during unbind.
      
      We are doing register access after pm_runtime_put_sync().
      
      We usually do cleanup in reverse order of init. Currently in
      remove(), the "pm_runtime_put_sync" is not in reverse order.
      
      Probe
      	reset_control_deassert(rstc);
      	pm_runtime_enable(&pdev->dev);
      	pm_runtime_get_sync(&pdev->dev);
      
      remove
      	pm_runtime_put_sync(&pdev->dev);
      	unregister_netdev(ndev);
      	..
      	ravb_mdio_release(priv);
      	pm_runtime_disable(&pdev->dev);
      
      Consider the call to unregister_netdev()
      unregister_netdev->unregister_netdevice_queue->rollback_registered_many
      that calls the below functions which access the registers after
      pm_runtime_put_sync()
       1) ravb_get_stats
       2) ravb_close
      
      Fixes: c156633f
      
       ("Renesas Ethernet AVB driver proper")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBiju Das <biju.das.jz@bp.renesas.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Link: https://lore.kernel.org/r/20221214105118.2495313-1-biju.das.jz@bp.renesas.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      c72a7e42
    • Gaosheng Cui's avatar
      net: stmmac: fix errno when create_singlethread_workqueue() fails · 2cb815cf
      Gaosheng Cui authored
      We should set the return value to -ENOMEM explicitly when
      create_singlethread_workqueue() fails in stmmac_dvr_probe(),
      otherwise we'll lose the error value.
      
      Fixes: a137f3f2
      
       ("net: stmmac: fix possible memory leak in stmmac_dvr_probe()")
      Signed-off-by: default avatarGaosheng Cui <cuigaosheng1@huawei.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Link: https://lore.kernel.org/r/20221214080117.3514615-1-cuigaosheng1@huawei.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      2cb815cf
    • Li Zetao's avatar
      r6040: Fix kmemleak in probe and remove · 7e43039a
      Li Zetao authored
      There is a memory leaks reported by kmemleak:
      
        unreferenced object 0xffff888116111000 (size 2048):
          comm "modprobe", pid 817, jiffies 4294759745 (age 76.502s)
          hex dump (first 32 bytes):
            00 c4 0a 04 81 88 ff ff 08 10 11 16 81 88 ff ff  ................
            08 10 11 16 81 88 ff ff 00 00 00 00 00 00 00 00  ................
          backtrace:
            [<ffffffff815bcd82>] kmalloc_trace+0x22/0x60
            [<ffffffff827e20ee>] phy_device_create+0x4e/0x90
            [<ffffffff827e6072>] get_phy_device+0xd2/0x220
            [<ffffffff827e7844>] mdiobus_scan+0xa4/0x2e0
            [<ffffffff827e8be2>] __mdiobus_register+0x482/0x8b0
            [<ffffffffa01f5d24>] r6040_init_one+0x714/0xd2c [r6040]
            ...
      
      The problem occurs in probe process as follows:
        r6040_init_one:
          mdiobus_register
            mdiobus_scan    <- alloc and register phy_device,
                               the reference count of phy_device is 3
          r6040_mii_probe
            phy_connect     <- connect to the first phy_device,
                               so the reference count of the first
                               phy_device is 4, others are 3
          register_netdev   <- fault inject succeeded, goto error handling path
      
          // error handling path
          err_out_mdio_unregister:
            mdiobus_unregister(lp->mii_bus);
          err_out_mdio:
            mdiobus_free(lp->mii_bus);    <- the reference count of the first
                                             phy_device is 1, it is not released
                                             and other phy_devices are released
        // similarly, the remove process also has the same problem
      
      The root cause is traced to the phy_device is not disconnected when
      removes one r6040 device in r6040_remove_one() or on error handling path
      after r6040_mii probed successfully. In r6040_mii_probe(), a net ethernet
      device is connected to the first PHY device of mii_bus, in order to
      notify the connected driver when the link status changes, which is the
      default behavior of the PHY infrastructure to handle everything.
      Therefore the phy_device should be disconnected when removes one r6040
      device or on error handling path.
      
      Fix it by adding phy_disconnect() when removes one r6040 device or on
      error handling path after r6040_mii probed successfully.
      
      Fixes: 3831861b
      
       ("r6040: implement phylib")
      Signed-off-by: default avatarLi Zetao <lizetao1@huawei.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Link: https://lore.kernel.org/r/20221213125614.927754-1-lizetao1@huawei.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      7e43039a
    • Kirill Tkhai's avatar
      unix: Fix race in SOCK_SEQPACKET's unix_dgram_sendmsg() · 3ff8bff7
      Kirill Tkhai authored
      There is a race resulting in alive SOCK_SEQPACKET socket
      may change its state from TCP_ESTABLISHED to TCP_CLOSE:
      
      unix_release_sock(peer)                  unix_dgram_sendmsg(sk)
        sock_orphan(peer)
          sock_set_flag(peer, SOCK_DEAD)
                                                 sock_alloc_send_pskb()
                                                   if !(sk->sk_shutdown & SEND_SHUTDOWN)
                                                     OK
                                                 if sock_flag(peer, SOCK_DEAD)
                                                   sk->sk_state = TCP_CLOSE
        sk->sk_shutdown = SHUTDOWN_MASK
      
      After that socket sk remains almost normal: it is able to connect, listen, accept
      and recvmsg, while it can't sendmsg.
      
      Since this is the only possibility for alive SOCK_SEQPACKET to change
      the state in such way, we should better fix this strange and potentially
      danger corner case.
      
      Note, that we will return EPIPE here like this is normally done in sock_alloc_send_pskb().
      Originally used ECONNREFUSED looks strange, since it's strange to return
      a specific retval in dependence of race in kernel, when user can't affect on this.
      
      Also, move TCP_CLOSE assignment for SOCK_DGRAM sockets under state lock
      to fix race with unix_dgram_connect():
      
      unix_dgram_connect(other)            unix_dgram_sendmsg(sk)
                                             unix_peer(sk) = NULL
                                             unix_state_unlock(sk)
        unix_state_double_lock(sk, other)
        sk->sk_state  = TCP_ESTABLISHED
        unix_peer(sk) = other
        unix_state_double_unlock(sk, other)
                                             sk->sk_state  = TCP_CLOSED
      
      This patch fixes both of these races.
      
      Fixes: 83301b53
      
       ("af_unix: Set TCP_ESTABLISHED for datagram sockets too")
      Signed-off-by: default avatarKirill Tkhai <tkhai@ya.ru>
      Link: https://lore.kernel.org/r/135fda25-22d5-837a-782b-ceee50e19844@ya.ru
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      3ff8bff7
    • Minsuk Kang's avatar
      nfc: pn533: Clear nfc_target before being used · 9f281577
      Minsuk Kang authored
      Fix a slab-out-of-bounds read that occurs in nla_put() called from
      nfc_genl_send_target() when target->sensb_res_len, which is duplicated
      from an nfc_target in pn533, is too large as the nfc_target is not
      properly initialized and retains garbage values. Clear nfc_targets with
      memset() before they are used.
      
      Found by a modified version of syzkaller.
      
      BUG: KASAN: slab-out-of-bounds in nla_put
      Call Trace:
       memcpy
       nla_put
       nfc_genl_dump_targets
       genl_lock_dumpit
       netlink_dump
       __netlink_dump_start
       genl_family_rcv_msg_dumpit
       genl_rcv_msg
       netlink_rcv_skb
       genl_rcv
       netlink_unicast
       netlink_sendmsg
       sock_sendmsg
       ____sys_sendmsg
       ___sys_sendmsg
       __sys_sendmsg
       do_syscall_64
      
      Fixes: 673088fb ("NFC: pn533: Send ATR_REQ directly for active device detection")
      Fixes: 361f3cb7
      
       ("NFC: DEP link hook implementation for pn533")
      Signed-off-by: default avatarMinsuk Kang <linuxlovemin@yonsei.ac.kr>
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Link: https://lore.kernel.org/r/20221214015139.119673-1-linuxlovemin@yonsei.ac.kr
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9f281577
    • Vladimir Oltean's avatar
      net: enetc: avoid buffer leaks on xdp_do_redirect() failure · 628050ec
      Vladimir Oltean authored
      Before enetc_clean_rx_ring_xdp() calls xdp_do_redirect(), each software
      BD in the RX ring between index orig_i and i can have one of 2 refcount
      values on its page.
      
      We are the owner of the current buffer that is being processed, so the
      refcount will be at least 1.
      
      If the current owner of the buffer at the diametrically opposed index
      in the RX ring (i.o.w, the other half of this page) has not yet called
      kfree(), this page's refcount could even be 2.
      
      enetc_page_reusable() in enetc_flip_rx_buff() tests for the page
      refcount against 1, and [ if it's 2 ] does not attempt to reuse it.
      
      But if enetc_flip_rx_buff() is put after the xdp_do_redirect() call,
      the page refcount can have one of 3 values. It can also be 0, if there
      is no owner of the other page half, and xdp_do_redirect() for this
      buffer ran so far that it triggered a flush of the devmap/cpumap bulk
      queue, and the consumers of those bulk queues also freed the buffer,
      all by the time xdp_do_redirect() returns the execution back to enetc.
      
      This is the reason why enetc_flip_rx_buff() is called before
      xdp_do_redirect(), but there is a big flaw with that reasoning:
      enetc_flip_rx_buff() will set rx_swbd->page = NULL on both sides of the
      enetc_page_reusable() branch, and if xdp_do_redirect() returns an error,
      we call enetc_xdp_free(), which does not deal gracefully with that.
      
      In fact, what happens is quite special. The page refcounts start as 1.
      enetc_flip_rx_buff() figures they're reusable, transfers these
      rx_swbd->page pointers to a different rx_swbd in enetc_reuse_page(), and
      bumps the refcount to 2. When xdp_do_redirect() later returns an error,
      we call the no-op enetc_xdp_free(), but we still haven't lost the
      reference to that page. A copy of it is still at rx_ring->next_to_alloc,
      but that has refcount 2 (and there are no concurrent owners of it in
      flight, to drop the refcount). What really kills the system is when
      we'll flip the rx_swbd->page the second time around. With an updated
      refcount of 2, the page will not be reusable and we'll really leak it.
      Then enetc_new_page() will have to allocate more pages, which will then
      eventually leak again on further errors from xdp_do_redirect().
      
      The problem, summarized, is that we zeroize rx_swbd->page before we're
      completely done with it, and this makes it impossible for the error path
      to do something with it.
      
      Since the packet is potentially multi-buffer and therefore the
      rx_swbd->page is potentially an array, manual passing of the old
      pointers between enetc_flip_rx_buff() and enetc_xdp_free() is a bit
      difficult.
      
      For the sake of going with a simple solution, we accept the possibility
      of racing with xdp_do_redirect(), and we move the flip procedure to
      execute only on the redirect success path. By racing, I mean that the
      page may be deemed as not reusable by enetc (having a refcount of 0),
      but there will be no leak in that case, either.
      
      Once we accept that, we have something better to do with buffers on
      XDP_REDIRECT failure. Since we haven't performed half-page flipping yet,
      we won't, either (and this way, we can avoid enetc_xdp_free()
      completely, which gives the entire page to the slab allocator).
      Instead, we'll call enetc_xdp_drop(), which will recycle this half of
      the buffer back to the RX ring.
      
      Fixes: 9d2b68cc
      
       ("net: enetc: add support for XDP_REDIRECT")
      Suggested-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Link: https://lore.kernel.org/r/20221213001908.2347046-1-vladimir.oltean@nxp.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      628050ec
  3. Dec 14, 2022
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · 7ae9888d
      Jakub Kicinski authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS fixes for net
      
      1) Fix NAT IPv6 flowtable hardware offload, from Qingfang DENG.
      
      2) Add a safety check to IPVS socket option interface report a
         warning if unsupported command is seen, this. From Li Qiong.
      
      3) Document SCTP conntrack timeouts, from Sriram Yagnaraman.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: conntrack: document sctp timeouts
        ipvs: add a 'default' case in do_ip_vs_set_ctl()
        netfilter: flowtable: really fix NAT IPv6 offload
      ====================
      
      Link: https://lore.kernel.org/r/20221213140923.154594-1-pablo@netfilter.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7ae9888d
    • Jiri Slaby (SUSE)'s avatar
      wireguard: timers: cast enum limits members to int in prints · 2d4ee16d
      Jiri Slaby (SUSE) authored
      Since gcc13, each member of an enum has the same type as the enum. And
      that is inherited from its members. Provided "REKEY_AFTER_MESSAGES =
      1ULL << 60", the named type is unsigned long.
      
      This generates warnings with gcc-13:
        error: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int'
      
      Cast those particular enum members to int when printing them.
      
      Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36113
      
      
      Cc: Martin Liska <mliska@suse.cz>
      Signed-off-by: default avatarJiri Slaby (SUSE) <jirislaby@kernel.org>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Link: https://lore.kernel.org/all/20221213225208.3343692-2-Jason@zx2c4.com/
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2d4ee16d
    • Tony Nguyen's avatar
      igb: Initialize mailbox message for VF reset · de5dc443
      Tony Nguyen authored
      When a MAC address is not assigned to the VF, that portion of the message
      sent to the VF is not set. The memory, however, is allocated from the
      stack meaning that information may be leaked to the VM. Initialize the
      message buffer to 0 so that no information is passed to the VM in this
      case.
      
      Fixes: 6ddbc4cf
      
       ("igb: Indicate failure on vf reset for empty mac address")
      Reported-by: default avatarAkihiko Odaki <akihiko.odaki@daynix.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Reviewed-by: default avatarAkihiko Odaki <akihiko.odaki@daynix.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Link: https://lore.kernel.org/r/20221212190031.3983342-1-anthony.l.nguyen@intel.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      de5dc443
    • Jakub Kicinski's avatar
      Merge branch 'misdn-don-t-call-dev_kfree_skb-kfree_skb-under-spin_lock_irqsave' · e9ad4986
      Jakub Kicinski authored
      Yang Yingliang says:
      
      ====================
      mISDN: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
      
      It is not allowed to call kfree_skb() or consume_skb() from hardware
      interrupt context or with hardware interrupts being disabled. This
      pachset try to avoid calling dev_kfree_skb/kfree_skb()() under
      spin_lock_irqsave().
      ====================
      
      Link: https://lore.kernel.org/r/20221212084139.3277913-1-yangyingliang@huawei.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e9ad4986
    • Yang Yingliang's avatar
      mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave() · 1232946c
      Yang Yingliang authored
      It is not allowed to call kfree_skb() or consume_skb() from hardware
      interrupt context or with hardware interrupts being disabled.
      
      skb_queue_purge() is called under spin_lock_irqsave() in handle_dmsg()
      and hfcm_l1callback(), kfree_skb() is called in them, to fix this, use
      skb_queue_splice_init() to move the dch->squeue to a free queue, also
      enqueue the tx_skb and rx_skb, at last calling __skb_queue_purge() to
      free the SKBs afer unlock.
      
      Fixes: af69fb3a
      
       ("Add mISDN HFC multiport driver")
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Reviewed-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1232946c
    • Yang Yingliang's avatar
      mISDN: hfcpci: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave() · f0f596bd
      Yang Yingliang authored
      It is not allowed to call kfree_skb() or consume_skb() from hardware
      interrupt context or with hardware interrupts being disabled.
      
      skb_queue_purge() is called under spin_lock_irqsave() in hfcpci_l2l1D(),
      kfree_skb() is called in it, to fix this, use skb_queue_splice_init()
      to move the dch->squeue to a free queue, also enqueue the tx_skb and
      rx_skb, at last calling __skb_queue_purge() to free the SKBs afer unlock.
      
      Fixes: 1700fe1a
      
       ("Add mISDN HFC PCI driver")
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Reviewed-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f0f596bd
    • Yang Yingliang's avatar
      mISDN: hfcsusb: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave() · ddc9648d
      Yang Yingliang authored
      It is not allowed to call kfree_skb() or consume_skb() from hardware
      interrupt context or with hardware interrupts being disabled.
      
      It should use dev_kfree_skb_irq() or dev_consume_skb_irq() instead.
      The difference between them is free reason, dev_kfree_skb_irq() means
      the SKB is dropped in error and dev_consume_skb_irq() means the SKB
      is consumed in normal.
      
      skb_queue_purge() is called under spin_lock_irqsave() in hfcusb_l2l1D(),
      kfree_skb() is called in it, to fix this, use skb_queue_splice_init()
      to move the dch->squeue to a free queue, also enqueue the tx_skb and
      rx_skb, at last calling __skb_queue_purge() to free the SKBs afer unlock.
      
      In tx_iso_complete(), dev_kfree_skb() is called to consume the transmitted
      SKB, so replace it with dev_consume_skb_irq().
      
      Fixes: 69f52adb
      
       ("mISDN: Add HFC USB driver")
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Reviewed-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ddc9648d
    • Jakub Kicinski's avatar
      Merge branch 'bonding-fix-high-prio-not-effect-issue' · da2b5b43
      Jakub Kicinski authored
      Hangbin Liu says:
      ====================
      Bonding: fix high prio not effect issue
      
      When a high prio link up, if there has current link, it will not do
      failover as we missed the check in link up event. Fix it in this patchset
      and add a prio option test case.
      ====================
      
      Link: https://lore.kernel.org/all/20221212035647.1053865-1-liuhangbin@gmail.com/
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      da2b5b43
    • Liang Li's avatar
      selftests: bonding: add bonding prio option test · 42a8d4aa
      Liang Li authored
      
      
      Add a test for bonding prio option. Here is the test result:
      
      ]# ./option_prio.sh
      TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=arp_ip_target and primary_reselect=0)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=arp_ip_target and primary_reselect=1)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=arp_ip_target and primary_reselect=2)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=miimon and primary_reselect=0)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=miimon and primary_reselect=1)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=1 monitor=miimon and primary_reselect=2)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=5 monitor=miimon and primary_reselect=0)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=5 monitor=miimon and primary_reselect=1)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=5 monitor=miimon and primary_reselect=2)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=6 monitor=miimon and primary_reselect=0)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=6 monitor=miimon and primary_reselect=1)  [ OK ]
      TEST: prio_test (Test bonding option 'prio' with mode=6 monitor=miimon and primary_reselect=2)  [ OK ]
      
      Signed-off-by: default avatarLiang Li <liali@redhat.com>
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      42a8d4aa
    • Hangbin Liu's avatar
      bonding: do failover when high prio link up · e95cc447
      Hangbin Liu authored
      
      
      Currently, when a high prio link enslaved, or when current link down,
      the high prio port could be selected. But when high prio link up, the
      new active slave reselection is not triggered. Fix it by checking link's
      prio when getting up. Making the do_failover after looping all slaves as
      there may be multi high prio slaves up.
      
      Reported-by: default avatarLiang Li <liali@redhat.com>
      Fixes: 0a2ff7cc
      
       ("Bonding: add per-port priority for failover re-selection")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e95cc447
    • Hangbin Liu's avatar
      bonding: add missed __rcu annotation for curr_active_slave · 3d0b738f
      Hangbin Liu authored
      
      
      There is one direct accesses to bond->curr_active_slave in
      bond_miimon_commit(). Protected it by rcu_access_pointer()
      since the later of this function also use this one.
      
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3d0b738f
    • Emeel Hakim's avatar
      net: macsec: fix net device access prior to holding a lock · f3b4a00f
      Emeel Hakim authored
      Currently macsec offload selection update routine accesses
      the net device prior to holding the relevant lock.
      Fix by holding the lock prior to the device access.
      
      Fixes: dcb780fb
      
       ("net: macsec: add nla support for changing the offloading selection")
      Reviewed-by: default avatarRaed Salem <raeds@nvidia.com>
      Signed-off-by: default avatarEmeel Hakim <ehakim@nvidia.com>
      Link: https://lore.kernel.org/r/20221211075532.28099-1-ehakim@nvidia.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f3b4a00f
    • Linus Torvalds's avatar
      Merge tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 7e68dd7d
      Linus Torvalds authored
      Pull networking updates from Paolo Abeni:
       "Core:
      
         - Allow live renaming when an interface is up
      
         - Add retpoline wrappers for tc, improving considerably the
           performances of complex queue discipline configurations
      
         - Add inet drop monitor support
      
         - A few GRO performance improvements
      
         - Add infrastructure for atomic dev stats, addressing long standing
           data races
      
         - De-duplicate common code between OVS and conntrack offloading
           infrastructure
      
         - A bunch of UBSAN_BOUNDS/FORTIFY_SOURCE improvements
      
         - Netfilter: introduce packet parser for tunneled packets
      
         - Replace IPVS timer-based estimators with kthreads to scale up the
           workload with the number of available CPUs
      
         - Add the helper support for connection-tracking OVS offload
      
        BPF:
      
         - Support for user defined BPF objects: the use case is to allocate
           own objects, build own object hierarchies and use the building
           blocks to build own data structures flexibly, for example, linked
           lists in BPF
      
         - Make cgroup local storage available to non-cgroup attached BPF
           programs
      
         - Avoid unnecessary deadlock detection and failures wrt BPF task
           storage helpers
      
         - A relevant bunch of BPF verifier fixes and improvements
      
         - Veristat tool improvements to support custom filtering, sorting,
           and replay of results
      
         - Add LLVM disassembler as default library for dumping JITed code
      
         - Lots of new BPF documentation for various BPF maps
      
         - Add bpf_rcu_read_{,un}lock() support for sleepable programs
      
         - Add RCU grace period chaining to BPF to wait for the completion of
           access from both sleepable and non-sleepable BPF programs
      
         - Add support storing struct task_struct objects as kptrs in maps
      
         - Improve helper UAPI by explicitly defining BPF_FUNC_xxx integer
           values
      
         - Add libbpf *_opts API-variants for bpf_*_get_fd_by_id() functions
      
        Protocols:
      
         - TCP: implement Protective Load Balancing across switch links
      
         - TCP: allow dynamically disabling TCP-MD5 static key, reverting back
           to fast[er]-path
      
         - UDP: Introduce optional per-netns hash lookup table
      
         - IPv6: simplify and cleanup sockets disposal
      
         - Netlink: support different type policies for each generic netlink
           operation
      
         - MPTCP: add MSG_FASTOPEN and FastOpen listener side support
      
         - MPTCP: add netlink notification support for listener sockets events
      
         - SCTP: add VRF support, allowing sctp sockets binding to VRF devices
      
         - Add bridging MAC Authentication Bypass (MAB) support
      
         - Extensions for Ethernet VPN bridging implementation to better
           support multicast scenarios
      
         - More work for Wi-Fi 7 support, comprising conversion of all the
           existing drivers to internal TX queue usage
      
         - IPSec: introduce a new offload type (packet offload) allowing
           complete header processing and crypto offloading
      
         - IPSec: extended ack support for more descriptive XFRM error
           reporting
      
         - RXRPC: increase SACK table size and move processing into a
           per-local endpoint kernel thread, reducing considerably the
           required locking
      
         - IEEE 802154: synchronous send frame and extended filtering support,
           initial support for scanning available 15.4 networks
      
         - Tun: bump the link speed from 10Mbps to 10Gbps
      
         - Tun/VirtioNet: implement UDP segmentation offload support
      
        Driver API:
      
         - PHY/SFP: improve power level switching between standard level 1 and
           the higher power levels
      
         - New API for netdev <-> devlink_port linkage
      
         - PTP: convert existing drivers to new frequency adjustment
           implementation
      
         - DSA: add support for rx offloading
      
         - Autoload DSA tagging driver when dynamically changing protocol
      
         - Add new PCP and APPTRUST attributes to Data Center Bridging
      
         - Add configuration support for 800Gbps link speed
      
         - Add devlink port function attribute to enable/disable RoCE and
           migratable
      
         - Extend devlink-rate to support strict prioriry and weighted fair
           queuing
      
         - Add devlink support to directly reading from region memory
      
         - New device tree helper to fetch MAC address from nvmem
      
         - New big TCP helper to simplify temporary header stripping
      
        New hardware / drivers:
      
         - Ethernet:
            - Marvel Octeon CNF95N and CN10KB Ethernet Switches
            - Marvel Prestera AC5X Ethernet Switch
            - WangXun 10 Gigabit NIC
            - Motorcomm yt8521 Gigabit Ethernet
            - Microchip ksz9563 Gigabit Ethernet Switch
            - Microsoft Azure Network Adapter
            - Linux Automation 10Base-T1L adapter
      
         - PHY:
            - Aquantia AQR112 and AQR412
            - Motorcomm YT8531S
      
         - PTP:
            - Orolia ART-CARD
      
         - WiFi:
            - MediaTek Wi-Fi 7 (802.11be) devices
            - RealTek rtw8821cu, rtw8822bu, rtw8822cu and rtw8723du USB
              devices
      
         - Bluetooth:
            - Broadcom BCM4377/4378/4387 Bluetooth chipsets
            - Realtek RTL8852BE and RTL8723DS
            - Cypress.CYW4373A0 WiFi + Bluetooth combo device
      
        Drivers:
      
         - CAN:
            - gs_usb: bus error reporting support
            - kvaser_usb: listen only and bus error reporting support
      
         - Ethernet NICs:
            - Intel (100G):
               - extend action skbedit to RX queue mapping
               - implement devlink-rate support
               - support direct read from memory
            - nVidia/Mellanox (mlx5):
               - SW steering improvements, increasing rules update rate
               - Support for enhanced events compression
               - extend H/W offload packet manipulation capabilities
               - implement IPSec packet offload mode
            - nVidia/Mellanox (mlx4):
               - better big TCP support
            - Netronome Ethernet NICs (nfp):
               - IPsec offload support
               - add support for multicast filter
            - Broadcom:
               - RSS and PTP support improvements
            - AMD/SolarFlare:
               - netlink extened ack improvements
               - add basic flower matches to offload, and related stats
            - Virtual NICs:
               - ibmvnic: introduce affinity hint support
            - small / embedded:
               - FreeScale fec: add initial XDP support
               - Marvel mv643xx_eth: support MII/GMII/RGMII modes for Kirkwood
               - TI am65-cpsw: add suspend/resume support
               - Mediatek MT7986: add RX wireless wthernet dispatch support
               - Realtek 8169: enable GRO software interrupt coalescing per
                 default
      
         - Ethernet high-speed switches:
            - Microchip (sparx5):
               - add support for Sparx5 TC/flower H/W offload via VCAP
            - Mellanox mlxsw:
               - add 802.1X and MAC Authentication Bypass offload support
               - add ip6gre support
      
         - Embedded Ethernet switches:
            - Mediatek (mtk_eth_soc):
               - improve PCS implementation, add DSA untag support
               - enable flow offload support
            - Renesas:
               - add rswitch R-Car Gen4 gPTP support
            - Microchip (lan966x):
               - add full XDP support
               - add TC H/W offload via VCAP
               - enable PTP on bridge interfaces
            - Microchip (ksz8):
               - add MTU support for KSZ8 series
      
         - Qualcomm 802.11ax WiFi (ath11k):
            - support configuring channel dwell time during scan
      
         - MediaTek WiFi (mt76):
            - enable Wireless Ethernet Dispatch (WED) offload support
            - add ack signal support
            - enable coredump support
            - remain_on_channel support
      
         - Intel WiFi (iwlwifi):
            - enable Wi-Fi 7 Extremely High Throughput (EHT) PHY capabilities
            - 320 MHz channels support
      
         - RealTek WiFi (rtw89):
            - new dynamic header firmware format support
            - wake-over-WLAN support"
      
      * tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2002 commits)
        ipvs: fix type warning in do_div() on 32 bit
        net: lan966x: Remove a useless test in lan966x_ptp_add_trap()
        net: ipa: add IPA v4.7 support
        dt-bindings: net: qcom,ipa: Add SM6350 compatible
        bnxt: Use generic HBH removal helper in tx path
        IPv6/GRO: generic helper to remove temporary HBH/jumbo header in driver
        selftests: forwarding: Add bridge MDB test
        selftests: forwarding: Rename bridge_mdb test
        bridge: mcast: Support replacement of MDB port group entries
        bridge: mcast: Allow user space to specify MDB entry routing protocol
        bridge: mcast: Allow user space to add (*, G) with a source list and filter mode
        bridge: mcast: Add support for (*, G) with a source list and filter mode
        bridge: mcast: Avoid arming group timer when (S, G) corresponds to a source
        bridge: mcast: Add a flag for user installed source entries
        bridge: mcast: Expose __br_multicast_del_group_src()
        bridge: mcast: Expose br_multicast_new_group_src()
        bridge: mcast: Add a centralized error path
        bridge: mcast: Place netlink policy before validation functions
        bridge: mcast: Split (*, G) and (S, G) addition into different functions
        bridge: mcast: Do not derive entry type from its filter mode
        ...
      7e68dd7d
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20221213' of https://github.com/jcmvbkbc/linux-xtensa · 1ca06f1c
      Linus Torvalds authored
      Pull Xtensa updates from Max Filippov:
      
       - fix kernel build with gcc-13
      
       - various minor fixes
      
      * tag 'xtensa-20221213' of https://github.com/jcmvbkbc/linux-xtensa:
        xtensa: add __umulsidi3 helper
        xtensa: update config files
        MAINTAINERS: update the 'T:' entry for xtensa
      1ca06f1c
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 4cb1fc6f
      Linus Torvalds authored
      Pull ARM updates from Russell King:
      
       - update unwinder to cope with module PLTs
      
       - enable UBSAN on ARM
      
       - improve kernel fault message
      
       - update UEFI runtime page tables dump
      
       - avoid clang's __aeabi_uldivmod generated in NWFPE code
      
       - disable FIQs on CPU shutdown paths
      
       - update XOR register usage
      
       - a number of build updates (using .arch, thread pointer, removal of
         lazy evaluation in Makefile)
      
       - conversion of stacktrace code to stackwalk
      
       - findbit assembly updates
      
       - hwcap feature updates for ARMv8 CPUs
      
       - instruction dump updates for big-endian platforms
      
       - support for function error injection
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (31 commits)
        ARM: 9279/1: support function error injection
        ARM: 9277/1: Make the dumped instructions are consistent with the disassembled ones
        ARM: 9276/1: Refactor dump_instr()
        ARM: 9275/1: Drop '-mthumb' from AFLAGS_ISA
        ARM: 9274/1: Add hwcap for Speculative Store Bypassing Safe
        ARM: 9273/1: Add hwcap for Speculation Barrier(SB)
        ARM: 9272/1: vfp: Add hwcap for FEAT_AA32I8MM
        ARM: 9271/1: vfp: Add hwcap for FEAT_AA32BF16
        ARM: 9270/1: vfp: Add hwcap for FEAT_FHM
        ARM: 9269/1: vfp: Add hwcap for FEAT_DotProd
        ARM: 9268/1: vfp: Add hwcap FPHP and ASIMDHP for FEAT_FP16
        ARM: 9267/1: Define Armv8 registers in AArch32 state
        ARM: findbit: add unwinder information
        ARM: findbit: operate by words
        ARM: findbit: convert to macros
        ARM: findbit: provide more efficient ARMv7 implementation
        ARM: findbit: document ARMv5 bit offset calculation
        ARM: 9259/1: stacktrace: Convert stacktrace to generic ARCH_STACKWALK
        ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code
        ARM: 9265/1: pass -march= only to compiler
        ...
      4cb1fc6f
    • Linus Torvalds's avatar
      Merge tag 'x86_sev_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 740afa4d
      Linus Torvalds authored
      Pull x86 sev updates from Borislav Petkov:
      
       - Two minor fixes to the sev-guest driver
      
      * tag 'x86_sev_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        virt/sev-guest: Add a MODULE_ALIAS
        virt/sev-guest: Remove unnecessary free in init_crypto()
      740afa4d
    • Linus Torvalds's avatar
      Merge tag 'x86_paravirt_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 82c72902
      Linus Torvalds authored
      Pull x86 paravirt update from Borislav Petkov:
      
       - Simplify paravirt patching machinery by removing the now unused
         clobber mask
      
      * tag 'x86_paravirt_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/paravirt: Remove clobber bitmask from .parainstructions
      82c72902
    • Linus Torvalds's avatar
      Merge tag 'x86_microcode_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a70210f4
      Linus Torvalds authored
      Pull x86 microcode and IFS updates from Borislav Petkov:
       "The IFS (In-Field Scan) stuff goes through tip because the IFS driver
        uses the same structures and similar functionality as the microcode
        loader and it made sense to route it all through this branch so that
        there are no conflicts.
      
         - Add support for multiple testing sequences to the Intel In-Field
           Scan driver in order to be able to run multiple different test
           patterns. Rework things and remove the BROKEN dependency so that
           the driver can be enabled (Jithu Joseph)
      
         - Remove the subsys interface usage in the microcode loader because
           it is not really needed
      
         - A couple of smaller fixes and cleanups"
      
      * tag 'x86_microcode_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
        x86/microcode/intel: Do not retry microcode reloading on the APs
        x86/microcode/intel: Do not print microcode revision and processor flags
        platform/x86/intel/ifs: Add missing kernel-doc entry
        Revert "platform/x86/intel/ifs: Mark as BROKEN"
        Documentation/ABI: Update IFS ABI doc
        platform/x86/intel/ifs: Add current_batch sysfs entry
        platform/x86/intel/ifs: Remove reload sysfs entry
        platform/x86/intel/ifs: Add metadata validation
        platform/x86/intel/ifs: Use generic microcode headers and functions
        platform/x86/intel/ifs: Add metadata support
        x86/microcode/intel: Use a reserved field for metasize
        x86/microcode/intel: Add hdr_type to intel_microcode_sanity_check()
        x86/microcode/intel: Reuse microcode_sanity_check()
        x86/microcode/intel: Use appropriate type in microcode_sanity_check()
        x86/microcode/intel: Reuse find_matching_signature()
        platform/x86/intel/ifs: Remove memory allocation from load path
        platform/x86/intel/ifs: Remove image loading during init
        platform/x86/intel/ifs: Return a more appropriate error code
        platform/x86/intel/ifs: Remove unused selection
        x86/microcode: Drop struct ucode_cpu_info.valid
        ...
      a70210f4
    • Linus Torvalds's avatar
      Merge tag 'x86_cpu_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3ef3ace4
      Linus Torvalds authored
      Pull x86 cpu updates from Borislav Petkov:
      
       - Split MTRR and PAT init code to accomodate at least Xen PV and TDX
         guests which do not get MTRRs exposed but only PAT. (TDX guests do
         not support the cache disabling dance when setting up MTRRs so they
         fall under the same category)
      
         This is a cleanup work to remove all the ugly workarounds for such
         guests and init things separately (Juergen Gross)
      
       - Add two new Intel CPUs to the list of CPUs with "normal" Energy
         Performance Bias, leading to power savings
      
       - Do not do bus master arbitration in C3 (ARB_DISABLE) on modern
         Centaur CPUs
      
      * tag 'x86_cpu_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
        x86/mtrr: Make message for disabled MTRRs more descriptive
        x86/pat: Handle TDX guest PAT initialization
        x86/cpuid: Carve out all CPUID functionality
        x86/cpu: Switch to cpu_feature_enabled() for X86_FEATURE_XENPV
        x86/cpu: Remove X86_FEATURE_XENPV usage in setup_cpu_entry_area()
        x86/cpu: Drop 32-bit Xen PV guest code in update_task_stack()
        x86/cpu: Remove unneeded 64-bit dependency in arch_enter_from_user_mode()
        x86/cpufeatures: Add X86_FEATURE_XENPV to disabled-features.h
        x86/acpi/cstate: Optimize ARB_DISABLE on Centaur CPUs
        x86/mtrr: Simplify mtrr_ops initialization
        x86/cacheinfo: Switch cache_ap_init() to hotplug callback
        x86: Decouple PAT and MTRR handling
        x86/mtrr: Add a stop_machine() handler calling only cache_cpu_init()
        x86/mtrr: Let cache_aps_delayed_init replace mtrr_aps_delayed_init
        x86/mtrr: Get rid of __mtrr_enabled bool
        x86/mtrr: Simplify mtrr_bp_init()
        x86/mtrr: Remove set_all callback from struct mtrr_ops
        x86/mtrr: Disentangle MTRR init from PAT init
        x86/mtrr: Move cache control code to cacheinfo.c
        x86/mtrr: Split MTRR-specific handling from cache dis/enabling
        ...
      3ef3ace4
    • Linus Torvalds's avatar
      Merge tag 'x86_boot_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4eb77fa1
      Linus Torvalds authored
      Pull x86 boot updates from Borislav Petkov:
       "A  of early boot cleanups and fixes.
      
         - Do some spring cleaning to the compressed boot code by moving the
           EFI mixed-mode code to a separate compilation unit, the AMD memory
           encryption early code where it belongs and fixing up build
           dependencies. Make the deprecated EFI handover protocol optional
           with the goal of removing it at some point (Ard Biesheuvel)
      
         - Skip realmode init code on Xen PV guests as it is not needed there
      
         - Remove an old 32-bit PIC code compiler workaround"
      
      * tag 'x86_boot_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Remove x86_32 PIC using %ebx workaround
        x86/boot: Skip realmode init code when running as Xen PV guest
        x86/efi: Make the deprecated EFI handover protocol optional
        x86/boot/compressed: Only build mem_encrypt.S if AMD_MEM_ENCRYPT=y
        x86/boot/compressed: Adhere to calling convention in get_sev_encryption_bit()
        x86/boot/compressed: Move startup32_check_sev_cbit() out of head_64.S
        x86/boot/compressed: Move startup32_check_sev_cbit() into .text
        x86/boot/compressed: Move startup32_load_idt() out of head_64.S
        x86/boot/compressed: Move startup32_load_idt() into .text section
        x86/boot/compressed: Pull global variable reference into startup32_load_idt()
        x86/boot/compressed: Avoid touching ECX in startup32_set_idt_entry()
        x86/boot/compressed: Simplify IDT/GDT preserve/restore in the EFI thunk
        x86/boot/compressed, efi: Merge multiple definitions of image_offset into one
        x86/boot/compressed: Move efi32_pe_entry() out of head_64.S
        x86/boot/compressed: Move efi32_entry out of head_64.S
        x86/boot/compressed: Move efi32_pe_entry into .text section
        x86/boot/compressed: Move bootargs parsing out of 32-bit startup code
        x86/boot/compressed: Move 32-bit entrypoint code into .text section
        x86/boot/compressed: Rename efi_thunk_64.S to efi-mixed.S
      4eb77fa1
    • Linus Torvalds's avatar
      Merge tag 'x86_asm_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8b9ed79c
      Linus Torvalds authored
      Pull x86 asm updates from Borislav Petkov:
      
       - Move the 32-bit memmove() asm implementation out-of-line in order to
         fix a 32-bit full LTO build failure with clang where it would fail at
         register allocation.
      
         Move it to an asm file and clean it up while at it, similar to what
         has been already done on 64-bit
      
      * tag 'x86_asm_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mem: Move memmove to out of line assembler
      8b9ed79c
    • Linus Torvalds's avatar
      Merge tag 'efi-next-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi · fc4c9f45
      Linus Torvalds authored
      Pull EFI updates from Ard Biesheuvel:
       "Another fairly sizable pull request, by EFI subsystem standards.
      
        Most of the work was done by me, some of it in collaboration with the
        distro and bootloader folks (GRUB, systemd-boot), where the main focus
        has been on removing pointless per-arch differences in the way EFI
        boots a Linux kernel.
      
         - Refactor the zboot code so that it incorporates all the EFI stub
           logic, rather than calling the decompressed kernel as a EFI app.
      
         - Add support for initrd= command line option to x86 mixed mode.
      
         - Allow initrd= to be used with arbitrary EFI accessible file systems
           instead of just the one the kernel itself was loaded from.
      
         - Move some x86-only handling and manipulation of the EFI memory map
           into arch/x86, as it is not used anywhere else.
      
         - More flexible handling of any random seeds provided by the boot
           environment (i.e., systemd-boot) so that it becomes available much
           earlier during the boot.
      
         - Allow improved arch-agnostic EFI support in loaders, by setting a
           uniform baseline of supported features, and adding a generic magic
           number to the DOS/PE header. This should allow loaders such as GRUB
           or systemd-boot to reduce the amount of arch-specific handling
           substantially.
      
         - (arm64) Run EFI runtime services from a dedicated stack, and use it
           to recover from synchronous exceptions that might occur in the
           firmware code.
      
         - (arm64) Ensure that we don't allocate memory outside of the 48-bit
           addressable physical range.
      
         - Make EFI pstore record size configurable
      
         - Add support for decoding CXL specific CPER records"
      
      * tag 'efi-next-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: (43 commits)
        arm64: efi: Recover from synchronous exceptions occurring in firmware
        arm64: efi: Execute runtime services from a dedicated stack
        arm64: efi: Limit allocations to 48-bit addressable physical region
        efi: Put Linux specific magic number in the DOS header
        efi: libstub: Always enable initrd command line loader and bump version
        efi: stub: use random seed from EFI variable
        efi: vars: prohibit reading random seed variables
        efi: random: combine bootloader provided RNG seed with RNG protocol output
        efi/cper, cxl: Decode CXL Error Log
        efi/cper, cxl: Decode CXL Protocol Error Section
        efi: libstub: fix efi_load_initrd_dev_path() kernel-doc comment
        efi: x86: Move EFI runtime map sysfs code to arch/x86
        efi: runtime-maps: Clarify purpose and enable by default for kexec
        efi: pstore: Add module parameter for setting the record size
        efi: xen: Set EFI_PARAVIRT for Xen dom0 boot on all architectures
        efi: memmap: Move manipulation routines into x86 arch tree
        efi: memmap: Move EFI fake memmap support into x86 arch tree
        efi: libstub: Undeprecate the command line initrd loader
        efi: libstub: Add mixed mode support to command line initrd loader
        efi: libstub: Permit mixed mode return types other than efi_status_t
        ...
      fc4c9f45
    • Linus Torvalds's avatar
      Merge tag 'integrity-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity · 717e6eb4
      Linus Torvalds authored
      Pull integrity updates from Mimi Zohar:
       "Aside from the one cleanup, the other changes are bug fixes:
      
        Cleanup:
      
         - Include missing iMac Pro 2017 in list of Macs with T2 security chip
      
        Bug fixes:
      
         - Improper instantiation of "encrypted" keys with user provided data
      
         - Not handling delay in updating LSM label based IMA policy rules
           (-ESTALE)
      
         - IMA and integrity memory leaks on error paths
      
         - CONFIG_IMA_DEFAULT_HASH_SM3 hash algorithm renamed"
      
      * tag 'integrity-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
        ima: Fix hash dependency to correct algorithm
        ima: Fix misuse of dereference of pointer in template_desc_init_fields()
        integrity: Fix memory leakage in keyring allocation error path
        ima: Fix memory leak in __ima_inode_hash()
        ima: Handle -ESTALE returned by ima_filter_rule_match()
        ima: Simplify ima_lsm_copy_rule
        ima: Fix a potential NULL pointer access in ima_restore_measurement_list
        efi: Add iMac Pro 2017 to uefi skip cert quirk
        KEYS: encrypted: fix key instantiation with user-provided data
      717e6eb4
    • Linus Torvalds's avatar
      Merge tag 'sysctl-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 8fa37a68
      Linus Torvalds authored
      Pull sysctl updates from Luis Chamberlain:
       "Only a small step forward on the sysctl cleanups for this cycle"
      
      * tag 'sysctl-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        sched: Move numa_balancing sysctls to its own file
      8fa37a68
    • Linus Torvalds's avatar
      Merge tag 'modules-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 3ba2c3ff
      Linus Torvalds authored
      Pull modules updates from Luis Chamberlain:
       "Tux gets for xmas an improvement to the average lookup performance of
        kallsyms_lookup_name() by 715x thanks to the work by Zhen Lei, which
        upgraded our old implementation from being O(n) to O(log(n)), while
        also retaining the old implementation support on /proc/kallsyms.
      
        The only penalty was increasing the memory footprint by 3 *
        kallsyms_num_syms. Folks who want to improve this further now also
        have a dedicated selftest facility through KALLSYMS_SELFTEST.
      
        Stephen Boyd added zstd in-kernel decompression support, but the only
        users of this would be folks using the load-pin LSM because otherwise
        we do module decompression in userspace.
      
        The only other thing with mentioning is a minor boot time optimization
        by Rasmus Villemoes which deferes param_sysfs_init() to late init. The
        rest is cleanups and minor fixes"
      
      * tag 'modules-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        livepatch: Call klp_match_callback() in klp_find_callback() to avoid code duplication
        module/decompress: Support zstd in-kernel decompression
        kallsyms: Remove unneeded semicolon
        kallsyms: Add self-test facility
        livepatch: Use kallsyms_on_each_match_symbol() to improve performance
        kallsyms: Add helper kallsyms_on_each_match_symbol()
        kallsyms: Reduce the memory occupied by kallsyms_seqs_of_names[]
        kallsyms: Correctly sequence symbols when CONFIG_LTO_CLANG=y
        kallsyms: Improve the performance of kallsyms_lookup_name()
        scripts/kallsyms: rename build_initial_tok_table()
        module: Fix NULL vs IS_ERR checking for module_get_next_page
        kernel/params.c: defer most of param_sysfs_init() to late_initcall time
        module: Remove unused macros module_addr_min/max
        module: remove redundant module_sysfs_initialized variable
      3ba2c3ff
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 0015edd6
      Linus Torvalds authored
      Pull clk driver updates from Stephen Boyd:
       "A pile of clk driver updates with a small tracepoint patch to the clk
        core this time around.
      
        The core framework is effectively unchanged, with the majority of the
        diff going to the Qualcomm clk driver directory because they added two
        3k line files that are almost all clk data (Abel Vesa from Linaro
        tried to shrink the number of lines down, but it doesn't seem to be
        possible without sacrificing readability).
      
        The second big driver this time around is the Rockchip rk3588 clk and
        reset unit, at _only_ 2.5k lines.
      
        Ignoring the big clk drivers from the familiar SoC vendors, there's
        just a bunch of little clk driver updates and fixes throughout here.
      
        It's the usual set of clk data fixups to describe proper parents, or
        add frequencies to frequency tables, or plug memory leaks when
        function calls fail. Also, some drivers are converted to use modern
        clk_hw APIs, which is always nice to see. And data is deduplicated,
        leading to a smaller kernel Image.
      
        Overall this batch has a larger collection of cleanups than it
        typically does. Maybe that means there are less new SoCs right now
        that need supporting, and the focus has shifted to quality and
        reliability. I can dream.
      
        New Drivers:
         - Frequency hopping controller hardware on MediaTek MT8186
         - Global clock controller for Qualcomm SM8550
         - Display clock controller for Qualcomm SC8280XP
         - RPMh clock controller for Qualcomm QDU1000 and QRU1000 SoCs
         - CPU PLL on MStar/SigmaStar SoCs
         - Support for the clock and reset unit of the Rockchip rk3588
      
        Updates:
         - Tracepoints for clk_rate_request structures
         - Debugfs support for fractional divider clk
         - Make MxL's CGU driver secure compatible
         - Ingenic JZ4755 SoC clk support
         - Support audio clks on X1000 SoCs
         - Remove flags from univ/main/syspll child fixed factor clocks across
           MediaTek platforms
         - Fix clock dependency for ADC on MediaTek MT7986
         - Fix parent for FlexSPI clock for i.MX93
         - Add USB suspend clock on i.MX8MP
         - Unmap anatop base on error for i.MX93 driver
         - Change enet clock parent to wakeup_axi_root for i.MX93
         - Drop LPIT1, LPIT2, TPM1 and TPM3 clocks for i.MX93
         - Mark HSIO bus clock and SYS_CNT clock as critical on i.MX93
         - Add 320MHz and 640MHz entries to PLL146x
         - Add audio shared gate and SAI clocks for i.MX8MP
         - Fix a possible memory leak in the error path of rockchip PLL
           creation
         - Fix header guard for V3S clocks
         - Add IR module clock for f1c100s
         - Correct the parent clocks for the (High Speed) Serial Communication
           Interfaces with FIFO ((H)SCIF) modules and the mixed-up Ethernet
           Switch clocks on Renesas R-Car S4-8
         - Add timer (TMU, CMT) and Cortex-A76 CPU core (Z0) clocks on Renesas
           R-Car V4H
         - Two PLL driver fixups for the Amlogic clk driver
         - Round SD clock rate to improve parent clock selection
         - Add Ethernet Switch and internal SASYNCPER clocks on Renesas R-Car
           S4-8
         - Add DMA (SYS-DMAC), SPI (MSIOF), external interrupt (INTC-EX)
           serial (SCIF), PWM (PWM and TPU), SDHI, and HyperFLASH/QSPI
           (RPC-IF) clocks on Renesas R-Car V4H
         - Add Multi-Function Timer Pulse Unit (MTU3a) clock and reset on
           Renesas RZ/G2L
         - Fix endless loop on Renesas RZ/N1
         - Correct the parent clocks for the High Speed Serial Communication
           Interfaces with FIFO (HSCIF) modules on the Renesas R-Car V4H SoC
           Note: HSCIF0 is used for the serial console on the White-Hawk
           development board
         - Various clk DT binding improvements and conversions to YAML
         - Qualcomm SM8150/SM8250 display clock controller cleaned up
         - Some missing clocks for Qualcomm SM8350 added
         - Qualcomm MSM8974 Global and Multimedia clock controllers
           transitioned to parent_data and parent_hws
         - Use parent_data and add network resets for Qualcomm IPQ8074
         - Qualcomm Krait clock controller modernized
         - Fix pm_runtime usage in Qualcomm SC7180 and SC7280 LPASS clock
           controllers
         - Enable retention mode on Qualcomm SM8250 USB GDSCs
         - Cleanup Qualcomm RPM and RPMh clock drivers to avoid duplicating
           clocks which definition could be shared between platforms
         - Various NULL pointer checks added for allocations"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (188 commits)
        clk: nomadik: correct struct name kernel-doc warning
        clk: lmk04832: fix kernel-doc warnings
        clk: lmk04832: drop superfluous #include
        clk: lmk04832: drop unnecessary semicolons
        clk: lmk04832: declare variables as const when possible
        clk: socfpga: Fix memory leak in socfpga_gate_init()
        clk: microchip: enable the MPFS clk driver by default if SOC_MICROCHIP_POLARFIRE
        clk: st: Fix memory leak in st_of_quadfs_setup()
        clk: samsung: Fix memory leak in _samsung_clk_register_pll()
        clk: Add trace events for rate requests
        clk: Store clk_core for clk_rate_request
        clk: qcom: rpmh: add support for SM6350 rpmh IPA clock
        clk: qcom: mmcc-msm8974: use parent_hws/_data instead of parent_names
        clk: qcom: mmcc-msm8974: move clock parent tables down
        clk: qcom: mmcc-msm8974: use ARRAY_SIZE instead of specifying num_parents
        clk: qcom: gcc-msm8974: use parent_hws/_data instead of parent_names
        clk: qcom: gcc-msm8974: move clock parent tables down
        clk: qcom: gcc-msm8974: use ARRAY_SIZE instead of specifying num_parents
        dt-bindings: clocks: qcom,mmcc: define clocks/clock-names for MSM8974
        dt-bindings: clock: split qcom,gcc-msm8974,-msm8226 to the separate file
        ...
      0015edd6
    • Linus Torvalds's avatar
      Merge tag 'mmc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 71946a25
      Linus Torvalds authored
      Pull MMC and MEMSTICK updates from Ulf Hansson:
       "MMC core:
         - A few minor improvements and cleanups
      
        MMC host:
         - Remove some redundant calls to local_irq_{save,restore}()
         - Replace kmap_atomic() with kmap_local_page()
         - Take return values from mmc_add_host() into account
         - dw_mmc-pltfm: Add support to configure clk-phase for socfpga
         - hsq: Minimize latency by using a fifo to dispatch requests
         - litex_mmc: Fixup corner case for polling mode
         - mtk-sd: Add inline crypto engine clock control
         - mtk-sd: Add support for the mediatek MT7986 variant
         - renesas_sdhi: Improve reset from HS400 mode
         - renesas_sdhi: Take DMA end interrupts into account
         - sdhci: Avoid unnecessary update of clock
         - sdhci: Fix an SD tuning issue
         - sdhci-brcmst: Add Kamal Dasu as maintainer for the Broadcom driver
         - sdhci-esdhc-imx: Improve tuning logic
         - sdhci-esdhc-imx: Improve support for the imxrt1050 variant
         - sdhci_f_sdh30: Add support for non-removable media
         - sdhci_f_sdh30: Add support for the Socionext F_SDH30_E51 variant
         - sdhci_f_sdh30: Add reset control support
         - sdhci-msm: Add support for the Qcom SM8550/SM8350/SM6375 variants
         - sdhci-msm: Add support for the Qcom MSM8976 variant
         - sdhci-of-arasan: Add support for dynamic configuration
         - sdhci-of-esdhc: Limit the clock frequency to confirm to spec
         - sdhci-pci: Enable asynchronous probe
         - sdhci-sprd: Improve card detection
         - sdhci-tegra: Improve reset support
         - sdhci-tegra: Add support to program MC stream ID
         - sunplus-mmc: Add new mmc driver for the Sunplus SP7021 controller
         - vub300: Fix warning splat for SDIO irq
      
        MEMSTICK core:
         - memstick: A few minor improvements and cleanups
      
        CLK/IOMMU:
         - clk: socfpga: Drop redundant support for clk-phase for the SD/MMC clk
         - iommu: Add tegra specific helper to get stream_id"
      
      * tag 'mmc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (108 commits)
        mmc: sdhci-sprd: Disable CLK_AUTO when the clock is less than 400K
        mmc: sdhci-of-esdhc: Modify mismatched function name
        memstick/mspro_block: Convert to use sysfs_emit()/sysfs_emit_at() APIs
        mmc: sdhci-tegra: Issue CMD and DAT resets together
        mmc: sdhci-tegra: Add support to program MC stream ID
        mmc: sdhci-tegra: Separate Tegra194 and Tegra234 SoC data
        mmc: sdhci-tegra: Sort includes alphabetically
        iommu/tegra: Add tegra_dev_iommu_get_stream_id() helper
        iommu: Add note about struct iommu_fwspec usage
        mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n
        dt-bindings: mmc: sdhci-msm: allow dma-coherent
        dt-bindings: mmc: sdhci-msm: drop properties mentioned in common MMC
        dt-bindings: mmc: sdhci-msm: cleanup style
        dt-bindings: mmc: sdhci-am654: cleanup style
        dt-bindings: mmc: sdhci: document sdhci-caps and sdhci-caps-mask
        mmc: vub300: fix warning - do not call blocking ops when !TASK_RUNNING
        MAINTAINERS: Update maintainer for SDHCI Broadcom BRCMSTB driver
        mmc: sdhci-of-esdhc: limit the SDHC clock frequency
        mmc: sdhci: Remove unneeded semicolon
        mmc: core: Normalize the error handling branch in sd_read_ext_regs()
        ...
      71946a25