This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH]Add lacked syscall.unshare to tapset
Hi Zhaolei,
On Tue, 2008-06-03 at 16:14 +0800, Zhaolei wrote:
> Thank you for your advice.
> It is a good idea to set flags as string in argstr.
>
> In my opinion, sys_unshare support only following flags:
>
> asmlinkage long sys_unshare(unsigned long unshare_flags)
> {
> ...
> if (unshare_flags & ~(CLONE_THREAD|CLONE_FS|CLONE_NEWNS|CLONE_SIGHAND|
> CLONE_VM|CLONE_FILES|CLONE_SYSVSEM|
> CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWUSER|
> CLONE_NEWNET))
> goto bad_unshare_out;
> ...
> }
>
> It is different from flags in __fork_flags.
> I think it maybe necessary to add a new function like __unshare_flags in
> aux_syscalls.stp.
If I read that fragment above correctly then not all the same flags are
supported, but you can still call unshare with them. The result will
just be that the syscall fails (because it doesn't support that
particular flag). So I don't think you need new function.
Cheers,
Mark