<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core/dev.c, branch v6.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-03-06T02:36:42Z</updated>
<entry>
<title>dpll: move all dpll&lt;&gt;netdev helpers to dpll code</title>
<updated>2024-03-06T02:36:42Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2024-03-05T01:35:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=289e922582af5b4721ba02e86bde4d9ba918158a'/>
<id>urn:sha1:289e922582af5b4721ba02e86bde4d9ba918158a</id>
<content type='text'>
Older versions of GCC really want to know the full definition
of the type involved in rcu_assign_pointer().

struct dpll_pin is defined in a local header, net/core can't
reach it. Move all the netdev &lt;&gt; dpll code into dpll, where
the type is known. Otherwise we'd need multiple function calls
to jump between the compilation units.

This is the same problem the commit under fixes was trying to address,
but with rcu_assign_pointer() not rcu_dereference().

Some of the exports are not needed, networking core can't
be a module, we only need exports for the helpers used by
drivers.

Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/all/35a869c8-52e8-177-1d4d-e57578b99b6@linux-m68k.org/
Fixes: 640f41ed33b5 ("dpll: fix build failure due to rcu_dereference_check() on unknown type")
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Link: https://lore.kernel.org/r/20240305013532.694866-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>dpll: rely on rcu for netdev_dpll_pin()</title>
<updated>2024-02-27T02:39:34Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2024-02-23T12:32:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d60d8df6f493bb46bf5db40d39dd60a1bafdd4e'/>
<id>urn:sha1:0d60d8df6f493bb46bf5db40d39dd60a1bafdd4e</id>
<content type='text'>
This fixes a possible UAF in if_nlmsg_size(),
which can run without RTNL.

Add rcu protection to "struct dpll_pin"

Move netdev_dpll_pin() from netdevice.h to dpll.h to
decrease name pollution.

Note: This looks possible to no longer acquire RTNL in
netdev_dpll_pin_assign() later in net-next.

v2: do not force rcu_read_lock() in rtnl_dpll_pin_size() (Jiri Pirko)

Fixes: 5f1842692880 ("netdev: expose DPLL pin handle for netdevice")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Arkadiusz Kubalewski &lt;arkadiusz.kubalewski@intel.com&gt;
Cc: Vadim Fedorenko &lt;vadim.fedorenko@linux.dev&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Link: https://lore.kernel.org/r/20240223123208.3543319-1-edumazet@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: add rcu safety to rtnl_prop_list_size()</title>
<updated>2024-02-13T01:38:52Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2024-02-09T18:12:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f30831390ede02d9fcd54fd9ea5a585ab649f4a'/>
<id>urn:sha1:9f30831390ede02d9fcd54fd9ea5a585ab649f4a</id>
<content type='text'>
rtnl_prop_list_size() can be called while alternative names
are added or removed concurrently.

if_nlmsg_size() / rtnl_calcit() can indeed be called
without RTNL held.

Use explicit RCU protection to avoid UAF.

Fixes: 88f4fb0c7496 ("net: rtnetlink: put alternative names to getlink message")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Jiri Pirko &lt;jiri@nvidia.com&gt;
Link: https://lore.kernel.org/r/20240209181248.96637-1-edumazet@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net-device: move lstats in net_device_read_txrx</title>
<updated>2024-02-12T09:51:26Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2024-02-08T14:43:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c353c7b7ffb7ae6ed8f3339906fe33c8be6cf344'/>
<id>urn:sha1:c353c7b7ffb7ae6ed8f3339906fe33c8be6cf344</id>
<content type='text'>
dev-&gt;lstats is notably used from loopback ndo_start_xmit()
and other virtual drivers.

Per cpu stats updates are dirtying per-cpu data,
but the pointer itself is read-only.

Fixes: 43a71cd66b9c ("net-device: reorganize net_device fast path variables")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Coco Li &lt;lixiaoyan@google.com&gt;
Cc: Simon Horman &lt;horms@kernel.org&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fix removing a namespace with conflicting altnames</title>
<updated>2024-01-22T01:09:30Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2024-01-19T00:58:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d09486a04f5da0a812c26217213b89a3b1acf836'/>
<id>urn:sha1:d09486a04f5da0a812c26217213b89a3b1acf836</id>
<content type='text'>
Mark reports a BUG() when a net namespace is removed.

    kernel BUG at net/core/dev.c:11520!

Physical interfaces moved outside of init_net get "refunded"
to init_net when that namespace disappears. The main interface
name may get overwritten in the process if it would have
conflicted. We need to also discard all conflicting altnames.
Recent fixes addressed ensuring that altnames get moved
with the main interface, which surfaced this problem.

Reported-by: Марк Коренберг &lt;socketpair@gmail.com&gt;
Link: https://lore.kernel.org/all/CAEmTpZFZ4Sv3KwqFOY2WKDHeZYdi0O7N5H1nTvcGp=SAEavtDg@mail.gmail.com/
Fixes: 7663d522099e ("net: check for altname conflicts when changing netdev's netns")
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "Introduce PHY listing and link_topology tracking"</title>
<updated>2024-01-05T00:05:47Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2024-01-05T00:04:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe1eb24bd5ade085914248c527044e942f75e06a'/>
<id>urn:sha1:fe1eb24bd5ade085914248c527044e942f75e06a</id>
<content type='text'>
This reverts commit 32bb4515e34469975abc936deb0a116c4a445817.
This reverts commit d078d480639a4f3b5fc2d56247afa38e0956483a.
This reverts commit fcc4b105caa4b844bf043375bf799c20a9c99db1.
This reverts commit 345237dbc1bdbb274c9fb9ec38976261ff4a40b8.
This reverts commit 7db69ec9cfb8b4ab50420262631fb2d1908b25bf.
This reverts commit 95132a018f00f5dad38bdcfd4180d1af955d46f6.
This reverts commit 63d5eaf35ac36cad00cfb3809d794ef0078c822b.
This reverts commit c29451aefcb42359905d18678de38e52eccb3bb5.
This reverts commit 2ab0edb505faa9ac90dee1732571390f074e8113.
This reverts commit dedd702a35793ab462fce4c737eeba0badf9718e.
This reverts commit 034fcc210349b873ece7356905be5c6ca11eef2a.
This reverts commit 9c5625f559ad6fe9f6f733c11475bf470e637d34.
This reverts commit 02018c544ef113e980a2349eba89003d6f399d22.

Looks like we need more time for reviews, and incremental
changes will be hard to make sense of. So revert.

Link: https://lore.kernel.org/all/ZZP6FV5sXEf+xd58@shell.armlinux.org.uk/
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net-device: move xdp_prog to net_device_read_rx</title>
<updated>2024-01-04T02:09:14Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2024-01-02T16:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3d344a1ca69d8fb2413e29e6400f3ad58a05c06'/>
<id>urn:sha1:d3d344a1ca69d8fb2413e29e6400f3ad58a05c06</id>
<content type='text'>
xdp_prog is used in receive path, both from XDP enabled drivers
and from netif_elide_gro().

This patch also removes two 4-bytes holes.

Fixes: 43a71cd66b9c ("net-device: reorganize net_device fast path variables")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Coco Li &lt;lixiaoyan@google.com&gt;
Cc: Simon Horman &lt;horms@kernel.org&gt;
Link: https://lore.kernel.org/r/20240102162220.750823-1-edumazet@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net-device: move gso_partial_features to net_device_read_tx</title>
<updated>2024-01-02T12:35:42Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2023-12-21T14:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=993498e537af9260e697219ce41b41b22b6199cc'/>
<id>urn:sha1:993498e537af9260e697219ce41b41b22b6199cc</id>
<content type='text'>
dev-&gt;gso_partial_features is read from tx fast path for GSO packets.

Move it to appropriate section to avoid a cache line miss.

Fixes: 43a71cd66b9c ("net-device: reorganize net_device fast path variables")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Coco Li &lt;lixiaoyan@google.com&gt;
Cc: David Ahern &lt;dsahern@kernel.org&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: Introduce ethernet link topology representation</title>
<updated>2024-01-01T18:38:56Z</updated>
<author>
<name>Maxime Chevallier</name>
<email>maxime.chevallier@bootlin.com</email>
</author>
<published>2023-12-21T18:00:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02018c544ef113e980a2349eba89003d6f399d22'/>
<id>urn:sha1:02018c544ef113e980a2349eba89003d6f399d22</id>
<content type='text'>
Link topologies containing multiple network PHYs attached to the same
net_device can be found when using a PHY as a media converter for use
with an SFP connector, on which an SFP transceiver containing a PHY can
be used.

With the current model, the transceiver's PHY can't be used for
operations such as cable testing, timestamping, macsec offload, etc.

The reason being that most of the logic for these configuration, coming
from either ethtool netlink or ioctls tend to use netdev-&gt;phydev, which
in multi-phy systems will reference the PHY closest to the MAC.

Introduce a numbering scheme allowing to enumerate PHY devices that
belong to any netdev, which can in turn allow userspace to take more
precise decisions with regard to each PHY's configuration.

The numbering is maintained per-netdev, in a phy_device_list.
The numbering works similarly to a netdevice's ifindex, with
identifiers that are only recycled once INT_MAX has been reached.

This prevents races that could occur between PHY listing and SFP
transceiver removal/insertion.

The identifiers are assigned at phy_attach time, as the numbering
depends on the netdevice the phy is attached to.

Signed-off-by: Maxime Chevallier &lt;maxime.chevallier@bootlin.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2023-12-21T21:17:23Z</updated>
<author>
<name>Paolo Abeni</name>
<email>pabeni@redhat.com</email>
</author>
<published>2023-12-21T21:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=56794e5358542b7c652f202946e53bfd2373b5e0'/>
<id>urn:sha1:56794e5358542b7c652f202946e53bfd2373b5e0</id>
<content type='text'>
Cross-merge networking fixes after downstream PR.

Adjacent changes:

drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
  23c93c3b6275 ("bnxt_en: do not map packet buffers twice")
  6d1add95536b ("bnxt_en: Modify TX ring indexing logic.")

tools/testing/selftests/net/Makefile
  2258b666482d ("selftests: add vlan hw filter tests")
  a0bc96c0cd6e ("selftests: net: verify fq per-band packet limit")

Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
</feed>
