This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1/5 PATCH] Kprobes fix for broken fault handling for i386


Anil,

You can use the test script mentioned by Hien below.
Also to test the fault handling, you need to just
call copy_from_user(), that will generate a page fault.
In the post/pre handler allocate a buffer and 
copy some data from the user address space.

copy_from_user(&buf, (unsigned long *)0xbff2d020, 10);

where the from address should be a valid user space address.


Thanks
Prasanna

On Tue, Mar 07, 2006 at 02:23:58PM -0800, Hien Nguyen wrote:
> Keshavamurthy Anil S wrote:
> 
> >On Tue, Mar 07, 2006 at 05:38:32AM -0800, Prasanna S Panchamukhi wrote:
> > 
> >
> >>  Hi,
> >>
> >>  Below is the set of patches to fix broken fault handling
> >>  for i386, x86_64, ppc64, ia64 and sparc64 architectures
> >>  against 2.6.16-rc5-mm2.
> >>
> >>  These patches are tested for i386 and x86_64 architectures.
> >>  Could you please test it for ia64 and ppc64.
> >>   
> >>
> >
> >Prasanna,
> >	Can you share your test module code here,
> >so that the same can be used(with minor tweak, if requred)
> >for testing other architecture. Also in you testing, did 
> >you cover fault handling during pre/post/singlestep
> >cases?
> >
> >Thanks,
> >Anil
> >
> > 
> >
> I tested Prasanna's fault handling patch with the current syscalls 
> tapset (latest from CVS) which does lots of user copies. Without the 
> patch the system crashes right away, but with this patch I finally can 
> test the system calls tapset.
> 
> I use Martin's sys.stp script below
> 
> probe syscall.*, syscall.*.return {
>        if (pid() == target()) {
>                if (returnp)
>                        printf("%d\n", returnval())
>                else
>                        printf("%s (%s) = ", name, argstr)
>        }
> }
> 
> Invoke the script as follow
> stap -c bash sys.stp
> to exit the script, just type exit.
> 
> Hien.
> 
> 
> 

-- 
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-51776329


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]