* [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"
[not found] <bb6d25c6baae315d05b571d8c508f0e8fa90027c.1567188299.git.msuchanek@suse.de>
@ 2019-08-30 19:46 ` Michal Suchanek
2019-08-30 19:54 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Michal Suchanek @ 2019-08-30 19:46 UTC (permalink / raw)
To: linux-arch
Cc: Rich Felker, linux-sh, Benjamin Herrenschmidt, Heiko Carstens,
linux-mips, James E.J. Bottomley, Max Filippov, Guo Ren,
H. Peter Anvin, sparclinux, Vincenzo Frascino, Will Deacon,
linux-s390, Arnd Bergmann, Yoshinori Sato, Michael Ellerman,
Helge Deller, x86, Russell King, Christian Borntraeger,
Ingo Molnar, Geert Uytterhoeven, linux-arm-kernel,
Catalin Marinas, James Hogan, Firoz Khan, Michal Suchanek,
linux-xtensa, Vasily Gorbik, linux-m68k, Borislav Petkov,
Alexander Viro, David Howells, Thomas Gleixner, Christian Brauner,
Chris Zankel, Michal Simek, linux-parisc, Greg Kroah-Hartman,
linux-kernel, Ralf Baechle, Paul Burton, linux-fsdevel,
Paul Mackerras, linuxppc-dev, David S. Miller
This reverts commit caf6f9c8a326cffd1d4b3ff3f1cfba75d159d70b.
Maybe it was needed after all.
When CONFIG_COMPAT is disabled on ppc64 the kernel does not build.
There is resistance to both removing the llseek syscall from the 64bit
syscall tables and building the llseek interface unconditionally.
Link: https://lore.kernel.org/lkml/20190828151552.GA16855@infradead.org/
Link: https://lore.kernel.org/lkml/20190829214319.498c7de2@naga/
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
arch/arm/include/asm/unistd.h | 1 +
arch/arm64/include/asm/unistd.h | 1 +
arch/csky/include/asm/unistd.h | 2 +-
arch/m68k/include/asm/unistd.h | 1 +
arch/microblaze/include/asm/unistd.h | 1 +
arch/mips/include/asm/unistd.h | 1 +
arch/parisc/include/asm/unistd.h | 1 +
arch/powerpc/include/asm/unistd.h | 1 +
arch/s390/include/asm/unistd.h | 1 +
arch/sh/include/asm/unistd.h | 1 +
arch/sparc/include/asm/unistd.h | 1 +
arch/x86/include/asm/unistd.h | 1 +
arch/xtensa/include/asm/unistd.h | 1 +
fs/read_write.c | 2 +-
include/asm-generic/unistd.h | 12 ++++++++++++
15 files changed, 26 insertions(+), 2 deletions(-)
create mode 100644 include/asm-generic/unistd.h
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 3676e82cf95c..e35ec8100a21 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -18,6 +18,7 @@
#define __ARCH_WANT_SYS_GETHOSTNAME
#define __ARCH_WANT_SYS_PAUSE
#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
index 2629a68b8724..2c9d8d91e347 100644
--- a/arch/arm64/include/asm/unistd.h
+++ b/arch/arm64/include/asm/unistd.h
@@ -7,6 +7,7 @@
#define __ARCH_WANT_SYS_GETHOSTNAME
#define __ARCH_WANT_SYS_PAUSE
#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
diff --git a/arch/csky/include/asm/unistd.h b/arch/csky/include/asm/unistd.h
index da7a18295615..bee8ba8309e7 100644
--- a/arch/csky/include/asm/unistd.h
+++ b/arch/csky/include/asm/unistd.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
-#include <uapi/asm/unistd.h>
+#include <asm-generic/unistd.h>
#define NR_syscalls (__NR_syscalls)
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index 2e0047cf86f8..54c04eb4495a 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -21,6 +21,7 @@
#define __ARCH_WANT_SYS_SOCKETCALL
#define __ARCH_WANT_SYS_FADVISE64
#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLD_MMAP
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h
index d79d35ac6253..c5fcbce1f997 100644
--- a/arch/microblaze/include/asm/unistd.h
+++ b/arch/microblaze/include/asm/unistd.h
@@ -27,6 +27,7 @@
#define __ARCH_WANT_SYS_SOCKETCALL
#define __ARCH_WANT_SYS_FADVISE64
#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
/* #define __ARCH_WANT_SYS_OLD_GETRLIMIT */
#define __ARCH_WANT_SYS_OLDUMOUNT
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h
index 071053ece677..8e8c7cab95ca 100644
--- a/arch/mips/include/asm/unistd.h
+++ b/arch/mips/include/asm/unistd.h
@@ -38,6 +38,7 @@
#define __ARCH_WANT_SYS_WAITPID
#define __ARCH_WANT_SYS_SOCKETCALL
#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_UNAME
#define __ARCH_WANT_SYS_OLDUMOUNT
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h
index cd438e4150f6..29bd46381f2e 100644
--- a/arch/parisc/include/asm/unistd.h
+++ b/arch/parisc/include/asm/unistd.h
@@ -159,6 +159,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
#define __ARCH_WANT_SYS_SOCKETCALL
#define __ARCH_WANT_SYS_FADVISE64
#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index b0720c7c3fcf..700fcdac2e3c 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -31,6 +31,7 @@
#define __ARCH_WANT_SYS_SOCKETCALL
#define __ARCH_WANT_SYS_FADVISE64
#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLD_UNAME
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h
index 9e9f75ef046a..52e9e2fe3768 100644
--- a/arch/s390/include/asm/unistd.h
+++ b/arch/s390/include/asm/unistd.h
@@ -21,6 +21,7 @@
#define __ARCH_WANT_SYS_IPC
#define __ARCH_WANT_SYS_FADVISE64
#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLD_MMAP
diff --git a/arch/sh/include/asm/unistd.h b/arch/sh/include/asm/unistd.h
index 9c7d9d9999c6..4899b6b72f1a 100644
--- a/arch/sh/include/asm/unistd.h
+++ b/arch/sh/include/asm/unistd.h
@@ -22,6 +22,7 @@
# define __ARCH_WANT_SYS_SOCKETCALL
# define __ARCH_WANT_SYS_FADVISE64
# define __ARCH_WANT_SYS_GETPGRP
+# define __ARCH_WANT_SYS_LLSEEK
# define __ARCH_WANT_SYS_NICE
# define __ARCH_WANT_SYS_OLD_GETRLIMIT
# define __ARCH_WANT_SYS_OLD_UNAME
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h
index 1e66278ba4a5..7edfc208e2af 100644
--- a/arch/sparc/include/asm/unistd.h
+++ b/arch/sparc/include/asm/unistd.h
@@ -36,6 +36,7 @@
#define __ARCH_WANT_SYS_SOCKETCALL
#define __ARCH_WANT_SYS_FADVISE64
#define __ARCH_WANT_SYS_GETPGRP
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING
diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h
index 097589753fec..9e5a1748b4ce 100644
--- a/arch/x86/include/asm/unistd.h
+++ b/arch/x86/include/asm/unistd.h
@@ -39,6 +39,7 @@
# define __ARCH_WANT_SYS_FADVISE64
# define __ARCH_WANT_SYS_GETHOSTNAME
# define __ARCH_WANT_SYS_GETPGRP
+# define __ARCH_WANT_SYS_LLSEEK
# define __ARCH_WANT_SYS_NICE
# define __ARCH_WANT_SYS_OLDUMOUNT
# define __ARCH_WANT_SYS_OLD_GETRLIMIT
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h
index b52236245e51..9fd236a7825e 100644
--- a/arch/xtensa/include/asm/unistd.h
+++ b/arch/xtensa/include/asm/unistd.h
@@ -9,6 +9,7 @@
#define __ARCH_WANT_NEW_STAT
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_UTIME32
+#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_GETPGRP
#define NR_syscalls __NR_syscalls
diff --git a/fs/read_write.c b/fs/read_write.c
index 5bbf587f5bc1..2f3c4bb138c4 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -331,7 +331,7 @@ COMPAT_SYSCALL_DEFINE3(lseek, unsigned int, fd, compat_off_t, offset, unsigned i
}
#endif
-#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
+#ifdef __ARCH_WANT_SYS_LLSEEK
SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
unsigned long, offset_low, loff_t __user *, result,
unsigned int, whence)
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
new file mode 100644
index 000000000000..ea74eca8463f
--- /dev/null
+++ b/include/asm-generic/unistd.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <uapi/asm-generic/unistd.h>
+#include <linux/export.h>
+
+/*
+ * These are required system calls, we should
+ * invert the logic eventually and let them
+ * be selected by default.
+ */
+#if __BITS_PER_LONG == 32
+#define __ARCH_WANT_SYS_LLSEEK
+#endif
--
2.22.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"
2019-08-30 19:46 ` [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro" Michal Suchanek
@ 2019-08-30 19:54 ` Arnd Bergmann
2019-08-30 20:13 ` Michal Suchánek
2019-08-31 8:38 ` Christoph Hellwig
0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-08-30 19:54 UTC (permalink / raw)
To: Michal Suchanek
Cc: Rich Felker, Linux-sh list, Benjamin Herrenschmidt,
Heiko Carstens, linux-mips, James E.J. Bottomley, Max Filippov,
Guo Ren, H. Peter Anvin, sparclinux, Vincenzo Frascino,
Will Deacon, linux-arch, linux-s390, Yoshinori Sato,
Michael Ellerman, Helge Deller, the arch/x86 maintainers,
Russell King, Christian Borntraeger, Ingo Molnar,
Geert Uytterhoeven, Linux ARM, Catalin Marinas, James Hogan,
Firoz Khan, linux-xtensa, Vasily Gorbik, linux-m68k,
Borislav Petkov, Alexander Viro, David Howells, Thomas Gleixner,
Christian Brauner, Chris Zankel, Michal Simek, Parisc List,
Greg Kroah-Hartman, Linux Kernel Mailing List, Ralf Baechle,
Paul Burton, Linux FS-devel Mailing List, Paul Mackerras,
linuxppc-dev, David S. Miller
On Fri, Aug 30, 2019 at 9:46 PM Michal Suchanek <msuchanek@suse.de> wrote:
>
> This reverts commit caf6f9c8a326cffd1d4b3ff3f1cfba75d159d70b.
>
> Maybe it was needed after all.
>
> When CONFIG_COMPAT is disabled on ppc64 the kernel does not build.
>
> There is resistance to both removing the llseek syscall from the 64bit
> syscall tables and building the llseek interface unconditionally.
>
> Link: https://lore.kernel.org/lkml/20190828151552.GA16855@infradead.org/
> Link: https://lore.kernel.org/lkml/20190829214319.498c7de2@naga/
>
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
This seems like the right idea in principle.
> index 5bbf587f5bc1..2f3c4bb138c4 100644
> --- a/fs/read_write.c
> +++ b/fs/read_write.c
> @@ -331,7 +331,7 @@ COMPAT_SYSCALL_DEFINE3(lseek, unsigned int, fd, compat_off_t, offset, unsigned i
> }
> #endif
>
> -#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
> +#ifdef __ARCH_WANT_SYS_LLSEEK
> SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
> unsigned long, offset_low, loff_t __user *, result,
> unsigned int, whence)
However, only reverting the patch will now break all newly added
32-bit architectures that don't define __ARCH_WANT_SYS_LLSEEK:
at least nds32 and riscv32 come to mind, not sure if there is another.
I think the easiest way however would be to combine the two checks
above and make it
#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) ||
defined(__ARCH_WANT_SYS_LLSEEK)
and then only set __ARCH_WANT_SYS_LLSEEK for powerpc.
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"
2019-08-30 19:54 ` Arnd Bergmann
@ 2019-08-30 20:13 ` Michal Suchánek
2019-08-30 20:37 ` Arnd Bergmann
2019-08-31 8:38 ` Christoph Hellwig
1 sibling, 1 reply; 6+ messages in thread
From: Michal Suchánek @ 2019-08-30 20:13 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rich Felker, Linux-sh list, Benjamin Herrenschmidt,
Heiko Carstens, linux-mips, James E.J. Bottomley, Max Filippov,
Guo Ren, H. Peter Anvin, sparclinux, Vincenzo Frascino,
Will Deacon, linux-arch, linux-s390, Yoshinori Sato,
Michael Ellerman, Helge Deller, the arch/x86 maintainers,
Russell King, Christian Borntraeger, Ingo Molnar,
Geert Uytterhoeven, Linux ARM, Catalin Marinas, James Hogan,
Firoz Khan, linux-xtensa, Vasily Gorbik, linux-m68k,
Borislav Petkov, Alexander Viro, David Howells, Thomas Gleixner,
Christian Brauner, Chris Zankel, Michal Simek, Parisc List,
Greg Kroah-Hartman, Linux Kernel Mailing List, Ralf Baechle,
Paul Burton, Linux FS-devel Mailing List, Paul Mackerras,
linuxppc-dev, David S. Miller
On Fri, 30 Aug 2019 21:54:43 +0200
Arnd Bergmann <arnd@arndb.de> wrote:
> On Fri, Aug 30, 2019 at 9:46 PM Michal Suchanek <msuchanek@suse.de> wrote:
> >
> > This reverts commit caf6f9c8a326cffd1d4b3ff3f1cfba75d159d70b.
> >
> > Maybe it was needed after all.
> >
> > When CONFIG_COMPAT is disabled on ppc64 the kernel does not build.
> >
> > There is resistance to both removing the llseek syscall from the 64bit
> > syscall tables and building the llseek interface unconditionally.
> >
> > Link: https://lore.kernel.org/lkml/20190828151552.GA16855@infradead.org/
> > Link: https://lore.kernel.org/lkml/20190829214319.498c7de2@naga/
> >
> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
>
> This seems like the right idea in principle.
>
> > index 5bbf587f5bc1..2f3c4bb138c4 100644
> > --- a/fs/read_write.c
> > +++ b/fs/read_write.c
> > @@ -331,7 +331,7 @@ COMPAT_SYSCALL_DEFINE3(lseek, unsigned int, fd, compat_off_t, offset, unsigned i
> > }
> > #endif
> >
> > -#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
> > +#ifdef __ARCH_WANT_SYS_LLSEEK
> > SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
> > unsigned long, offset_low, loff_t __user *, result,
> > unsigned int, whence)
>
> However, only reverting the patch will now break all newly added
> 32-bit architectures that don't define __ARCH_WANT_SYS_LLSEEK:
> at least nds32 and riscv32 come to mind, not sure if there is another.
AFAICT nds32 never had the syscall. Its headers were added without
__ARCH_WANT_SYS_LLSEEK before the define was removed.
The new architecture csky should be handled.
>
> I think the easiest way however would be to combine the two checks
> above and make it
>
> #if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) ||
> defined(__ARCH_WANT_SYS_LLSEEK)
>
> and then only set __ARCH_WANT_SYS_LLSEEK for powerpc.
Yes, that limits the use of __ARCH_WANT_SYS_LLSEEK, does not require
resurrecting the old headers, and may fix some architectures like nds32
that forgot to add it.
Thanks
Michal
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"
2019-08-30 20:13 ` Michal Suchánek
@ 2019-08-30 20:37 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-08-30 20:37 UTC (permalink / raw)
To: Michal Suchánek
Cc: Rich Felker, Linux-sh list, Benjamin Herrenschmidt,
Heiko Carstens, linux-mips, James E.J. Bottomley, Max Filippov,
Guo Ren, H. Peter Anvin, sparclinux, Vincenzo Frascino,
Will Deacon, linux-arch, linux-s390, Yoshinori Sato,
Michael Ellerman, Helge Deller, the arch/x86 maintainers,
Russell King, Christian Borntraeger, Ingo Molnar,
Geert Uytterhoeven, Linux ARM, Catalin Marinas, James Hogan,
Firoz Khan, linux-xtensa, Vasily Gorbik, linux-m68k,
Borislav Petkov, Alexander Viro, David Howells, Thomas Gleixner,
Christian Brauner, Chris Zankel, Michal Simek, Parisc List,
Greg Kroah-Hartman, Linux Kernel Mailing List, Ralf Baechle,
Paul Burton, Linux FS-devel Mailing List, Paul Mackerras,
linuxppc-dev, David S. Miller
On Fri, Aug 30, 2019 at 10:13 PM Michal Suchánek <msuchanek@suse.de> wrote:
> On Fri, 30 Aug 2019 21:54:43 +0200
> Arnd Bergmann <arnd@arndb.de> wrote:
> > > index 5bbf587f5bc1..2f3c4bb138c4 100644
> > > --- a/fs/read_write.c
> > > +++ b/fs/read_write.c
> > > @@ -331,7 +331,7 @@ COMPAT_SYSCALL_DEFINE3(lseek, unsigned int, fd, compat_off_t, offset, unsigned i
> > > }
> > > #endif
> > >
> > > -#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
> > > +#ifdef __ARCH_WANT_SYS_LLSEEK
> > > SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
> > > unsigned long, offset_low, loff_t __user *, result,
> > > unsigned int, whence)
> >
> > However, only reverting the patch will now break all newly added
> > 32-bit architectures that don't define __ARCH_WANT_SYS_LLSEEK:
> > at least nds32 and riscv32 come to mind, not sure if there is another.
>
> AFAICT nds32 never had the syscall. Its headers were added without
> __ARCH_WANT_SYS_LLSEEK before the define was removed.
nds32 got it from include/asm-generic/unistd.h
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"
2019-08-30 19:54 ` Arnd Bergmann
2019-08-30 20:13 ` Michal Suchánek
@ 2019-08-31 8:38 ` Christoph Hellwig
2019-08-31 13:44 ` Arnd Bergmann
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2019-08-31 8:38 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rich Felker, Linux-sh list, Benjamin Herrenschmidt,
Heiko Carstens, Linux Kernel Mailing List, James E.J. Bottomley,
Max Filippov, Guo Ren, H. Peter Anvin, sparclinux,
Vincenzo Frascino, Will Deacon, linux-arch, linux-s390,
Yoshinori Sato, Michael Ellerman, Helge Deller,
the arch/x86 maintainers, Russell King, Christian Borntraeger,
Ingo Molnar, Geert Uytterhoeven, Christian Brauner,
Catalin Marinas, James Hogan, Firoz Khan, Michal Suchanek,
linux-xtensa, Vasily Gorbik, Chris Zankel, linux-m68k,
Borislav Petkov, Alexander Viro, Thomas Gleixner, Linux ARM,
David Howells, Michal Simek, Parisc List, Greg Kroah-Hartman,
linux-mips, Ralf Baechle, Paul Burton,
Linux FS-devel Mailing List, Paul Mackerras, linuxppc-dev,
David S. Miller
On Fri, Aug 30, 2019 at 09:54:43PM +0200, Arnd Bergmann wrote:
> > -#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
> > +#ifdef __ARCH_WANT_SYS_LLSEEK
> > SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
> > unsigned long, offset_low, loff_t __user *, result,
> > unsigned int, whence)
>
> However, only reverting the patch will now break all newly added
> 32-bit architectures that don't define __ARCH_WANT_SYS_LLSEEK:
> at least nds32 and riscv32 come to mind, not sure if there is another.
>
> I think the easiest way however would be to combine the two checks
> above and make it
>
> #if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) ||
> defined(__ARCH_WANT_SYS_LLSEEK)
>
> and then only set __ARCH_WANT_SYS_LLSEEK for powerpc.
I'd much rather introduce a CONFIG_SYS_LLSEEK Kconfig symbol, selected
by CONFIG_64BIT and CONFIG_COMPAT by default, plus manually by powerpc.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"
2019-08-31 8:38 ` Christoph Hellwig
@ 2019-08-31 13:44 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-08-31 13:44 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Rich Felker, Linux-sh list, Benjamin Herrenschmidt,
Heiko Carstens, Linux Kernel Mailing List, James E.J. Bottomley,
Max Filippov, Guo Ren, H. Peter Anvin, sparclinux,
Vincenzo Frascino, Will Deacon, linux-arch, linux-s390,
Yoshinori Sato, Michael Ellerman, Helge Deller,
the arch/x86 maintainers, Russell King, Christian Borntraeger,
Ingo Molnar, Geert Uytterhoeven, Christian Brauner,
Catalin Marinas, James Hogan, Firoz Khan, Michal Suchanek,
linux-xtensa, Vasily Gorbik, Chris Zankel, Nitesh Kataria,
linux-m68k, Borislav Petkov, Alexander Viro, Thomas Gleixner,
Linux ARM, David Howells, Michal Simek, Parisc List,
Greg Kroah-Hartman, linux-mips, Ralf Baechle, Paul Burton,
Linux FS-devel Mailing List, Paul Mackerras, linuxppc-dev,
David S. Miller
On Sat, Aug 31, 2019 at 10:39 AM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Fri, Aug 30, 2019 at 09:54:43PM +0200, Arnd Bergmann wrote:
> > > -#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
> > > +#ifdef __ARCH_WANT_SYS_LLSEEK
> > > SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
> > > unsigned long, offset_low, loff_t __user *, result,
> > > unsigned int, whence)
> >
> > However, only reverting the patch will now break all newly added
> > 32-bit architectures that don't define __ARCH_WANT_SYS_LLSEEK:
> > at least nds32 and riscv32 come to mind, not sure if there is another.
> >
> > I think the easiest way however would be to combine the two checks
> > above and make it
> >
> > #if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) ||
> > defined(__ARCH_WANT_SYS_LLSEEK)
> >
> > and then only set __ARCH_WANT_SYS_LLSEEK for powerpc.
>
> I'd much rather introduce a CONFIG_SYS_LLSEEK Kconfig symbol, selected
> by CONFIG_64BIT and CONFIG_COMPAT by default, plus manually by powerpc.
The reason we currently use __ARCH_WANT_SYS_* for all the other conditional
system calls is that these macros can be put into the uapi file for use by
include/uapi/asm/unistd.h, which is not possible with CONFIG_*
symbols.
This is not a problem for llseek, but it would be slightly inconsistent.
Nitesh is trying to convert include/uapi/asm/unistd.h into syscall.tbl format,
after that is done, we can probably change all the __ARCH_WANT_SYS_*
into config symbols.
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-31 13:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <bb6d25c6baae315d05b571d8c508f0e8fa90027c.1567188299.git.msuchanek@suse.de>
2019-08-30 19:46 ` [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro" Michal Suchanek
2019-08-30 19:54 ` Arnd Bergmann
2019-08-30 20:13 ` Michal Suchánek
2019-08-30 20:37 ` Arnd Bergmann
2019-08-31 8:38 ` Christoph Hellwig
2019-08-31 13:44 ` Arnd Bergmann
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).