mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 13:51:28 +00:00
[LibOS] Be more precise in reporting clone parameters
Additional clone parameters only matter if certain CLONE flags are set and otherwise may contain useless/invalid values. So, be more precise in reporting them in debug output.
This commit is contained in:
committed by
Michał Kowalczyk
parent
bbb5340c7e
commit
d3ce64c2b2
@@ -211,15 +211,16 @@ int shim_do_clone (int flags, void * user_stack_addr, int * parent_tidptr,
|
||||
|
||||
/* FIXME: we ignore parent_tidptr, child_tidptr and tls; no application seems to use a
|
||||
* combination of clone(CLONE_VFORK) and these parameters */
|
||||
if (parent_tidptr || child_tidptr || tls) {
|
||||
debug("Emulation of clone(CLONE_VFORK) ignores");
|
||||
if (parent_tidptr)
|
||||
debug(" parent_tidptr = %p,", parent_tidptr);
|
||||
if (child_tidptr)
|
||||
debug(" child_tidptr = %p,", child_tidptr);
|
||||
if (tls)
|
||||
debug(" tls = %p,", tls);
|
||||
debug(" taking into account only user_stack_addr = %p\n", user_stack_addr);
|
||||
if (flags & (CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|CLONE_SETTLS)) {
|
||||
debug("Emulation of clone(CLONE_VFORK) takes into account only user_stack_addr = %p. "
|
||||
"Additional parameters are ignored:", user_stack_addr);
|
||||
if (flags & CLONE_PARENT_SETTID)
|
||||
debug(" parent_tidptr = %p", parent_tidptr);
|
||||
if (flags & (CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID))
|
||||
debug(" child_tidptr = %p", child_tidptr);
|
||||
if (flags & CLONE_SETTLS)
|
||||
debug(" tls = %p", tls);
|
||||
debug("\n");
|
||||
}
|
||||
|
||||
ret = shim_do_vfork();
|
||||
|
||||
Reference in New Issue
Block a user