Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp774718pxb; Wed, 20 Jan 2021 22:10:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrbntrKUkkYZQ3duikzJZQy+AbLNPSayXNoc8DXQ0EKBh8xpJwKuAaQl60J+A1BqaPvoSE X-Received: by 2002:a05:6402:35ca:: with SMTP id z10mr10064277edc.174.1611209408783; Wed, 20 Jan 2021 22:10:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611209408; cv=none; d=google.com; s=arc-20160816; b=klJkyQI3UqRrNGECFU8lX1IfZbSSs2c+iKmk3gNQKib5TSlPSGd6TRBCVdXl/BXYyZ 1fWFF7BxuOYldcaC+WdCpASXYv5bBt9BYR0HNhGWj6dzYaWpgIg9e5JV1JKbteeIzssa ZAsUOhBZmQ6tUvbNmNtDVsZt//KpMkoUJu9885HCiUmuW1g3uU47reCamyJBn+vnNpcV 6iWe+lRUyF/9zxQVHt5Npcqjs+6PqxlJ8tYw3lo09fM+WdNwWh62GlFpIlOFhtkxkxT/ dgfKkyU1ThCRsEJcuQfCh/0CMnWNRs/48nAE5UhSEnAj/FOKFv0i0gooUMmFbPS+Lj7W Y0Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=LiwQig3mBDyOYo2eSKpYJKV3suzCYG3QO9goq+oiZ2s=; b=yVmrRVqYZ2ZzXqd833vKQFNpmHW5zyxaxheIfU10pIhlIg4FaBeWH8wHQvuKu/v6zn Aapi95Wgb8dM8Anp8WvV49GKN7wbWFpaqZSCLom8BeDOydL2ls5uyEk0c7d5CnipxzmI 1GtAgw2kLWRhXP2YY3TgagH1VQo93o+X1jLVX7pcE/nAots8AE7yJVmpmwKdRPJIJ3Ec GdK0gUge5fo2IEvYVzemKBRp5rKHAJ64q8JopCXCisAjuPxS3kUzu6iLPVg8Nq4T0+S3 bx0xqedsocodoPYXqVQx7IE/5Ojya3gEuLYwUZ/2khlDZP3uTKDT/psfVUbq8sFP/UqR mI0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be5si1695059edb.385.2021.01.20.22.09.45; Wed, 20 Jan 2021 22:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726513AbhAUGGi (ORCPT + 99 others); Thu, 21 Jan 2021 01:06:38 -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