From: fche@redhat.com (Frank Ch. Eigler)
To: Richard J Moore <richardj_moore@uk.ibm.com>
Cc: systemtap@sources.redhat.com
Subject: Re: thoughts about exception-handling requirements for kprobes
Date: Fri, 10 Mar 2006 03:46:00 -0000 [thread overview]
Message-ID: <y0mr75barmw.fsf@ton.toronto.redhat.com> (raw)
In-Reply-To: <OFFFD05E79.21688AA2-ON8025712C.0052DE26-8025712C.0057A4F8@uk.ibm.com>
richardj_moore wrote:
> I've been thinking about the need for exception-handling [...]
> Cases 1 & 4
> The expected exceptions in user pre- and post-handlers are easy to deal
> with in a way that performs well: this is via a setjmp/longjmp mechanism.
> [...]
Right.
> It would seem better to have kprobes put a wrapper around setjmp
> (ksetjmp) and issue the longjmp directly. kprobes could also
> maintain a maxfault counter for the probe so that we can exit
> recursive fault situations.
Sure. Perhaps the "kprobe" struct could get a jmpbuf field that could
be initialized using a call from within the pre/post handler. The
default kprobes fault handler could check whether this field was set,
and if so, just longjmp to it.
> [...] Could we exploit if from systemtap?
Certainly - the standard probe prologue/epilogue could hook into it
just inside the lock/unlock sequence. Given the data in the context
(such as last_stmt), it could synthesize an error message to at least
place blame at the right source-level point.
> How about using a try-catch semantic [...]
If necessary, some nested structure like that could be put also into
the scripting language. But if all we want is general crash
protection, then the single implicit try/catch around the entire
handler block may well be enough.
- FChE
next prev parent reply other threads:[~2006-03-10 3:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 16:00 Richard J Moore
2006-03-10 3:46 ` Frank Ch. Eigler [this message]
2006-03-17 21:51 ` Keshavamurthy Anil S
2006-03-19 17:24 ` Prasanna S Panchamukhi
2006-03-20 8:47 ` Richard J Moore
2006-03-20 9:18 ` Prasanna S Panchamukhi
2006-03-20 14:33 ` Frank Ch. Eigler
2006-03-20 9:43 ` Richard J Moore
2006-03-20 18:40 ` Keshavamurthy Anil S
2006-03-21 0:34 ` Richard J Moore
2006-03-21 0:53 ` Keshavamurthy Anil S
2006-03-21 5:23 ` Ananth N Mavinakayanahalli
2006-03-21 9:41 ` Prasanna S Panchamukhi
2006-03-21 22:46 ` Keshavamurthy Anil S
2006-03-22 2:37 ` Frank Ch. Eigler
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=y0mr75barmw.fsf@ton.toronto.redhat.com \
--to=fche@redhat.com \
--cc=richardj_moore@uk.ibm.com \
--cc=systemtap@sources.redhat.com \
/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).