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: <20231211190849.6c7d5246@kernel.org>
Date: Mon, 11 Dec 2023 19:08:49 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Louis Peens <louis.peens@...igine.com>
Cc: David Miller <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, Hui
 Zhou <hui.zhou@...igine.com>, netdev@...r.kernel.org,
 stable@...r.kernel.org, oss-drivers@...igine.com
Subject: Re: [PATCH net 2/2] nfp: flower: fix hardware offload for the
 transfer layer port

On Fri,  8 Dec 2023 08:59:56 +0200 Louis Peens wrote:
> +		if (mangle_action->mangle.offset == offsetof(struct tcphdr, source)) {
> +			mangle_action->mangle.val =
> +				(__force u32)cpu_to_be32(mangle_action->mangle.val << 16);
> +			mangle_action->mangle.mask =
> +				(__force u32)cpu_to_be32(mangle_action->mangle.mask << 16 | 0xFFFF);

This a bit odd. Here you fill in the "other half" of the mask with Fs...

> +		}
> +		if (mangle_action->mangle.offset == offsetof(struct tcphdr, dest)) {
> +			mangle_action->mangle.offset = 0;
> +			mangle_action->mangle.val =
> +				(__force u32)cpu_to_be32(mangle_action->mangle.val);
> +			mangle_action->mangle.mask =
> +				(__force u32)cpu_to_be32(mangle_action->mangle.mask);
> +		}

.. but here you just let it be zero.

If it's correct it'd be good to explain in the commit msg why.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ