This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: how to handle userspace string copy failures
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Martin Hunt <hunt at redhat dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: 25 May 2006 15:21:52 -0400
- Subject: Re: how to handle userspace string copy failures
- References: <1148580663.6909.12.camel@dragon>
hunt wrote:
> [...] So, for the record, we cannot guarantee always being able to
> always access userspace
We need to investigate to what extent this problem can be worked
around by clever other ways. For example, can we arrange to
preemptively fault in more parts of programs when systemtap probes are
running?
> and such failures should not terminate the script.
See the MAXERRORS parameter.
> At worst, I think we should print warnings. I also propose that any
> user_string() request that fails should return "<unknown>".
I am uncomfortable with hard-coding such a decorated english term. A
simple blank string would be fine.
I would be happier if the decision for treatment as a soft vs. hard
error were left up to the caller script. One way to do this would be
to fork user_string() into two variants, one of which signals the
current sort of error-level fault (as does kernel_string()), and one
that just returns a sentinel soft-error value. Hey, that sentinel
value could even be passed to it as an additional argument.
- FChE