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: <e4f6a025-136d-4c66-bea3-6916daa52b52@lunn.ch>
Date: Mon, 3 Nov 2025 23:08:11 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: netdev@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com,
	Doug Berger <opendmb@...il.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, 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 1/2] net: ethernet: Allow disabling pause on
 panic

> +	/*
> +	 * In panic context, we're in atomic context and cannot sleep.
> +	 * We try to call set_pauseparam directly. If it would sleep,
> +	 * that's a driver bug, but we proceed anyway since we're panicking.
> +	 * The driver's set_pauseparam implementation should ideally handle
> +	 * atomic context, but if it doesn't, we can't do much about it
> +	 * during a panic.
> +	 */
> +	ops->set_pauseparam(dev, &pause);

I'm not sure i like that. Many driver writers get pause wrong. I've
been encouraging them to use phylink, since it does all the business
logic for them. There are around 18 drivers doing this. They are
likely to first get a splat from ASSERT_RTNL() and then hit a
mutex_lock()/unlock.

Could you take a look at phylink_ethtool_set_pauseparam(), and if we
are in a panic context, at minimum turn it into a NOP?

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ