Skip to content
  1. Mar 27, 2023
  2. Mar 25, 2023
    • Michal Michalik's avatar
      tools: ynl: add the Python requirements.txt file · bc77f731
      Michal Michalik authored
      
      
      It is a good practice to state explicitly which are the required Python
      packages needed in a particular project to run it. The most commonly
      used way is to store them in the `requirements.txt` file*.
      
      *URL: https://pip.pypa.io/en/stable/reference/requirements-file-format/
      
      Currently user needs to figure out himself that Python needs `PyYAML`
      and `jsonschema` (and theirs requirements) packages to use the tool.
      Add the `requirements.txt` for user convenience.
      
      How to use it:
      1) (optional) Create and activate empty virtual environment:
        python3.X -m venv venv3X
        source ./venv3X/bin/activate
      2) Install all the required packages:
        pip install -r requirements.txt
          or
        python -m pip install -r requirements.txt
      3) Run the script!
      
      The `requirements.txt` file was tested for:
      * Python 3.6
      * Python 3.8
      * Python 3.10
      
      Signed-off-by: default avatarMichal Michalik <michal.michalik@intel.com>
      Link: https://lore.kernel.org/r/20230323190802.32206-1-michal.michalik@intel.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      bc77f731
    • Tom Rix's avatar
      mISDN: remove unused vpm_read_address and cpld_read_reg functions · 2d08f3e1
      Tom Rix authored
      
      
      clang with W=1 reports
      drivers/isdn/hardware/mISDN/hfcmulti.c:667:1: error: unused function
        'vpm_read_address' [-Werror,-Wunused-function]
      vpm_read_address(struct hfc_multi *c)
      ^
      
      drivers/isdn/hardware/mISDN/hfcmulti.c:643:1: error: unused function
        'cpld_read_reg' [-Werror,-Wunused-function]
      cpld_read_reg(struct hfc_multi *hc, unsigned char reg)
      ^
      
      These functions are not used, so remove them.
      
      Reported-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarTom Rix <trix@redhat.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20230323161343.2633836-1-trix@redhat.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2d08f3e1
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · dc0a7b52
      Jakub Kicinski authored
      Conflicts:
      
      drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
        6e9d51b1 ("net/mlx5e: Initialize link speed to zero")
        1bffcea4 ("net/mlx5e: Add devlink hairpin queues parameters")
      https://lore.kernel.org/all/20230324120623.4ebbc66f@canb.auug.org.au/
      https://lore.kernel.org/all/20230321211135.47711-1-saeed@kernel.org/
      
      Adjacent changes:
      
      drivers/net/phy/phy.c
        323fe43c ("net: phy: Improved PHY error reporting in state machine")
        4203d840
      
       ("net: phy: Ensure state transitions are processed from phy_stop()")
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      dc0a7b52
  3. Mar 24, 2023
    • Linus Torvalds's avatar
      Merge tag 'net-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 608f1b13
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from bpf, wifi and bluetooth.
      
        Current release - regressions:
      
         - wifi: mt76: mt7915: add back 160MHz channel width support for
           MT7915
      
         - libbpf: revert poisoning of strlcpy, it broke uClibc-ng
      
        Current release - new code bugs:
      
         - bpf: improve the coverage of the "allow reads from uninit stack"
           feature to fix verification complexity problems
      
         - eth: am65-cpts: reset PPS genf adj settings on enable
      
        Previous releases - regressions:
      
         - wifi: mac80211: serialize ieee80211_handle_wake_tx_queue()
      
         - wifi: mt76: do not run mt76_unregister_device() on unregistered hw,
           fix null-deref
      
         - Bluetooth: btqcomsmd: fix command timeout after setting BD address
      
         - eth: igb: revert rtnl_lock() that causes a deadlock
      
         - dsa: mscc: ocelot: fix device specific statistics
      
        Previous releases - always broken:
      
         - xsk: add missing overflow check in xdp_umem_reg()
      
         - wifi: mac80211:
            - fix QoS on mesh interfaces
            - fix mesh path discovery based on unicast packets
      
         - Bluetooth:
            - ISO: fix timestamped HCI ISO data packet parsing
            - remove "Power-on" check from Mesh feature
      
         - usbnet: more fixes to drivers trusting packet length
      
         - wifi: iwlwifi: mvm: fix mvmtxq->stopped handling
      
         - Bluetooth: btintel: iterate only bluetooth device ACPI entries
      
         - eth: iavf: fix inverted Rx hash condition leading to disabled hash
      
         - eth: igc: fix the validation logic for taprio's gate list
      
         - dsa: tag_brcm: legacy: fix daisy-chained switches
      
        Misc:
      
         - bpf: adjust insufficient default bpf_jit_limit to account for
           growth of BPF use over the last 5 years
      
         - xdp: bpf_xdp_metadata() use EOPNOTSUPP as unique errno indicating
           no driver support"
      
      * tag 'net-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (84 commits)
        Bluetooth: HCI: Fix global-out-of-bounds
        Bluetooth: mgmt: Fix MGMT add advmon with RSSI command
        Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work
        Bluetooth: L2CAP: Fix responding with wrong PDU type
        Bluetooth: btqcomsmd: Fix command timeout after setting BD address
        Bluetooth: btinel: Check ACPI handle for NULL before accessing
        net: mdio: thunder: Add missing fwnode_handle_put()
        net: dsa: mt7530: move setting ssc_delta to PHY_INTERFACE_MODE_TRGMII case
        net: dsa: mt7530: move lowering TRGMII driving to mt7530_setup()
        net: dsa: mt7530: move enabling disabling core clock to mt7530_pll_setup()
        net: asix: fix modprobe "sysfs: cannot create duplicate filename"
        gve: Cache link_speed value from device
        tools: ynl: Fix genlmsg header encoding formats
        net: enetc: fix aggregate RMON counters not showing the ranges
        Bluetooth: Remove "Power-on" check from Mesh feature
        Bluetooth: Fix race condition in hci_cmd_sync_clear
        Bluetooth: btintel: Iterate only bluetooth device ACPI entries
        Bluetooth: ISO: fix timestamped HCI ISO data packet parsing
        Bluetooth: btusb: Remove detection of ISO packets over bulk
        Bluetooth: hci_core: Detect if an ACL packet is in fact an ISO packet
        ...
      608f1b13
    • Linus Torvalds's avatar
      Merge tag 'for-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 28506304
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "A few more fixes, the zoned accounting fix is spread across a few
        patches, preparatory and the actual fixes:
      
         - zoned mode:
            - fix accounting of unusable zone space
            - fix zone activation condition for DUP profile
            - preparatory patches
      
         - improved error handling of missing chunks
      
         - fix compiler warning"
      
      * tag 'for-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: zoned: drop space_info->active_total_bytes
        btrfs: zoned: count fresh BG region as zone unusable
        btrfs: use temporary variable for space_info in btrfs_update_block_group
        btrfs: rename BTRFS_FS_NO_OVERCOMMIT to BTRFS_FS_ACTIVE_ZONE_TRACKING
        btrfs: zoned: fix btrfs_can_activate_zone() to support DUP profile
        btrfs: fix compiler warning on SPARC/PA-RISC handling fscrypt_setup_filename
        btrfs: handle missing chunk mapping more gracefully
      28506304
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 6dd74c51
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four small fixes, three in drivers.
      
        The core fix adds a UFS device to an existing quirk to avoid a huge
        delay on boot"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: scsi_dh_alua: Fix memleak for 'qdata' in alua_activate()
        scsi: qla2xxx: Synchronize the IOCB count to be in order
        scsi: qla2xxx: Perform lockless command completion in abort path
        scsi: core: Add BLIST_SKIP_VPD_PAGES for SKhynix H28U74301AMR
      6dd74c51
    • Florian Fainelli's avatar
      net: phy: Improved PHY error reporting in state machine · 323fe43c
      Florian Fainelli authored
      
      
      When the PHY library calls phy_error() something bad has happened, and
      we halt the PHY state machine. Calling phy_error() from the main state
      machine however is not precise enough to know whether the issue is
      reading the link status or starting auto-negotiation.
      
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      323fe43c
    • Cai Huoqing's avatar
      net/ism: Remove redundant pci_clear_master · c85bd3da
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c85bd3da
    • Cai Huoqing's avatar
      isdn: mISDN: netjet: Remove redundant pci_clear_master · 950bfdcf
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      950bfdcf
    • Horatiu Vultur's avatar
      net: phy: micrel: Add support for PTP_PF_EXTTS for lan8841 · fac63186
      Horatiu Vultur authored
      
      
      Extend the PTP programmable gpios to implement also PTP_PF_EXTTS
      function. The pins can be configured to capture both of rising
      and falling edge. Once the event is seen, then an interrupt is
      generated and the LTC is saved in the registers.
      
      This was tested using:
      ts2phc -m -l 7 -s generic -f ts2phc.cfg
      
      Where the configuration was the following:
      [global]
      ts2phc.pin_index  6
      
      [eth2]
      
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fac63186
    • Cai Huoqing's avatar
      ethernet: ec_bhf: Remove redundant pci_clear_master · 3228150b
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3228150b
    • Cai Huoqing's avatar
      ionic: Remove redundant pci_clear_master · f686e959
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Acked-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f686e959
    • Cai Huoqing's avatar
      net: mana: Remove redundant pci_clear_master · 2d59af83
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2d59af83
    • Cai Huoqing's avatar
      net/mlx5: Remove redundant pci_clear_master · 5b6f4bd2
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b6f4bd2
    • Cai Huoqing's avatar
      net/fungible: Remove redundant pci_clear_master · 8b91d5b6
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Acked-by: default avatarDimitris Michailidis <dmichail@fungible.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b91d5b6
    • Cai Huoqing's avatar
      net: cxgb4vf: Remove redundant pci_clear_master · aae964bb
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aae964bb
    • Cai Huoqing's avatar
      net: hisilicon: Remove redundant pci_clear_master · fc3e07e8
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc3e07e8
    • Cai Huoqing's avatar
      net: liquidio: Remove redundant pci_clear_master · fc5aba60
      Cai Huoqing authored
      
      
      Remove pci_clear_master to simplify the code,
      the bus-mastering is also cleared in do_pci_disable_device,
      like this:
      ./drivers/pci/pci.c:2197
      static void do_pci_disable_device(struct pci_dev *dev)
      {
      	u16 pci_command;
      
      	pci_read_config_word(dev, PCI_COMMAND, &pci_command);
      	if (pci_command & PCI_COMMAND_MASTER) {
      		pci_command &= ~PCI_COMMAND_MASTER;
      		pci_write_config_word(dev, PCI_COMMAND, pci_command);
      	}
      
      	pcibios_disable_device(dev);
      }.
      And dev->is_busmaster is set to 0 in pci_disable_device.
      
      Signed-off-by: default avatarCai Huoqing <cai.huoqing@linux.dev>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc5aba60
    • Taichi Nishimura's avatar
      fix typos in net/sched/* files · 4170f0ef
      Taichi Nishimura authored
      
      
      This patch fixes typos in net/sched/* files.
      
      Signed-off-by: default avatarTaichi Nishimura <awkrail01@gmail.com>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4170f0ef
    • Lukas Bulwahn's avatar
      ethernet: broadcom/sb1250-mac: clean up after SIBYTE_BCM1x55 removal · c34ce279
      Lukas Bulwahn authored
      With commit b984d7b5
      
       ("MIPS: sibyte: Remove unused config option
      SIBYTE_BCM1x55"), some #if's in the Broadcom SiByte SOC built-in Ethernet
      driver can be simplified.
      
      Simplify prepreprocessor conditions after config SIBYTE_BCM1x55 removal.
      
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Reviewed-by: default avatarSteen Hegelund <Steen.Hegelund@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c34ce279
    • Xin Long's avatar
      ipv6: prevent router_solicitations for team port · 2df9bf4d
      Xin Long authored
      The issue fixed for bonding in commit c2edacf8 ("bonding / ipv6: no
      addrconf for slaves separately from master") also exists in team driver.
      However, we can't just disable ipv6 addrconf for team ports, as 'teamd'
      will need it when nsns_ping watch is used in the user space.
      
      Instead of preventing ipv6 addrconf, this patch only prevents RS packets
      for team ports, as it did in commit b52e1cce
      
       ("ipv6: Don't send rs
      packets to the interface of ARPHRD_TUNNEL").
      
      Note that we do not prevent DAD packets, to avoid the changes getting
      intricate / hacky. Also, usually sysctl dad_transmits is set to 1 and
      only 1 DAD packet will be sent, and by now no libteam user complains
      about DAD packets on team ports, unlike RS packets.
      
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2df9bf4d
    • Jakub Kicinski's avatar
      Merge branch 'main' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next · e346df60
      Jakub Kicinski authored
      
      
      Florian Westphal says:
      
      ====================
      netfilter updates for net-next
      
      This pull request contains changes for the *net-next* tree.
      
      1. Change IPv6 stack to keep conntrack references until ipsec policy
         checks are done, like ipv4, from Madhu Koriginja.
         This update was missed when IPv6 NAT support was added 10 years ago.
      
      2. get rid of old 'compat' structure layout in nf_nat_redirect
         core and move the conversion to the only user that needs the
         old layout for abi reasons. From Jeremy Sowden.
      
      3. Compact some common code paths in nft_redir, also from Jeremy.
      
      4. Time to remove the 'default y' knob so iptables 32bit compat interface
         isn't compiled in by default anymore, from myself.
      
      5. Move ip(6)tables builtin icmp matches to the udptcp one.
         This has the advantage that icmp/icmpv6 match doesn't load the
         iptables/ip6tables modules anymore when iptables-nft is used.
         Also from myself.
      
      * 'main' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next:
        netfilter: keep conntrack reference until IPsecv6 policy checks are done
        xtables: move icmp/icmpv6 logic to xt_tcpudp
        netfilter: xtables: disable 32bit compat interface by default
        netfilter: nft_masq: deduplicate eval call-backs
        netfilter: nft_redir: use `struct nf_nat_range2` throughout and deduplicate eval call-backs
      ====================
      
      Link: https://lore.kernel.org/r/20230322210802.6743-1-fw@strlen.de
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e346df60
    • Jakub Kicinski's avatar
      docs: netdev: add note about Changes Requested and revising commit messages · e110ba65
      Jakub Kicinski authored
      
      
      One of the most commonly asked questions is "I answered all questions
      and don't need to make any code changes, why was the patch not applied".
      Document our time honored tradition of asking people to repost with
      improved commit messages, to record the answers to reviewer questions.
      
      Take this opportunity to also recommend a change log format.
      
      Link: https://lore.kernel.org/r/20230322231202.265835-1-kuba@kernel.org
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e110ba65
    • Maxim Korotkov's avatar
      bnx2: remove deadcode in bnx2_init_cpus() · 4691720f
      Maxim Korotkov authored
      The load_cpu_fw function has no error return code
      and always returns zero. Checking the value returned by
      this function does not make sense.
      Now checking the value of the return value is misleading when reading
      the code. Path with error handling was deleted in 57579f76
      
      
      ("bnx2: Use request_firmware()").
      As a result, bnx2_init_cpus() will also return only zero
      Therefore, it will be safe to change the type of functions
      to void and remove checking to improving readability.
      
      Found by Security Code and Linux Verification
      Center (linuxtesting.org) with SVACE
      
      Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarMaxim Korotkov <korotkov.maxim.s@gmail.com>
      Link: https://lore.kernel.org/r/20230322162843.3452-1-korotkov.maxim.s@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4691720f
    • Alex Elder's avatar
      net: ipa: add IPA v5.0 to ipa_version_string() · 0c04328c
      Alex Elder authored
      
      
      In the IPA device sysfs directory, the "version" file can be read to
      find out what IPA version is implemented.  The content of this file
      is supplied by ipa_version_string(), which needs to be updated to
      properly handle IPA v5.0.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20230322144742.2203947-1-elder@linaro.org
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0c04328c
    • Jiri Pirko's avatar
      ynl: allow to encode u8 attr · 8da3a559
      Jiri Pirko authored
      
      
      Playing with dpll netlink, I came across following issue:
      $ sudo ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/dpll.yaml --do pin-set --json '{"id": 0, "pin-idx": 1, "pin-state": 1}'
      Traceback (most recent call last):
        File "tools/net/ynl/cli.py", line 52, in <module>
          main()
        File "tools/net/ynl/cli.py", line 40, in main
          reply = ynl.do(args.do, attrs)
        File "tools/net/ynl/lib/ynl.py", line 520, in do
          return self._op(method, vals)
        File "tools/net/ynl/lib/ynl.py", line 476, in _op
          msg += self._add_attr(op.attr_set.name, name, value)
        File "tools/net/ynl/lib/ynl.py", line 344, in _add_attr
          raise Exception(f'Unknown type at {space} {name} {value} {attr["type"]}')
      Exception: Unknown type at dpll pin-state 1 u8
      
      I'm not that familiar with ynl code, but from a quick peek, I suspect
      that couple other types are missing for both encoding and decoding.
      Ignoring those here as I'm scratching my local itch only.
      
      Fix the issue by adding u8 attr packing.
      
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/20230322154242.1739136-1-jiri@resnulli.us
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8da3a559
    • Jakub Kicinski's avatar
      docs: networking: document NAPI · 3eb8eea2
      Jakub Kicinski authored
      
      
      Add basic documentation about NAPI. We can stop linking to the ancient
      doc on the LF wiki.
      
      Link: https://lore.kernel.org/all/20230315223044.471002-1-kuba@kernel.org/
      Reviewed-by: default avatarBagas Sanjaya <bagasdotme@gmail.com>
      Reviewed-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
      Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> # for ctucanfd-driver.rst
      Reviewed-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Link: https://lore.kernel.org/r/20230322053848.198452-1-kuba@kernel.org
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3eb8eea2
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 1b4ae19e
      Jakub Kicinski authored
      
      
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2023-03-23
      
      We've added 8 non-merge commits during the last 13 day(s) which contain
      a total of 21 files changed, 238 insertions(+), 161 deletions(-).
      
      The main changes are:
      
      1) Fix verification issues in some BPF programs due to their stack usage
         patterns, from Eduard Zingerman.
      
      2) Fix to add missing overflow checks in xdp_umem_reg and return an error
         in such case, from Kal Conley.
      
      3) Fix and undo poisoning of strlcpy in libbpf given it broke builds for
         libcs which provided the former like uClibc-ng, from Jesus Sanchez-Palencia.
      
      4) Fix insufficient bpf_jit_limit default to avoid users running into hard
         to debug seccomp BPF errors, from Daniel Borkmann.
      
      5) Fix driver return code when they don't support a bpf_xdp_metadata kfunc
         to make it unambiguous from other errors, from Jesper Dangaard Brouer.
      
      6) Two BPF selftest fixes to address compilation errors from recent changes
         in kernel structures, from Alexei Starovoitov.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        xdp: bpf_xdp_metadata use EOPNOTSUPP for no driver support
        bpf: Adjust insufficient default bpf_jit_limit
        xsk: Add missing overflow check in xdp_umem_reg
        selftests/bpf: Fix progs/test_deny_namespace.c issues.
        selftests/bpf: Fix progs/find_vma_fail1.c build error.
        libbpf: Revert poisoning of strlcpy
        selftests/bpf: Tests for uninitialized stack reads
        bpf: Allow reads from uninit stack
      ====================
      
      Link: https://lore.kernel.org/r/20230323225221.6082-1-daniel@iogearbox.net
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1b4ae19e
    • Jakub Kicinski's avatar
      Merge tag 'for-net-2023-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth · 2e63a2df
      Jakub Kicinski authored
      Luiz Augusto von Dentz says:
      
      ====================
      bluetooth pull request for net:
      
       - Fix MGMT add advmon with RSSI command
       - L2CAP: Fix responding with wrong PDU type
       - Fix race condition in hci_cmd_sync_clear
       - ISO: Fix timestamped HCI ISO data packet parsing
       - HCI: Fix global-out-of-bounds
       - hci_sync: Resume adv with no RPA when active scan
      
      * tag 'for-net-2023-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth:
        Bluetooth: HCI: Fix global-out-of-bounds
        Bluetooth: mgmt: Fix MGMT add advmon with RSSI command
        Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work
        Bluetooth: L2CAP: Fix responding with wrong PDU type
        Bluetooth: btqcomsmd: Fix command timeout after setting BD address
        Bluetooth: btinel: Check ACPI handle for NULL before accessing
        Bluetooth: Remove "Power-on" check from Mesh feature
        Bluetooth: Fix race condition in hci_cmd_sync_clear
        Bluetooth: btintel: Iterate only bluetooth device ACPI entries
        Bluetooth: ISO: fix timestamped HCI ISO data packet parsing
        Bluetooth: btusb: Remove detection of ISO packets over bulk
        Bluetooth: hci_core: Detect if an ACL packet is in fact an ISO packet
        Bluetooth: hci_sync: Resume adv with no RPA when active scan
      ====================
      
      Link: https://lore.kernel.org/r/20230323202335.33808413
      
      -1-luiz.dentz@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2e63a2df
    • Jakub Kicinski's avatar
      Merge tag 'wireless-2023-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless · 4f44d326
      Jakub Kicinski authored
      
      
      Kalle Valo says:
      
      ====================
      wireless fixes for v6.3
      
      Third set of fixes for v6.3. mt76 has two kernel crash fixes and
      adding back 160 MHz channel support for mt7915. mac80211 has fixes for
      a race in transmit path and two mesh related fixes. iwlwifi also has
      fixes for races.
      
      * tag 'wireless-2023-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless:
        wifi: mac80211: fix mesh path discovery based on unicast packets
        wifi: mac80211: fix qos on mesh interfaces
        wifi: iwlwifi: mvm: protect TXQ list manipulation
        wifi: iwlwifi: mvm: fix mvmtxq->stopped handling
        wifi: mac80211: Serialize ieee80211_handle_wake_tx_queue()
        wifi: mwifiex: mark OF related data as maybe unused
        wifi: mt76: connac: do not check WED status for non-mmio devices
        wifi: mt76: mt7915: add back 160MHz channel width support for MT7915
        wifi: mt76: do not run mt76_unregister_device() on unregistered hw
      ====================
      
      Link: https://lore.kernel.org/r/20230323110332.C4FE4C433D2@smtp.kernel.org
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4f44d326
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v6.3-rc3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 1e760fa3
      Linus Torvalds authored
      Pull gfs2 fix from Andreas Gruenbacher:
      
       - Reinstate commit 970343cd ("GFS2: free disk inode which is
         deleted by remote node -V2") as reverting that commit could cause
         gfs2_put_super() to hang.
      
      * tag 'gfs2-v6.3-rc3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        Reinstate "GFS2: free disk inode which is deleted by remote node -V2"
      1e760fa3
    • Sungwoo Kim's avatar
      Bluetooth: HCI: Fix global-out-of-bounds · bce56405
      Sungwoo Kim authored
      To loop a variable-length array, hci_init_stage_sync(stage) considers
      that stage[i] is valid as long as stage[i-1].func is valid.
      Thus, the last element of stage[].func should be intentionally invalid
      as hci_init0[], le_init2[], and others did.
      However, amp_init1[] and amp_init2[] have no invalid element, letting
      hci_init_stage_sync() keep accessing amp_init1[] over its valid range.
      This patch fixes this by adding {} in the last of amp_init1[] and
      amp_init2[].
      
      ==================================================================
      BUG: KASAN: global-out-of-bounds in hci_dev_open_sync (
      /v6.2-bzimage/net/bluetooth/hci_sync.c:3154
      /v6.2-bzimage/net/bluetooth/hci_sync.c:3343
      /v6.2-bzimage/net/bluetooth/hci_sync.c:4418
      /v6.2-bzimage/net/bluetooth/hci_sync.c:4609
      /v6.2-bzimage/net/bluetooth/hci_sync.c:4689)
      Read of size 8 at addr ffffffffaed1ab70 by task kworker/u5:0/1032
      CPU: 0 PID: 1032 Comm: kworker/u5:0 Not tainted 6.2.0 #3
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04
      Workqueue: hci1 hci_power_on
      Call Trace:
       <TASK>
      dump_stack_lvl (/v6.2-bzimage/lib/dump_stack.c:107 (discriminator 1))
      print_report (/v6.2-bzimage/mm/kasan/report.c:307
        /v6.2-bzimage/mm/kasan/report.c:417)
      ? hci_dev_open_sync (/v6.2-bzimage/net/bluetooth/hci_sync.c:3154
        /v6.2-bzimage/net/bluetooth/hci_sync.c:3343
        /v6.2-bzimage/net/bluetooth/hci_sync.c:4418
        /v6.2-bzimage/net/bluetooth/hci_sync.c:4609
        /v6.2-bzimage/net/bluetooth/hci_sync.c:4689)
      kasan_report (/v6.2-bzimage/mm/kasan/report.c:184
        /v6.2-bzimage/mm/kasan/report.c:519)
      ? hci_dev_open_sync (/v6.2-bzimage/net/bluetooth/hci_sync.c:3154
        /v6.2-bzimage/net/bluetooth/hci_sync.c:3343
        /v6.2-bzimage/net/bluetooth/hci_sync.c:4418
        /v6.2-bzimage/net/bluetooth/hci_sync.c:4609
        /v6.2-bzimage/net/bluetooth/hci_sync.c:4689)
      hci_dev_open_sync (/v6.2-bzimage/net/bluetooth/hci_sync.c:3154
        /v6.2-bzimage/net/bluetooth/hci_sync.c:3343
        /v6.2-bzimage/net/bluetooth/hci_sync.c:4418
        /v6.2-bzimage/net/bluetooth/hci_sync.c:4609
        /v6.2-bzimage/net/bluetooth/hci_sync.c:4689)
      ? __pfx_hci_dev_open_sync (/v6.2-bzimage/net/bluetooth/hci_sync.c:4635)
      ? mutex_lock (/v6.2-bzimage/./arch/x86/include/asm/atomic64_64.h:190
        /v6.2-bzimage/./include/linux/atomic/atomic-long.h:443
        /v6.2-bzimage/./include/linux/atomic/atomic-instrumented.h:1781
        /v6.2-bzimage/kernel/locking/mutex.c:171
        /v6.2-bzimage/kernel/locking/mutex.c:285)
      ? __pfx_mutex_lock (/v6.2-bzimage/kernel/locking/mutex.c:282)
      hci_power_on (/v6.2-bzimage/net/bluetooth/hci_core.c:485
        /v6.2-bzimage/net/bluetooth/hci_core.c:984)
      ? __pfx_hci_power_on (/v6.2-bzimage/net/bluetooth/hci_core.c:969)
      ? read_word_at_a_time (/v6.2-bzimage/./include/asm-generic/rwonce.h:85)
      ? strscpy (/v6.2-bzimage/./arch/x86/include/asm/word-at-a-time.h:62
        /v6.2-bzimage/lib/string.c:161)
      process_one_work (/v6.2-bzimage/kernel/workqueue.c:2294)
      worker_thread (/v6.2-bzimage/./include/linux/list.h:292
        /v6.2-bzimage/kernel/workqueue.c:2437)
      ? __pfx_worker_thread (/v6.2-bzimage/kernel/workqueue.c:2379)
      kthread (/v6.2-bzimage/kernel/kthread.c:376)
      ? __pfx_kthread (/v6.2-bzimage/kernel/kthread.c:331)
      ret_from_fork (/v6.2-bzimage/arch/x86/entry/entry_64.S:314)
       </TASK>
      The buggy address belongs to the variable:
      amp_init1+0x30/0x60
      The buggy address belongs to the physical page:
      page:000000003a157ec6 refcount:1 mapcount:0 mapping:0000000000000000 ia
      flags: 0x200000000001000(reserved|node=0|zone=2)
      raw: 0200000000001000 ffffea0005054688 ffffea0005054688 000000000000000
      raw: 0000000000000000 0000000000000000 00000001ffffffff 000000000000000
      page dumped because: kasan: bad access detected
      Memory state around the buggy address:
       ffffffffaed1aa00: f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9 00 00 00 00
       ffffffffaed1aa80: 00 00 00 00 f9 f9 f9 f9 00 00 00 00 00 00 00 00
      >ffffffffaed1ab00: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 f9 f9
                                                                   ^
       ffffffffaed1ab80: f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9 00 00 00 f9
       ffffffffaed1ac00: f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9 00 00 02 f9
      
      This bug is found by FuzzBT, a modified version of Syzkaller.
      Other contributors for this bug are Ruoyu Wu and Peng Hui.
      
      Fixes: d0b13706
      
       ("Bluetooth: hci_sync: Rework init stages")
      Signed-off-by: default avatarSungwoo Kim <iam@sung-woo.kim>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      bce56405
    • Howard Chung's avatar
      Bluetooth: mgmt: Fix MGMT add advmon with RSSI command · 1a0291f8
      Howard Chung authored
      
      
      The MGMT command: MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI uses variable
      length argument. This causes host not able to register advmon with rssi.
      
      This patch has been locally tested by adding monitor with rssi via
      btmgmt on a kernel 6.1 machine.
      
      Reviewed-by: default avatarArchie Pusaka <apusaka@chromium.org>
      Fixes: b338d917
      
       ("Bluetooth: Implement support for Mesh")
      Signed-off-by: default avatarHoward Chung <howardchung@google.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      1a0291f8
    • Zheng Wang's avatar
      Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work · 1e9ac114
      Zheng Wang authored
      In btsdio_probe, &data->work was bound with btsdio_work.In
      btsdio_send_frame, it was started by schedule_work.
      
      If we call btsdio_remove with an unfinished job, there may
      be a race condition and cause UAF bug on hdev.
      
      Fixes: ddbaf13e
      
       ("[Bluetooth] Add generic driver for Bluetooth SDIO devices")
      Signed-off-by: default avatarZheng Wang <zyytlz.wz@163.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      1e9ac114
    • Luiz Augusto von Dentz's avatar
      Bluetooth: L2CAP: Fix responding with wrong PDU type · 9aa9d947
      Luiz Augusto von Dentz authored
      L2CAP_ECRED_CONN_REQ shall be responded with L2CAP_ECRED_CONN_RSP not
      L2CAP_LE_CONN_RSP:
      
      L2CAP LE EATT Server - Reject - run
        Listening for connections
        New client connection with handle 0x002a
        Sending L2CAP Request from client
        Client received response code 0x15
        Unexpected L2CAP response code (expected 0x18)
      L2CAP LE EATT Server - Reject - test failed
      
      > ACL Data RX: Handle 42 flags 0x02 dlen 26
            LE L2CAP: Enhanced Credit Connection Request (0x17) ident 1 len 18
              PSM: 39 (0x0027)
              MTU: 64
              MPS: 64
              Credits: 5
              Source CID: 65
              Source CID: 66
              Source CID: 67
              Source CID: 68
              Source CID: 69
      < ACL Data TX: Handle 42 flags 0x00 dlen 16
            LE L2CAP: LE Connection Response (0x15) ident 1 len 8
              invalid size
              00 00 00 00 00 00 06 00
      
      L2CAP LE EATT Server - Reject - run
        Listening for connections
        New client connection with handle 0x002a
        Sending L2CAP Request from client
        Client received response code 0x18
      L2CAP LE EATT Server - Reject - test passed
      
      Fixes: 15f02b91
      
       ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      9aa9d947