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: Tue, 26 Mar 2024 13:20:28 +0100
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Yury Norov <yury.norov@...il.com>
CC: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
	<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>, Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
	Marcin Szycik <marcin.szycik@...ux.intel.com>, Wojciech Drewek
	<wojciech.drewek@...el.com>, Andy Shevchenko <andy@...nel.org>, "Rasmus
 Villemoes" <linux@...musvillemoes.dk>, Alexander Potapenko
	<glider@...gle.com>, Jiri Pirko <jiri@...nulli.us>, Ido Schimmel
	<idosch@...dia.com>, Przemek Kitszel <przemyslaw.kitszel@...el.com>, "Simon
 Horman" <horms@...nel.org>, <linux-btrfs@...r.kernel.org>,
	<dm-devel@...hat.com>, <ntfs3@...ts.linux.dev>, <linux-s390@...r.kernel.org>,
	<intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v5 17/21] lib/bitmap: add tests for IP tunnel
 flags conversion helpers

From: Yury Norov <yury.norov@...il.com>
Date: Wed, 28 Feb 2024 08:38:49 -0800

> On Thu, Feb 01, 2024 at 01:22:12PM +0100, Alexander Lobakin wrote:
>> Now that there are helpers for converting IP tunnel flags between the
>> old __be16 format and the bitmap format, make sure they work as expected
>> by adding a couple of tests to the bitmap testing suite. The helpers are
>> all inline, so no dependencies on the related CONFIG_* (or a standalone
>> module) are needed.
>>
>> Cover three possible cases:
>>
>> 1. No bits past BIT(15) are set, VTI/SIT bits are not set. This
>>    conversion is almost a direct assignment.
>> 2. No bits past BIT(15) are set, but VTI/SIT bit is set. During the
>>    conversion, it must be transformed into BIT(16) in the bitmap,
>>    but still compatible with the __be16 format.
>> 3. The bitmap has bits past BIT(15) set (not the VTI/SIT one). The
>>    result will be truncated.
>>    Note that currently __IP_TUNNEL_FLAG_NUM is 17 (incl. special),
>>    which means that the result of this case is currently
>>    semi-false-positive. When BIT(17) is finally here, it will be
>>    adjusted accordingly.
>>
>> Signed-off-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> 
> So why testing IP tunnels stuff in lib/test_bitmap? I think it should
> go with the rest of networking code.

When I was creating these tests, there was no networking-specific KUnit,
but now we have one, so it makes sense to move it.

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ