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: <20260119110811.GA1492101@kernel-ep2>
Date: Mon, 19 Jan 2026 16:38:11 +0530
From: Subbaraya Sundeep <sbhatta@...vell.com>
To: Alok Tiwari <alok.a.tiwari@...cle.com>
CC: <sd@...asysnail.net>, <bbhushan2@...vell.com>, <pabeni@...hat.com>,
        <kuba@...nel.org>, <edumazet@...gle.com>, <davem@...emloft.net>,
        <andrew+netdev@...n.ch>, <jerinj@...vell.com>, <hkelam@...vell.com>,
        <gakula@...vell.com>, <lcherian@...vell.com>, <sgoutham@...vell.com>,
        <george.cherian@...vell.com>, <netdev@...r.kernel.org>,
        <alok.a.tiwarilinux@...il.com>
Subject: Re: [PATCH net-next] octeontx2: cn10k: fix RX flowid TCAM mask
 handling

On 2026-01-16 at 22:17:12, Alok Tiwari (alok.a.tiwari@...cle.com) wrote:
> The RX flowid programming initializes the TCAM mask to all ones, but
> then overwrites it when clearing the MAC DA mask bits. This results
> in losing the intended initialization and may affect other match fields.
> 
> Update the code to clear the MAC DA bits using an AND operation, making
> the handling of mask[0] consistent with mask[1], where the field-specific
> bits are cleared after initializing the mask to ~0ULL.
> 
> Signed-off-by: Alok Tiwari <alok.a.tiwari@...cle.com>
This has no impact in functionality and it is better to be consistent with
mask[1]. Thanks for the change.

Reviewed-by: Subbaraya Sundeep <sbhatta@...vell.com>

> ---
>  drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
> index 4c7e0f345cb5..060c715ebad0 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
> @@ -328,7 +328,7 @@ static int cn10k_mcs_write_rx_flowid(struct otx2_nic *pfvf,
>  
>  	req->data[0] = FIELD_PREP(MCS_TCAM0_MAC_DA_MASK, mac_da);
>  	req->mask[0] = ~0ULL;
> -	req->mask[0] = ~MCS_TCAM0_MAC_DA_MASK;
> +	req->mask[0] &= ~MCS_TCAM0_MAC_DA_MASK;
>  
>  	req->data[1] = FIELD_PREP(MCS_TCAM1_ETYPE_MASK, ETH_P_MACSEC);
>  	req->mask[1] = ~0ULL;
> -- 
> 2.50.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ