From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 085A7DE0 for ; Mon, 11 Apr 2016 22:35:20 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id n3so1536060wmn.0 for ; Mon, 11 Apr 2016 13:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=B4oQA/BIfmtpQ3LoYftGsSKvc06+h+57Yztc3/x6jZQ=; b=vtnO/Kt+zNcVmZN53nyz0KbVzLa3BwQ/meXAQws1EDIU79LEI95eVoFi8X9rr10Jt0 qEF76gYfqjksuNEl5WTAK6vZnAgI7HWhHnegxEtz5uKNYMKkb+Z9xQq+w4KUo+yugpRy awuk2w1XhkwmB4PTKjbTWERkDI8ZAg5oydgCsCA+WOIdgJcsqkI0qLMkpiB+fGpCXq8J +Kzomcr+MN+xd6UExi82dDeyPg4/sWTliLh0a3FOWzg6pIi4MheNpBu3+xrAF6WOaErG sLnQEtlfzJaK2ggggPhl1Zc8VGgDx+/90JCB/SqsDFpynapDnQC3zhi/rN0u1svOiof0 dMOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=B4oQA/BIfmtpQ3LoYftGsSKvc06+h+57Yztc3/x6jZQ=; b=geAwFxn3HCuExTFzls2mXyeNv4m/18iJQJFOvranUlH8q9/1gjc7GQv7a2K6oqGyck SVcjWOHA5NjzuUFlkhYMGTKOeBUV6PzBX2wxOGcbe0bM8SRrHmFIiQ7PjV91LmaOrWCc Zce6ckRRdaV55TT21Od91peV2KsYnW6yWA/5g8t+eJZuxbkzMSkPkA6jGmkMT6YKZ3WK ePW20PsmiE9wg5GdEvtZDTkSUEMi8sGkclJ2SNc7rtotAf/+k/PBan9jOaTOYOb2lYty jTrn0TD26mlDG81elRMdhXTowfTxba5jXP7VSAkmPDSjrlXShEeZYceqk8LIbTF2g4Xa arrA== X-Gm-Message-State: AD7BkJIlRMSE7YYW+SWXt7G0WbGD7AREt0b8JaGoKHVanJd6Uf210Z4h5mKbSDSk7ZUryoS0 X-Received: by 10.28.136.211 with SMTP id k202mr21693667wmd.93.1460406919905; Mon, 11 Apr 2016 13:35:19 -0700 (PDT) Received: from xps13.localnet (245.111.75.86.rev.sfr.net. [86.75.111.245]) by smtp.gmail.com with ESMTPSA id a184sm19307880wma.3.2016.04.11.13.35.18 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Apr 2016 13:35:19 -0700 (PDT) From: Thomas Monjalon To: Jasvinder Singh Cc: dev@dpdk.org, cristian.dumitrescu@intel.com Date: Mon, 11 Apr 2016 22:35:13 +0200 Message-ID: <16410001.D3kMoyTPAi@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1460397337-237625-1-git-send-email-jasvinder.singh@intel.com> References: <1460397337-237625-1-git-send-email-jasvinder.singh@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] librte_port: fix the buffer overflow for ring writer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 20:35:20 -0000 2016-04-11 18:55, Jasvinder Singh: > Fixes the buffer overflow that occurs due to following; > > 1. When the input packet burst does not meet the conditions: (a) being > contiguous (first n bits set in pkts_mask, all the other bits cleared) > and (b) containing a full burst, i.e. at least tx_burst_sz packets > (n >= tx_burst_size). This is the slow(er) code path taken when local > variable expr != 0. > 2. There are some packets already in the buffer. > 3. The number of packets in the incoming burst (i.e. popcount(pkts_mask)) > plus the number of packets already in the buffer exceeds the buffer size > (RTE_PORT_IN_BURST_SIZE_MAX, i.e. 64). > > Fixes: bf6931b242f7 ("port: ring") > Fixes: 5f4cd47309d6 ("port: add ring writer nodrop") > > Signed-off-by: Jasvinder Singh > Acked-by: Cristian Dumitrescu Applied, thanks