DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix unintentional integer overflow
@ 2019-04-24  2:29 Tiwei Bie
  2019-04-24  2:29 ` Tiwei Bie
  2019-04-24 12:41 ` Iremonger, Bernard
  0 siblings, 2 replies; 6+ messages in thread
From: Tiwei Bie @ 2019-04-24  2:29 UTC (permalink / raw)
  To: wenzhuo.lu, jingjing.wu, bernard.iremonger, dev; +Cc: stable

Fix the potential overflow in expression 1 << begin by using 1ULL.

Coverity issue: 279437, 279445
Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 app/test-pmd/cmdline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 5a10c5f38..03926f913 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -17739,7 +17739,7 @@ print_rx_offloads(uint64_t offloads)
 	begin = __builtin_ctzll(offloads);
 	end = sizeof(offloads) * CHAR_BIT - __builtin_clzll(offloads);
 
-	single_offload = 1 << begin;
+	single_offload = 1ULL << begin;
 	for (bit = begin; bit < end; bit++) {
 		if (offloads & single_offload)
 			printf(" %s",
@@ -18133,7 +18133,7 @@ print_tx_offloads(uint64_t offloads)
 	begin = __builtin_ctzll(offloads);
 	end = sizeof(offloads) * CHAR_BIT - __builtin_clzll(offloads);
 
-	single_offload = 1 << begin;
+	single_offload = 1ULL << begin;
 	for (bit = begin; bit < end; bit++) {
 		if (offloads & single_offload)
 			printf(" %s",
-- 
2.17.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH] app/testpmd: fix unintentional integer overflow
  2019-04-24  2:29 [dpdk-dev] [PATCH] app/testpmd: fix unintentional integer overflow Tiwei Bie
@ 2019-04-24  2:29 ` Tiwei Bie
  2019-04-24 12:41 ` Iremonger, Bernard
  1 sibling, 0 replies; 6+ messages in thread
From: Tiwei Bie @ 2019-04-24  2:29 UTC (permalink / raw)
  To: wenzhuo.lu, jingjing.wu, bernard.iremonger, dev; +Cc: stable

Fix the potential overflow in expression 1 << begin by using 1ULL.

Coverity issue: 279437, 279445
Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 app/test-pmd/cmdline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 5a10c5f38..03926f913 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -17739,7 +17739,7 @@ print_rx_offloads(uint64_t offloads)
 	begin = __builtin_ctzll(offloads);
 	end = sizeof(offloads) * CHAR_BIT - __builtin_clzll(offloads);
 
-	single_offload = 1 << begin;
+	single_offload = 1ULL << begin;
 	for (bit = begin; bit < end; bit++) {
 		if (offloads & single_offload)
 			printf(" %s",
@@ -18133,7 +18133,7 @@ print_tx_offloads(uint64_t offloads)
 	begin = __builtin_ctzll(offloads);
 	end = sizeof(offloads) * CHAR_BIT - __builtin_clzll(offloads);
 
-	single_offload = 1 << begin;
+	single_offload = 1ULL << begin;
 	for (bit = begin; bit < end; bit++) {
 		if (offloads & single_offload)
 			printf(" %s",
-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix unintentional integer overflow
  2019-04-24  2:29 [dpdk-dev] [PATCH] app/testpmd: fix unintentional integer overflow Tiwei Bie
  2019-04-24  2:29 ` Tiwei Bie
@ 2019-04-24 12:41 ` Iremonger, Bernard
  2019-04-24 12:41   ` Iremonger, Bernard
  2019-04-24 17:01   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  1 sibling, 2 replies; 6+ messages in thread
From: Iremonger, Bernard @ 2019-04-24 12:41 UTC (permalink / raw)
  To: Bie, Tiwei, Lu, Wenzhuo, Wu, Jingjing, dev; +Cc: stable

> -----Original Message-----
> From: Bie, Tiwei
> Sent: Wednesday, April 24, 2019 3:30 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>;
> dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: [PATCH] app/testpmd: fix unintentional integer overflow
> 
> Fix the potential overflow in expression 1 << begin by using 1ULL.
> 
> Coverity issue: 279437, 279445
> Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix unintentional integer overflow
  2019-04-24 12:41 ` Iremonger, Bernard
@ 2019-04-24 12:41   ` Iremonger, Bernard
  2019-04-24 17:01   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  1 sibling, 0 replies; 6+ messages in thread
From: Iremonger, Bernard @ 2019-04-24 12:41 UTC (permalink / raw)
  To: Bie, Tiwei, Lu, Wenzhuo, Wu, Jingjing, dev; +Cc: stable

> -----Original Message-----
> From: Bie, Tiwei
> Sent: Wednesday, April 24, 2019 3:30 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>;
> dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: [PATCH] app/testpmd: fix unintentional integer overflow
> 
> Fix the potential overflow in expression 1 << begin by using 1ULL.
> 
> Coverity issue: 279437, 279445
> Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix unintentional integer overflow
  2019-04-24 12:41 ` Iremonger, Bernard
  2019-04-24 12:41   ` Iremonger, Bernard
@ 2019-04-24 17:01   ` Ferruh Yigit
  2019-04-24 17:01     ` Ferruh Yigit
  1 sibling, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-24 17:01 UTC (permalink / raw)
  To: Iremonger, Bernard, Bie, Tiwei, Lu, Wenzhuo, Wu, Jingjing, dev; +Cc: stable

On 4/24/2019 1:41 PM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: Bie, Tiwei
>> Sent: Wednesday, April 24, 2019 3:30 AM
>> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
>> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>;
>> dev@dpdk.org
>> Cc: stable@dpdk.org
>> Subject: [PATCH] app/testpmd: fix unintentional integer overflow
>>
>> Fix the potential overflow in expression 1 << begin by using 1ULL.
>>
>> Coverity issue: 279437, 279445
>> Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> 
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> 

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix unintentional integer overflow
  2019-04-24 17:01   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2019-04-24 17:01     ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-24 17:01 UTC (permalink / raw)
  To: Iremonger, Bernard, Bie, Tiwei, Lu, Wenzhuo, Wu, Jingjing, dev; +Cc: stable

On 4/24/2019 1:41 PM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: Bie, Tiwei
>> Sent: Wednesday, April 24, 2019 3:30 AM
>> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
>> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>;
>> dev@dpdk.org
>> Cc: stable@dpdk.org
>> Subject: [PATCH] app/testpmd: fix unintentional integer overflow
>>
>> Fix the potential overflow in expression 1 << begin by using 1ULL.
>>
>> Coverity issue: 279437, 279445
>> Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> 
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> 

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-24 17:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24  2:29 [dpdk-dev] [PATCH] app/testpmd: fix unintentional integer overflow Tiwei Bie
2019-04-24  2:29 ` Tiwei Bie
2019-04-24 12:41 ` Iremonger, Bernard
2019-04-24 12:41   ` Iremonger, Bernard
2019-04-24 17:01   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-04-24 17:01     ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).