lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <aHoBcULQVVsbx6XO@mail.vates.tech>
Date: Fri, 18 Jul 2025 08:10:29 +0000
From: "Anthoine Bourgeois" <anthoine.bourgeois@...es.tech>
To: "Jakub Kicinski" <kuba@...nel.org>
Cc: "Juergen Gross" <jgross@...e.com>, "Stefano Stabellini" <sstabellini@...nel.org>, "Oleksandr Tyshchenko" <oleksandr_tyshchenko@...m.com>, "Wei Liu" <wei.liu@...nel.org>, "Paul Durrant" <paul@....org>, xen-devel@...ts.xenproject.org, netdev@...r.kernel.org, "Elliott Mitchell" <ehem+xen@....com>
Subject: Re: [PATCH v2] xen/netfront: Fix TX response spurious interrupts

On Thu, Jul 17, 2025 at 07:29:51AM -0700, Jakub Kicinski wrote:
>On Tue, 15 Jul 2025 16:11:29 +0000 Anthoine Bourgeois wrote:
>> Fixes: b27d47950e48 ("xen/netfront: harden netfront against event channel storms")
>
>Not entirely sure who you expect to apply this patch, but if networking
>then I wouldn't classify this is a fix. The "regression" happened 4
>years ago. And this patch doesn't seem to be tuning the logic added by
>the cited commit. I think this is an optimization, -next material, and
>therefore there should be no Fixes tag here. You can refer to the commit
>without the tag.

Ok, you're right the cited commit exacerbates a problem that was already
there before.
I will change this in v3.

>> @@ -849,9 +847,6 @@ static netdev_tx_t xennet_start_xmit(struct sk_buff *skb, struct net_device *dev
>>  	tx_stats->packets++;
>>  	u64_stats_update_end(&tx_stats->syncp);
>>
>> -	/* Note: It is not safe to access skb after xennet_tx_buf_gc()! */
>> -	xennet_tx_buf_gc(queue);
>> -
>>  	if (!netfront_tx_slot_available(queue))
>>  		netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->id));
>
>I thought normally reaping completions from the Tx path is done
>to prevent the queue from filling up, when the device-generated
>completions are slow or the queue is short. I say "normally" but
>this is relatively a uncommon thing to do in networking.
>Maybe it's my lack of Xen knowledge but it would be good to add to
>the commit message why these calls where here in the first place.

Good to know how it should "normally" works, I'm not an expert.
The patch also has the advantage of standardizing the network driver
with other Xen PV drivers that do not have this reponse collection
outside of the interrupt handler.

As this part of the code is here since the driver was upsteamed and the
author no longer works on xen, I will do my best to add my guess on why
this code was there.

Regards,
Anthoine


Anthoine Bourgeois | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ