DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: dev@dpdk.org, "Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3 2/2] eal: fix signed integers in fbarray
Date: Tue, 17 Apr 2018 14:39:27 +0200	[thread overview]
Message-ID: <3175682.LQN8HbFZGo@xps> (raw)
In-Reply-To: <8624521c-060c-3c22-3e56-d1988b4eeda7@intel.com>

17/04/2018 13:14, Burakov, Anatoly:
> On 14-Apr-18 11:03 AM, Burakov, Anatoly wrote:
> > On 13-Apr-18 7:43 PM, Adrien Mazarguil wrote:
> >> While debugging startup issues encountered with Clang (see "eal: fix
> >> undefined behavior in fbarray"), I noticed that fbarray stores indices,
> >> sizes and masks on signed integers involved in bitwise operations.
> >>
> >> Such operations almost invariably cause undefined behavior with values 
> >> that
> >> cannot be represented by the result type, as is often the case with
> >> bit-masks and left-shifts.
> >>
> >> This patch replaces them with unsigned integers as a safety measure and
> >> promotes a few internal variables to larger types for consistency.
> >>
> >> Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
> >> Cc: Anatoly Burakov <anatoly.burakov@intel.com>
> >>
> >> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> >>
> >>
> >> v3 changes:
> >>
> >> - Added INT_MAX upper bound check in fully_validate() as suggested by
> >>    Anatoly.
> >> - Added a sysconf() result check to appease Coverity since 
> >> calc_data_size()
> >>    now takes an unsigned page size (Coverity issues 272598 and 272599).
> >>
> >> v2 changes:
> >>
> >> Removed unnecessary "(unsigned int)" cast leftovers.
> > 
> > Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > 
> 
> Still ack, but i think Coverity issues need to be moved to main commit 
> message, as opposed to being in patch notes.

Applied (with Coverity ids added), thanks

      reply	other threads:[~2018-04-17 12:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 15:39 [dpdk-dev] [PATCH 1/2] eal: fix undefined behavior " Adrien Mazarguil
2018-04-13 15:39 ` [dpdk-dev] [PATCH 2/2] eal: fix signed integers " Adrien Mazarguil
2018-04-13 15:56 ` [dpdk-dev] [PATCH v2 1/2] eal: fix undefined behavior " Adrien Mazarguil
2018-04-13 15:56   ` [dpdk-dev] [PATCH v2 2/2] eal: fix signed integers " Adrien Mazarguil
2018-04-13 16:09     ` Burakov, Anatoly
2018-04-13 17:54       ` Adrien Mazarguil
2018-04-13 16:10   ` [dpdk-dev] [PATCH v2 1/2] eal: fix undefined behavior " Burakov, Anatoly
2018-04-13 18:42   ` [dpdk-dev] [PATCH v3 " Adrien Mazarguil
2018-04-13 18:43     ` [dpdk-dev] [PATCH v3 2/2] eal: fix signed integers " Adrien Mazarguil
2018-04-14 10:03       ` Burakov, Anatoly
2018-04-17 11:14         ` Burakov, Anatoly
2018-04-17 12:39           ` 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=3175682.LQN8HbFZGo@xps \
    --to=thomas@monjalon.net \
    --cc=adrien.mazarguil@6wind.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.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).