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: <4C1FA3C1.4020006@garzik.org>
Date:	Mon, 21 Jun 2010 13:39:13 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Ben Hutchings <bhutchings@...arflare.com>
CC:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	linux-net-drivers@...arflare.com
Subject: Re: [PATCH net-next-2.6] sfc: Implement ethtool register dump operation

On 06/21/2010 09:06 AM, Ben Hutchings wrote:
> Signed-off-by: Ben Hutchings<bhutchings@...arflare.com>
> ---
>   drivers/net/sfc/ethtool.c |   16 +++
>   drivers/net/sfc/io.h      |    7 +
>   drivers/net/sfc/nic.c     |  266 +++++++++++++++++++++++++++++++++++++++++++++
>   drivers/net/sfc/nic.h     |    3 +
>   4 files changed, 292 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
> index 22026bf..81b7f39 100644
> --- a/drivers/net/sfc/ethtool.c
> +++ b/drivers/net/sfc/ethtool.c
> @@ -242,6 +242,20 @@ static void efx_ethtool_get_drvinfo(struct net_device *net_dev,
>   	strlcpy(info->bus_info, pci_name(efx->pci_dev), sizeof(info->bus_info));
>   }
>
> +static int efx_ethtool_get_regs_len(struct net_device *net_dev)
> +{
> +	return efx_nic_get_regs_len(netdev_priv(net_dev));
> +}
> +
> +static void efx_ethtool_get_regs(struct net_device *net_dev,
> +				 struct ethtool_regs *regs, void *buf)
> +{
> +	struct efx_nic *efx = netdev_priv(net_dev);
> +
> +	regs->version = efx->type->revision;
> +	efx_nic_get_regs(efx, buf);

regs->version is really the version of hardware register dump exported 
to userspace.  You might want to hardcode this in the driver, to be 
changed when efx_nic_regs[] array changes, rather than tying 
regs->version directly to the SFC hardware architecture revision.

However, if that limitation is OK with you, ie. ethtool register dump 
code will change when h/w arch rev changes, then

	Acked-by: Jeff Garzik <jgarzik@...hat.com>

This is a ABI-related choice, so it deserves a bit of consideration.

Regards,

	Jeff




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ