<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/ethtool/ioctl.c, branch linux-6.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-12-31T12:26:45+00:00</updated>
<entry>
<title>ethtool: avoiding integer overflow in ethtool_phys_id()</title>
<updated>2022-12-31T12:26:45+00:00</updated>
<author>
<name>Maxim Korotkov</name>
<email>korotkov.maxim.s@gmail.com</email>
</author>
<published>2022-11-22T12:29:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f8f15f3f2fd1063bcef0374b4bfa6c374e7a4d3'/>
<id>urn:sha1:2f8f15f3f2fd1063bcef0374b4bfa6c374e7a4d3</id>
<content type='text'>
[ Upstream commit 64a8f8f7127da228d59a39e2c5e75f86590f90b4 ]

The value of an arithmetic expression "n * id.data" is subject
to possible overflow due to a failure to cast operands to a larger data
type before performing arithmetic. Used macro for multiplication instead
operator for avoiding overflow.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Maxim Korotkov &lt;korotkov.maxim.s@gmail.com&gt;
Reviewed-by: Alexander Lobakin &lt;alexandr.lobakin@intel.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Link: https://lore.kernel.org/r/20221122122901.22294-1-korotkov.maxim.s@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ethtool: Fix and simplify ethtool_convert_link_mode_to_legacy_u32()</title>
<updated>2022-06-14T06:11:35+00:00</updated>
<author>
<name>Marco Bonelli</name>
<email>marco@mebeim.net</email>
</author>
<published>2022-06-09T13:49:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19d62f5eeaa0fd912cc179530084403f90a5535a'/>
<id>urn:sha1:19d62f5eeaa0fd912cc179530084403f90a5535a</id>
<content type='text'>
Fix the implementation of ethtool_convert_link_mode_to_legacy_u32(), which
is supposed to return false if src has bits higher than 31 set. The current
implementation uses the complement of bitmap_fill(ext, 32) to test high
bits of src, which is wrong as bitmap_fill() fills _with long granularity_,
and sizeof(long) can be &gt; 4. No users of this function currently check the
return value, so the bug was dormant.

Also remove the check for __ETHTOOL_LINK_MODE_MASK_NBITS &gt; 32, as the enum
ethtool_link_mode_bit_indices contains far beyond 32 values. Using
find_next_bit() to test the src bitmask works regardless of this anyway.

Signed-off-by: Marco Bonelli &lt;marco@mebeim.net&gt;
Link: https://lore.kernel.org/r/20220609134900.11201-1-marco@mebeim.net
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: rename reference+tracking helpers</title>
<updated>2022-06-10T04:52:55+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-06-08T04:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d62607c3fe45911b2331fac073355a8c914bbde2'/>
<id>urn:sha1:d62607c3fe45911b2331fac073355a8c914bbde2</id>
<content type='text'>
Netdev reference helpers have a dev_ prefix for historic
reasons. Renaming the old helpers would be too much churn
but we can rename the tracking ones which are relatively
recent and should be the default for new code.

Rename:
 dev_hold_track()    -&gt; netdev_hold()
 dev_put_track()     -&gt; netdev_put()
 dev_replace_track() -&gt; netdev_ref_replace()

Link: https://lore.kernel.org/r/20220608043955.919359-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ethtool: use phydev variable</title>
<updated>2022-01-06T12:33:35+00:00</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2022-01-05T14:10:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ccd21ec5b8dd9b8a528a70315cee95fc1dd79d20'/>
<id>urn:sha1:ccd21ec5b8dd9b8a528a70315cee95fc1dd79d20</id>
<content type='text'>
In ethtool_get_phy_stats(), the phydev varaible is set to
dev-&gt;phydev but dev-&gt;phydev is still used.  Replace
dev-&gt;phydev uses with phydev.

Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Don't include filter.h from net/sock.h</title>
<updated>2021-12-29T16:48:14+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-12-29T00:49:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b6459415b384cb829f0b2a4268f211c789f6cf0b'/>
<id>urn:sha1:b6459415b384cb829f0b2a4268f211c789f6cf0b</id>
<content type='text'>
sock.h is pretty heavily used (5k objects rebuilt on x86 after
it's touched). We can drop the include of filter.h from it and
add a forward declaration of struct sk_filter instead.
This decreases the number of rebuilt objects when bpf.h
is touched from ~5k to ~1k.

There's a lot of missing includes this was masking. Primarily
in networking tho, this time.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Acked-by: Nikolay Aleksandrov &lt;nikolay@nvidia.com&gt;
Acked-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Link: https://lore.kernel.org/bpf/20211229004913.513372-1-kuba@kernel.org
</content>
</entry>
<entry>
<title>net: add net device refcount tracker to ethtool_phys_id()</title>
<updated>2021-12-07T00:05:10+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-12-05T04:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ae2195088d06adfd20eab98ecc9db80ef2eb6b2'/>
<id>urn:sha1:5ae2195088d06adfd20eab98ecc9db80ef2eb6b2</id>
<content type='text'>
This helper might hold a netdev reference for a long time,
lets add reference tracking.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethtool: set a default driver name</title>
<updated>2021-11-27T00:44:53+00:00</updated>
<author>
<name>Tonghao Zhang</name>
<email>xiangxia.m.yue@gmail.com</email>
</author>
<published>2021-11-25T16:30:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bde3b0fd8055bf2c00fd20a4e3d65e920c15b443'/>
<id>urn:sha1:bde3b0fd8055bf2c00fd20a4e3d65e920c15b443</id>
<content type='text'>
The netdev (e.g. ifb, bareudp), which not support ethtool ops
(e.g. .get_drvinfo), we can use the rtnl kind as a default name.

ifb netdev may be created by others prefix, not ifbX.

Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Hao Chen &lt;chenhao288@hisilicon.com&gt;
Cc: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Cc: "Gustavo A. R. Silva" &lt;gustavoars@kernel.org&gt;
Cc: Danielle Ratson &lt;danieller@nvidia.com&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Tonghao Zhang &lt;xiangxia.m.yue@gmail.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Link: https://lore.kernel.org/r/20211125163049.84970-1-xiangxia.m.yue@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2021-11-26T21:45:19+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-11-26T21:26:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=93d5404e8988882bd33f6acc0d343c4db51eb8b4'/>
<id>urn:sha1:93d5404e8988882bd33f6acc0d343c4db51eb8b4</id>
<content type='text'>
drivers/net/ipa/ipa_main.c
  8afc7e471ad3 ("net: ipa: separate disabling setup from modem stop")
  76b5fbcd6b47 ("net: ipa: kill ipa_modem_init()")

Duplicated include, drop one.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ethtool: ioctl: fix potential NULL deref in ethtool_set_coalesce()</title>
<updated>2021-11-26T19:17:47+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2021-11-26T17:55:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0276af2176c78771da7f311621a25d7608045827'/>
<id>urn:sha1:0276af2176c78771da7f311621a25d7608045827</id>
<content type='text'>
ethtool_set_coalesce() now uses both the .get_coalesce() and
.set_coalesce() callbacks. But the check for their availability is
buggy, so changing the coalesce settings on a device where the driver
provides only _one_ of the callbacks results in a NULL pointer
dereference instead of an -EOPNOTSUPP.

Fix the condition so that the availability of both callbacks is
ensured. This also matches the netlink code.

Note that reproducing this requires some effort - it only affects the
legacy ioctl path, and needs a specific combination of driver options:
- have .get_coalesce() and .coalesce_supported but no
 .set_coalesce(), or
- have .set_coalesce() but no .get_coalesce(). Here eg. ethtool doesn't
  cause the crash as it first attempts to call ethtool_get_coalesce()
  and bails out on error.

Fixes: f3ccfda19319 ("ethtool: extend coalesce setting uAPI with CQE mode")
Cc: Yufeng Mo &lt;moyufeng@huawei.com&gt;
Cc: Huazhong Tan &lt;tanhuazhong@huawei.com&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20211126175543.28000-1-jwi@linux.ibm.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ethtool: extend ringparam setting/getting API with rx_buf_len</title>
<updated>2021-11-22T12:31:49+00:00</updated>
<author>
<name>Hao Chen</name>
<email>chenhao288@hisilicon.com</email>
</author>
<published>2021-11-18T12:12:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7462494408cd3de8b0bc1e79670bf213288501d0'/>
<id>urn:sha1:7462494408cd3de8b0bc1e79670bf213288501d0</id>
<content type='text'>
Add two new parameters kernel_ringparam and extack for
.get_ringparam and .set_ringparam to extend more ring params
through netlink.

Signed-off-by: Hao Chen &lt;chenhao288@hisilicon.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
