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 7CD164367C for ; Tue, 5 Dec 2023 19:33:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E05E40297; Tue, 5 Dec 2023 19:33:44 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 91C1F40271 for ; Tue, 5 Dec 2023 19:33:43 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1d03bcf27e9so30400185ad.0 for ; Tue, 05 Dec 2023 10:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1701801223; x=1702406023; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=g7eyNGIaVtAvGXiXfbzfupEQjRB2pywj7CTUXsMuNR8=; b=cMQlFvX9n77s5EcUpBz5zP/lkxLLyK7ztX+066Rm7YPBFgbYzM9wspYaoKB4GL+tZB uF/A4rvabIlyJfVfVclD9zQITNWpu0Im0SJPOgzQb0inuMcBb9jOxnEdd9qRKqEtyQ3J 546EI0YseSdqtMkveSqUB0XpsM6cXq4MxJknOOpBOxkBAzLtzVteG6/jddXB+OZz8CCn 1acilpF685CFor86RT7gp85zUOTASP4+HkiiMi0y4W2Mr2Uo/YmwHU9c9pktUlAfHe2A 1Vky2aYLak6HqWlfVxw4PxdobZ04i+VKwcVC/T86AInK5qGcKrYzuBoz02ewYND8G8m6 hmyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701801223; x=1702406023; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g7eyNGIaVtAvGXiXfbzfupEQjRB2pywj7CTUXsMuNR8=; b=VX1fKP92mdNSG+qX9NUdnqurBnJ9ZeRhNL8vSwsJICQeMzk8X+TiqZcHPMussbGP+2 /RsrsjrI7olJhMP7kg3f7y0QiTxg7+R5YP1ChCrsFB2PMBETm2gAS4PvFiqqQbi4WYuy /z6MvVs0PSWbc18fE0alC85PdcalSXdMfD07Jmz6NoFiUoNYq4tjIG5eaQgpUQrE/Gj0 2OO+Y2dQDdv+KBzCcwx22YeWipby5bLXsbXjvyWTyBY+gVSQlekTyi62REhITal0J9ZL j8cqa4mVMe5pR50LrH72Avll0pao2AAdNAWtzF7BYZGD5K09VOpa9ANFmsC8Hxzl0ODz 5OxQ== X-Gm-Message-State: AOJu0YytYjr8fN6Yt3r/lgQqTy/XMracFdmrXAFkYalK4Jtxi64/Aqnk xAcKO6UpkVcbKyH20ZjgOWoQeA== X-Google-Smtp-Source: AGHT+IFK5RuG8eETyQ22QJ37BUnAFVu7VaSCkgX7f61gTYYk6hTiJ5dMIY8WuxQzIxt4xOxwx3Kwhg== X-Received: by 2002:a17:902:d2c5:b0:1d0:af28:25a with SMTP id n5-20020a170902d2c500b001d0af28025amr2994249plc.41.1701801222764; Tue, 05 Dec 2023 10:33:42 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id k3-20020a170902694300b001cfc1764fa7sm10512489plt.1.2023.12.05.10.33.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 10:33:42 -0800 (PST) Date: Tue, 5 Dec 2023 10:33:40 -0800 From: Stephen Hemminger To: Joyce Kong Cc: Jakub Grajciar , Morten =?UTF-8?B?QnLDuHJ1cA==?= , Ruifeng Wang , dev@dpdk.org, nd@arm.com, stable@dpdk.org, Liangxing Wang Subject: Re: [PATCH v1] net/memif: fix segfault with Tx burst larger than 255 Message-ID: <20231205103340.05563ee9@hermes.local> In-Reply-To: <20231205040524.3525473-1-joyce.kong@arm.com> References: <20231205040524.3525473-1-joyce.kong@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Tue, 5 Dec 2023 04:05:24 +0000 Joyce Kong wrote: > There will be a segfault when tx burst size is larger than > 256. This is because eth_memif_tx uses an index i which is > uint8_t to count transmitted nb_pkts. Extend i to uint16_t, > the same size as nb_pkts. > > Fixes: b5613c8f9d0a ("net/memif: add a Tx fast path") > Cc: stable@dpdk.org > > Reported-by: Liangxing Wang > Signed-off-by: Joyce Kong > Reviewed-by: Ruifeng Wang > --- I wonder if other drivers have same bug? Reviewed-by: Stephen Hemminger