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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=FROM_EXCESS_BASE64, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81855C3A5A4 for ; Fri, 30 Aug 2019 20:15:18 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F68323429 for ; Fri, 30 Aug 2019 20:15:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F68323429 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46KrLr0KjBzDqbC for ; Sat, 31 Aug 2019 06:15:16 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=suse.de (client-ip=195.135.220.15; helo=mx1.suse.de; envelope-from=msuchanek@suse.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46KrJf0HpBzDr2P for ; Sat, 31 Aug 2019 06:13:22 +1000 (AEST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1BD59ACC3; Fri, 30 Aug 2019 20:13:18 +0000 (UTC) Date: Fri, 30 Aug 2019 22:13:15 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: Arnd Bergmann Subject: Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro" Message-ID: <20190830221315.4b3b8a74@kitsune.suse.cz> In-Reply-To: References: <20190830194651.31043-1-msuchanek@suse.de> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , Linux-sh list , 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 , Helge Deller , the arch/x86 maintainers , Russell King , Christian Borntraeger , Ingo Molnar , Geert Uytterhoeven , Linux ARM , Catalin Marinas , James Hogan , Firoz Khan , linux-xtensa@linux-xtensa.org, 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" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,FROM_EXCESS_BASE64,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FB9BC3A59B for ; Fri, 30 Aug 2019 20:13:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3387923427 for ; Fri, 30 Aug 2019 20:13:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GHWN6kft" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3387923427 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=koI7m3U+O9QNimvjeIXBuNgvSu27p6HDUZam/s0VXis=; b=GHWN6kft6LSekX +tBsMWzaiNAlrw4JfDmDE3HCi6XlDZdruyLzc4ne3zEpDf8wDjCYxxYUXYy24smtl1QH0/66ndSSa bP8SaZk+PhlzQjnIZcWYmWVO2KzCiS6GsgL4MvXrCDZWH9l0lRFZBqmMivQSG81gumFU569PuzjB/ OoB7cOrWbycUw4NVHlrg9bYZjpnP4Q29E03gV8nfXtCWSVqb9x/8zVINmkFgdzRRcBxFhfmGq9U1C k2NfCpiNAoepffuDzflHnOXafQRFemprXTQssqzZURK3OgUvLA05Kahi6eZ1DXlPre9ztt+LURakL N1b4qutqtZHeYMGUcG7w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i3nGt-000471-Es; Fri, 30 Aug 2019 20:13:23 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i3nGq-00046f-6Y for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2019 20:13:22 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1BD59ACC3; Fri, 30 Aug 2019 20:13:18 +0000 (UTC) Date: Fri, 30 Aug 2019 22:13:15 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: Arnd Bergmann Subject: Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro" Message-ID: <20190830221315.4b3b8a74@kitsune.suse.cz> In-Reply-To: References: <20190830194651.31043-1-msuchanek@suse.de> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190830_131320_534350_14854366 X-CRM114-Status: GOOD ( 19.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 , Linux ARM , Catalin Marinas , James Hogan , Firoz Khan , linux-xtensa@linux-xtensa.org, 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" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel