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: <20250825104721.28f127a2@kmaincent-XPS-13-7390>
Date: Mon, 25 Aug 2025 10:47:21 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>, 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>, kernel@...gutronix.de, Dent Project
 <dentproject@...uxfoundation.org>, Thomas Petazzoni
 <thomas.petazzoni@...tlin.com>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, Maxime Chevallier
 <maxime.chevallier@...tlin.com>, Kyle Swenson <kyle.swenson@....tech>
Subject: Re: [PATCH net-next 2/2] net: pse-pd: pd692x0: Add sysfs interface
 for configuration save/reset

Hello Andrew,

Le Fri, 22 Aug 2025 19:17:55 +0200,
Andrew Lunn <andrew@...n.ch> a écrit :

> On Fri, Aug 22, 2025 at 05:37:02PM +0200, Kory Maincent wrote:
> > From: Kory Maincent (Dent Project) <kory.maincent@...tlin.com>
> > 
> > Add sysfs attributes save_conf and reset_conf to enable userspace
> > management of the PSE's permanent configuration stored in EEPROM.
> > 
> > The save_conf attribute allows saving the current configuration to
> > EEPROM by writing '1'. The reset_conf attribute restores factory
> > defaults and reinitializes the port matrix configuration.  
> 
> I'm not sure sysfs is the correct interface for this.
> 
> Lets take a step back.
> 
> I assume ethtool will report the correct state after a reboot when the
> EEPROM has content? The driver does not hold configuration state which
> cannot be represented in the EEPROM?

In fact I assumed it is an EEPROM but it is described as non volatile memory
so I don't know which type it is.

Yes ethtool report the current configuration which match the saved one if it has
been saved before. No the driver doesn't hold any state that can not be
represented in the non-volatile memory.

> Is the EEPROM mandatory, or optional? Is it built into the controller?

It is built into the controller. It seem there are version of this
controller that does not support it : "This command is not supported by
PD69200M."

> How fast is it to store the settings?

2 i2c messages and a 50 ms wait as described in the datasheet.
 
> I'm wondering if rather than having this sysfs parameter, you just
> store every configuration change? That could be more intuitive.

I have not thought of it. I don't know if it is a good idea. We may need
feedback from people that actually use PSE on field. Kyle any idea on this?
In any case we still need a way to reset the configuration through sysfs or
whatever other way.

> I've not looked at the sysfs documentation. Are there other examples
> of such a property?

Not sure for that particular save/reset configuration case.
Have you another implementation idea in mind?

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ