New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add userspace namespace contexts to LTTng #55
Conversation
liblttng-ust/lttng-context-vegid.c
Outdated
static | ||
gid_t get_vegid(void) | ||
{ | ||
if (caa_unlikely(cached_vegid == (gid_t) -1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think load shared/store shared are missing here. And we should ideally return the value we read from getegid() through a local variable rather than re-read the static variable when we initialize it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same pattern applies to other contexts.
liblttng-ust/lttng-context-vegid.c
Outdated
{ | ||
gid_t vegid; | ||
|
||
vegid = get_vegid(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could remove the local variable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same applies to other contexts.
liblttng-ust/ns.h
Outdated
|
||
enum ns_ino_state { | ||
NS_INO_UNAVAILABLE = 0x0, | ||
NS_INO_UNPOPULATED = 0x1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UNPOPULATED -> UNINITIALIZED ?
Add a context for each available kernel namespace which currently are : cgroup, ipc, mnt, net, pid, user and uts. The id chosen to identify the namespaces is the inode number of the file representing each one of them in the proc filesystem. This was introduced in kernel v3.8.0, if any of these context are enabled on a system running an older kernel, zero will be returned. Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Add a context for each available namespaced user and group IDs * vuid : real user ID * veuid : effective user ID * vsuid : saved set-user ID These are the IDs as seen in the current user namespace, see user_namespaces(7) and credentials(7) for details on each type. Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Merged manually into lttng-ust master, thanks! |
No description provided.