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: <4C2AD59E.10008@garzik.org>
Date:	Wed, 30 Jun 2010 01:26:54 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Ben Hutchings <bhutchings@...arflare.com>
CC:	Stanislaw Gruszka <sgruszka@...hat.com>,
	Amit Salecha <amit.salecha@...gic.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Amerigo Wang <amwang@...hat.com>,
	Anirban Chakraborty <anirban.chakraborty@...gic.com>
Subject: Re: [RFC] [PATCH] ethtool: Change ethtool_op_set_flags to validate
 flags

On 06/29/2010 12:01 PM, Ben Hutchings wrote:
> This is the sort of change I'd like to see.
>
> Ben.
>
> ---
> ethtool_op_set_flags() does not check for unsupported flags, and has
> no way of doing so.  This means it is not suitable for use as a
> default implementation of ethtool_ops::set_flags.
>
> Add a 'supported' parameter specifying the flags that the driver and
> hardware support, validate the requested flags against this, and
> change all current callers to pass this parameter.
>
> Change some other trivial implementations of ethtool_ops::set_flags to
> call ethtool_op_set_flags().
> ---
>   drivers/net/cxgb4/cxgb4_main.c    |    9 +--------
>   drivers/net/enic/enic_main.c      |    1 -
>   drivers/net/ixgbe/ixgbe_ethtool.c |    5 ++++-
>   drivers/net/mv643xx_eth.c         |    7 ++++++-
>   drivers/net/myri10ge/myri10ge.c   |   10 +++++++---
>   drivers/net/niu.c                 |    9 +--------
>   drivers/net/sfc/ethtool.c         |    5 +----
>   drivers/net/sky2.c                |   16 ++++++----------
>   include/linux/ethtool.h           |    2 +-
>   net/core/ethtool.c                |   28 +++++-----------------------
>   10 files changed, 32 insertions(+), 60 deletions(-)

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

I think that's a better way to do it...


--
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