[Bug testsuite/20298] New: the unprivileged_embedded_C.exp testcase needs updating
dsmith at redhat dot com
sourceware-bugzilla@sourceware.org
Fri Jun 24 18:10:00 GMT 2016
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.
More information about the Systemtap
mailing list