From: "dsmith at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug testsuite/20298] New: the unprivileged_embedded_C.exp testcase needs updating
Date: Fri, 24 Jun 2016 18:10:00 -0000 [thread overview]
Message-ID: <bug-20298-6586@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=20298
Bug ID: 20298
Summary: the unprivileged_embedded_C.exp testcase needs
updating
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: testsuite
Assignee: systemtap at sourceware dot org
Reporter: dsmith at redhat dot com
Target Milestone: ---
There are at least 2 problems I see with
testsuite/systemtap.stress/unprivileged_embedded_C.exp:
1) It only searches tapset functions in tapset/ and tapset/${ARCH}/. It doesn't
search tapsets in tapset/linux/ and tapset/linux/${ARCH}/. It needs to be
updated for the dyninst/linux tapset directory rearrangement.
2) It gets spurious failures. It assumes that if a tapset function doesn't have
any embedded C (i.e. a pure stap script function), a unprivileged user can call
it. That isn't the case if that pure stap script function calls a function that
is privileged.
For example, note the following 2 functions from tapset/linux/conversions.exp:
====
function kernel_string:string (addr:long) %{ /* pure */
...
%}
function kernel_string:string (addr:long, err_msg:string) {
try { return kernel_string(addr) } catch { return err_msg }
}
====
If unprivileged_embedded_C.exp tests the 2nd function above, it will think an
unprivileged user should be able to call it. However, since it calls the 1st
function which is privileged, the 2nd function is also privileged.
Since the testcase can't know what pure stap script functions should be
privileged or unprivileged, it should probably just skip testing them.
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2016-06-24 18:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 18:10 dsmith at redhat dot com [this message]
2016-06-27 17:57 ` [Bug testsuite/20298] " dsmith at redhat dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-20298-6586@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).