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=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 D051DC433E0 for ; Thu, 21 Jan 2021 06:07:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80B762389F for ; Thu, 21 Jan 2021 06:07:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726530AbhAUGHD (ORCPT ); Thu, 21 Jan 2021 01:07:03 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:49239 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbhAUGGP (ORCPT ); Thu, 21 Jan 2021 01:06:15 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 10L65MM9023443; Thu, 21 Jan 2021 07:05:22 +0100 Date: Thu, 21 Jan 2021 07:05:22 +0100 From: Willy Tarreau To: Linus Torvalds Cc: Al Viro , Christoph Hellwig , Johannes Berg , Oliver Giles , Linux Kernel Mailing List , Greg Kroah-Hartman Subject: Re: Splicing to/from a tty Message-ID: <20210121060522.GA23430@1wt.eu> References: <20210118195400.GC736435@zeniv-ca> <20210120162608.GB740243@zeniv-ca> <20210120191116.GC740243@zeniv-ca> <20210120231439.GE740243@zeniv-ca> <20210121003835.GF740243@zeniv-ca> <20210121014528.GG740243@zeniv-ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2021 at 07:38:38PM -0800, Linus Torvalds wrote: > On Wed, Jan 20, 2021 at 5:45 PM Al Viro wrote: > > > > splice() triggers an error for seekable destination with O_APPEND and > > with NULL off_out. > > Ok, that's just broken. > > > Same for splice() to socket with > > fcntl(sock_fd, F_SETFL, O_APPEND); > > done first. > > Same. > > As long as you don't pass a position pointer, I think both should just work. > > Not that I imagine it matters for a lot of people.. I think that most users of splice() on sockets got used to falling back to recv/send on splice failure due to various cases not being supported historically (UNIX family sockets immediately come to my mind but I seem to remember other combinations). Thus I guess that most users of splice() detect that it doesn't work either due to lower than expected performance or while running strace. Willy