systemtap broken by USER_NS for now
Alexander Y. Fomichev
git.user@gmail.com
Wed May 22 14:00:00 GMT 2013
Hi
for now user_ns unconditionally requires
CONFIG_UIDGID_STRICT_TYPE_CHECKS and the latter in turn breaks things
this way:
typedef struct {
uid_t val;
} kuid_t;
and so:
stap # ./probe.stp
In file included from /usr/share/systemtap/runtime/linux/task_finder.c:17:0,
from /usr/share/systemtap/runtime/linux/runtime.h:188,
from /usr/share/systemtap/runtime/runtime.h:24,
from
/tmp/.private/root/stap7M7WmA/stap_6ce999ddb8d32c70dcbe287153f6957f_16537_src.c:22:
/usr/share/systemtap/runtime/linux/task_finder2.c: In function
'__stp_utrace_attach_match_filename':
/usr/share/systemtap/runtime/linux/task_finder2.c:816:11: error:
incompatible types when assigning to type 'uid_t' from type 'kuid_t'
tsk_euid = task_euid(tsk);
^
.....................................................................
It seems like fix is straightforward - just use from_kuid_munged to
get euid if CONFIG_UIDGID_STRICT_TYPE_CHECKS is defined. (really it
always works on latest kernels but breaks older ones). I've attached a
simple patch and it works for 3.9 (both with and without
STRICT_TYPE_CHECKS) but i'm not systemtap guy so i could be completely
wrong. Feel free to throw it out without reading :)
--
Best regards.
Alexander Y. Fomichev <git.user@gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uidgid_strict_type_check.patch
Type: application/octet-stream
Size: 5734 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20130522/586dcfe6/attachment.obj>
More information about the Systemtap
mailing list