From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: takuo.koguchi.sw@hitachi.com
Cc: linux-kernel@vger.kernel.org, masami.hiramatsu.pt@hitachi.com,
rostedt@goodmis.org, fweisbec@gmail.com, mingo@redhat.com,
jbaron@redhat.com, yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH] ARM: Wire up HAVE_SYSCALL_TRACEPOINTS
Date: Wed, 1 Feb 2012 09:46:21 +0000 [thread overview]
Message-ID: <20120201094621.GD889@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <XNM1$5$0$1$$3$9$0$A$8005107U4ed75e6e@hitachi.com>
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.
prev parent reply other threads:[~2012-02-01 9:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 11:01 [PATCH] ARM: Wire up HAVE_SYSCALL_TRACEPOINTS takuo.koguchi.sw
2012-02-01 1:47 ` Indan Zupancic
2012-02-01 2:09 ` Steven Rostedt
2012-02-02 9:21 ` Takuo Koguchi
2012-02-02 11:00 ` Indan Zupancic
2012-02-02 11:10 ` Russell King - ARM Linux
2012-02-02 23:38 ` Indan Zupancic
2012-02-02 23:41 ` Roland McGrath
2012-02-03 0:32 ` Russell King - ARM Linux
2012-02-03 1:58 ` Indan Zupancic
2012-02-01 9:46 ` Russell King - ARM Linux [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120201094621.GD889@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=fweisbec@gmail.com \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=takuo.koguchi.sw@hitachi.com \
--cc=yrl.pp-manager.tt@hitachi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).