public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: William Cohen <wcohen@redhat.com>
To: David Smith <dsmith@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Improve build-id checking when the task we're interested in isn't 'current'. git commit causing problems on ARM and IA64
Date: Tue, 03 Apr 2012 14:18:00 -0000	[thread overview]
Message-ID: <4F7B068A.9090708@redhat.com> (raw)
In-Reply-To: <4F7A23DB.5000800@redhat.com>

On 04/02/2012 06:10 PM, David Smith wrote:
> On 04/02/2012 03:16 PM, William Cohen wrote:
> 
>> On 04/02/2012 03:30 PM, David Smith wrote:
>>> ../install/bin/stap  -k ../systemtap/testsuite/systemtap.base/add.stp 
>>
>> Hi David,
>>
>> Thanks for taking a look at this problem.
>>
>> The git checkin fixes the problem for ia64.
>>
>> The arm machine is using a kernel from the linus torvald's git repo. This particular kernel doesn't
> 
>> have utrace support in it, so it doesn't have CONFIG_UTRACE set.
>> Thus, things still fail in the same way on the ARM machine.
> 
>>
>> Does this code work with stock x86_64 kernel?  I am wondering why this problem wasn't seen on the x86
> 
>> machine. Does the x86 not need to do the explicit flushes unlike the
>> ia64 and ARM?
> 
> Right.  From what I've been looking at on the stock x86_64 kernel,
> copy_to_user_page() boils down to a memcpy() call.
> 
> Since x86_64 doesn't have an arch-specific cacheflush.h file, it
> inherits the following from asm-generic/cacheflush.h:
> 
> ====
> ....
> #define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
> ....
> #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
>         do { \
>                 memcpy(dst, src, len); \
>                 flush_icache_user_range(vma, page, vaddr, len); \
>         } while (0)
> ====
> 
> Arm has a arch-specific copy_to_user_page() (defined in
> arch/arm/include/cacheflush.h) which isn't exported.  Sigh.
> 
> It looks like on current kernels access_process_vm() is exported, which
> means we could use the real function instead of our copy (can you check
> and make sure this is exported on arm?).  However, we've added the
> __access_process_vm_noflush() variant which isn't present upstream.
> 
> I'm not sure there are easy answers here.
> 

I looked through Module.symvers for the currently running kernel on the ARM machine and didn't see access_process_vm listed. Also seems that all the uses of access_process_vm() were for things that are built into the kernel rather than modules.

-Will

  reply	other threads:[~2012-04-03 14:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30 21:15 William Cohen
2012-04-02 19:30 ` David Smith
2012-04-02 20:17   ` William Cohen
2012-04-02 22:10     ` David Smith
2012-04-03 14:18       ` William Cohen [this message]
2012-04-03 14:35       ` David Smith
2012-04-04 20:57       ` Improve build-id checking when the task we're interested in isn't 'current'. git commit causing problems on ARM and IA64) David Smith
2012-04-05 15:29         ` David Smith

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=4F7B068A.9090708@redhat.com \
    --to=wcohen@redhat.com \
    --cc=dsmith@redhat.com \
    --cc=systemtap@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).