patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Michal Krawczyk <mk@semihalf.com>
Cc: dev@dpdk.org, igorch@amazon.com, gtzalik@amazon.com,
	rahul.lakkireddy@chelsio.com, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] vfio: fix BAR offset type for 32-bit app
Date: Fri, 25 Oct 2019 16:41:07 +0100	[thread overview]
Message-ID: <96426c4b-8c2b-b825-dd0a-515497dbcb91@intel.com> (raw)
In-Reply-To: <20191024121046.30244-1-mk@semihalf.com>

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: rahul.lakkireddy@chelsio.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Michal Krawczyk <mk@semihalf.com>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

  reply	other threads:[~2019-10-25 15:41 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 [this message]
2019-10-26 15:31   ` David Marchand

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=96426c4b-8c2b-b825-dd0a-515497dbcb91@intel.com \
    --to=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).