Re: [PATCH 00/12] tracing: add compat syscall support v2

From: Frederic Weisbecker
Date: Thu Mar 11 2010 - 22:27:25 EST


On Thu, Mar 11, 2010 at 05:12:28PM -0500, Jason Baron wrote:
> I kept separate namespaces to avoid collisions and generally simplify
> things. However, you are right - we can maintain namespace separation at the
> "sys32_blah", "compat_sys", level and map to a common "compat_blah" for the
> trace event name. We can avoid collisions by simply storing the "sys32" or
> "compat_sys" name in the syscall metadata structure name field.


Well, the purpose is also to reach a state near to cross arch generic
for tools.

If we have a script that parses compat syscalls events in arch X, it
would be nice if it works on arch Y.

If arch X overrides compat_blah through sys32_blah and arch Y just keep
compat_blah, the script won't cross work.

The problem is not that trivial to solve though, I guess the best is to
remove the compat_blah trace event if we already have sys32_blah.
Also the syscall handler naming doesn't seem to be always unified (not
talking about the sys32 thing but the name of the syscall itself).

So let's start simple for now, we can just include everything and
solve that incrementally. But a good start would be to have a separate
compat_syscalls event subsystem.


> > - We probably want a compat_syscalls trace event subsystem (separated
> > from syscalls), can be done incrementally though
> >
> > - Commit e7b8e675d9c71b868b66f62f725a948047514719
> > (tracing: Unify arch_syscall_addr() implementations)
> > has made a good use of the unified syscall table name
> > between archs that support syscall tracing so that we
> > can, most of the time, directly dereference it from generic
> > code. Exotic archs can still override arch_syscall_addr()
> > if we can't do that with their syscall table.
> > I wish we can do that with the compat syscall tables too.
> > Compat syscall tables names seem to be less unified for now
> > though. Again, can be done incrementally.
> >
> > Other than that, that's a cool batch!
> >
> > Thanks!
> >
>
> the other question is how to go about getting arch support, since right
> now we break non-x86 arches which have CONFIG_FTRACE_SYSCALLS and
> CONFIG_COMPAT set with this patch.


I guess we can handle that with an ARCH_HAVE_FTRACE_COMPAT_SYSCALLS.
It's not that broken actually, compat syscalls events will just
not trigger.



> thanks,
>
> -Jason

--
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/