From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10178 invoked by alias); 19 Sep 2016 15:44:02 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 10024 invoked by uid 48); 19 Sep 2016 15:43:49 -0000 From: "fche at redhat dot com" To: systemtap@sourceware.org Subject: [Bug tapsets/20618] Cannot get the real syscall return code value Date: Mon, 19 Sep 2016 15:44:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fche at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WORKSFORME X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016-q3/txt/msg00301.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D20618 Frank Ch. Eigler changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |codonell at redhat dot com, | |fche at redhat dot com Resolution|--- |WORKSFORME --- Comment #1 from Frank Ch. Eigler --- > We couldn't find in any part of the documentation that returnval() or the > syscall return value will be replaced with the errno value [...] It turns out that this is an artefact of how linux system calls work. A positive/zero return value is success, a negative return value usually is an error code that the glibc runtime will shift into the global 'errno'. At the low systemtap level, the negative errno -is- the genuine return value from the syscall. Unfortunately, we don't have convenient probes at the glibc level to observe the C-level aftereffects properly. There is a glibc RFE open (for quite some time now) for them to insert some sys/sdt.h markers, so that stap could present the cooked results properly. (RHers, see also https://bugzilla.redhat.com/show_bug.cgi?id=3D742034 .) --=20 You are receiving this mail because: You are the assignee for the bug.