<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/xen-netback/common.h, branch linux-6.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.5.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.5.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-03-28T12:16:40Z</updated>
<entry>
<title>xen/netback: don't do grant copy across page boundary</title>
<updated>2023-03-28T12:16:40Z</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2023-03-27T08:36:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=05310f31ca74673a96567fb14637b7d5d6c82ea5'/>
<id>urn:sha1:05310f31ca74673a96567fb14637b7d5d6c82ea5</id>
<content type='text'>
Fix xenvif_get_requests() not to do grant copy operations across local
page boundaries. This requires to double the maximum number of copy
operations per queue, as each copy could now be split into 2.

Make sure that struct xenvif_tx_cb doesn't grow too large.

Cc: stable@vger.kernel.org
Fixes: ad7f402ae4f4 ("xen/netback: Ensure protocol headers don't fall in the non-linear area")
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Reviewed-by: Paul Durrant &lt;paul@xen.org&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>xen/netback: don't call kfree_skb() with interrupts disabled</title>
<updated>2022-12-06T15:00:33Z</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2022-12-06T07:54:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=74e7e1efdad45580cc3839f2a155174cf158f9b5'/>
<id>urn:sha1:74e7e1efdad45580cc3839f2a155174cf158f9b5</id>
<content type='text'>
It is not allowed to call kfree_skb() from hardware interrupt
context or with interrupts being disabled. So remove kfree_skb()
from the spin_lock_irqsave() section and use the already existing
"drop" label in xenvif_start_xmit() for dropping the SKB. At the
same time replace the dev_kfree_skb() call there with a call of
dev_kfree_skb_any(), as xenvif_start_xmit() can be called with
disabled interrupts.

This is XSA-424 / CVE-2022-42328 / CVE-2022-42329.

Fixes: be81992f9086 ("xen/netback: don't queue unlimited number of packages")
Reported-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Reviewed-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
</content>
</entry>
<entry>
<title>xen/netback: use struct ubuf_info_msgzc</title>
<updated>2022-09-29T01:51:24Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2022-09-23T16:39:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b63ca3e822e7ae71f65f83df68ce18155db28eea'/>
<id>urn:sha1:b63ca3e822e7ae71f65f83df68ce18155db28eea</id>
<content type='text'>
struct ubuf_info will be changed, use ubuf_info_msgzc instead.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Acked-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>xen/netback: do some code cleanup</title>
<updated>2022-06-09T04:05:03Z</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2022-06-08T04:37:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5834e72eda0b7e5767eb107259d98eef19ebd11f'/>
<id>urn:sha1:5834e72eda0b7e5767eb107259d98eef19ebd11f</id>
<content type='text'>
Remove some unused macros and functions, make local functions static.

Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Acked-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Link: https://lore.kernel.org/r/20220608043726.9380-1-jgross@suse.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>xen/netback: fix rx queue stall detection</title>
<updated>2021-12-16T07:42:56Z</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2021-12-16T07:25:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6032046ec4b70176d247a71836186d47b25d1684'/>
<id>urn:sha1:6032046ec4b70176d247a71836186d47b25d1684</id>
<content type='text'>
Commit 1d5d48523900a4b ("xen-netback: require fewer guest Rx slots when
not using GSO") introduced a security problem in netback, as an
interface would only be regarded to be stalled if no slot is available
in the rx queue ring page. In case the SKB at the head of the queued
requests will need more than one rx slot and only one slot is free the
stall detection logic will never trigger, as the test for that is only
looking for at least one slot to be free.

Fix that by testing for the needed number of slots instead of only one
slot being available.

In order to not have to take the rx queue lock that often, store the
number of needed slots in the queue data. As all SKB dequeue operations
happen in the rx queue kernel thread this is safe, as long as the
number of needed slots is accessed via READ/WRITE_ONCE() only and
updates are always done with the rx queue lock held.

Add a small helper for obtaining the number of free slots.

This is part of XSA-392

Fixes: 1d5d48523900a4b ("xen-netback: require fewer guest Rx slots when not using GSO")
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Reviewed-by: Jan Beulich &lt;jbeulich@suse.com&gt;
</content>
</entry>
<entry>
<title>skbuff: Add skb parameter to the ubuf zerocopy callback</title>
<updated>2021-01-08T00:06:37Z</updated>
<author>
<name>Jonathan Lemon</name>
<email>jonathan.lemon@gmail.com</email>
</author>
<published>2021-01-06T22:18:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=36177832f42d9c7b222ab039678398a9d4070fff'/>
<id>urn:sha1:36177832f42d9c7b222ab039678398a9d4070fff</id>
<content type='text'>
Add an optional skb parameter to the zerocopy callback parameter,
which is passed down from skb_zcopy_clear().  This gives access
to the original skb, which is needed for upcoming RX zero-copy
error handling.

Signed-off-by: Jonathan Lemon &lt;jonathan.lemon@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>xen/netback: use lateeoi irq binding</title>
<updated>2020-10-20T08:22:03Z</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2020-09-07T13:47:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=23025393dbeb3b8b3b60ebfa724cdae384992e27'/>
<id>urn:sha1:23025393dbeb3b8b3b60ebfa724cdae384992e27</id>
<content type='text'>
In order to reduce the chance for the system becoming unresponsive due
to event storms triggered by a misbehaving netfront use the lateeoi
irq binding for netback and unmask the event channel only just before
going to sleep waiting for new events.

Make sure not to issue an EOI when none is pending by introducing an
eoi_pending element to struct xenvif_queue.

When no request has been consumed set the spurious flag when sending
the EOI for an interrupt.

This is part of XSA-332.

Cc: stable@vger.kernel.org
Reported-by: Julien Grall &lt;julien@xen.org&gt;
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Reviewed-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Reviewed-by: Wei Liu &lt;wl@xen.org&gt;
</content>
</entry>
<entry>
<title>xen networking: add XDP offset adjustment to xen-netback</title>
<updated>2020-07-01T22:25:14Z</updated>
<author>
<name>Denis Kirjanov</name>
<email>kda@linux-powerpc.org</email>
</author>
<published>2020-06-29T13:13:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1c9535c701fb287c2f292bc7fb39a07c5f8a25fd'/>
<id>urn:sha1:1c9535c701fb287c2f292bc7fb39a07c5f8a25fd</id>
<content type='text'>
the patch basically adds the offset adjustment and netfront
state reading to make XDP work on netfront side.

Reviewed-by: Paul Durrant &lt;paul@xen.org&gt;
Signed-off-by: Denis Kirjanov &lt;kda@linux-powerpc.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xen-netback: add reference from xenvif to backend_info to facilitate coredump analysis</title>
<updated>2019-04-12T17:10:28Z</updated>
<author>
<name>Dongli Zhang</name>
<email>dongli.zhang@oracle.com</email>
</author>
<published>2019-04-12T06:53:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6dc400af216a79c10cb082f25a7337bcbf532045'/>
<id>urn:sha1:6dc400af216a79c10cb082f25a7337bcbf532045</id>
<content type='text'>
During coredump analysis, it is not easy to obtain the address of
backend_info in xen-netback.

So far there are two ways to obtain backend_info:

1. Do what xenbus_device_find() does for vmcore to find the xenbus_device
and then derive it from dev_get_drvdata().

2. Extract backend_info from callstack of xenwatch (e.g., netback_remove()
or frontend_changed()).

This patch adds a reference from xenvif to backend_info so that it would be
much more easier to obtain backend_info during coredump analysis.

Signed-off-by: Dongli Zhang &lt;dongli.zhang@oracle.com&gt;
Acked-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xen-netback: validate queue numbers in xenvif_set_hash_mapping()</title>
<updated>2018-09-25T17:39:34Z</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2018-09-25T08:13:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=22f9cde3401077ea450b69bf9b0bba373e12e454'/>
<id>urn:sha1:22f9cde3401077ea450b69bf9b0bba373e12e454</id>
<content type='text'>
Checking them before the grant copy means nothing as to the validity of
the incoming request. As we shouldn't make the new data live before
having validated it, introduce a second instance of the mapping array.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Reviewed-by: Paul Durrant &lt;paul.durrant@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
