patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Michal Krawczyk <mk@semihalf.com>
Cc: dev <dev@dpdk.org>,
	igorch@amazon.com, Guy Tzalik <gtzalik@amazon.com>,
	 rahul.lakkireddy@chelsio.com, dpdk stable <stable@dpdk.org>,
	 "Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: Re: [dpdk-stable] [PATCH] vfio: fix BAR offset type for 32-bit app
Date: Sat, 26 Oct 2019 17:31:30 +0200	[thread overview]
Message-ID: <CAJFAV8wR=2o=a6TYB-S4L4XpQ_vzDWppH73aOnpwLd5xq1Pb+g@mail.gmail.com> (raw)
In-Reply-To: <96426c4b-8c2b-b825-dd0a-515497dbcb91@intel.com>

On Fri, Oct 25, 2019 at 5:41 PM Burakov, Anatoly
<anatoly.burakov@intel.com> wrote:
>
> On 24-Oct-19 1:10 PM, Michal Krawczyk wrote:
> > When 32-bit application is built on 64-bit system it is possible that
> > the offset of the resource is outside of the 32-bit value.
> >
> > The problem with the unsigned long is, that it is 32-bit and not 64-bit
> > when using armhf compiler. Although the system is returning u64 value,
> > we are losing it's value if it's higher than 32-bit in the conversion
> > process. It can further cause mmap to fail due to offset being 0 or to
> > map not intended memory region.
> >
> > To make it more portable, the uint64_t value is now being used for
> > storing offset instead of unsigned long. The size of being 32-bit seems
> > to be fine as the 32-bit application won't be able to access bigger
> > memory and it is further converted to size_t anyway. But for better
> > readability and to be consistent, it's type was changed to size_t as
> > well.
> >
> > Fixes: 0205f873557c ("vfio: fix overflow of BAR region offset and size")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Michal Krawczyk <mk@semihalf.com>
> > ---
>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks.


-- 
David Marchand


      reply	other threads:[~2019-10-26 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 12:10 Michal Krawczyk
2019-10-25 15:41 ` Burakov, Anatoly
2019-10-26 15:31   ` David Marchand [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='CAJFAV8wR=2o=a6TYB-S4L4XpQ_vzDWppH73aOnpwLd5xq1Pb+g@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=gtzalik@amazon.com \
    --cc=igorch@amazon.com \
    --cc=mk@semihalf.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=stable@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).