mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Chang Hyun Park <heartinpiece@gmail.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com
Subject: Re: [PATCH 1/1] perf: Fixed perf trace, 32bit return values to 64bit
Date: Mon, 29 Sep 2014 15:28:30 -0300	[thread overview]
Message-ID: <20140929182830.GH3879@kernel.org> (raw)
In-Reply-To: <1411736041-8017-1-git-send-email-heartinpiece@gmail.com>

Em Fri, Sep 26, 2014 at 09:54:01PM +0900, Chang Hyun Park escreveu:
> perf trace for syscalls resulted in mmap return values being stripped of
> the top 32 bits, and actually printing only the lower 32 bits. This was
> because the ret value was of an 'int' type and not a 'long' type.
> 
> The Problem:
> 991258501.244 ( 0.004 ms): mmap(len: 40001536, prot: READ|WRITE, flags:
> 		PRIVATE|ANONYMOUS, fd: -1) = 0x56691000
> 991258501.257 ( 0.000 ms): minfault [_int_malloc+0x1038] =>
> 			    //anon@0x7fa056691008 //(d.)
> 
> The first line shows an mmap, which succeeds and returns 0x56691000.
> However the next line shows a memory access to that virtual memory area,
> specifically to 0x7fa056691008. The upper 32 bit is lost due to the
> problem mentioned above, and thus mmap's return value didn't have the
> upper 0x7fa0.

Thanks, applied to my perf/core branch.

- Arnaldo

  reply	other threads:[~2014-09-29 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 12:54 Chang Hyun Park
2014-09-29 18:28 ` Arnaldo Carvalho de Melo [this message]
2014-10-03  5:25 ` [tip:perf/core] perf trace: Fix mmap return address truncation to 32-bit tip-bot for Chang Hyun Park

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=20140929182830.GH3879@kernel.org \
    --to=acme@kernel.org \
    --cc=heartinpiece@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome