public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Role of svc_entry macro with 64 bytes in kprobes/systemtap on ARM
@ 2013-12-12  3:10 Jey Jay
  2013-12-12 20:21 ` Josh Stone
  0 siblings, 1 reply; 2+ messages in thread
From: Jey Jay @ 2013-12-12  3:10 UTC (permalink / raw)
  To: systemtap

Hi,

Currently Im working on "systemtap" and "kprobes".

My current work is to convert the kprobes in to loadable kernel
module(.ko) on arm architecture.

Converted module is able to run the examples in
"http://lxr.free-electrons.com/source/samples/kprobes/?a=arm".

But few systemtap scripts like

1. https://sourceware.org/systemtap/SystemTap_Beginners_Guide/traceiosect.html
2. https://sourceware.org/systemtap/SystemTap_Beginners_Guide/mainsect-disk.html#disktop

producing kernel panics.

We don't want to recompile kernel. so CONFIG_KPROBES is not set.

Because CONFIG_KPROBES, In the following file

http://lxr.free-electrons.com/source/arch/arm/kernel/entry-armv.S?a=arm

#ifdef CONFIG_KPROBES
@ If a kprobe is about to simulate a "stmdb sp..." instruction,
@ it obviously needs free stack space which then will belong to
@ the saved context.
    svc_entry 64
#else
        svc_entry
#endif


svc_entry macro is not expanded with 64. I am not sure with
relationship between svc_entry macro and kprobes.

Im getting problem exactly in
http://lxr.free-electrons.com/source/arch/arm/kernel/kprobes-common.c?a=arm#L246

Please share your knowledge.

Thanks and Regards
Jeyaram

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Role of svc_entry macro with 64 bytes in kprobes/systemtap on ARM
  2013-12-12  3:10 Role of svc_entry macro with 64 bytes in kprobes/systemtap on ARM Jey Jay
@ 2013-12-12 20:21 ` Josh Stone
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Stone @ 2013-12-12 20:21 UTC (permalink / raw)
  To: systemtap

On 12/11/2013 07:10 PM, Jey Jay wrote:
> Hi,
> 
> Currently Im working on "systemtap" and "kprobes".
> 
> My current work is to convert the kprobes in to loadable kernel
> module(.ko) on arm architecture.
> 
> Converted module is able to run the examples in
> "http://lxr.free-electrons.com/source/samples/kprobes/?a=arm".
> 
> But few systemtap scripts like
> 
> 1. https://sourceware.org/systemtap/SystemTap_Beginners_Guide/traceiosect.html
> 2. https://sourceware.org/systemtap/SystemTap_Beginners_Guide/mainsect-disk.html#disktop
> 
> producing kernel panics.

In case you aren't aware, stap has the runtime option -DSTP_ALIBI to
exculpate itself from such panics.  It basically compiles out the probe
handlers, leaving just an atomic counter to track probe hits.

Sharing the details of your kernel panics would also help.

But I'm sorry, I don't know about svc_entry myself...

Josh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-12 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-12  3:10 Role of svc_entry macro with 64 bytes in kprobes/systemtap on ARM Jey Jay
2013-12-12 20:21 ` Josh Stone

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).