From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <dev-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 943DFA0A0C; Sat, 10 Jul 2021 11:46:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81E1441144; Sat, 10 Jul 2021 11:46:45 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 06D95407FF; Sat, 10 Jul 2021 11:46:44 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 950375C00B9; Sat, 10 Jul 2021 05:46:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 10 Jul 2021 05:46:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= g80jFENE0ZB6N/isnkNATqBleFeuEXksSeoj5ktpZx4=; b=rA3t+hXQqEj2MZIA MrjT5ri0YHrqiYjpzi/09lncrBcn2z2nZOX4vJoMJr2FO7ggNPk1rXRxZr+XVG87 kZkBNqMDe1E+GGmYqE7VvkjpJp+lTu0qB/Xzgd6y7ZU+CqWOFuc55se2YqYkvdSG A/cBdsCPAz2n8wuudM6veZVT4259ETqVFTTIjL8Ovn2cHB2eG26HEDCUY002luc5 L4MUoycIGNmT0pY5A7LrDDhKDAn1/thXw/EpEeNG6Wuj8OyQNMufNubP/VpfgMNA eFTlYmjSEEVKEcIK+eUMofn2U9q0v8ez9S2ZingxjBVIDE4ayaawgSPrpFEYGHkK DMPrsA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=g80jFENE0ZB6N/isnkNATqBleFeuEXksSeoj5ktpZ x4=; b=U/SuU0rB4Kz9+sZhcdhtqCTgvPHYxMO0AJL8RGVoGBIR3HZCqPF1FkoEn tB65p4Jh6IX0JSLpiTXlUk+D/05Fd9tQW8QXy3r1SARq0334U6WUA6wtqQOngRWf tycFCOXgAjMftPXDHIII5JXU7us73HJjJD6/etUjs1Ei/PqWCoU3cWzZlwc3yhVF Zv+Zz+fgPElkI0UJ05tHGh9BdR6fMNmL+77HiqZxDRHReHUsBJZwZR3mYj1zdPy7 tHFfEJbw47vPG4BNuyskUBEVyxgEY5QQjUfBfK5x6VJKOauHmV1rY4lcuSmouo3v mux1Kiu9R21A9AZpQCfa7RB2ucW8w== X-ME-Sender: <xms:gmzpYLW-fkn8vv0h779PjykMQFCBkehW_9DTTwKM1Pngx_lJEj6l1w> <xme:gmzpYDntHzcYr2VZVGSnbs4MRCQVXnHTk8fkXBz9AJsq9Z81L9OtA5rjKAmpTYzKJ O7KEg7BY_rqO_CRgQ> X-ME-Received: <xmr:gmzpYHaPpT0GetA9NKXwG8sEuZmRoY_pGk97ggkx1wZveAJU0cWwa9s1lz-X-1ccF0xbSxhN-TNX2CYaDupp35M> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrtdekgddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: <xmx:gmzpYGWFDdi2d2v6YXkAdlx8rjx9-5mK2-4LcKSG5jp6ZMdl4N3nMA> <xmx:gmzpYFlO-u5Xl7fRzZ4LgenRlG3yDnOA8AonyyzyPP07MDoafrHfPw> <xmx:gmzpYDfu6YvrfHnaXNKqY8ZMV-zSbMoFygEV75jQXIXU8LaojsQ8TQ> <xmx:g2zpYDY7HZwTAEkUvrjEAwW65963rro0qlaNsCZmwjVaPi2lcQQxMg> Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 10 Jul 2021 05:46:40 -0400 (EDT) From: Thomas Monjalon <thomas@monjalon.net> To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>, "Xueming(Steven) Li" <xuemingl@nvidia.com> Cc: Matan Azrad <matan@nvidia.com>, Slava Ovsiienko <viacheslavo@nvidia.com>, Ferruh Yigit <ferruh.yigit@intel.com>, dev@dpdk.org, "stable@dpdk.org" <stable@dpdk.org> Date: Sat, 10 Jul 2021 11:46:36 +0200 Message-ID: <3864014.rxSNbIDDph@thomas> In-Reply-To: <DM4PR12MB53733C9408ABE6E3DB46B930A11C9@DM4PR12MB5373.namprd12.prod.outlook.com> References: <20210702142322.821302-1-andrew.rybchenko@oktetlabs.ru> <20210705100252.1840901-1-andrew.rybchenko@oktetlabs.ru> <DM4PR12MB53733C9408ABE6E3DB46B930A11C9@DM4PR12MB5373.namprd12.prod.outlook.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] ethdev: keep count of allocated and used representor ranges X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> 05/07/2021 13:07, Xueming(Steven) Li: > From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> > > From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> > > > > In its current state, the API can overflow the user-passed buffer if a new representor range appears between function calls. > > > > In order to solve this problem, augment the representor info structure with the numbers of allocated and initialized ranges. This way > > the users of this structure can be sure they will not overrun the buffer. > > > > Fixes: 85e1588ca72f ("ethdev: add API to get representor info") > > Cc: stable@dpdk.org > > > > Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> > > Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> > > Reviewed-by: Xueming Li <xuemingl@nvidia.com> Applied, thanks.