From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, tim@xen.org,
george.dunlap@citrix.com, stefano.stabellini@citrix.com
Subject: Re: [PATCH] xen/arm: Correctly handle non-page aligned pointer in raw_copy_*
Date: Tue, 18 Feb 2014 15:29:26 +0000 [thread overview]
Message-ID: <53037C56.3080804@linaro.org> (raw)
In-Reply-To: <1392737112.11080.102.camel@kazak.uk.xensource.com>
On 02/18/2014 03:25 PM, Ian Campbell wrote:
> On Tue, 2014-02-18 at 15:08 +0000, Julien Grall wrote:
>> On 02/18/2014 03:00 PM, Ian Campbell wrote:
>>> On Tue, 2014-02-18 at 14:59 +0000, Ian Campbell wrote:
>>>
>>>>> As the offset is only computed one time per function,
>>>>
>>>> We set offset = 0 at the end of the first iteration.
>>>
>>> Ah, we do in raw_copy_to_guest_helper and raw_clear_guest but not
>>> raw_copy_from_guest -- which I think is the actual bug here.
>>
>> I didn't notice the offset = 0 at then end of raw_copy_to_guest.
>>
>> I can send a patch to only set offset to 0 in raw_copy_from_guest. But I
>> think it's less clear than this patch. What do you think?
>
> I think the approach currently used by the (non-buggy) functions is
> better -- it makes it obvious that after the first iteration things
> *have* to now be aligned.
Ok. I will resend the patch.
> I also wouldn't be surprised if the compiler had trouble proving this
> and so ended up needlessly recalculating offset instead of optimising it
> out.
>
> If you find the code unclear please feel free to add comments etc.
I will add comment.
--
Julien Grall
next prev parent reply other threads:[~2014-02-18 15:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 17:10 [PATCH] xen/arm: Correctly handle non-page aligned pointer in raw_copy_* Julien Grall
2014-02-14 17:35 ` Stefano Stabellini
2014-02-18 14:59 ` Ian Campbell
2014-02-18 15:00 ` Ian Campbell
2014-02-18 15:08 ` Julien Grall
2014-02-18 15:25 ` Ian Campbell
2014-02-18 15:29 ` Julien Grall [this message]
2014-02-18 15:05 ` Julien Grall
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=53037C56.3080804@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.