All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: linux-parisc@vger.kernel.org,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	John David Anglin <dave.anglin@bell.net>
Subject: Re: [PATCH, v2] parisc: Add compile-time check when adding new syscalls
Date: Sun, 15 Mar 2015 21:32:12 +0100	[thread overview]
Message-ID: <20150315203212.GA452@ls3530.box> (raw)
In-Reply-To: <20150314203416.GA10789@ls3530.box>

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index 5a8997d..0959fcc 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -55,6 +55,7 @@
 #define ENTRY_COMP(_name_) .word sys_##_name_
 #endif
 
+99:
 	ENTRY_SAME(restart_syscall)	/* 0 */
 	ENTRY_SAME(exit)
 	ENTRY_SAME(fork_wrapper)
@@ -439,6 +440,15 @@
 	ENTRY_SAME(bpf)
 	ENTRY_COMP(execveat)
 
+
+#if defined(CONFIG_64BIT)
+.ifne (. - 99b) - (__NR_Linux_syscalls * 8)
+#else /* !defined(CONFIG_64BIT) */
+.ifne (. - 99b) - (__NR_Linux_syscalls * 4)
+#endif
+.error "size of syscall table does not fit value of __NR_Linux_syscalls"
+.endif
+
 	/* Nothing yet */
 
 #undef ENTRY_SAME

      reply	other threads:[~2015-03-15 20:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-14 20:34 [PATCH] parisc: Add compile-time check when adding new syscalls Helge Deller
2015-03-15 20:32 ` Helge Deller [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=20150315203212.GA452@ls3530.box \
    --to=deller@gmx.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dave.anglin@bell.net \
    --cc=linux-parisc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.