Re: [uml-devel] Re: [RFC] PATCH 3/4 - Time virtualization : PTRACE_SYSCALL_MASK

From: Heiko Carstens
Date: Sat Apr 22 2006 - 14:35:33 EST


> For UML, instead, it's important to set that some peculiar syscalls are not
> traced, that the mask is 1-extended and that errors are reported.
>
> So, I suggest a "flags" parameter for this. Sadly, we're using the ptrace()
> syscall and there's no 5th argument normally, we could either use it (IIRC
> some calls use the 5th regs indeed), or pass as "data" a struct with flags
> and the mask.
>
> The flags could be:
>
> MASK_DEFAULT_TRACE (set the default to 1 for remaining bits)
> MASK_DEFAULT_IGNORE (set the default to 0 for remaining bits)
> MASK_STRICT_VERIFY (return -EINVAL for bits exceeding NR_syscalls and set
> differently than the default).
>
> probably with a reasonable prefix to avoid namespace pollution (something like
> "PT_SC_-").

You might as well introduce yet another ptrace call which returns the number
of system calls and for this ptrace call force user space to pass a complete
bitmap. Sounds easier to me.

> > The tracing process won't see
> > any of the non existant syscalls it requested to see anyway.
> No, you misunderstood the code, it does the opposite very different - the loop

Looks I missed a few "!"s :)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/