From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Al Viro <viro@zeniv.linux.org.uk>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Linux-Arch <linux-arch@vger.kernel.org>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Linux-Next <linux-next@vger.kernel.org>,
Chris Metcalf <cmetcalf@tilera.com>
Subject: Re: [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64
Date: Thu, 20 Mar 2014 15:51:28 +0100 [thread overview]
Message-ID: <20140320145128.GE4403@osiris> (raw)
In-Reply-To: <20140320113333.GD4403@osiris>
On Thu, Mar 20, 2014 at 12:33:33PM +0100, Heiko Carstens wrote:
> On Thu, Mar 20, 2014 at 11:03:14AM +0100, Geert Uytterhoeven wrote:
> > On Thu, Mar 6, 2014 at 4:51 PM, Heiko Carstens
> > <heiko.carstens@de.ibm.com> wrote:
> > > For architecture dependent compat syscalls in common code an architecture
> > > must define something like __ARCH_WANT_<WHATEVER> if it wants to use the
> > > code.
> > > This however is not true for compat_sys_getdents64 for which architectures
> > > must define __ARCH_OMIT_COMPAT_SYS_GETDENTS64 if they do not want the code.
> > >
> > > This leads to the situation where all architectures, except mips, get the
> > > compat code but only x86_64, arm64 and the generic syscall architectures
> > > actually use it.
> > >
> > > So invert the logic, so that architectures actively must do something to
> > > get the compat code.
> > >
> > > This way a couple of architectures get rid of otherwise dead code.
> > >
> > > Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> >
> > Is this the cause of the tilegx_defconfig failures in -next?
> >
> > include/uapi/asm-generic/unistd.h:195:1: error:
> > 'compat_sys_getdents64' undeclared here (not in a function)
> > make[3]: *** [arch/tile/kernel/compat.o] Error 1
> >
> > http://kisskb.ellerman.id.au/kisskb/buildresult/10808012/
>
> Yes. That's unexpected header include order from my side...
> Looking into it. Thanks!
I think the simple patch below should fix the compile error.
Unfortunately I don't have a tile cross compiler.
But at least s390, x86_64, sparc64 and mip64 still compile, so it
looks like I'm not immediatly lost in include order hell.
(pushed to the s390 compat branch, so the next linux-next release
should contain the fix)
From f80f4cd232c56f491ecbeea3dd0627598b59b61e Mon Sep 17 00:00:00 2001
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Date: Thu, 20 Mar 2014 15:30:14 +0100
Subject: [PATCH] compat: include linux/unistd.h within linux/compat.h
linux/compat.h does not include linux/unistd.h but the compat.h header
file contains various conditional
#ifdef __ARCH_WANT_COMPAT_...
asmlinkage long compat...()
#endif
compat system call function declarations.
If linux/unistd.h isn't included it depends on previous includes if those
__ARCH_WANT_COMPAT_... defines are defined or not. So add an additional
linux/unistd.h include.
Should fix this compile error on tile:
include/uapi/asm-generic/unistd.h:195:1: error: 'compat_sys_getdents64' undeclared
make[3]: *** [arch/tile/kernel/compat.o] Error 1
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
include/linux/compat.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 7c765624b7ef..01c0aa57ccec 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -14,6 +14,7 @@
#include <linux/if.h>
#include <linux/fs.h>
#include <linux/aio_abi.h> /* for aio_context_t */
+#include <linux/unistd.h>
#include <asm/compat.h>
#include <asm/siginfo.h>
--
1.8.5.5
WARNING: multiple messages have this Message-ID (diff)
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Al Viro <viro@zeniv.linux.org.uk>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Linux-Arch <linux-arch@vger.kernel.org>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Linux-Next <linux-next@vger.kernel.org>,
Chris Metcalf <cmetcalf@tilera.com>
Subject: Re: [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64
Date: Thu, 20 Mar 2014 15:51:28 +0100 [thread overview]
Message-ID: <20140320145128.GE4403@osiris> (raw)
In-Reply-To: <20140320113333.GD4403@osiris>
On Thu, Mar 20, 2014 at 12:33:33PM +0100, Heiko Carstens wrote:
> On Thu, Mar 20, 2014 at 11:03:14AM +0100, Geert Uytterhoeven wrote:
> > On Thu, Mar 6, 2014 at 4:51 PM, Heiko Carstens
> > <heiko.carstens@de.ibm.com> wrote:
> > > For architecture dependent compat syscalls in common code an architecture
> > > must define something like __ARCH_WANT_<WHATEVER> if it wants to use the
> > > code.
> > > This however is not true for compat_sys_getdents64 for which architectures
> > > must define __ARCH_OMIT_COMPAT_SYS_GETDENTS64 if they do not want the code.
> > >
> > > This leads to the situation where all architectures, except mips, get the
> > > compat code but only x86_64, arm64 and the generic syscall architectures
> > > actually use it.
> > >
> > > So invert the logic, so that architectures actively must do something to
> > > get the compat code.
> > >
> > > This way a couple of architectures get rid of otherwise dead code.
> > >
> > > Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> >
> > Is this the cause of the tilegx_defconfig failures in -next?
> >
> > include/uapi/asm-generic/unistd.h:195:1: error:
> > 'compat_sys_getdents64' undeclared here (not in a function)
> > make[3]: *** [arch/tile/kernel/compat.o] Error 1
> >
> > http://kisskb.ellerman.id.au/kisskb/buildresult/10808012/
>
> Yes. That's unexpected header include order from my side...
> Looking into it. Thanks!
I think the simple patch below should fix the compile error.
Unfortunately I don't have a tile cross compiler.
But at least s390, x86_64, sparc64 and mip64 still compile, so it
looks like I'm not immediatly lost in include order hell.
(pushed to the s390 compat branch, so the next linux-next release
should contain the fix)
>From f80f4cd232c56f491ecbeea3dd0627598b59b61e Mon Sep 17 00:00:00 2001
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Date: Thu, 20 Mar 2014 15:30:14 +0100
Subject: [PATCH] compat: include linux/unistd.h within linux/compat.h
linux/compat.h does not include linux/unistd.h but the compat.h header
file contains various conditional
#ifdef __ARCH_WANT_COMPAT_...
asmlinkage long compat...()
#endif
compat system call function declarations.
If linux/unistd.h isn't included it depends on previous includes if those
__ARCH_WANT_COMPAT_... defines are defined or not. So add an additional
linux/unistd.h include.
Should fix this compile error on tile:
include/uapi/asm-generic/unistd.h:195:1: error: 'compat_sys_getdents64' undeclared
make[3]: *** [arch/tile/kernel/compat.o] Error 1
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
include/linux/compat.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 7c765624b7ef..01c0aa57ccec 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -14,6 +14,7 @@
#include <linux/if.h>
#include <linux/fs.h>
#include <linux/aio_abi.h> /* for aio_context_t */
+#include <linux/unistd.h>
#include <asm/compat.h>
#include <asm/siginfo.h>
--
1.8.5.5
next prev parent reply other threads:[~2014-03-20 14:51 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 15:51 [PATCH/RFC 00/16] compat: convert to COMPAT_SYSCALL_DEFINE Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 Heiko Carstens
2014-03-20 10:03 ` Geert Uytterhoeven
2014-03-20 11:33 ` Heiko Carstens
2014-03-20 14:51 ` Heiko Carstens [this message]
2014-03-20 14:51 ` Heiko Carstens
2014-03-20 15:20 ` Geert Uytterhoeven
2014-03-20 15:29 ` Chris Metcalf
2014-03-06 15:51 ` [PATCH/RFC 02/16] compat: add COMPAT_SYSCALL_DEFINE0 macro Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 03/16] ipc/compat_sys_msgrcv: change msgtyp type from long to compat_long_t Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 04/16] fs/compat: optional preadv64/pwrite64 compat system calls Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 05/16] kernel/compat: convert to COMPAT_SYSCALL_DEFINE Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 06/16] net/compat: " Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 07/16] mm/compat: " Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 08/16] security/compat: " Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 09/16] fs/compat: " Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 10/16] ipc/compat: " Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 11/16] fs/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 12/16] ipc/compat: " Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 13/16] net/compat: " Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 14/16] kexec/compat: " Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 15/16] mm/compat: " Heiko Carstens
2014-03-06 15:51 ` [PATCH/RFC 16/16] s390/compat: build error for large compat syscall args Heiko Carstens
2014-03-06 16:14 ` [PATCH/RFC 00/16] compat: convert to COMPAT_SYSCALL_DEFINE Geert Uytterhoeven
2014-03-12 19:45 ` Heiko Carstens
2014-03-13 7:32 ` Heiko Carstens
2014-03-13 19:09 ` Mark Brown
2014-03-17 6:02 ` Stephen Rothwell
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=20140320145128.GE4403@osiris \
--to=heiko.carstens@de.ibm.com \
--cc=cmetcalf@tilera.com \
--cc=geert@linux-m68k.org \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
/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.