DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Cc: helin.zhang@intel.com, jingjing.wu@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] i40e: unintended sign extension
Date: Thu, 9 Jun 2016 16:14:08 +0100	[thread overview]
Message-ID: <20160609151408.GD12520@bricha3-MOBL3> (raw)
In-Reply-To: <1463749416-7658-1-git-send-email-slawomirx.mrozowicz@intel.com>

On Fri, May 20, 2016 at 03:03:36PM +0200, Slawomir Mrozowicz wrote:
> Suspicious implicit sign extension: pf->fdir.match_counter_index
> with type unsigned short (16 bits, unsigned) is promoted in
> pf->fdir.match_counter_index << 20 to type int (32 bits, signed),
> then sign-extended to type unsigned long (64 bits, unsigned).
> If pf->fdir.match_counter_index << 20 is greater than 0x7FFFFFFF,
> the upper bits of the result will all be 1.
> To fix the issue set explicit cast uint32_t of pf->fdir.match_counter_index.
> 
> Fixes: 05999aab4ca6 ("i40e: add or delete flow director")
> Coverity ID 13315
> 
> Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied to dpdk-next-net/rel_16_07

/Bruce

      reply	other threads:[~2016-06-09 15:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 13:03 Slawomir Mrozowicz
2016-06-09 15:14 ` Bruce Richardson [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=20160609151408.GD12520@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=slawomirx.mrozowicz@intel.com \
    /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).