* Re: [PATCH/RFC 00/16] compat: convert to COMPAT_SYSCALL_DEFINE [not found] <1394121083-2507-1-git-send-email-heiko.carstens@de.ibm.com> @ 2014-03-12 19:45 ` Heiko Carstens 2014-03-13 7:32 ` Heiko Carstens 2014-03-17 6:02 ` Stephen Rothwell [not found] ` <1394121083-2507-2-git-send-email-heiko.carstens@de.ibm.com> 1 sibling, 2 replies; 9+ messages in thread From: Heiko Carstens @ 2014-03-12 19:45 UTC (permalink / raw) To: Stephen Rothwell Cc: linux-next, Al Viro, H. Peter Anvin, Ingo Molnar, Thomas Gleixner, linux-arch, Martin Schwidefsky, H. Peter Anvin Hi Stephen, since nobody objected to the compat changes I described below, could you please add the tree git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git compat to linux-next? Thanks, Heiko [full quote below] On Thu, Mar 06, 2014 at 04:51:07PM +0100, Heiko Carstens wrote: > Hi all, > > this patch series converts all common code compat syscalls to use the new > COMPAT_SYSCALL_DEFINE macros introduced by Al Viro. > My main motivation is to get rid of the 1400+ line s390 specific assembler > file which contains code for each and every compat system call to perform > proper sign, zero and pointer conversion. > > Eventually the conversion is pretty trivial, except that for a couple of > compat syscalls argument types needed to be changed from e.g. 'long' to > 'compat_long_t' so that the COMPAT_SYSCALL_DEFINE macro can perform > proper sign extension from the 32 bit compat system call argument like > it was orginally passed in from user space. > > The patch series keeps the "noop" conversions (5-10) and those with type > changes (11-15) separate. > > Patches 1-4 are just additional cleanup patches. > > Especially I'd like to know from somebody familiar with the x32 ABI if > any of the type changes break x32? > I intentionally did not touch the preadv64 and pwritev64 compat system > calls since they have been explicitly added to allow x32 pass 64 bit > arguments. > However it's not obvious to me if any of my other compat system call > changes break x32 or not. > > FWIW, this patch series omits the whole s390 patches, since I assume > they are not very interesting to non-s390 people ;) > > The complete series (including the s390 only patches) is available at > > git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git compat > > If nobody objects I'd like to have the branch integrated into linux-next > to get some additional testing. > > So, please let me know if I screwed up something! :) > > Thanks, > Heiko > > Heiko Carstens (16): > compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 > compat: add COMPAT_SYSCALL_DEFINE0 macro > ipc/compat_sys_msgrcv: change msgtyp type from long to compat_long_t > fs/compat: optional preadv64/pwrite64 compat system calls > kernel/compat: convert to COMPAT_SYSCALL_DEFINE > net/compat: convert to COMPAT_SYSCALL_DEFINE > mm/compat: convert to COMPAT_SYSCALL_DEFINE > security/compat: convert to COMPAT_SYSCALL_DEFINE > fs/compat: convert to COMPAT_SYSCALL_DEFINE > ipc/compat: convert to COMPAT_SYSCALL_DEFINE > fs/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > ipc/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > net/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > kexec/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > mm/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > s390/compat: build error for large compat syscall args > > (diffstat below includes the s390 only patches) > > arch/arm64/include/asm/unistd.h | 1 + > arch/mips/include/asm/unistd.h | 1 - > arch/s390/include/asm/compat.h | 6 +- > arch/s390/kernel/compat_linux.c | 116 +-- > arch/s390/kernel/compat_linux.h | 81 +-- > arch/s390/kernel/compat_signal.c | 4 +- > arch/s390/kernel/compat_wrapper.S | 1425 ------------------------------------- > arch/s390/kernel/compat_wrapper.c | 209 ++++++ > arch/s390/kernel/entry.h | 6 +- > arch/s390/kernel/syscalls.S | 504 ++++++------- > arch/x86/include/asm/unistd.h | 3 + > fs/compat.c | 121 ++-- > fs/compat_ioctl.c | 5 +- > fs/exec.c | 6 +- > fs/read_write.c | 36 +- > include/linux/compat.h | 62 +- > include/linux/kexec.h | 6 - > include/linux/syscalls.h | 2 + > include/uapi/asm-generic/unistd.h | 1 + > ipc/compat.c | 13 +- > ipc/compat_mq.c | 32 +- > kernel/compat.c | 100 +-- > kernel/kexec.c | 8 +- > kernel/ptrace.c | 4 +- > mm/mempolicy.c | 18 +- > mm/process_vm_access.c | 26 +- > net/compat.c | 32 +- > security/keys/compat.c | 4 +- > 28 files changed, 828 insertions(+), 2004 deletions(-) > > -- > 1.8.4.5 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH/RFC 00/16] compat: convert to COMPAT_SYSCALL_DEFINE 2014-03-12 19:45 ` [PATCH/RFC 00/16] compat: convert to COMPAT_SYSCALL_DEFINE Heiko Carstens @ 2014-03-13 7:32 ` Heiko Carstens 2014-03-13 19:09 ` Mark Brown 2014-03-17 6:02 ` Stephen Rothwell 1 sibling, 1 reply; 9+ messages in thread From: Heiko Carstens @ 2014-03-13 7:32 UTC (permalink / raw) To: Mark Brown; +Cc: linux-next Hi Mark, I obviously missed that you are currently handling linux-next, so I sent my request to Stephen yesterday :) Could you add the git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git compat to linux-next, please? Thanks, Heiko (sorry for top-posting) On Wed, Mar 12, 2014 at 08:45:26PM +0100, Heiko Carstens wrote: > Hi Stephen, > > since nobody objected to the compat changes I described below, could you > please add the tree > > git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git compat > > to linux-next? > > Thanks, > Heiko > > [full quote below] > > On Thu, Mar 06, 2014 at 04:51:07PM +0100, Heiko Carstens wrote: > > Hi all, > > > > this patch series converts all common code compat syscalls to use the new > > COMPAT_SYSCALL_DEFINE macros introduced by Al Viro. > > My main motivation is to get rid of the 1400+ line s390 specific assembler > > file which contains code for each and every compat system call to perform > > proper sign, zero and pointer conversion. > > > > Eventually the conversion is pretty trivial, except that for a couple of > > compat syscalls argument types needed to be changed from e.g. 'long' to > > 'compat_long_t' so that the COMPAT_SYSCALL_DEFINE macro can perform > > proper sign extension from the 32 bit compat system call argument like > > it was orginally passed in from user space. > > > > The patch series keeps the "noop" conversions (5-10) and those with type > > changes (11-15) separate. > > > > Patches 1-4 are just additional cleanup patches. > > > > Especially I'd like to know from somebody familiar with the x32 ABI if > > any of the type changes break x32? > > I intentionally did not touch the preadv64 and pwritev64 compat system > > calls since they have been explicitly added to allow x32 pass 64 bit > > arguments. > > However it's not obvious to me if any of my other compat system call > > changes break x32 or not. > > > > FWIW, this patch series omits the whole s390 patches, since I assume > > they are not very interesting to non-s390 people ;) > > > > The complete series (including the s390 only patches) is available at > > > > git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git compat > > > > If nobody objects I'd like to have the branch integrated into linux-next > > to get some additional testing. > > > > So, please let me know if I screwed up something! :) > > > > Thanks, > > Heiko > > > > Heiko Carstens (16): > > compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 > > compat: add COMPAT_SYSCALL_DEFINE0 macro > > ipc/compat_sys_msgrcv: change msgtyp type from long to compat_long_t > > fs/compat: optional preadv64/pwrite64 compat system calls > > kernel/compat: convert to COMPAT_SYSCALL_DEFINE > > net/compat: convert to COMPAT_SYSCALL_DEFINE > > mm/compat: convert to COMPAT_SYSCALL_DEFINE > > security/compat: convert to COMPAT_SYSCALL_DEFINE > > fs/compat: convert to COMPAT_SYSCALL_DEFINE > > ipc/compat: convert to COMPAT_SYSCALL_DEFINE > > fs/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > > ipc/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > > net/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > > kexec/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > > mm/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types > > s390/compat: build error for large compat syscall args > > > > (diffstat below includes the s390 only patches) > > > > arch/arm64/include/asm/unistd.h | 1 + > > arch/mips/include/asm/unistd.h | 1 - > > arch/s390/include/asm/compat.h | 6 +- > > arch/s390/kernel/compat_linux.c | 116 +-- > > arch/s390/kernel/compat_linux.h | 81 +-- > > arch/s390/kernel/compat_signal.c | 4 +- > > arch/s390/kernel/compat_wrapper.S | 1425 ------------------------------------- > > arch/s390/kernel/compat_wrapper.c | 209 ++++++ > > arch/s390/kernel/entry.h | 6 +- > > arch/s390/kernel/syscalls.S | 504 ++++++------- > > arch/x86/include/asm/unistd.h | 3 + > > fs/compat.c | 121 ++-- > > fs/compat_ioctl.c | 5 +- > > fs/exec.c | 6 +- > > fs/read_write.c | 36 +- > > include/linux/compat.h | 62 +- > > include/linux/kexec.h | 6 - > > include/linux/syscalls.h | 2 + > > include/uapi/asm-generic/unistd.h | 1 + > > ipc/compat.c | 13 +- > > ipc/compat_mq.c | 32 +- > > kernel/compat.c | 100 +-- > > kernel/kexec.c | 8 +- > > kernel/ptrace.c | 4 +- > > mm/mempolicy.c | 18 +- > > mm/process_vm_access.c | 26 +- > > net/compat.c | 32 +- > > security/keys/compat.c | 4 +- > > 28 files changed, 828 insertions(+), 2004 deletions(-) > > > > -- > > 1.8.4.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-next" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH/RFC 00/16] compat: convert to COMPAT_SYSCALL_DEFINE 2014-03-13 7:32 ` Heiko Carstens @ 2014-03-13 19:09 ` Mark Brown 0 siblings, 0 replies; 9+ messages in thread From: Mark Brown @ 2014-03-13 19:09 UTC (permalink / raw) To: Heiko Carstens; +Cc: linux-next [-- Attachment #1: Type: text/plain, Size: 2062 bytes --] On Thu, Mar 13, 2014 at 08:32:30AM +0100, Heiko Carstens wrote: > I obviously missed that you are currently handling linux-next, so I sent my > request to Stephen yesterday :) > Could you add the > git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git compat > to linux-next, please? OK, I think I did this but it's entirely possible I'm not driving the scripts correctly so things might explode. Take a look tomorrow :) You should also make sure this is handed over to Stephen when he's back from vacation next week. Thanks for adding your subsystem tree as a participant of linux-next. As you may know, this is not a judgment of your code. The purpose of linux-next is for integration testing and to lower the impact of conflicts between subsystems in the next merge window. You will need to ensure that the patches/commits in your tree/series have been: * submitted under GPL v2 (or later) and include the Contributor's Signed-off-by, * posted to the relevant mailing list, * reviewed by you (or another maintainer of your subsystem tree), * successfully unit tested, and * destined for the current or next Linux merge window. Basically, this should be just what you would send to Linus (or ask him to fetch). It is allowed to be rebased if you deem it necessary. Legal Stuff: By participating in linux-next, your subsystem tree contributions are public and will be included in the linux-next trees. You may be sent e-mail messages indicating errors or other issues when the patches/commits from your subsystem tree are merged and tested in linux-next. These messages may also be cross-posted to the linux-next mailing list, the linux-kernel mailing list, etc. The linux-next tree project, Linaro (my employer) and IBM (Stephen's employer) make no warranties regarding the linux-next project, the testing procedures, the results, the e-mails, etc. If you don't agree to these ground rules, let me know and I'll remove your tree from participation in linux-next. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH/RFC 00/16] compat: convert to COMPAT_SYSCALL_DEFINE 2014-03-12 19:45 ` [PATCH/RFC 00/16] compat: convert to COMPAT_SYSCALL_DEFINE Heiko Carstens 2014-03-13 7:32 ` Heiko Carstens @ 2014-03-17 6:02 ` Stephen Rothwell 1 sibling, 0 replies; 9+ messages in thread From: Stephen Rothwell @ 2014-03-17 6:02 UTC (permalink / raw) To: Heiko Carstens Cc: linux-next, Al Viro, H. Peter Anvin, Ingo Molnar, Thomas Gleixner, linux-arch, Martin Schwidefsky, H. Peter Anvin, Mark Brown [-- Attachment #1: Type: text/plain, Size: 1917 bytes --] Hi Heiko, On Wed, 12 Mar 2014 20:45:26 +0100 Heiko Carstens <heiko.carstens@de.ibm.com> wrote: > > since nobody objected to the compat changes I described below, could you > please add the tree > > git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git compat > > to linux-next? Mark added this the other day and I will add it to my tree from today. Thanks for adding your subsystem tree as a participant of linux-next. As you may know, this is not a judgment of your code. The purpose of linux-next is for integration testing and to lower the impact of conflicts between subsystems in the next merge window. You will need to ensure that the patches/commits in your tree/series have been: * submitted under GPL v2 (or later) and include the Contributor's Signed-off-by, * posted to the relevant mailing list, * reviewed by you (or another maintainer of your subsystem tree), * successfully unit tested, and * destined for the current or next Linux merge window. Basically, this should be just what you would send to Linus (or ask him to fetch). It is allowed to be rebased if you deem it necessary. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au Legal Stuff: By participating in linux-next, your subsystem tree contributions are public and will be included in the linux-next trees. You may be sent e-mail messages indicating errors or other issues when the patches/commits from your subsystem tree are merged and tested in linux-next. These messages may also be cross-posted to the linux-next mailing list, the linux-kernel mailing list, etc. The linux-next tree project and IBM (my employer) make no warranties regarding the linux-next project, the testing procedures, the results, the e-mails, etc. If you don't agree to these ground rules, let me know and I'll remove your tree from participation in linux-next. [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <1394121083-2507-2-git-send-email-heiko.carstens@de.ibm.com>]
* Re: [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 [not found] ` <1394121083-2507-2-git-send-email-heiko.carstens@de.ibm.com> @ 2014-03-20 10:03 ` Geert Uytterhoeven 2014-03-20 11:33 ` Heiko Carstens 0 siblings, 1 reply; 9+ messages in thread From: Geert Uytterhoeven @ 2014-03-20 10:03 UTC (permalink / raw) To: Heiko Carstens Cc: Al Viro, H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Linux-Arch, Martin Schwidefsky, Linux-Next, Chris Metcalf 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/ > --- > arch/arm64/include/asm/unistd.h | 1 + > arch/mips/include/asm/unistd.h | 1 - > arch/x86/include/asm/unistd.h | 1 + > fs/compat.c | 4 ++-- > include/linux/compat.h | 2 ++ > include/uapi/asm-generic/unistd.h | 1 + > 6 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h > index 82ce217e94cf..a4654c656a1e 100644 > --- a/arch/arm64/include/asm/unistd.h > +++ b/arch/arm64/include/asm/unistd.h > @@ -14,6 +14,7 @@ > * along with this program. If not, see <http://www.gnu.org/licenses/>. > */ > #ifdef CONFIG_COMPAT > +#define __ARCH_WANT_COMPAT_SYS_GETDENTS64 > #define __ARCH_WANT_COMPAT_STAT64 > #define __ARCH_WANT_SYS_GETHOSTNAME > #define __ARCH_WANT_SYS_PAUSE > diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h > index 4d3b92886665..413d6c612bec 100644 > --- a/arch/mips/include/asm/unistd.h > +++ b/arch/mips/include/asm/unistd.h > @@ -24,7 +24,6 @@ > > #ifndef __ASSEMBLY__ > > -#define __ARCH_OMIT_COMPAT_SYS_GETDENTS64 > #define __ARCH_WANT_OLD_READDIR > #define __ARCH_WANT_SYS_ALARM > #define __ARCH_WANT_SYS_GETHOSTNAME > diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h > index c2a48139c340..f4b5795d7e34 100644 > --- a/arch/x86/include/asm/unistd.h > +++ b/arch/x86/include/asm/unistd.h > @@ -23,6 +23,7 @@ > # include <asm/unistd_64.h> > # include <asm/unistd_64_x32.h> > # define __ARCH_WANT_COMPAT_SYS_TIME > +# define __ARCH_WANT_COMPAT_SYS_GETDENTS64 > > # endif > > diff --git a/fs/compat.c b/fs/compat.c > index 6af20de2c1a3..0095a6978eef 100644 > --- a/fs/compat.c > +++ b/fs/compat.c > @@ -981,7 +981,7 @@ asmlinkage long compat_sys_getdents(unsigned int fd, > return error; > } > > -#ifndef __ARCH_OMIT_COMPAT_SYS_GETDENTS64 > +#ifdef __ARCH_WANT_COMPAT_SYS_GETDENTS64 > > struct compat_getdents_callback64 { > struct dir_context ctx; > @@ -1066,7 +1066,7 @@ asmlinkage long compat_sys_getdents64(unsigned int fd, > fdput(f); > return error; > } > -#endif /* ! __ARCH_OMIT_COMPAT_SYS_GETDENTS64 */ > +#endif /* __ARCH_WANT_COMPAT_SYS_GETDENTS64 */ > > /* > * Exactly like fs/open.c:sys_open(), except that it doesn't set the > diff --git a/include/linux/compat.h b/include/linux/compat.h > index 3f448c65511b..beded18f992d 100644 > --- a/include/linux/compat.h > +++ b/include/linux/compat.h > @@ -502,9 +502,11 @@ asmlinkage long compat_sys_old_readdir(unsigned int fd, > asmlinkage long compat_sys_getdents(unsigned int fd, > struct compat_linux_dirent __user *dirent, > unsigned int count); > +#ifdef __ARCH_WANT_COMPAT_SYS_GETDENTS64 > asmlinkage long compat_sys_getdents64(unsigned int fd, > struct linux_dirent64 __user *dirent, > unsigned int count); > +#endif > asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *, > unsigned int nr_segs, unsigned int flags); > asmlinkage long compat_sys_open(const char __user *filename, int flags, > diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h > index dde8041f40d2..6db66783d268 100644 > --- a/include/uapi/asm-generic/unistd.h > +++ b/include/uapi/asm-generic/unistd.h > @@ -191,6 +191,7 @@ __SYSCALL(__NR_quotactl, sys_quotactl) > > /* fs/readdir.c */ > #define __NR_getdents64 61 > +#define __ARCH_WANT_COMPAT_SYS_GETDENTS64 > __SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64) > > /* fs/read_write.c */ > -- > 1.8.4.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-arch" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 2014-03-20 10:03 ` [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 Geert Uytterhoeven @ 2014-03-20 11:33 ` Heiko Carstens 2014-03-20 14:51 ` Heiko Carstens 0 siblings, 1 reply; 9+ messages in thread From: Heiko Carstens @ 2014-03-20 11:33 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Al Viro, H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Linux-Arch, Martin Schwidefsky, Linux-Next, Chris Metcalf 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! ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 2014-03-20 11:33 ` Heiko Carstens @ 2014-03-20 14:51 ` Heiko Carstens 2014-03-20 15:20 ` Geert Uytterhoeven 2014-03-20 15:29 ` Chris Metcalf 0 siblings, 2 replies; 9+ messages in thread From: Heiko Carstens @ 2014-03-20 14:51 UTC (permalink / raw) To: Geert Uytterhoeven, Al Viro, H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Linux-Arch, Martin Schwidefsky, Linux-Next, Chris Metcalf 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 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 2014-03-20 14:51 ` Heiko Carstens @ 2014-03-20 15:20 ` Geert Uytterhoeven 2014-03-20 15:29 ` Chris Metcalf 1 sibling, 0 replies; 9+ messages in thread From: Geert Uytterhoeven @ 2014-03-20 15:20 UTC (permalink / raw) To: Heiko Carstens Cc: Al Viro, H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Linux-Arch, Martin Schwidefsky, Linux-Next, Chris Metcalf Hi Heiko, On Thu, Mar 20, 2014 at 3:51 PM, Heiko Carstens <heiko.carstens@de.ibm.com> wrote: > I think the simple patch below should fix the compile error. Thanks! > Unfortunately I don't have a tile cross compiler. Unfortunately https://www.kernel.org/pub/tools/crosstool/ doesn't have one for s390 hosts, only for ia32 and amd64. > 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> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 2014-03-20 14:51 ` Heiko Carstens 2014-03-20 15:20 ` Geert Uytterhoeven @ 2014-03-20 15:29 ` Chris Metcalf 1 sibling, 0 replies; 9+ messages in thread From: Chris Metcalf @ 2014-03-20 15:29 UTC (permalink / raw) To: Heiko Carstens, Geert Uytterhoeven, Al Viro, H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Linux-Arch, Martin Schwidefsky, Linux-Next On 3/20/2014 10:51 AM, Heiko Carstens wrote: > 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> This does fix the error on tilegx. Thanks. Acked-by: Chris Metcalf <cmetcalf@tilera.com> -- Chris Metcalf, Tilera Corp. http://www.tilera.com ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-03-20 15:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1394121083-2507-1-git-send-email-heiko.carstens@de.ibm.com>
2014-03-12 19:45 ` [PATCH/RFC 00/16] compat: convert to COMPAT_SYSCALL_DEFINE Heiko Carstens
2014-03-13 7:32 ` Heiko Carstens
2014-03-13 19:09 ` Mark Brown
2014-03-17 6:02 ` Stephen Rothwell
[not found] ` <1394121083-2507-2-git-send-email-heiko.carstens@de.ibm.com>
2014-03-20 10:03 ` [PATCH/RFC 01/16] compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 Geert Uytterhoeven
2014-03-20 11:33 ` Heiko Carstens
2014-03-20 14:51 ` Heiko Carstens
2014-03-20 15:20 ` Geert Uytterhoeven
2014-03-20 15:29 ` Chris Metcalf
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).