From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5D112427E6; Mon, 20 Mar 2023 22:38:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39EC0410D0; Mon, 20 Mar 2023 22:38:14 +0100 (CET) Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) by mails.dpdk.org (Postfix) with ESMTP id 66D3840A80 for ; Mon, 20 Mar 2023 22:38:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7225; q=dns/txt; s=iport; t=1679348293; x=1680557893; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=q59DqNnf7jhlw7guPBBjJow9T0GSJrAq6qPqGPSRSpA=; b=fgvj4NnrQCPxT2G6hN61DCPjiX5jsn2CO9gzqO/Z3XBOooXM3ENk20Gf VKK2VI2+K3ZTcdpin8EaLzwPrQdon3suKWZcypuSTWhp6HHBDixpG1EZB m9qdbMRvH2XqLNVc62HaFJTdPGC7ETDb129/GpCe/FplmHGvvO7T0L+h9 E=; X-IPAS-Result: =?us-ascii?q?A0ADAACQ0BhkmJRdJa1aGgEBAQEBAQEBAQEDAQEBARIBA?= =?us-ascii?q?QEBAgIBAQEBQIE7BQEBAQELAYEqMVJzAlk7RogeA4RQX4g0lweFIYEsgSUDV?= =?us-ascii?q?g8BAQENAQFEBAEBhQUChTUCJTQJDgECBAEBAQEDAgMBAQEBAQEDAQEFAQEBA?= =?us-ascii?q?gEHBBQBAQEBAQEBAR4ZBQ4QJ4VoDYZVAQEBAQMSLgEBNwEPAgEIEQMBAigHM?= =?us-ascii?q?hQJCAIEAQ0FCBqCXAGCFUcDAaZ2AYE/AoofeIE0gQGCCAEBBgQEnyAJgUABi?= =?us-ascii?q?RmIGicbgUlEgRVDeYFuP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UP5kYvGbf2RYUh27D3xnklWasoDWb/8sQqAe NuBMbT6LJfdk6bdWnQui1qzMa3Vno+Ex+aSgxa0/blmQR+jTR81Q8V1cYflnAP+NY0TIRF/f 3NNuBtmKtVRsEbYKphDKMKQNexCGbKXRXQWVjiamjPBeUCITbAupT36LI66KWjf4EJ1oI7nN DbXFZRpQcJCjXT4A21rel2Gzz2MRCAtG7Wu7JjDrBCy8/BeIY= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="5.98,276,1673913600"; d="scan'208,217";a="34711134" Received: from rcdn-core-12.cisco.com ([173.37.93.148]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 20 Mar 2023 21:38:12 +0000 Received: from mail.cisco.com (xfe-rtp-005.cisco.com [64.101.210.235]) by rcdn-core-12.cisco.com (8.15.2/8.15.2) with ESMTPS id 32KLcA4m004848 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=OK); Mon, 20 Mar 2023 21:38:11 GMT Received: from xfe-aln-001.cisco.com (173.37.135.121) by xfe-rtp-005.cisco.com (64.101.210.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Mon, 20 Mar 2023 17:37:59 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (173.37.151.57) by xfe-aln-001.cisco.com (173.37.135.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25 via Frontend Transport; Mon, 20 Mar 2023 16:37:59 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ltyMXxT3JQMwErKu6xrsGgbz01O4t4j+5AMkQ0x2/DfDcwDcakLX2OsJHb+JsT2JrnhnfZZ8MleIcXIMc6ahqamLmjc33mN41FBIXthHXQmH+Kq7aO/mH/BxkkOcWtx5+G5Xih/DtT20Txt/A4JDA35U09Q4hAxeR4iDjnH5o6dol2jyO+lds07rwXm1ws4pp6UsiPaSssbSA2+vKI5m5CX2v/yKxBiGKphMjvJ12YFomz5hVBT5Zb/VR638SzZTUBTs14WpVfcmN5VKBAL/N/s0rYRtLFI3wfBwp+7FUP2de6RXvuLhvnmnA+e2k9JCDdBF7mNLe8avyTZly/Cycw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5EeGDw2mQlsZwrB0jIwuFA5R+vyFMlmFE4Tn9PTsn7Q=; b=fMg1zzArV323jjhozwxSfKFFKjRFpyvXMgHRSBOFbYF0FE4a4R9V3BhW2QfJBdt6B/0SKT/dQzvr/ka3KeOxj0jxjq7kkkxYY32nT5GzoGfsJ9LPGXJ3wFaTT3XgZB6CbdsqiM/c0K3Q3/DOT4AOP14/NjziGzimsxKOIy1VnfoiMQ1ENxk0qaJccrL0anbTjcUFrN/5JIKZZ+mjs2y7FUlfgNaucf7gu4tuxnx/X8Gr4MYJ+ioJBjQLqZvnMbqTboiNTrpYJdFDzCl5uFS+a55oBL5fYto5DQHeSg3ocdRSXK1r0CmQnlJUaXNhDKEtCUudqbqco4/Y2eSYFyU9ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5EeGDw2mQlsZwrB0jIwuFA5R+vyFMlmFE4Tn9PTsn7Q=; b=oDDVedJuagp85iYJYVXycIjaT4AhCKYgxO0fYIIPhhRivNQKYREWxFGu37jio+VlYCWrOsUC/XzWAxya1ZJIoxCiby/MUxKmh3iXslahvp6uiwaQhXp0JdJQXZBGBAHqqb6HZ/OzI1rhNUJLdaQLbRLM3nlGMmz+Au3+UX+MTks= Received: from BYAPR11MB2535.namprd11.prod.outlook.com (2603:10b6:a02:be::32) by DM4PR11MB5453.namprd11.prod.outlook.com (2603:10b6:5:398::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 21:37:57 +0000 Received: from BYAPR11MB2535.namprd11.prod.outlook.com ([fe80::c761:f5a7:1508:b857]) by BYAPR11MB2535.namprd11.prod.outlook.com ([fe80::c761:f5a7:1508:b857%6]) with mapi id 15.20.6178.037; Mon, 20 Mar 2023 21:37:57 +0000 From: "John Daley (johndale)" To: Chengwen Feng , "thomas@monjalon.net" , "ferruh.yigit@amd.com" , "Hyong Youb Kim (hyonkim)" CC: "dev@dpdk.org" Subject: Re: [PATCH v2 13/44] net/enic: fix segment fault when parse devargs Thread-Topic: [PATCH v2 13/44] net/enic: fix segment fault when parse devargs Thread-Index: AQHZWw5ON1SQj6HInEq46lHfgN1ZCa8EMZP9 Date: Mon, 20 Mar 2023 21:37:25 +0000 Message-ID: References: <20230314124813.39521-1-fengchengwen@huawei.com> <20230320092110.37295-1-fengchengwen@huawei.com> <20230320092110.37295-14-fengchengwen@huawei.com> In-Reply-To: <20230320092110.37295-14-fengchengwen@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cisco.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR11MB2535:EE_|DM4PR11MB5453:EE_ x-ms-office365-filtering-correlation-id: d0b39fa2-cb4e-4fcb-7672-08db298b5f10 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gWlLyaI1+8AINEyUpJqtDz/pywDx7cglCjDJhQaAMituxgpvBvBjc+2BpbXMrK8B54DoWqXnMA9lh6tQhFdvgUnjXQUI84qRXSZzCYtwoi6F1XkVy+CMW8RF23zYSt5Zjt6++RsU/6gcW1f+yitDqigCpdBTLcN8lGMLMUgPGx3MbxFET/Dh/KXgtwk14lcdt9ev6s4gSZu9S/Osxt39FNsuQ3w1OEw0v68p/VjxRCQWll+nmxFBjGTNBBhybKZf1apBolB7KnGrJduoONqPGYPu5DHYxfb3L27WfAHptwJ80r3oHvep+vk8ps8IjedtfyH/HdmVrCHm8LXis8vobm55eJX2fjUPiJ4IDTGAnSi54XNHBqSJvESK/Lhg0HwDDch6Cif0KCsJhw/nH+D8bqB7L9naK3T+h8Wmt458RqHHDUKJnMzY4l/rMXpw5odeakjwdU3XySK4YkEId/tlV/4mECbvEfs7xn0aQ8wN1GMyNHsZ4vt9fExxt9KnnGvYjLCW+AHNGzWDttmIxzUBciiaiNUno2UQkD1CeOeQLxcenK2VfCfo9k5GDw7Y5ebLxGznGebtRvCbljnEkhVnpJaUUkHb9yz2yqjgyj3yUOe30nvii/pHnwA8tvRzIXLeLWD+D7c/enqc7R2z23tER+WnKY4+Y6BEGSEg/0K83dyGqkd+I8lZtqtMe0+8LEnOIwifdPiRHLGcwrBYcsw6bQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2535.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(346002)(396003)(366004)(136003)(39860400002)(376002)(451199018)(6636002)(6506007)(7696005)(316002)(6666004)(186003)(9686003)(110136005)(33656002)(53546011)(71200400001)(478600001)(26005)(38070700005)(38100700002)(122000001)(86362001)(66946007)(52536014)(2906002)(5660300002)(76116006)(66476007)(8936002)(41300700001)(64756008)(4326008)(55016003)(66556008)(66446008)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x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nU+kdWekJbCvrJnvBABkpzXNOYGin/jCuabZ8z8DXct7fCb1/PL?= =?us-ascii?Q?76LWPdPiDs+FtkvzjlBZosmCq4nF3hM2RjU3IxsJr2fQiUPUdjk8cUyLlBfl?= =?us-ascii?Q?F1v8kjD0dK6lWhqpNyiccHNPWy7kQEECdzqjWz0u6nOyY2+fyLboKLlf+XCt?= =?us-ascii?Q?nC/ujdBRBDuJ3uWz8+XJmS7nvoKtn/39WxYCrfljc9xlmdExfeSE9DY0ONyC?= =?us-ascii?Q?SRMzY3W6x30wMrKUkcEtuZ+TWzD7dl75S8MDas6kPI8HOoxqLyAb2PhgCNhS?= =?us-ascii?Q?J52J+8dp+WM4JA9wKFs7BSQ+BFJkBONvrY6c6G7t74r6se62Zvcs3xvwn9ar?= =?us-ascii?Q?L2iYGLUhaKOeLKzh6VDx/bqodwrXz24YbofuQLBmQW24LSYBpLG4+h32MtIG?= =?us-ascii?Q?8Y71q5zHpv4k1IR2tJvq35Xs70bkAtQeLBbtT3gql348GpRXLIMl6qiJ+EI3?= =?us-ascii?Q?+QGS64f8W98Lhpnpb4apyHnomPzYMCJ6d2PiOB2Dfz9k9pmUNRq61jOO2WC+?= =?us-ascii?Q?NSW99C3H25LNYVmKWBLCC29q6nDxlIZEnv7H9VVNUxY4Z1RF83SV/0t/igYj?= =?us-ascii?Q?/xSTqlKTrFx0pYEgyds5dVaRS1vGAcLNPGV7xpuZyplyZ/gUgN54TNi2an5R?= =?us-ascii?Q?dJLTKVq7qLj505Za0vaUooFd/p09mXqC+/S5LVxizZKixHkcoeflP5X0ppK6?= =?us-ascii?Q?KfZEnCThq1rZDhKdrgpfcsO0mKcJ6xdxm4YcWCDN?= Content-Type: multipart/alternative; boundary="_000_BYAPR11MB253540C9B6198AB4A4E3E3F3CF809BYAPR11MB2535namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2535.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0b39fa2-cb4e-4fcb-7672-08db298b5f10 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2023 21:37:57.4539 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TLyqS0pN1fsxa9KqV8rh/k5LPv9LIClAnlksXslAOh73dmKQ1ZQO3biVv4OS3C1IavbX+5t9jBvNgrYsWLwBQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5453 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 64.101.210.235, xfe-rtp-005.cisco.com X-Outbound-Node: rcdn-core-12.cisco.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --_000_BYAPR11MB253540C9B6198AB4A4E3E3F3CF809BYAPR11MB2535namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: John Daley johndale@cisco.com From: Chengwen Feng Date: Monday, March 20, 2023 at 2:28 AM To: thomas@monjalon.net , ferruh.yigit@amd.com , John Daley (johndale) , Hyong Youb Kim= (hyonkim) Cc: dev@dpdk.org Subject: [PATCH v2 13/44] net/enic: fix segment fault when parse devargs The rte_kvargs_process() was used to parse KV pairs, it also supports to parse 'only keys' (e.g. socket_id) type. And the callback function parameter 'value' is NULL when parsed 'only keys'. This patch fixes segment fault when parse input args with 'only keys'. Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE= ") Fixes: e39c2756e21a ("net/enic: add devarg to specify ingress VLAN rewrite = mode") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng --- drivers/net/enic/enic_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.= c index cdf0915591..b67016e0a3 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -1148,6 +1148,9 @@ static int enic_parse_zero_one(const char *key, struct enic *enic; bool b; + if (value =3D=3D NULL) + return -EINVAL; + enic =3D (struct enic *)opaque; if (strcmp(value, "0") =3D=3D 0) { b =3D false; @@ -1173,6 +1176,9 @@ static int enic_parse_ig_vlan_rewrite(__rte_unused co= nst char *key, { struct enic *enic; + if (value =3D=3D NULL) + return -EINVAL; + enic =3D (struct enic *)opaque; if (strcmp(value, "trunk") =3D=3D 0) { /* Trunk mode: always tag */ -- 2.17.1 --_000_BYAPR11MB253540C9B6198AB4A4E3E3F3CF809BYAPR11MB2535namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

    Revie= wed-by: John Daley johndale@cisco.com

 

From: Chengwen Feng <f= engchengwen@huawei.com>
Date: Monday, March 20, 2023 at 2:28 AM
To: thomas@monjalon.net <thomas@monjalon.net>, ferruh.yigit@am= d.com <ferruh.yigit@amd.com>, John Daley (johndale) <johndale@cisc= o.com>, Hyong Youb Kim (hyonkim) <hyonkim@cisco.com>
Cc: dev@dpdk.org <dev@dpdk.org>
Subject: [PATCH v2 13/44] net/enic: fix segment fault when parse dev= args

The rte_kvargs_process() was used to parse KV pairs, it also su= pports
to parse 'only keys' (e.g. socket_id) type. And the callback function
parameter 'value' is NULL when parsed 'only keys'.

This patch fixes segment fault when parse input args with 'only keys'.

Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and G= ENEVE")
Fixes: e39c2756e21a ("net/enic: add devarg to specify ingress VLAN rew= rite mode")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/enic/enic_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.= c
index cdf0915591..b67016e0a3 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -1148,6 +1148,9 @@ static int enic_parse_zero_one(const char *key,
         struct enic *enic;
         bool b;
 
+       if (value =3D=3D NULL)
+            &n= bsp;  return -EINVAL;
+
         enic =3D (struct enic *)op= aque;
         if (strcmp(value, "0&= quot;) =3D=3D 0) {
            &nb= sp;    b =3D false;
@@ -1173,6 +1176,9 @@ static int enic_parse_ig_vlan_rewrite(__rte_unused co= nst char *key,
 {
         struct enic *enic;
 
+       if (value =3D=3D NULL)
+            &n= bsp;  return -EINVAL;
+
         enic =3D (struct enic *)op= aque;
         if (strcmp(value, "tr= unk") =3D=3D 0) {
            &nb= sp;    /* Trunk mode: always tag */
--
2.17.1

--_000_BYAPR11MB253540C9B6198AB4A4E3E3F3CF809BYAPR11MB2535namp_--