From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9415 invoked by alias); 25 May 2006 19:22:07 -0000 Received: (qmail 9392 invoked by uid 22791); 25 May 2006 19:22:05 -0000 X-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 25 May 2006 19:21:55 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4PJLr6g022683 for ; Thu, 25 May 2006 15:21:53 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4PJLqem002955; Thu, 25 May 2006 15:21:52 -0400 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.toronto.redhat.com [172.16.14.9]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k4PJLq7L010251; Thu, 25 May 2006 15:21:52 -0400 Received: from ton.toronto.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 67CD380004C; Thu, 25 May 2006 15:21:52 -0400 (EDT) Received: from ton.toronto.redhat.com (localhost.localdomain [127.0.0.1]) by ton.toronto.redhat.com (8.13.1/8.13.1) with ESMTP id k4PJLqn2011454; Thu, 25 May 2006 15:21:52 -0400 Received: (from fche@localhost) by ton.toronto.redhat.com (8.13.1/8.13.1/Submit) id k4PJLq8H011451; Thu, 25 May 2006 15:21:52 -0400 X-Authentication-Warning: ton.toronto.redhat.com: fche set sender to fche@redhat.com using -f To: Martin Hunt Cc: systemtap@sources.redhat.com Subject: Re: how to handle userspace string copy failures References: <1148580663.6909.12.camel@dragon> From: fche@redhat.com (Frank Ch. Eigler) Date: Thu, 25 May 2006 19:22:00 -0000 In-Reply-To: <1148580663.6909.12.camel@dragon> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00494.txt.bz2 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 "". 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