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: <20190120193234.GD19714@lunn.ch>
Date:   Sun, 20 Jan 2019 20:32:34 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Bryan Whitehead <Bryan.Whitehead@...rochip.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on
 chip OTP

On Fri, Jan 18, 2019 at 04:54:53PM -0500, Bryan Whitehead wrote:
> The LAN743x includes on chip One-Time-Programmable (OTP) memory.
> 
> This patch extends the ethtool EEPROM read/write interface to
> access OTP memory space.
> 
> This is done by adding the private flag OTP_ACCESS, which is used
> to switch between EEPROM, and OTP modes.
> 
> The private flag OTP_ACCESS is configurable through the
>   ethtool --set-priv-flags command.
> And visible through the
>   ethtool --show-priv-flags command.

Hi Bryan

It would be good to explain what is wrong with the current code, which
allows you to select between the OTP and the EEPROM at write time.

> +static int lan743x_ethtool_set_priv_flags(struct net_device *netdev, u32 flags)
> +{
> +	struct lan743x_adapter *adapter = netdev_priv(netdev);
> +
> +	adapter->flags = flags;
> +
> +	return 0;
> +}

Is the EEPROM mandatory? Could there be designs without an EEPROM?
When setting the private flag here, should you probe to see if there
actually is an EEPROM and return -ENODEV if it is missing.

	 Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ