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: <ZKQi2HiT/yu/vSr8@corigine.com>
Date:   Tue, 4 Jul 2023 14:47:04 +0100
From:   Simon Horman <simon.horman@...igine.com>
To:     Suman Ghosh <sumang@...vell.com>
Cc:     sgoutham@...vell.com, gakula@...vell.com, sbhatta@...vell.com,
        hkelam@...vell.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3] octeontx2-pf: Add additional check for MCAM rules

On Mon, Jul 03, 2023 at 10:30:54PM +0530, Suman Ghosh wrote:
> Due to hardware limitation, MCAM drop rule with
> ether_type == 802.1Q and vlan_id == 0 is not supported. Hence rejecting
> such rules.
> 
> Fixes: dce677da57c0 ("octeontx2-pf: Add vlan-etype to ntuple filters")
> Signed-off-by: Suman Ghosh <sumang@...vell.com>
> ---
> Changes since v2:
> - Added "fixes" tag
> 
>  .../net/ethernet/marvell/octeontx2/nic/otx2_flows.c |  7 +++++++
>  .../net/ethernet/marvell/octeontx2/nic/otx2_tc.c    | 13 +++++++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
> index 10e11262d48a..49ba27875111 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
> @@ -871,6 +871,13 @@ static int otx2_prepare_flow_request(struct ethtool_rx_flow_spec *fsp,
>  			if (be16_to_cpu(fsp->m_ext.vlan_etype) != 0xFFFF)
>  				return -EINVAL;
>  
> +			/* Drop rule with vlan_etype == 802.1Q
> +			 * and vlan_id == 0 is not supported
> +			 */
> +			if (vlan_etype == ETH_P_8021Q && !fsp->m_ext.vlan_tci &&
> +			    fsp->ring_cookie == RX_CLS_FLOW_DISC)
> +				return -EINVAL;
> +

Hi Suman,

vlan_etype appears to be uninitialised here.

>  			vlan_etype = be16_to_cpu(fsp->h_ext.vlan_etype);

Perhaps the new check should go here.

>  			/* Only ETH_P_8021Q and ETH_P_802AD types supported */
>  			if (vlan_etype != ETH_P_8021Q &&

As noted by Jakub elsewhere, please allow 24h from the posting of v3
before posting v4.

-- 
pw-bot: changes-requested

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ