<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/ethernet/google, branch v6.1.124</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.124</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.124'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-12-14T18:54:53+00:00</updated>
<entry>
<title>gve: Fixes for napi_poll when budget is 0</title>
<updated>2024-12-14T18:54:53+00:00</updated>
<author>
<name>Ziwei Xiao</name>
<email>ziweixiao@google.com</email>
</author>
<published>2023-11-14T00:41:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d687b98747eb016d26f6504db401eb9d18c241e'/>
<id>urn:sha1:7d687b98747eb016d26f6504db401eb9d18c241e</id>
<content type='text'>
commit 278a370c1766060d2144d6cf0b06c101e1043b6d upstream.

Netpoll will explicilty pass the polling call with a budget of 0 to
indicate it's clearing the Tx path only. For the gve_rx_poll and
gve_xdp_poll, they were mistakenly taking the 0 budget as the indication
to do all the work. Add check to avoid the rx path and xdp path being
called when budget is 0. And also avoid napi_complete_done being called
when budget is 0 for netpoll.

Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
Signed-off-by: Ziwei Xiao &lt;ziweixiao@google.com&gt;
Link: https://lore.kernel.org/r/20231114004144.2022268-1-ziweixiao@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Signed-off-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gve: Fix an edge case for TSO skb validity check</title>
<updated>2024-08-03T06:49:39+00:00</updated>
<author>
<name>Bailey Forrest</name>
<email>bcf@google.com</email>
</author>
<published>2024-07-24T14:34:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f75333ae89f610c80f197e12329c1acce427922'/>
<id>urn:sha1:0f75333ae89f610c80f197e12329c1acce427922</id>
<content type='text'>
commit 36e3b949e35964e22b9a57f960660fc599038dd4 upstream.

The NIC requires each TSO segment to not span more than 10
descriptors. NIC further requires each descriptor to not exceed
16KB - 1 (GVE_TX_MAX_BUF_SIZE_DQO).

The descriptors for an skb are generated by
gve_tx_add_skb_no_copy_dqo() for DQO RDA queue format.
gve_tx_add_skb_no_copy_dqo() loops through each skb frag and
generates a descriptor for the entire frag if the frag size is
not greater than GVE_TX_MAX_BUF_SIZE_DQO. If the frag size is
greater than GVE_TX_MAX_BUF_SIZE_DQO, it is split into descriptor(s)
of size GVE_TX_MAX_BUF_SIZE_DQO and a descriptor is generated for
the remainder (frag size % GVE_TX_MAX_BUF_SIZE_DQO).

gve_can_send_tso() checks if the descriptors thus generated for an
skb would meet the requirement that each TSO-segment not span more
than 10 descriptors. However, the current code misses an edge case
when a TSO segment spans multiple descriptors within a large frag.
This change fixes the edge case.

gve_can_send_tso() relies on the assumption that max gso size (9728)
is less than GVE_TX_MAX_BUF_SIZE_DQO and therefore within an skb
fragment a TSO segment can never span more than 2 descriptors.

Fixes: a57e5de476be ("gve: DQO: Add TX path")
Signed-off-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Signed-off-by: Bailey Forrest &lt;bcf@google.com&gt;
Reviewed-by: Jeroen de Borst &lt;jeroendb@google.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Link: https://patch.msgid.link/20240724143431.3343722-1-pkaligineedi@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gve: ignore nonrelevant GSO type bits when processing TSO headers</title>
<updated>2024-06-21T12:35:52+00:00</updated>
<author>
<name>Joshua Washington</name>
<email>joshwash@google.com</email>
</author>
<published>2024-06-10T22:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c495ebe90b5b7804f016f9e40a8c2fd8f5307d12'/>
<id>urn:sha1:c495ebe90b5b7804f016f9e40a8c2fd8f5307d12</id>
<content type='text'>
[ Upstream commit 1b9f756344416e02b41439bf2324b26aa25e141c ]

TSO currently fails when the skb's gso_type field has more than one bit
set.

TSO packets can be passed from userspace using PF_PACKET, TUNTAP and a
few others, using virtio_net_hdr (e.g., PACKET_VNET_HDR). This includes
virtualization, such as QEMU, a real use-case.

The gso_type and gso_size fields as passed from userspace in
virtio_net_hdr are not trusted blindly by the kernel. It adds gso_type
|= SKB_GSO_DODGY to force the packet to enter the software GSO stack
for verification.

This issue might similarly come up when the CWR bit is set in the TCP
header for congestion control, causing the SKB_GSO_TCP_ECN gso_type bit
to be set.

Fixes: a57e5de476be ("gve: DQO: Add TX path")
Signed-off-by: Joshua Washington &lt;joshwash@google.com&gt;
Reviewed-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Reviewed-by: Harshitha Ramamurthy &lt;hramamurthy@google.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Suggested-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Andrei Vagin &lt;avagin@gmail.com&gt;

v2 - Remove unnecessary comments, remove line break between fixes tag
and signoffs.

v3 - Add back unrelated empty line removal.

Link: https://lore.kernel.org/r/20240610225729.2985343-1-joshwash@google.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>gve: Clear napi-&gt;skb before dev_kfree_skb_any()</title>
<updated>2024-06-21T12:35:45+00:00</updated>
<author>
<name>Ziwei Xiao</name>
<email>ziweixiao@google.com</email>
</author>
<published>2024-06-12T00:16:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d221284991118c0ab16480b53baecd857c0bc442'/>
<id>urn:sha1:d221284991118c0ab16480b53baecd857c0bc442</id>
<content type='text'>
commit 6f4d93b78ade0a4c2cafd587f7b429ce95abb02e upstream.

gve_rx_free_skb incorrectly leaves napi-&gt;skb referencing an skb after it
is freed with dev_kfree_skb_any(). This can result in a subsequent call
to napi_get_frags returning a dangling pointer.

Fix this by clearing napi-&gt;skb before the skb is freed.

Fixes: 9b8dd5e5ea48 ("gve: DQO: Add RX path")
Cc: stable@vger.kernel.org
Reported-by: Shailend Chand &lt;shailend@google.com&gt;
Signed-off-by: Ziwei Xiao &lt;ziweixiao@google.com&gt;
Reviewed-by: Harshitha Ramamurthy &lt;hramamurthy@google.com&gt;
Reviewed-by: Shailend Chand &lt;shailend@google.com&gt;
Reviewed-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Link: https://lore.kernel.org/r/20240612001654.923887-1-ziweixiao@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gve: Fix use-after-free vulnerability</title>
<updated>2024-02-05T20:13:02+00:00</updated>
<author>
<name>Praveen Kaligineedi</name>
<email>pkaligineedi@google.com</email>
</author>
<published>2024-01-30T21:45:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e1edd8e6c0613e0a939f709cebda5e286a53caee'/>
<id>urn:sha1:e1edd8e6c0613e0a939f709cebda5e286a53caee</id>
<content type='text'>
From: Bailey Forrest &lt;bcf@google.com&gt;

Call skb_shinfo() after gve_prep_tso() on DQO TX path.
gve_prep_tso() calls skb_cow_head(), which may reallocate
shinfo causing a use after free.

This bug was unintentionally fixed by 'a6fb8d5a8b69
("gve: Tx path for DQO-QPL")' while adding DQO-QPL format
support in 6.6. That patch is not appropriate for stable releases.

Fixes: a57e5de476be ("gve: DQO: Add TX path")
Signed-off-by: Praveen Kaligineedi &lt;pkaligineedi@google.com&gt;
Signed-off-by: Bailey Forrest &lt;bcf@google.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Jeroen de Borst &lt;jeroendb@google.com&gt;
Reviewed-by: Kevin DeCabooter &lt;decabooter@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gve: Use size_add() in call to struct_size()</title>
<updated>2023-11-20T10:51:52+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2023-09-15T18:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a764c22bbc859cff185b1d33eaec09878f638e12'/>
<id>urn:sha1:a764c22bbc859cff185b1d33eaec09878f638e12</id>
<content type='text'>
[ Upstream commit d692873cbe861a870cdc9cbfb120eefd113c3dfd ]

If, for any reason, `tx_stats_num + rx_stats_num` wraps around, the
protection that struct_size() adds against potential integer overflows
is defeated. Fix this by hardening call to struct_size() with size_add().

Fixes: 691f4077d560 ("gve: Replace zero-length array with flexible-array member")
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gve: fix frag_list chaining</title>
<updated>2023-09-19T10:28:01+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2023-08-31T21:38:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a47ad6d226dca9e18cab6e046c62881db427976b'/>
<id>urn:sha1:a47ad6d226dca9e18cab6e046c62881db427976b</id>
<content type='text'>
[ Upstream commit 817c7cd2043a83a3d8147f40eea1505ac7300b62 ]

gve_rx_append_frags() is able to build skbs chained with frag_list,
like GRO engine.

Problem is that shinfo-&gt;frag_list should only be used
for the head of the chain.

All other links should use skb-&gt;next pointer.

Otherwise, built skbs are not valid and can cause crashes.

Equivalent code in GRO (skb_gro_receive()) is:

    if (NAPI_GRO_CB(p)-&gt;last == p)
        skb_shinfo(p)-&gt;frag_list = skb;
    else
        NAPI_GRO_CB(p)-&gt;last-&gt;next = skb;
    NAPI_GRO_CB(p)-&gt;last = skb;

Fixes: 9b8dd5e5ea48 ("gve: DQO: Add RX path")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Bailey Forrest &lt;bcf@google.com&gt;
Cc: Willem de Bruijn &lt;willemb@google.com&gt;
Cc: Catherine Sullivan &lt;csully@google.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gve: Set default duplex configuration to full</title>
<updated>2023-07-23T11:49:22+00:00</updated>
<author>
<name>Junfeng Guo</name>
<email>junfeng.guo@intel.com</email>
</author>
<published>2023-07-06T04:41:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b4086a66abd557bc2ec4d68f4d800d1c40dbc2d'/>
<id>urn:sha1:2b4086a66abd557bc2ec4d68f4d800d1c40dbc2d</id>
<content type='text'>
[ Upstream commit 0503efeadbf6bb8bf24397613a73b67e665eac5f ]

Current duplex mode was unset in the driver, resulting in the default
parameter being set to 0, which corresponds to half duplex. It might
mislead users to have incorrect expectation about the driver's
transmission capabilities.
Set the default duplex configuration to full, as the driver runs in
full duplex mode at this point.

Fixes: 7e074d5a76ca ("gve: Enable Link Speed Reporting in the driver.")
Signed-off-by: Junfeng Guo &lt;junfeng.guo@intel.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Message-ID: &lt;20230706044128.2726747-1-junfeng.guo@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gve: Remove the code of clearing PBA bit</title>
<updated>2023-05-24T16:32:32+00:00</updated>
<author>
<name>Ziwei Xiao</name>
<email>ziweixiao@google.com</email>
</author>
<published>2023-05-09T22:51:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d695dccb74e3e06fde5bfeaf4fd4cb86691d09bd'/>
<id>urn:sha1:d695dccb74e3e06fde5bfeaf4fd4cb86691d09bd</id>
<content type='text'>
[ Upstream commit f4c2e67c1773d2a2632381ee30e9139c1e744c16 ]

Clearing the PBA bit from the driver is race prone and it may lead to
dropped interrupt events. This could potentially lead to the traffic
being completely halted.

Fixes: 5e8c5adf95f8 ("gve: DQO: Add core netdev features")
Signed-off-by: Ziwei Xiao &lt;ziweixiao@google.com&gt;
Signed-off-by: Bailey Forrest &lt;bcf@google.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gve: Secure enough bytes in the first TX desc for all TCP pkts</title>
<updated>2023-04-13T14:55:24+00:00</updated>
<author>
<name>Shailend Chand</name>
<email>shailend@google.com</email>
</author>
<published>2023-04-03T17:28:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=332e7f93f112bd5ee3bb876cc8b3da9083029e01'/>
<id>urn:sha1:332e7f93f112bd5ee3bb876cc8b3da9083029e01</id>
<content type='text'>
[ Upstream commit 3ce9345580974863c060fa32971537996a7b2d57 ]

Non-GSO TCP packets whose SKBs' linear portion did not include the
entire TCP header were not populating the first Tx descriptor with
as many bytes as the vNIC expected. This change ensures that all
TCP packets populate the first descriptor with the correct number of
bytes.

Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC")
Signed-off-by: Shailend Chand &lt;shailend@google.com&gt;
Link: https://lore.kernel.org/r/20230403172809.2939306-1-shailend@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
