1. Feb 16, 2024
    • David S. Miller's avatar
      Merge branch 'bridge-mdb-events' · 82a678e2
      David S. Miller authored
      
      
      Tobias Waldekranz says:
      
      ====================
      net: bridge: switchdev: Ensure MDB events are delivered exactly once
      
      When a device is attached to a bridge, drivers will request a replay
      of objects that were created before the device joined the bridge, that
      are still of interest to the joining port. Typical examples include
      FDB entries and MDB memberships on other ports ("foreign interfaces")
      or on the bridge itself.
      
      Conversely when a device is detached, the bridge will synthesize
      deletion events for all those objects that are still live, but no
      longer applicable to the device in question.
      
      This series eliminates two races related to the synching and
      unsynching phases of a bridge's MDB with a joining or leaving device,
      that would cause notifications of such objects to be either delivered
      twice (1/2), or not at all (2/2).
      
      A similar race to the one solved by 1/2 still remains for the
      FDB. This is much harder to solve, due to the lockless operation of
      the FDB's rhashtable, and is therefore knowingly left out of this
      series.
      
      v1 -> v2:
      - Squash the previously separate addition of
        switchdev_port_obj_act_is_deferred into first consumer.
      - Use ether_addr_equal to compare MAC addresses.
      - Document switchdev_port_obj_act_is_deferred (renamed from
        switchdev_port_obj_is_deferred in v1, to indicate that we also match
        on the action).
      - Delay allocations of MDB objects until we know they're needed.
      - Use non-RCU version of the hash list iterator, now that the MDB is
        not scanned while holding the RCU read lock.
      - Add Fixes tag to commit message
      
      v2 -> v3:
      - Fix unlocking in error paths
      - Access RCU protected port list via mlock_dereference, since MDB is
        guaranteed to remain constant for the duration of the scan.
      
      v3 -> v4:
      - Limit the search for exiting deferred events in 1/2 to only apply to
        additions, since the problem does not exist in the deletion case.
      - Add 2/2, to plug a related race when unoffloading an indirectly
        associated device.
      
      v4 -> v5:
      - Fix grammatical errors in kerneldoc of
        switchdev_port_obj_act_is_deferred
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      82a678e2
    • Tobias Waldekranz's avatar
      net: bridge: switchdev: Ensure deferred event delivery on unoffload · f7a70d65
      Tobias Waldekranz authored
      When unoffloading a device, it is important to ensure that all
      relevant deferred events are delivered to it before it disassociates
      itself from the bridge.
      
      Before this change, this was true for the normal case when a device
      maps 1:1 to a net_bridge_port, i.e.
      
         br0
         /
      swp0
      
      When swp0 leaves br0, the call to switchdev_deferred_process() in
      del_nbp() makes sure to process any outstanding events while the
      device is still associated with the bridge.
      
      In the case when the association is indirect though, i.e. when the
      device is attached to the bridge via an intermediate device, like a
      LAG...
      
          br0
          /
        lag0
        /
      swp0
      
      ...then detaching swp0 from lag0 does not cause any net_bridge_port to
      be deleted, so there was no guarantee that all events had been
      processed before the device disassociated itself from the bridge.
      
      Fix this by always synchronously processing all deferred events before
      signaling completion of unoffloading back to the driver.
      
      Fixes: 4e51bf44
      
       ("net: bridge: move the switchdev object replay helpers to "push" mode")
      Signed-off-by: default avatarTobias Waldekranz <tobias@waldekranz.com>
      Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7a70d65
    • Tobias Waldekranz's avatar
      net: bridge: switchdev: Skip MDB replays of deferred events on offload · dc489f86
      Tobias Waldekranz authored
      Before this change, generation of the list of MDB events to replay
      would race against the creation of new group memberships, either from
      the IGMP/MLD snooping logic or from user configuration.
      
      While new memberships are immediately visible to walkers of
      br->mdb_list, the notification of their existence to switchdev event
      subscribers is deferred until a later point in time. So if a replay
      list was generated during a time that overlapped with such a window,
      it would also contain a replay of the not-yet-delivered event.
      
      The driver would thus receive two copies of what the bridge internally
      considered to be one single event. On destruction of the bridge, only
      a single membership deletion event was therefore sent. As a
      consequence of this, drivers which reference count memberships (at
      least DSA), would be left with orphan groups in their hardware
      database when the bridge was destroyed.
      
      This is only an issue when replaying additions. While deletion events
      may still be pending on the deferred queue, they will already have
      been removed from br->mdb_list, so no duplicates can be generated in
      that scenario.
      
      To a user this meant that old group memberships, from a bridge in
      which a port was previously attached, could be reanimated (in
      hardware) when the port joined a new bridge, without the new bridge's
      knowledge.
      
      For example, on an mv88e6xxx system, create a snooping bridge and
      immediately add a port to it:
      
          root@infix-06-0b-00:~$ ip link add dev br0 up type bridge mcast_snooping 1 && \
          > ip link set dev x3 up master br0
      
      And then destroy the bridge:
      
          root@infix-06-0b-00:~$ ip link del dev br0
          root@infix-06-0b-00:~$ mvls atu
          ADDRESS             FID  STATE      Q  F  0  1  2  3  4  5  6  7  8  9  a
          DEV:0 Marvell 88E6393X
          33:33:00:00:00:6a     1  static     -  -  0  .  .  .  .  .  .  .  .  .  .
          33:33:ff:87:e4:3f     1  static     -  -  0  .  .  .  .  .  .  .  .  .  .
          ff:ff:ff:ff:ff:ff     1  static     -  -  0  1  2  3  4  5  6  7  8  9  a
          root@infix-06-0b-00:~$
      
      The two IPv6 groups remain in the hardware database because the
      port (x3) is notified of the host's membership twice: once via the
      original event and once via a replay. Since only a single delete
      notification is sent, the count remains at 1 when the bridge is
      destroyed.
      
      Then add the same port (or another port belonging to the same hardware
      domain) to a new bridge, this time with snooping disabled:
      
          root@infix-06-0b-00:~$ ip link add dev br1 up type bridge mcast_snooping 0 && \
          > ip link set dev x3 up master br1
      
      All multicast, including the two IPv6 groups from br0, should now be
      flooded, according to the policy of br1. But instead the old
      memberships are still active in the hardware database, causing the
      switch to only forward traffic to those groups towards the CPU (port
      0).
      
      Eliminate the race in two steps:
      
      1. Grab the write-side lock of the MDB while generating the replay
         list.
      
      This prevents new memberships from showing up while we are generating
      the replay list. But it leaves the scenario in which a deferred event
      was already generated, but not delivered, before we grabbed the
      lock. Therefore:
      
      2. Make sure that no deferred version of a replay event is already
         enqueued to the switchdev deferred queue, before adding it to the
         replay list, when replaying additions.
      
      Fixes: 4f2673b3
      
       ("net: bridge: add helper to replay port and host-joined mdb entries")
      Signed-off-by: default avatarTobias Waldekranz <tobias@waldekranz.com>
      Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc489f86
    • Alexander Gordeev's avatar
      net/iucv: fix the allocation size of iucv_path_table array · b4ea9b6a
      Alexander Gordeev authored
      
      
      iucv_path_table is a dynamically allocated array of pointers to
      struct iucv_path items. Yet, its size is calculated as if it was
      an array of struct iucv_path items.
      
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Reviewed-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b4ea9b6a
    • Linus Torvalds's avatar
      Merge tag 'net-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 4f5e5092
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from can, wireless and netfilter.
      
        Current release - regressions:
      
         - af_unix: fix task hung while purging oob_skb in GC
      
         - pds_core: do not try to run health-thread in VF path
      
        Current release - new code bugs:
      
         - sched: act_mirred: don't zero blockid when net device is being
           deleted
      
        Previous releases - regressions:
      
         - netfilter:
            - nat: restore default DNAT behavior
            - nf_tables: fix bidirectional offload, broken when unidirectional
              offload support was added
      
         - openvswitch: limit the number of recursions from action sets
      
         - eth: i40e: do not allow untrusted VF to remove administratively set
           MAC address
      
        Previous releases - always broken:
      
         - tls: fix races and bugs in use of async crypto
      
         - mptcp: prevent data races on some of the main socket fields, fix
           races in fastopen handling
      
         - dpll: fix po...
      4f5e5092
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.8a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · cc9c4f0b
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Fixes and simple cleanups:
      
         - use a proper flexible array instead of a one-element array in order
           to avoid array-bounds sanitizer errors
      
         - add NULL pointer checks after allocating memory
      
         - use memdup_array_user() instead of open-coding it
      
         - fix a rare race condition in Xen event channel allocation code
      
         - make struct bus_type instances const
      
         - make kerneldoc inline comments match reality"
      
      * tag 'for-linus-6.8a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/events: close evtchn after mapping cleanup
        xen/gntalloc: Replace UAPI 1-element array
        xen: balloon: make balloon_subsys const
        xen: pcpu: make xen_pcpu_subsys const
        xen/privcmd: Use memdup_array_user() in alloc_ioreq()
        x86/xen: Add some null pointer checking to smp.c
        xen/xenbus: document will_handle argument for xenbus_watch_path()
      cc9c4f0b
    • Linus Torvalds's avatar
      update workarounds for gcc "asm goto" issue · 68fb3ca0
      Linus Torvalds authored
      In commit 4356e9f8 ("work around gcc bugs with 'asm goto' with
      outputs") I did the gcc workaround unconditionally, because the cause of
      the bad code generation wasn't entirely clear.
      
      In the meantime, Jakub Jelinek debugged the issue, and has come up with
      a fix in gcc [2], which also got backported to the still maintained
      branches of gcc-11, gcc-12 and gcc-13.
      
      Note that while the fix technically wasn't in the original gcc-14
      branch, Jakub says:
      
       "while it is true that no GCC 14 snapshots until today (or whenever the
        fix will be committed) have the fix, for GCC trunk it is up to the
        distros to use the latest snapshot if they use it at all and would
        allow better testing of the kernel code without the workaround, so
        that if there are other issues they won't be discovered years later.
        Most userland code doesn't actually use asm goto with outputs..."
      
      so we will consider gcc-14 to be fixed - if somebody is using gcc
      snapshots of the gcc-14 before the ...
      68fb3ca0
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 339e2fca
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Improve devlink dependency parsing for DT graphs
      
       - Fix devlink handling of io-channels dependencies
      
       - Fix PCI addressing in marvell,prestera example
      
       - A few schema fixes for property constraints
      
       - Improve performance of DT unprobed devices kselftest
      
       - Fix regression in DT_SCHEMA_FILES handling
      
       - Fix compile error in unittest for !OF_DYNAMIC
      
      * tag 'devicetree-fixes-for-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: ufs: samsung,exynos-ufs: Add size constraints on "samsung,sysreg"
        of: property: Add in-ports/out-ports support to of_graph_get_port_parent()
        of: property: Improve finding the supplier of a remote-endpoint property
        of: property: Improve finding the consumer of a remote-endpoint property
        net: marvell,prestera: Fix example PCI bus addressing
        of: unittest: Fix compile in the non-dynamic case
        of: property: fix typo in io-channels
        dt-bindings: tpm: Drop type from "resets"
        dt-bindings: display: nxp,tda998x: Fix 'audio-ports' constraints
        dt-bindings: xilinx: replace Piyush Mehta maintainership
        kselftest: dt: Stop relying on dirname to improve performance
        dt-bindings: don't anchor DT_SCHEMA_FILES to bindings directory
      339e2fca
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · a00cf198
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A smallish collection of fixes for SPI, all driver specific, plus one
        device ID addition for a new Intel part.
      
        The ppc4xx isn't routinely covered by most of the automated testing so
        there were some errors that were missed in some of the recent API
        conversions, otherwise there's nothing super remarkable here"
      
      * tag 'spi-fix-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi-mxs: Fix chipselect glitch
        spi: intel-pci: Add support for Lunar Lake-M SPI serial flash
        spi: omap2-mcspi: Revert FIFO support without DMA
        spi: ppc4xx: Drop write-only variable
        spi: ppc4xx: Fix fallout from rename in struct spi_bitbang
        spi: ppc4xx: Fix fallout from include cleanup
        spi: spi-ppc4xx: include missing platform_device.h
        spi: imx: fix the burst length at DMA mode and CPU mode
      a00cf198
    • Linus Torvalds's avatar
      Merge tag 'regmap-fix-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 2c460834
      Linus Torvalds authored
      Pull regmap test fixes from Mark Brown:
       "Guenter runs a lot of KUnit tests so noticed that there were a couple
        of the regmap tests, including the newly added noinc test, which could
        show spurious failures due to the use of randomly generated test
        values. These changes handle the randomly generated data properly"
      
      * tag 'regmap-fix-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: kunit: Ensure that changed bytes are actually different
        regmap: kunit: fix raw noinc write test wrapping
      2c460834
    • Linus Torvalds's avatar
      Merge tag 'hid-for-linus-2024021501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · 9207fe75
      Linus Torvalds authored
      Pull HID fixes from Jiri Kosina:
      
       - fix for 'MSC_SERIAL = 0' corner case handling in wacom driver (Jason
         Gerecke)
      
       - ACPI S3 suspend/resume fix for intel-ish-hid (Even Xu)
      
       - race condition fix preventing Wacom driver from losing events shortly
         after initialization (Jason Gerecke)
      
       - fix preventing certain Logitech HID++ devices from spamming kernel
         log (Oleksandr Natalenko)
      
      * tag 'hid-for-linus-2024021501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: wacom: generic: Avoid reporting a serial of '0' to userspace
        HID: Intel-ish-hid: Ishtp: Fix sensor reads after ACPI S3 suspend
        HID: multitouch: Add required quirk for Synaptics 0xcddc device
        HID: wacom: Do not register input devices until after hid_hw_start
        HID: logitech-hidpp: Do not flood kernel log
      9207fe75
    • Jakub Kicinski's avatar
      Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · c40c0d3a
      Jakub Kicinski authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2024-02-06 (igb, igc)
      
      This series contains updates to igb and igc drivers.
      
      Kunwu Chan adjusts firmware version string implementation to resolve
      possible NULL pointer issue for igb.
      
      Sasha removes workaround on igc.
      
      * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        igc: Remove temporary workaround
        igb: Fix string truncation warnings in igb_set_fw_version
      ====================
      
      Link: https://lore.kernel.org/r/20240214180347.3219650-1-anthony.l.nguyen@intel.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c40c0d3a
    • Jakub Kicinski's avatar
      Merge branch 'fix-module_description-for-net-p6' · b2c6c529
      Jakub Kicinski authored
      Breno Leitao says:
      
      ====================
      Fix MODULE_DESCRIPTION() for net (p6)
      
      There are a few network modules left that misses MODULE_DESCRIPTION(),
      causing a warnning when compiling with W=1. Example:
      
              WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/....
      
      This last patchset solves the problem for all the missing driver. It is
      not expect to see any warning for the driver/net and net/ directory once
      all these patches have landed.
      
      v1: https://lore.kernel.org/all/20240213112122.404045-1-leitao@debian.org/
      ====================
      
      Link: https://lore.kernel.org/r/20240214152741.670178-1-leitao@debian.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b2c6c529
    • Breno Leitao's avatar
      net: fill in MODULE_DESCRIPTION()s for missing arcnet · 538b22e7
      Breno Leitao authored
      
      
      W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
      Add descriptions to the ARC modules.
      
      Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
      Link: https://lore.kernel.org/r/20240214152741.670178-8-leitao@debian.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      538b22e7
    • Breno Leitao's avatar
      net: fill in MODULE_DESCRIPTION()s for mdio_devres · 9de69f0e
      Breno Leitao authored
      
      
      W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
      Add descriptions to the PHY MDIO helpers.
      
      Suggested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20240214152741.670178-7-leitao@debian.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9de69f0e
    • Breno Leitao's avatar
      net: fill in MODULE_DESCRIPTION()s for ppp · e1e5ef2a
      Breno Leitao authored
      
      
      W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
      Add descriptions to the PPP modules.
      
      Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
      Link: https://lore.kernel.org/r/20240214152741.670178-6-leitao@debian.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e1e5ef2a
    • Breno Leitao's avatar
      net: fill in MODULE_DESCRIPTION()s for fddik/skfp · 4ad9e858
      Breno Leitao authored
      
      
      W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
      Add descriptions to the SysKonnect FDDI PCI module.
      
      Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
      Link: https://lore.kernel.org/r/20240214152741.670178-5-leitao@debian.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4ad9e858
    • Breno Leitao's avatar
      net: fill in MODULE_DESCRIPTION()s for plip · 44c1197b
      Breno Leitao authored
      
      
      W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
      Add descriptions to the PLIP (parallel port) network module
      
      Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
      Link: https://lore.kernel.org/r/20240214152741.670178-4-leitao@debian.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      44c1197b
    • Breno Leitao's avatar
      net: fill in MODULE_DESCRIPTION()s for ieee802154/fakelb · c0872309
      Breno Leitao authored
      
      
      W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
      Add descriptions to the IEEE 802.15.4 loopback driver.
      
      Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
      Link: https://lore.kernel.org/r/20240214152741.670178-3-leitao@debian.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c0872309
    • Breno Leitao's avatar
      net: fill in MODULE_DESCRIPTION()s for xen-netback · 5b8e3464
      Breno Leitao authored
      
      
      W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
      Add descriptions to the Xen backend network module.
      
      Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
      Acked-by: default avatarPaul Durrant <paul@xen.org>
      Link: https://lore.kernel.org/r/20240214152741.670178-2-leitao@debian.org
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5b8e3464
  2. Feb 15, 2024
  3. Feb 14, 2024