[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090825210848.GD8215@nowhere>
Date: Tue, 25 Aug 2009 23:08:50 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Jason Baron <jbaron@...hat.com>
Cc: Ingo Molnar <mingo@...e.hu>, Josh Stone <jistone@...hat.com>,
linux-kernel@...r.kernel.org, Li Zefan <lizf@...fujitsu.com>,
Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Jiaying Zhang <jiayingz@...gle.com>,
Martin Bligh <mbligh@...gle.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Paul Mundt <lethal@...ux-sh.org>
Subject: Re: [PATCH v4 0/4] tracing: tweaks for generic syscall events
On Tue, Aug 25, 2009 at 10:41:22AM -0400, Jason Baron wrote:
> right, the compat layer as well as the core kernel need additional
> DEFINE_SYSCALL() macros to catch all the the syscalls. However, I think
> the compat layer is a bit more involved in that it often makes use of
> the core kernel syscalls, but the mapping between syscall number is
> different. So, we need another array, or to augment the existing one, to
> cover the compat syscalls. We also need to detect 32-bit processes in
> the syscall entry path to determine which array to use, and we need to
> grab the arguments differently. So there is a bunch of work here.
Hmm, indeed we may need a parallel compat_syscall_table for the metadata
and other kind of special treatements.
I wonder how ptrace sort it out in syscall_trace_enter() to guess the
origin of the syscall (ia32 or normal), since the table is not mapped
with the same numbers.
> Also, we have the question of whether we need separate entries in the
> events/syscalls directly for 32-bit process syscalls that call the same
> 64-bit syscall interfaces. Should they be parsed as 64-bit argument
> values event thought they are 32-bit? To reduce complexity, I would say
> the 32-bit syscall entries should be the same as the 64-bit ones. That
> said there will be a bunch of new "compat_sys*" etc. entries.
>
We could probably re-route the compat syscall tracing to their
homologuous 64 bits tracepoints, but one may want to only trace the
compat_syscalls, use filters only on them, activate only some of them,
etc...
To do such routing, we could have a simple table that resolves
a compat syscall number to its real 64 bits syscall number and we could
then pass this number plus a flag that set its compat state in the ring
buffer entry.
That would avoid the need of using the DEFINE_SYSCALLx() in fs/compat.c
But such ghost tracepoints would also complexify too much the filter
processing, the individual tracepoints toggling, etc...
So I think having real compat tracepoints would actually be more simple.
We could still use shortcuts in userspace if we want to enable
sys_enter_open and sys_enter_compat_open at the same time.
Hmm?
> > Is someone willing to cover them?
> >
>
> I can take a stab at it.
Thanks a lot!
> thanks,
>
> -Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists