xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Igor Druzhinin <igor.druzhinin@citrix.com>
To: George Dunlap <george.dunlap@citrix.com>, xen-devel@lists.xen.org
Cc: george.dunlap@eu.citrix.com,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Olaf Hering <olaf@aepfle.de>, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] trace: Fix incorrect number of pages used for trace metadata
Date: Fri, 30 Sep 2016 17:04:07 +0100	[thread overview]
Message-ID: <734b55ec-c46e-b9bd-80f5-4596ebb4e353@citrix.com> (raw)
In-Reply-To: <dbbb6a2e-bde3-365a-ad72-c78cf2f35912@citrix.com>

On 30/09/16 15:46, George Dunlap wrote:
> On 29/09/16 14:53, Igor Druzhinin wrote:
>> As long as t_info_first_offset is calculated in uint32_t offsets we need to
>> multiply it by sizeof(uint32_t) in order to get the right number of pages
>> for trace metadata. Not doing that makes it impossible to read the trace
>> buffer correctly from userspace for some corner cases.
>>
>> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
>
> Hmm, looks like we actually want to revert this c/s fbf96e6, "xentrace:
> correct formula to calculate t_info_pages".  But that one was presumably
> written (and Acked by me) because the variable name there,
> t_info_first_offset, is confusing.
>
> The other mistake in fbf96e6 is that before t_info_words was actually
> denominated in words; but after it's denominated in bytes (which is
> again confusing).
>
> What about something like the attached instead?  This should fix your
> problem while making the code clearer.
>
>  -George
>
>

Reviewed-by: Igor Druzhinin <igor.druzhinin@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-09-30 16:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 13:53 [PATCH] trace: Fix incorrect number of pages used for trace metadata Igor Druzhinin
2016-09-30 14:46 ` George Dunlap
2016-09-30 14:48   ` Andrew Cooper
2016-09-30 14:48   ` George Dunlap
2016-09-30 16:04   ` Igor Druzhinin [this message]
2016-09-30 16:12     ` George Dunlap
2016-10-04  9:59       ` Igor Druzhinin

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=734b55ec-c46e-b9bd-80f5-4596ebb4e353@citrix.com \
    --to=igor.druzhinin@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=george.dunlap@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xen.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).