From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Miklos Szeredi <miklos@szeredi.hu>,
Wade Farnsworth <wade_farnsworth@mentor.com>,
Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-arch <linux-arch@vger.kernel.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
Miklos Szeredi <mszeredi@suse.cz>
Subject: Re: [PATCH 02/15] arm: __NR_syscalls fix
Date: Wed, 23 Apr 2014 11:27:18 +0100 [thread overview]
Message-ID: <20140423102718.GA6434@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140411124502.GO16119@n2100.arm.linux.org.uk>
On Fri, Apr 11, 2014 at 01:45:02PM +0100, Russell King - ARM Linux wrote:
> On Fri, Apr 11, 2014 at 02:02:32PM +0200, Miklos Szeredi wrote:
> > On Fri, Apr 11, 2014 at 1:54 PM, Russell King - ARM Linux
> > <linux@arm.linux.org.uk> wrote:
> > > On Fri, Apr 11, 2014 at 01:50:50PM +0200, Miklos Szeredi wrote:
> > >> Yes, and the padding will be of wrong length if NR_syscalls is
> > >> incorrect (which may be Oopsable?). At least that is my impression
> > >> from a casual glance.
> > >
> > > Please explain.
> >
> > Look at ending lines of arch/arm/kernel/calls.S: if NR_syscalls is a
> > multiple of 4, then syscalls_padding will be zero. I.e. no padding
> > despite the fact that there is in fact only 382 system calls in table
> > and there should be 2 sys_ni_syscall pads.
>
> Hmm, it looks like you're right... this used to work fine until...
>
> commit 1f66e06fb6414732bef7bf4a071ef76a837badec
> Author: Wade Farnsworth <wade_farnsworth@mentor.com>
> Date: Fri Sep 7 18:18:25 2012 +0100
>
> ARM: 7524/1: support syscall tracing
>
> because the tracing code wanted to know the number of syscalls. I don't
> know what the answer is here, because the current solution is IMHO far
> to fragile.
Actually, no, you're wrong. Look closely at the definitions. __NR_syscalls
is not the same as NR_syscalls.
__NR_syscalls is the statically defined size of the syscall table for
*probes purposes.
NR_syscalls is the assembly-counted number of CALL() macros in
arch/arm/kernel/calls.S.
So, patch 2 isn't required, and patch 3 needs to be fixed up to take
this into account...
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
next prev parent reply other threads:[~2014-04-23 10:28 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 10:25 [PATCH 00/15] wire up renameat2 syscall for various archs Miklos Szeredi
2014-04-11 10:25 ` [PATCH 01/15] i386: add renameat2 syscall Miklos Szeredi
2014-04-11 10:25 ` Miklos Szeredi
2014-04-11 10:25 ` [PATCH 02/15] arm: __NR_syscalls fix Miklos Szeredi
2014-04-11 10:25 ` Miklos Szeredi
2014-04-11 10:33 ` Russell King - ARM Linux
2014-04-11 10:33 ` Russell King - ARM Linux
2014-04-11 11:50 ` Miklos Szeredi
2014-04-11 11:54 ` Russell King - ARM Linux
2014-04-11 12:02 ` Miklos Szeredi
2014-04-11 12:45 ` Russell King - ARM Linux
2014-04-23 10:27 ` Russell King - ARM Linux [this message]
2014-04-23 12:00 ` Miklos Szeredi
2014-04-11 10:25 ` [PATCH 03/15] arm: add renameat2 syscall Miklos Szeredi
2014-04-11 10:25 ` Miklos Szeredi
2014-04-11 10:35 ` Russell King - ARM Linux
2014-04-11 11:48 ` Miklos Szeredi
2014-04-11 17:39 ` David Miller
2014-04-11 10:25 ` [PATCH 04/15] arm64: __NR_compat_syscalls fix Miklos Szeredi
2014-04-22 16:58 ` Catalin Marinas
2014-04-22 16:58 ` Catalin Marinas
2014-04-23 8:46 ` Miklos Szeredi
2014-04-23 9:40 ` Catalin Marinas
2014-04-11 10:25 ` [PATCH 05/15] arm64: add renameat2 syscall Miklos Szeredi
2014-04-11 10:25 ` Miklos Szeredi
2014-04-22 17:01 ` Catalin Marinas
2014-04-11 10:25 ` [PATCH 06/15] m68k: " Miklos Szeredi
2014-04-11 10:25 ` Miklos Szeredi
2014-04-14 16:29 ` Geert Uytterhoeven
2014-04-14 16:29 ` Geert Uytterhoeven
2014-04-21 8:10 ` Geert Uytterhoeven
2014-04-22 15:32 ` Miklos Szeredi
2014-04-22 15:32 ` Miklos Szeredi
2014-04-11 10:25 ` [PATCH 07/15] mips: " Miklos Szeredi
2014-04-23 11:40 ` James Hogan
2014-04-23 11:40 ` James Hogan
2014-05-15 12:04 ` Miklos Szeredi
2014-04-11 10:25 ` [PATCH 08/15] ia64: " Miklos Szeredi
2014-04-11 10:25 ` [PATCH 09/15] parisc: " Miklos Szeredi
2014-04-11 10:25 ` Miklos Szeredi
2014-04-19 18:54 ` Helge Deller
2014-04-19 18:54 ` Helge Deller
2014-04-22 15:33 ` Miklos Szeredi
2014-04-22 15:33 ` Miklos Szeredi
2014-04-11 10:25 ` [PATCH 10/15] powerpc: " Miklos Szeredi
2014-04-11 10:25 ` Miklos Szeredi
2014-04-11 10:25 ` [PATCH 11/15] s390: NR_syscalls fix Miklos Szeredi
2014-04-11 11:24 ` Martin Schwidefsky
2014-04-11 11:24 ` Martin Schwidefsky
2014-04-11 11:52 ` Miklos Szeredi
2014-04-11 10:25 ` [PATCH 12/15] s390: add renameat2 syscall Miklos Szeredi
2014-04-11 10:25 ` [PATCH 13/15] sparc: " Miklos Szeredi
2014-04-11 10:25 ` Miklos Szeredi
2014-04-11 10:25 ` [PATCH 14/15] xtensa: " Miklos Szeredi
2014-04-11 10:25 ` [PATCH 15/15] asm-generic: " Miklos Szeredi
2014-04-23 11:46 ` James Hogan
2014-04-14 16:32 ` [PATCH 00/15] wire up renameat2 syscall for various archs Geert Uytterhoeven
2014-04-14 20:11 ` Miklos Szeredi
2014-04-15 7:45 ` Geert Uytterhoeven
2014-04-15 7:45 ` Geert Uytterhoeven
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=20140423102718.GA6434@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=wade_farnsworth@mentor.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).