linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] checksyscalls: fix "here document" handling
@ 2012-09-07 11:31 Heiko Carstens
  2012-09-07 11:31 ` [PATCH 2/2] checksyscalls: ignore kcmp system call Heiko Carstens
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2012-09-07 11:31 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Heiko Carstens, Michal Marek, H. Peter Anvin

"echo" doesn't read from stdin, therefore the checksyscalls script didn't warn
about not implemented system calls anymore since 29dc54c6 "checksyscalls: Use
arch/x86/syscalls/syscall_32.tbl as source".

Use "cat" instead of "echo" which handles this correctly.

Cc: Michal Marek <mmarek@suse.cz>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 scripts/checksyscalls.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index d24810f..fd8fa9a 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -200,7 +200,7 @@ EOF
 syscall_list() {
     grep '^[0-9]' "$1" | sort -n | (
 	while read nr abi name entry ; do
-	    echo <<EOF
+	    cat <<EOF
 #if !defined(__NR_${name}) && !defined(__IGNORE_${name})
 #warning syscall ${name} not implemented
 #endif
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] checksyscalls: ignore kcmp system call
  2012-09-07 11:31 [PATCH 1/2] checksyscalls: fix "here document" handling Heiko Carstens
@ 2012-09-07 11:31 ` Heiko Carstens
  2012-09-07 12:02   ` Cyrill Gorcunov
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2012-09-07 11:31 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, Heiko Carstens, Cyrill Gorcunov, Michal Marek,
	H. Peter Anvin

Now that the checksyscalls script works again it will warn about the missing
"kcmp" system call on all architectures but x86.
Since according to git commit d97b46a6 "syscalls, x86: add __NR_kcmp syscall"
only x86 is currently supported don't emit any warning for this system call.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 scripts/checksyscalls.sh |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index fd8fa9a..c7cda79 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -194,6 +194,9 @@ cat << EOF
 #define __IGNORE_getpmsg
 #define __IGNORE_putpmsg
 #define __IGNORE_vserver
+
+/* kcmp is currently x86 only */
+#define __IGNORE_kcmp
 EOF
 }
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] checksyscalls: ignore kcmp system call
  2012-09-07 11:31 ` [PATCH 2/2] checksyscalls: ignore kcmp system call Heiko Carstens
@ 2012-09-07 12:02   ` Cyrill Gorcunov
  2012-09-13 16:02     ` Heiko Carstens
  0 siblings, 1 reply; 5+ messages in thread
From: Cyrill Gorcunov @ 2012-09-07 12:02 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: Andrew Morton, linux-kernel, Michal Marek, H. Peter Anvin

On Fri, Sep 07, 2012 at 01:31:31PM +0200, Heiko Carstens wrote:
> Now that the checksyscalls script works again it will warn about the missing
> "kcmp" system call on all architectures but x86.
> Since according to git commit d97b46a6 "syscalls, x86: add __NR_kcmp syscall"
> only x86 is currently supported don't emit any warning for this system call.
> 
> Cc: Cyrill Gorcunov <gorcunov@openvz.org>
> Cc: Michal Marek <mmarek@suse.cz>
> Cc: H. Peter Anvin <hpa@linux.intel.com>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>  scripts/checksyscalls.sh |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
> index fd8fa9a..c7cda79 100755
> --- a/scripts/checksyscalls.sh
> +++ b/scripts/checksyscalls.sh
> @@ -194,6 +194,9 @@ cat << EOF
>  #define __IGNORE_getpmsg
>  #define __IGNORE_putpmsg
>  #define __IGNORE_vserver
> +
> +/* kcmp is currently x86 only */
> +#define __IGNORE_kcmp
>  EOF
>  }

Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] checksyscalls: ignore kcmp system call
  2012-09-07 12:02   ` Cyrill Gorcunov
@ 2012-09-13 16:02     ` Heiko Carstens
  2012-09-13 16:38       ` Cyrill Gorcunov
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2012-09-13 16:02 UTC (permalink / raw)
  To: Cyrill Gorcunov; +Cc: Andrew Morton, linux-kernel, Michal Marek, H. Peter Anvin

On Fri, Sep 07, 2012 at 04:02:34PM +0400, Cyrill Gorcunov wrote:
> On Fri, Sep 07, 2012 at 01:31:31PM +0200, Heiko Carstens wrote:
> > Now that the checksyscalls script works again it will warn about the missing
> > "kcmp" system call on all architectures but x86.
> > Since according to git commit d97b46a6 "syscalls, x86: add __NR_kcmp syscall"
> > only x86 is currently supported don't emit any warning for this system call.
[...]
> > diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
> > index fd8fa9a..c7cda79 100755
> > --- a/scripts/checksyscalls.sh
> > +++ b/scripts/checksyscalls.sh
> > @@ -194,6 +194,9 @@ cat << EOF
> >  #define __IGNORE_getpmsg
> >  #define __IGNORE_putpmsg
> >  #define __IGNORE_vserver
> > +
> > +/* kcmp is currently x86 only */
> > +#define __IGNORE_kcmp

Ok, I wired the system call up on s390 and the test case passed.
Below is the patch that is needed to actually reach the system call from
other architectures than x86.
Andrew, can you pick this one up as well?

The code that wires the system call up on s390 will go upstream via the
s390 tree. Thanks to kcmp being a cond_syscall there is no compile
time dependency.

>From 1ff800597ea8f678a179387e3cf2ae663531e2fe Mon Sep 17 00:00:00 2001
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Date: Thu, 13 Sep 2012 09:37:38 +0200
Subject: [PATCH] syscalls: make kcmp syscall available for all architectures

Remove the x86 dependency, since the system call is not
architecture dependend.

Also add a ptrace.h include, so it compiles at least also on s390.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 kernel/Makefile | 4 +---
 kernel/kcmp.c   | 1 +
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/Makefile b/kernel/Makefile
index c0cc67a..eb4138b 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -25,9 +25,7 @@ endif
 obj-y += sched/
 obj-y += power/
 
-ifeq ($(CONFIG_CHECKPOINT_RESTORE),y)
-obj-$(CONFIG_X86) += kcmp.o
-endif
+obj-$(CONFIG_CHECKPOINT_RESTORE) += kcmp.o
 obj-$(CONFIG_FREEZER) += freezer.o
 obj-$(CONFIG_PROFILING) += profile.o
 obj-$(CONFIG_STACKTRACE) += stacktrace.o
diff --git a/kernel/kcmp.c b/kernel/kcmp.c
index 30b7b22..e30ac0f 100644
--- a/kernel/kcmp.c
+++ b/kernel/kcmp.c
@@ -4,6 +4,7 @@
 #include <linux/string.h>
 #include <linux/random.h>
 #include <linux/module.h>
+#include <linux/ptrace.h>
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/cache.h>
-- 
1.7.11.6


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] checksyscalls: ignore kcmp system call
  2012-09-13 16:02     ` Heiko Carstens
@ 2012-09-13 16:38       ` Cyrill Gorcunov
  0 siblings, 0 replies; 5+ messages in thread
From: Cyrill Gorcunov @ 2012-09-13 16:38 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: Andrew Morton, linux-kernel, Michal Marek, H. Peter Anvin

On Thu, Sep 13, 2012 at 06:02:37PM +0200, Heiko Carstens wrote:
> On Fri, Sep 07, 2012 at 04:02:34PM +0400, Cyrill Gorcunov wrote:
> > On Fri, Sep 07, 2012 at 01:31:31PM +0200, Heiko Carstens wrote:
> > > Now that the checksyscalls script works again it will warn about the missing
> > > "kcmp" system call on all architectures but x86.
> > > Since according to git commit d97b46a6 "syscalls, x86: add __NR_kcmp syscall"
> > > only x86 is currently supported don't emit any warning for this system call.
> [...]
> > > diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
> > > index fd8fa9a..c7cda79 100755
> > > --- a/scripts/checksyscalls.sh
> > > +++ b/scripts/checksyscalls.sh
> > > @@ -194,6 +194,9 @@ cat << EOF
> > >  #define __IGNORE_getpmsg
> > >  #define __IGNORE_putpmsg
> > >  #define __IGNORE_vserver
> > > +
> > > +/* kcmp is currently x86 only */
> > > +#define __IGNORE_kcmp
> 
> Ok, I wired the system call up on s390 and the test case passed.
> Below is the patch that is needed to actually reach the system call from
> other architectures than x86.
> Andrew, can you pick this one up as well?
> 
> The code that wires the system call up on s390 will go upstream via the
> s390 tree. Thanks to kcmp being a cond_syscall there is no compile
> time dependency.
> 
> From 1ff800597ea8f678a179387e3cf2ae663531e2fe Mon Sep 17 00:00:00 2001
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
> Date: Thu, 13 Sep 2012 09:37:38 +0200
> Subject: [PATCH] syscalls: make kcmp syscall available for all architectures
> 
> Remove the x86 dependency, since the system call is not
> architecture dependend.
> 
> Also add a ptrace.h include, so it compiles at least also on s390.
> 
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>

Thanks a lot!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-13 16:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-07 11:31 [PATCH 1/2] checksyscalls: fix "here document" handling Heiko Carstens
2012-09-07 11:31 ` [PATCH 2/2] checksyscalls: ignore kcmp system call Heiko Carstens
2012-09-07 12:02   ` Cyrill Gorcunov
2012-09-13 16:02     ` Heiko Carstens
2012-09-13 16:38       ` Cyrill Gorcunov

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).