DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "Megha Ajmera" <megha.ajmera@intel.com>,
	"Morten Brørup" <mb@smartsharesystems.com>
Cc: dev@dpdk.org, stephen@networkplumber.org,
	john.mcnamara@intel.com, sham.singh.thakur@intel.com
Subject: Re: [PATCH v2] sched: fix integer handling issue
Date: Thu, 24 Feb 2022 23:51:44 +0100	[thread overview]
Message-ID: <2569533.BddDVKsqQX@thomas> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D86EE7@smartserver.smartshare.dk>

23/02/2022 19:13, Morten Brørup:
> > From: Megha Ajmera [mailto:megha.ajmera@intel.com]
> > Sent: Wednesday, 23 February 2022 18.37
> > 
> > Masking of core mask was incorrect. Instead of using 1U for shifting,
> > it
> > should be using 1LU as the result is assigned to uint64.
> > 
> > CID 375859: Potentially overflowing expression "1U << app_main_core"
> > with
> > type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit
> > arithmetic, and then used in a context that expects an expression of
> > type "uint64_t" (64 bits, unsigned).
> > 
> > Coverity issue: 375859
> > 
> > Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
> > ---
> > -		if (app_used_core_mask & (1u << app_main_core)) {
> > +		if (app_used_core_mask & (RTE_BIT64(app_main_core))) {
> 
> No need for parenthesis around RTE_BIT64(app_main_core).

Fixed while merging.

> Acked-by: Morten Brørup <mb@smartsharesystems.com>

Applied, thanks.



      reply	other threads:[~2022-02-24 22:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 13:18 [PATCH] " Megha Ajmera
2022-02-22 14:13 ` Morten Brørup
2022-02-22 16:03   ` Stephen Hemminger
2022-02-22 18:55     ` Ajmera, Megha
2022-02-23  7:17     ` Morten Brørup
2022-02-23 10:03       ` Ferruh Yigit
2022-02-23 10:42         ` more than 64 lcores not properly supported Morten Brørup
2022-02-23 11:20           ` Ferruh Yigit
2022-02-23 13:49             ` Thomas Monjalon
2022-02-23 15:12               ` Stephen Hemminger
2022-02-23 17:36 ` [PATCH v2] sched: fix integer handling issue Megha Ajmera
2022-02-23 18:13   ` Morten Brørup
2022-02-24 22:51     ` Thomas Monjalon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2569533.BddDVKsqQX@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=mb@smartsharesystems.com \
    --cc=megha.ajmera@intel.com \
    --cc=sham.singh.thakur@intel.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).