how to handle userspace string copy failures
Frank Ch. Eigler
fche@redhat.com
Thu May 25 19:22:00 GMT 2006
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
More information about the Systemtap
mailing list