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 5DD194367C; Tue, 5 Dec 2023 19:33:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8337242E58; Tue, 5 Dec 2023 19:33:44 +0100 (CET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 9307340297 for ; Tue, 5 Dec 2023 19:33:43 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1d0521554ddso30660715ad.2 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=I+qXwfUBPCS/NhKeiXu5QnTViirupjLoRlDkSiMohMcZ3q6kywZFTrGlrl4lNWLdMs BF9WLGejzOtG4FbKiqcdyaiR2JGB5BelWnJ8WIkMMpD/UBWAegDQToB2RlHVLT1LhSBs fHFJe7MijrpFRsPFQ1UQakPmHvSSCI8t+e1RzrZ57q0LWauK5Ewr8Mr3gXPj3/stoYA1 cewA6WmyCYXxfuQgASOekRiFPUudKsbSzv/mwvy5ost6VL6wxFCQf5894qtZKpjqs2R3 Ho2W+Zgaq0ELtQyi+ZXGEgyHIDjMgE6K36zmSM+Frb2Qs+A/8+q6QTm0Qe5DedkdBe/h Ckzw== X-Gm-Message-State: AOJu0YyYAPgJ9u0sAJM7g39b1bMoilgrL9T9s/4945bMJN7rvV7uCu+G kZqNqj8G32+ih6RMfIKNV6lhgQ== 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: 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 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