1. 04 2月, 2022 29 次提交
  2. 03 2月, 2022 11 次提交
    • W
      cgroup/cpuset: Fix "suspicious RCU usage" lockdep warning · 2bdfd282
      Waiman Long 提交于
      It was found that a "suspicious RCU usage" lockdep warning was issued
      with the rcu_read_lock() call in update_sibling_cpumasks().  It is
      because the update_cpumasks_hier() function may sleep. So we have
      to release the RCU lock, call update_cpumasks_hier() and reacquire
      it afterward.
      
      Also add a percpu_rwsem_assert_held() in update_sibling_cpumasks()
      instead of stating that in the comment.
      
      Fixes: 4716909c ("cpuset: Track cpusets that use parent's effective_cpus")
      Signed-off-by: NWaiman Long <longman@redhat.com>
      Tested-by: NPhil Auld <pauld@redhat.com>
      Reviewed-by: NPhil Auld <pauld@redhat.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      2bdfd282
    • N
      tools/resolve_btfids: Do not print any commands when building silently · 7f3bdbc3
      Nathan Chancellor 提交于
      When building with 'make -s', there is some output from resolve_btfids:
      
      $ make -sj"$(nproc)" oldconfig prepare
        MKDIR     .../tools/bpf/resolve_btfids/libbpf/
        MKDIR     .../tools/bpf/resolve_btfids//libsubcmd
        LINK     resolve_btfids
      
      Silent mode means that no information should be emitted about what is
      currently being done. Use the $(silent) variable from Makefile.include
      to avoid defining the msg macro so that there is no information printed.
      
      Fixes: fbbb68de ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object")
      Signed-off-by: NNathan Chancellor <nathan@kernel.org>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/bpf/20220201212503.731732-1-nathan@kernel.org
      7f3bdbc3
    • J
      Revert "mm/gup: small refactoring: simplify try_grab_page()" · c36c04c2
      John Hubbard 提交于
      This reverts commit 54d516b1
      
      That commit did a refactoring that effectively combined fast and slow
      gup paths (again).  And that was again incorrect, for two reasons:
      
       a) Fast gup and slow gup get reference counts on pages in different
          ways and with different goals: see Linus' writeup in commit
          cd1adf1b ("Revert "mm/gup: remove try_get_page(), call
          try_get_compound_head() directly""), and
      
       b) try_grab_compound_head() also has a specific check for
          "FOLL_LONGTERM && !is_pinned(page)", that assumes that the caller
          can fall back to slow gup. This resulted in new failures, as
          recently report by Will McVicker [1].
      
      But (a) has problems too, even though they may not have been reported
      yet.  So just revert this.
      
      Link: https://lore.kernel.org/r/20220131203504.3458775-1-willmcvicker@google.com [1]
      Fixes: 54d516b1 ("mm/gup: small refactoring: simplify try_grab_page()")
      Reported-and-tested-by: NWill McVicker <willmcvicker@google.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Minchan Kim <minchan@google.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: stable@vger.kernel.org # 5.15
      Signed-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c36c04c2
    • L
      Merge tag 'mips-fixes-5.17_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · d394bb77
      Linus Torvalds 提交于
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - fix missed change for PTR->PTR_WD conversion
      
       - kernel-doc fixes
      
      * tag 'mips-fixes-5.17_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: KVM: fix vz.c kernel-doc notation
        MIPS: octeon: Fix missed PTR->PTR_WD conversion
      d394bb77
    • D
      Merge branch 'dsa-mv88e6xxx-phylink_generic_validate' · 9c309189
      David S. Miller 提交于
      Russell King says:
      
      ====================
      net: dsa: mv88e6xxx: convert to phylink_generic_validate()
      
      The overall objective of this series is to convert the mv88e6xxx DSA
      driver to use phylink_generic_validate().
      
      Patch 1 adds a new helper mv88e6352_g2_scratch_port_has_serdes() which
      indicates whether an 88e6352 port has a serdes associated with it. This
      is necessary as ports 4 and 5 will normally be in automedia mode, where
      the CMODE field in the port status register will change e.g. between 15
      (internal PHY) and 9 (1000base-X) depending on whether the serdes has
      link.
      
      The existing code caches the cmode field, and depending whether the
      serdes has link at probe time, determines whether we allow things such
      as the serdes statistics to be accessed. This means if the link isn't
      up at probe time, the serdes is essentially unavailable.
      
      Patch 1 addresses this by reading the pin configuration to find out
      whether the serdes is attached to port 4 or port 5.
      
      Patch 2 is a joint effort between myself and Marek Behún, adding the
      supported interfaces and MAC capabilities to all mv88e6xxx supported
      switch devices. This is slightly more restrictive than the original
      code as we didn't used to care too much about the interface mode, but
      with this we do - which is why we must know if there's a serdes
      associated now.
      
      Patch 3 switches mv88e6xxx to use the generic validation by removing
      the initialisation of the phylink_validate pointer in the dsa_ops
      struct.
      
      Patch 4 updates the statistics code to use the new helper in patch 1,
      so the serdes statistics are available even if the link was down at
      driver probe time.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c309189
    • R
      net: dsa: mv88e6xxx: improve 88e6352 serdes statistics detection · 7f7d32bc
      Russell King (Oracle) 提交于
      The decision whether to report serdes statistics currently depends on
      the cached C_Mode value for the port, read at probe time or updated by
      configuration. However, port 4 can be in "automedia" mode when it is
      used as a serdes port, meaning it switches between the internal PHY and
      the serdes, changing the read-only C_Mode value depending on which
      first gains link. Consequently, the C_Mode value read at probe does not
      accurately reflect whether the port has the serdes associated with it.
      
      In "net: dsa: mv88e6xxx: add mv88e6352_g2_scratch_port_has_serdes()",
      we added a way to read the hardware configuration to determine which
      port has the serdes associated with it. Use this to determine which
      port reports the serdes statistics.
      Reviewed-by: NMarek Behún <kabel@kernel.org>
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f7d32bc
    • R
      net: dsa: mv88e6xxx: convert to phylink_generic_validate() · 2ee84cfe
      Russell King (Oracle) 提交于
      Now that the mv88e6xxx chip drivers are supplying the supported
      interfaces and MAC capabilities, switch the driver to use the generic
      phylink validation implementation by removing our own validation
      implementations. This causes DSA to call phylink_generic_validate()
      on our behalf.
      Reviewed-by: NMarek Behún <kabel@kernel.org>
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ee84cfe
    • R
      net: dsa: mv88e6xxx: populate supported_interfaces and mac_capabilities · d4ebf12b
      Russell King (Oracle) 提交于
      Populate the supported interfaces and MAC capabilities for the
      Marvell MV88E6xxx DSA switches in preparation to using these for the
      validation functionality.
      
      Patch co-authored by Marek.
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: Marek Behún <kabel@kernel.org> [ fixed 6341 and 6393x ]
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4ebf12b
    • R
      net: dsa: mv88e6xxx: add mv88e6352_g2_scratch_port_has_serdes() · 62001548
      Russell King (Oracle) 提交于
      Read the hardware configuration to determine which port is attached
      to the serdes.
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62001548
    • D
      Merge branch 'dsa-mv88e6xxx-port-isolation' · 09476443
      David S. Miller 提交于
      Tobias Waldekranz says:
      
      ====================
      net: dsa: mv88e6xxx: Improve standalone port isolation
      
      The ideal isolation between standalone ports satisfies two properties:
      1. Packets from one standalone port must not be forwarded to any other
         port.
      2. Packets from a standalone port must be sent to the CPU port.
      
      mv88e6xxx solves (1) by isolating standalone ports using the PVT. Up
      to this point though, (2) has not guaranteed; as the ATU is still
      consulted, there is a chance that incoming packets never reach the CPU
      if its DA has previously been used as the SA of an earlier packet (see
      1/5 for more details). This is typically not a problem, except for one
      very useful setup in which switch ports are looped in order to run the
      bridge kselftests in tools/testing/selftests/net/forwarding. This
      series attempts to solve (2).
      
      Ideally, we could simply use the "ForceMap" bit of more modern chips
      (Agate and newer) to classify all incoming packets as MGMT. This is
      not available on older silicon that is still widely used (Opal Plus
      chips like the 6097 for example).
      
      Instead, this series takes a two pronged approach:
      
      1/5: Always clear MapDA on standalone ports to make sure that no ATU
           entry can lead packets astray. This solves (2) for single-chip
           systems.
      
      2/5: Trivial prep work for 4/5.
      3/5: Trivial prep work for 4/5.
      
      4/5: On multi-chip systems though, this is not enough. On the incoming
           chip, the packet will be forced out towards the CPU thanks to
           1/5, but on any intermediate chips the ATU is still consulted. We
           override this behavior by marking the reserved standalone VID (0)
           as a policy VID, the DSA ports' VID policy is set to TRAP. This
           will cause the packet to be reclassified as MGMT on the first
           intermediate chip, after which it's a straight shot towards the
           CPU.
      
      Finally, we allow more tests to be run on mv88e6xxx:
      
      5/5: The bridge_vlan{,un}aware suites sets an ageing_time of 10s on
           the bridge it creates, but mv88e6xxx has a minimum supported time
           of 15s. Allow this time to be overridden in forwarding.config.
      
      With this series in place, mv88e6xxx passes the following kselftest
      suites:
      
      - bridge_port_isolation.sh
      - bridge_sticky_fdb.sh
      - bridge_vlan_aware.sh
      - bridge_vlan_unaware.sh
      
      v1 -> v2:
        - Wording/spelling (Vladimir)
        - Use standard iterator in dsa_switch_upstream_port (Vladimir)
        - Limit enabling of VTU port policy to downstream DSA ports (Vladimir)
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09476443
    • T
      selftests: net: bridge: Parameterize ageing timeout · 08119759
      Tobias Waldekranz 提交于
      Allow the ageing timeout that is set on bridges to be customized from
      forwarding.config. This allows the tests to be run on hardware which
      does not support a 10s timeout (e.g. mv88e6xxx).
      Signed-off-by: NTobias Waldekranz <tobias@waldekranz.com>
      Reviewed-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08119759