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: how to handle userspace string copy failures


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


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