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: <87ttgc75ol.fsf@nvidia.com>
Date: Fri, 26 Jul 2024 13:25:06 +0200
From: Petr Machata <petrm@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>, <edumazet@...gle.com>,
	<pabeni@...hat.com>, <michael.chan@...adcom.com>, <shuah@...nel.org>,
	<ecree.xilinx@...il.com>, <przemyslaw.kitszel@...el.com>,
	<ahmed.zaki@...el.com>, <andrew@...n.ch>, <willemb@...gle.com>,
	<pavan.chebbi@...adcom.com>, <petrm@...dia.com>
Subject: Re: [PATCH net 5/5] selftests: drv-net: rss_ctx: check for all-zero
 keys


Jakub Kicinski <kuba@...nel.org> writes:

> We had a handful of bugs relating to key being either all 0
> or just reported incorrectly as all 0. Check for this in
> the tests.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Reviewed-by: Petr Machata <petrm@...dia.com>

> +def _rss_key_check(cfg, data=None, context=0):
> +    if data is None:
> +        data = get_rss(cfg, context=context)
> +    if 'rss-hash-key' not in data:
> +        return
> +    non_zero = [x for x in data['rss-hash-key'] if x != 0]
> +    ksft_eq(bool(non_zero), True, comment=f"RSS key is all zero {data['rss-hash-key']}")

If there's a v2, consider changing this to len(non_zero) > 0, or
non_zero != [].

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ