[patch 1/4] powerpc: fix for OProfile callgraph for Power 64 bit user apps

Carl Love cel at us.ibm.com
Fri May 16 00:50:08 EST 2008


On Thu, 2008-05-15 at 13:58 +1000, Paul Mackerras wrote:
> Michael Ellerman writes:
> 
> > __copy_from_user_inatomic() accepts any value for n, it just has a
> > special case for 1, 2, 4 and 8 - but it should still work for other
> > values.
> 
> There is a bug in __copy_from_user_inatomic that
> 
> http://patchwork.ozlabs.org/linuxppc/patch?id=18418
> 
> fixes, and I'm about to send that Linus-wards.
> 
> Carl, to what extent does that fix eliminate the need for the changes
> in your patch?
> 
> Paul.

Paul:

I will have to apply the above mentioned patch to see if it fixes the
issue.  What I found was when the original code tried to copy three
unsigned long into stack_frame[3], i.e. 24 bytes my system consistently
failed.  The comment about 48 bytes is a note that is all that is
guaranteed to be there according to the API.  I found by restricting the
copy to the values in the case statement, things worked.  

              Carl Love




More information about the Linuxppc-dev mailing list