Re: [PATCH v3 08/11] powerpc/tracing: fix compat syscall handling

From: Michael Ellerman
Date: Wed Oct 12 2016 - 05:59:52 EST


Marcin Nowakowski <marcin.nowakowski@xxxxxxxxxx> writes:

> Adapt the code to make use of new syscall handling interface
>
> Signed-off-by: Marcin Nowakowski <marcin.nowakowski@xxxxxxxxxx>
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
> ---
> arch/powerpc/include/asm/ftrace.h | 11 +++++++++++
> arch/powerpc/kernel/ftrace.c | 4 ++++

I went to test this and noticed the exit and enter events appear to be
reversed in time? (your series on top of 24532f768121)

ls-4221 [003] .... 83.766113: compat_sys_rt_sigprocmask -> 0x2
ls-4221 [003] .... 83.766137: compat_sys_rt_sigprocmask(how: 2, nset: 1010db30, oset: 0, sigsetsize: 8)
ls-4221 [003] .... 83.766175: compat_sys_rt_sigaction -> 0x14
ls-4221 [003] .... 83.766175: compat_sys_rt_sigaction(sig: 14, act: ffbd33c4, oact: ffbd3338, sigsetsize: 8)
ls-4221 [003] .... 83.766177: compat_sys_rt_sigaction -> 0x15
ls-4221 [003] .... 83.766177: compat_sys_rt_sigaction(sig: 15, act: ffbd33c4, oact: ffbd3338, sigsetsize: 8)
ls-4221 [003] .... 83.766178: compat_sys_rt_sigaction -> 0x16
ls-4221 [003] .... 83.766178: compat_sys_rt_sigaction(sig: 16, act: ffbd33d4, oact: ffbd3348, sigsetsize: 8)
ls-4221 [003] .... 83.766179: sys_setpgid -> 0x107d
ls-4221 [003] .... 83.766179: sys_setpgid(pid: 107d, pgid: 107d)
ls-4221 [003] .... 83.766180: compat_sys_rt_sigprocmask -> 0x0
ls-4221 [003] .... 83.766181: compat_sys_rt_sigprocmask(how: 0, nset: ffbd34b0, oset: ffbd3530, sigsetsize: 8)
ls-4221 [003] .... 83.766186: compat_sys_ioctl -> 0xff
ls-4221 [003] .... 83.766187: compat_sys_ioctl(fd: ff, cmd: 80047476, arg32: ffbd3488)
ls-4221 [003] .... 83.766188: compat_sys_rt_sigprocmask -> 0x2
ls-4221 [003] .... 83.766189: compat_sys_rt_sigprocmask(how: 2, nset: ffbd3530, oset: 0, sigsetsize: 8)
ls-4221 [003] .... 83.766189: sys_close -> 0x4
ls-4221 [003] .... 83.766190: sys_close(fd: 4)
ls-4221 [003] .... 83.766191: sys_read -> 0x3
ls-4221 [003] .... 83.766191: sys_read(fd: 3, buf: ffbd35dc, count: 1)
ls-4221 [003] .... 83.766235: sys_close -> 0x3
ls-4221 [003] .... 83.766235: sys_close(fd: 3)

cheers