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] [day] [month] [year] [list]
Message-ID: 
 <SJ0PR18MB52164BC38B5D8899B74610E1DB2CA@SJ0PR18MB5216.namprd18.prod.outlook.com>
Date: Thu, 6 Jul 2023 17:34:35 +0000
From: Suman Ghosh <sumang@...vell.com>
To: Simon Horman <simon.horman@...igine.com>
CC: Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Geethasowjanya Akula
	<gakula@...vell.com>,
        Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
        Hariprasad Kelam <hkelam@...vell.com>,
        "davem@...emloft.net"
	<davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [EXT] Re: [PATCH V3] octeontx2-pf: Add additional check for MCAM
 rules

>-----Original Message-----
>From: Simon Horman <simon.horman@...igine.com>
>Sent: Tuesday, July 4, 2023 7:17 PM
>To: Suman Ghosh <sumang@...vell.com>
>Cc: Sunil Kovvuri Goutham <sgoutham@...vell.com>; Geethasowjanya Akula
><gakula@...vell.com>; Subbaraya Sundeep Bhatta <sbhatta@...vell.com>;
>Hariprasad Kelam <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: [EXT] Re: [PATCH V3] octeontx2-pf: Add additional check for
>MCAM rules
>
>External Email
>
>----------------------------------------------------------------------
>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.
[Suman] yes. Moved the assignment of vlan_etype before the checkin v4. Hence no need for initialization now.
>
>>  			vlan_etype = be16_to_cpu(fsp->h_ext.vlan_etype);
>
>Perhaps the new check should go here.
[Suman] Ack.
>
>>  			/* 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