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]
Date: Thu, 17 Aug 2023 14:27:38 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
	edumazet@...gle.com, netdev@...r.kernel.org,
	Piotr Gardocki <piotrx.gardocki@...el.com>,
	Rafal Romanowski <rafal.romanowski@...el.com>
Subject: Re: [PATCH net 1/2] iavf: fix FDIR rule fields masks validation

On Wed, Aug 16, 2023 at 12:33:07PM -0700, Tony Nguyen wrote:
> From: Piotr Gardocki <piotrx.gardocki@...el.com>
> 
> Return an error if a field's mask is neither full nor empty. When a mask
> is only partial the field is not being used for rule programming but it
> gives a wrong impression it is used. Fix by returning an error on any
> partial mask to make it clear they are not supported.
> The ip_ver assignment is moved earlier in code to allow using it in
> iavf_validate_fdir_fltr_masks.
> 
> Fixes: 527691bf0682 ("iavf: Support IPv4 Flow Director filters")
> Fixes: e90cbc257a6f ("iavf: Support IPv6 Flow Director filters")
> Signed-off-by: Piotr Gardocki <piotrx.gardocki@...el.com>
> Tested-by: Rafal Romanowski <rafal.romanowski@...el.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> ---
>  .../net/ethernet/intel/iavf/iavf_ethtool.c    | 10 +++
>  drivers/net/ethernet/intel/iavf/iavf_fdir.c   | 77 ++++++++++++++++++-
>  drivers/net/ethernet/intel/iavf/iavf_fdir.h   |  2 +
>  3 files changed, 85 insertions(+), 4 deletions(-)

<...>

> +static const struct in6_addr ipv6_addr_zero_mask = {
> +	.in6_u = {
> +		.u6_addr8 = {
> +			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> +		}
> +	}
> +};
> +

Static variables are zeroed by default, there is no need in direct assignment of 0s.

Thanks,
Reviewed-by: Leon Romanovsky <leonro@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ