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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9109c963-4544-4c4b-8d75-3293d8173cd5@broadcom.com>
Date: Wed, 12 Nov 2025 14:53:51 -0800
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, Doug Berger <opendmb@...il.com>,
 Broadcom internal kernel review list
 <bcm-kernel-feedback-list@...adcom.com>, Andrew Lunn
 <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
 Simon Horman <horms@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
 Antoine Tenart <atenart@...nel.org>, Kuniyuki Iwashima <kuniyu@...gle.com>,
 Yajun Deng <yajun.deng@...ux.dev>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v3 1/2] net: ethernet: Allow disabling pause on
 panic

On 11/10/25 17:10, Jakub Kicinski wrote:
> On Thu,  6 Nov 2025 16:25:09 -0800 Florian Fainelli wrote:
>> Development devices on a lab network might be subject to kernel panics
>> and if they have pause frame generation enabled, once the kernel panics,
>> the Ethernet controller stops being serviced. This can create a flood of
>> pause frames that certain switches are unable to handle resulting a
>> completle paralysis of the network because they broadcast to other
>> stations on that same network segment.
>>
>> To accomodate for such situation introduce a
>> /sys/class/net/<device>/disable_pause_on_panic knob which will disable
>> Ethernet pause frame generation upon kernel panic.
>>
>> Note that device driver wishing to make use of that feature need to
>> implement ethtool_ops::set_pauseparam_panic to specifically deal with
>> that atomic context.
> 
> Some basic review comments below (no promises if addressing those will
> make me for one feel any warmer towards the concept).
> 
>>   Documentation/ABI/testing/sysfs-class-net | 16 +++++
>>   include/linux/ethtool.h                   |  3 +
>>   include/linux/netdevice.h                 |  1 +
>>   net/core/net-sysfs.c                      | 39 +++++++++++
>>   net/ethernet/Makefile                     |  3 +-
>>   net/ethernet/pause_panic.c                | 79 +++++++++++++++++++++++
> 
> panic.c or shutdown.c is probably a slightly better name,
> more likely we'd add more code in that.
> 
>>   6 files changed, 140 insertions(+), 1 deletion(-)
>>   create mode 100644 net/ethernet/pause_panic.c
>>
>> diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net
>> index ebf21beba846..da0e4e862aca 100644
>> --- a/Documentation/ABI/testing/sysfs-class-net
>> +++ b/Documentation/ABI/testing/sysfs-class-net
>> @@ -352,3 +352,19 @@ Description:
>>   		0  threaded mode disabled for this dev
>>   		1  threaded mode enabled for this dev
>>   		== ==================================
>> +
>> +What:		/sys/class/net/<iface>/disable_pause_on_panic
>> +Date:		Nov 2025
>> +KernelVersion:	6.20
>> +Contact:	netdev@...r.kernel.org
>> +Description:
>> +		Boolean value to control whether to disable pause frame
>> +		generation on panic. This is helpful in environments where
>> +		the link partner may incorrect respond to pause frames (e.g.:
>> +		improperly configured Ethernet switches)
>> +
>> +		Possible values:
>> +		== =====================================================
>> +		0  do not disable pause frame generation on kernel panic
>> +		1  disable pause frame generation on kernel panic
>> +		== =====================================================
> 
> please no sysfs for something as niche as this feature

Would you prefer ethtool in that case?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ