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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <88e9588e-705a-9592-8f25-31a85c40a793@intel.com>
Date: Fri, 18 Aug 2023 11:38:35 +0200
From: Piotr Gardocki <piotrx.gardocki@...el.com>
To: Leon Romanovsky <leon@...nel.org>, Tony Nguyen
	<anthony.l.nguyen@...el.com>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<edumazet@...gle.com>, <netdev@...r.kernel.org>, Rafal Romanowski
	<rafal.romanowski@...el.com>
Subject: Re: [PATCH net 1/2] iavf: fix FDIR rule fields masks validation

On 17.08.2023 13:27, Leon Romanovsky wrote:
> 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 for comment, I will change that to:
static const struct in6_addr ipv6_addr_zero_mask;

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ