linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laura Abbott <labbott@redhat.com>
To: gregkh@linuxfoundation.org, arve@android.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ion: scatterlist offset not used for buffer map
Date: Fri, 8 Apr 2016 15:43:59 -0700	[thread overview]
Message-ID: <5708342F.8070704@redhat.com> (raw)
In-Reply-To: <20160408065626.GA25580@e106921-lin.trondheim.arm.com>

On 04/07/2016 11:56 PM, John Einar Reitan wrote:
> On Thu, Apr 07, 2016 at 12:37:50PM -0700, Laura Abbott wrote:
>> On 04/07/2016 04:29 AM, John Einar Reitan wrote:
>>> ion's default user/kernel page mapping code don't honor the offset
>>> option for scatterlists. It uses sg_page and expect the whole page to be
>>> mapped, while the offset could dictate an offset within a large page.
>>>
>>> sg_phys correctly accounts for the offset, so should be used instead.
>>>
>>
>> Can you be more specific about which heap and which allocation pattern
>> is exposing this bug?
>
> The heap that exposed the bug is one I'm developing and will be posting
> as a RFC soon. It uses compound pages and an sub-divides it into surface
> buffers. The ion buffers are configured to hold sgl's with the compound
> page and the correct offset of the buffer, via
> sg_set_page(.., compound_page, .., offset_of_logical_buffer);
>
> sg_phys/sg_virt  includes this offset, but if you poke the sg and extract
> the page with sg_page yourself you must include this offset in your
> calculations too.
>

This patch should be re-sent when you have the RFC for the heap. Unless
there is a heap available in tree we don't really need this patch.

Thanks,
Laura

  reply	other threads:[~2016-04-08 22:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 11:29 [PATCH] ion: scatterlist offset not used for buffer map John Einar Reitan
2016-04-07 19:37 ` Laura Abbott
2016-04-08  6:56   ` John Einar Reitan
2016-04-08 22:43     ` Laura Abbott [this message]
2016-04-08 23:11     ` Colin Cross
2016-04-11  7:10       ` John Einar Reitan

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=5708342F.8070704@redhat.com \
    --to=labbott@redhat.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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).