From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= Subject: Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro" Date: Fri, 30 Aug 2019 22:13:15 +0200 Message-ID: <20190830221315.4b3b8a74@kitsune.suse.cz> References: <20190830194651.31043-1-msuchanek@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Arnd Bergmann Cc: Rich Felker , Linux-sh list , Benjamin Herrenschmidt , Heiko Carstens , linux-mips@vger.kernel.org, "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 Linu List-Id: linux-arch.vger.kernel.org On Fri, 30 Aug 2019 21:54:43 +0200 Arnd Bergmann wrote: > On Fri, Aug 30, 2019 at 9:46 PM Michal Suchanek 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 > > 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