Messages in this thread | | | Date | Wed, 1 Feb 2012 09:46:21 +0000 | From | Russell King - ARM Linux <> | Subject | Re: [PATCH] ARM: Wire up HAVE_SYSCALL_TRACEPOINTS |
| |
On Thu, Dec 01, 2011 at 08:01:32PM +0900, takuo.koguchi.sw@hitachi.com wrote: > diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h > index 4a11237..f4eac2d 100644 > --- a/arch/arm/include/asm/unistd.h > +++ b/arch/arm/include/asm/unistd.h > @@ -405,6 +405,9 @@ > #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) > #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) > > +#ifndef __ASSEMBLY__ > +#define NR_syscalls 378 > +#endif
So, we have 380 syscalls in the assembly code. You're telling ftrace that we have 378. That's just great, because it means userspace can trigger this trivially:
int reg_event_syscall_enter(struct ftrace_event_call *call) { int ret = 0; int num;
num = ((struct syscall_metadata *)call->data)->syscall_nr; if (WARN_ON_ONCE(num < 0 || num >= NR_syscalls)) return -ENOSYS;
And what about the ARM private syscalls?
This ftrace NR_syscalls definition would have to be some very large number to avoid these issuing the above warning. ftrace really needs to lose this before ARM can start using it.
| |