Error using tapset functions, i.e. euid()

Bug #803549 reported by Serge Hallyn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemtap (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When I try to use this script:

probe kernel.function("sys_open").return
{
# -EPERM or -EACCES
        if ($return == -1 || $return == -13) {
                printf ("%s(%d) %s (%d) %s\n",
                                execname(), pid(), probefunc(), $return, kernel_string($filename))
                printf("euid %d\n", euid())
        }
}

I get a long list of errors beginning with:

In file included from /usr/share/systemtap/runtime/runtime.h:118,
                 from /tmp/stapPD2v8O/stap_ae6cb464ee6f134b982d954fb5baac90_4259.c:51:
/usr/share/systemtap/runtime/alloc.c: In function ‘_stp_alloc_percpu’:
/usr/share/systemtap/runtime/alloc.c:241: error: too few arguments to function ‘__alloc_percpu’
In file included from /usr/share/systemtap/runtime/runtime.h:124,
                 from /tmp/stapPD2v8O/stap_ae6cb464ee6f134b982d954fb5baac90_4259.c:51:
/usr/share/systemtap/runtime/regs.c: In function ‘_stp_print_regs’:
/usr/share/systemtap/runtime/regs.c:125: error: ‘struct pt_regs’ has no member named ‘rip’
/usr/share/systemtap/runtime/regs.c:125: error: ‘struct pt_regs’ has no member named ‘rsp’
/usr/share/systemtap/runtime/regs.c:125: error: ‘struct pt_regs’ has no member named ‘eflags’
/usr/share/systemtap/runtime/regs.c:127: error: ‘struct pt_regs’ has no member named ‘rax’
/usr/share/systemtap/runtime/regs.c:127: error: ‘struct pt_regs’ has no member named ‘rbx’
/usr/share/systemtap/runtime/regs.c:127: error: ‘struct pt_regs’ has no member named ‘rcx’
/usr/share/systemtap/runtime/regs.c:129: error: ‘struct pt_regs’ has no member named ‘rdx’
/usr/share/systemtap/runtime/regs.c:129: error: ‘struct pt_regs’ has no member named ‘rsi’
/usr/share/systemtap/runtime/regs.c:129: error: ‘struct pt_regs’ has no member named ‘rdi’
/usr/share/systemtap/runtime/regs.c:131: error: ‘struct pt_regs’ has no member named ‘rbp’
/usr/share/systemtap/runtime/regs.c: In function ‘_stp_get_sp’:
/usr/share/systemtap/runtime/regs.c:409: error: ‘struct pt_regs’ has no member named ‘rsp’
/usr/share/systemtap/runtime/regs.c: In function ‘_stp_get_arg32_by_number’:
/usr/share/systemtap/runtime/regs.c:468: error: ‘struct pt_regs’ has no member named ‘rax’
/usr/share/systemtap/runtime/regs.c:469: error: ‘struct pt_regs’ has no member named ‘rdx’
/usr/share/systemtap/runtime/regs.c:470: error: ‘struct pt_regs’ has no member named ‘rcx’
/usr/share/systemtap/runtime/regs.c: In function ‘_stp_get_arg64_by_number’:
/usr/share/systemtap/runtime/regs.c:495: error: ‘struct pt_regs’ has no member named ‘rdi’
/usr/share/systemtap/runtime/regs.c:496: error: ‘struct pt_regs’ has no member named ‘rsi’
/usr/share/systemtap/runtime/regs.c:497: error: ‘struct pt_regs’ has no member named ‘rdx’
/usr/share/systemtap/runtime/regs.c:498: error: ‘struct pt_regs’ has no member named ‘rcx’
In file included from /usr/share/systemtap/runtime/unwind/unwind.h:19,
                 from /usr/share/systemtap/runtime/unwind.c:16,
                 from /usr/share/systemtap/runtime/stack.c:26,
                 from /tmp/stapPD2v8O/stap_ae6cb464ee6f134b982d954fb5baac90_4259.c:52:

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

This is in a fresh lucid VM (with lucid-updates and lucid-security).

Linux systap-lucid-amd64 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:52:38 UTC 2011 x86_64 GNU/Linux

Revision history for this message
Frank Ch. Eigler (fche) wrote :

This may be related to upstream commit:

commit 6899576f99ddd612520f7cdb4987155fad27bc6e
Author: Frank Ch. Eigler <email address hidden>
Date: Thu May 12 19:53:30 2011 -0400

    runtime/autoconf: gcc 4.6 fix false -Werror positives

Upstream release 1.6 includes this and many other possibly-related fixes.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemtap - 2.1-1~experimental1

---------------
systemtap (2.1-1~experimental1) experimental; urgency=low

  * New upstream release (Closes: #690404, #701365, #701365)
    (LP: #803549, #1130626, #1075772).
  * Drop patches that are part of the new upstream release:
    - manpage-syntax1.diff
    - spelling-fixes1.diff
    - spelling-fixes2.diff
    - manpage-paths1.diff
    - fix.CVE-2012-0875.diff
  * Add patches that fix various lintian warnings. These have all
    been accepted upstream so we can get rid of them in the next
    release (thanks Frank Ch. Eigler!):
    - 0001-man-stap.1-escape-minus-sign-properly.patch
    - 0002-man-stap.1-fix-typo.patch
    - 0003-man-stapprobes.3stap-escape-minus-sign-properly.patch
    - 0005-Add-missing-usr-bin-env-stap-to-some-examples.patch
    - 0006-man-stappaths.7-properly-escape-dot-in-the-beginning.patch
    - 0008-man-escape-quote-properly-in-header.patch
    - 0001-configure.ac-remove-temporary-file-after-test.patch
    - 0002-Makefile.am-remove-temporary-symlinks-in-distclean.patch
    - 0003-configure-Makefile-regenerate.patch
    - 0001-tapset-test-adieu.patch
    - 0001-Makefile.am-don-t-install-html-.tmpl-files.patch
    - 0002-Makefile.in-regenerate.patch
    - 0001-manpager-fix-warnings-by-adding-breaks-between-SEE-A.patch
  * Add patch to partially fix #604453:
    - 0001-blacklist-more-unsafe-functions.patch
  * Backport patch to support unreadable System.map on Ubuntu:
    - 0001-translator-tolerate-unavailable-System.map.patch
  * Add patch to suggest reading README.Debian if anything
    fails. Usability testing shows that surprisingly few users
    will find it otherwise :-) This patch can not be forwarded
    upstream but it is very simple.
    - suggest-readme.debian.diff
  * Upload to experimental since wheezy is frozen.
  * Drop systemtap-grapher binary package as it has been
    removed by upstream. Remove its build-dependencies
    libgtkmm-2.4-dev, libboost-dev and libglademm-2.4-dev as well.
  * Add powerpcspe to the architecture list (Closes: #700161).
  * Ship stap-prep to help users figure out what
    debug symbol and header packages they need to install and mention
    this in README.Debian.
  * Add patches to make stap-prep work on Debian:
    - 0001-Prepare-stap-prep-for-support-for-non-rpm-systems.patch
    - 0002-stap-prep-add-support-for-deb-based-systems.patch
    - 0003-man-add-man-page-for-stap-prep-1.patch
    - 0004-man-stap.1-add-reference-to-stap-prep-1.patch
    - 0001-install-stap-prep.1-man-page.patch
    - 0002-man-Makefile.in-regenerate.patch
  * Add patch to improve error messages:
    - 0001-Suggest-running-stap-prep-after-all-failures.patch
  * Enable emacs addon that makes editing .stp files easier.
  * Ensure that build log shows full build commands.
  * Bump Standards-Version to 3.9.4, no changes were needed.

 -- Timo Juhani Lindfors <email address hidden> Sat, 23 Feb 2013 14:36:19 +0200

Changed in systemtap (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.