Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2928496pxb; Tue, 19 Jan 2021 09:17:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyC+X+sdeDCn3WT/KTfhjC1OX64JUfB2bioxab77xXUCk2nxAWVs1/nW3tSYul40+6JW/wO X-Received: by 2002:a17:906:2743:: with SMTP id a3mr3759609ejd.378.1611076640349; Tue, 19 Jan 2021 09:17:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611076640; cv=none; d=google.com; s=arc-20160816; b=eyFNLZuYvOTMpFwAvXDkiAkHNZ1l1CrjbUeccl0/myqLEJE6hAIpDfs6k42cgSwyt7 0TELSpwhud42271x8qa/Ki3c/iFAGeJtz0LilU1BE76dR/DO/b5DOGkYrkatbafJei5F PnBS6sISYJXGfflnR2BUA8STvlhUy6/hi/GUL8hV9WB3xa60bEvqEx8IlTt/A1wvvUCr bsH+QqFXINbFYwPJRQZjJano8O2tO24hQBGJpkxylZk1+88Pxyx13zneorrSDyFOfnAh xWBK/0E0EEMwCJNjIRTs8NMJWxtN+G4HVSDM6eSQwV3krh5R4I3N0c+Q363WkTQkOBwr h1Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=OCGEPTLVGt/Jq99sW5izukCTm4MbpLbgEds5382RoQ4=; b=m0JA7ypLqJyhdp4XEhZ5esAHOtFfZ5rZlG3+8sOqTv6OkZlSHuq6F1i2HezxTlfhvg uPRpRWhjuOs//ztpNT5cLjn6egBIzpcnA/n/VhOn970KaLugG4iTJNNYW30FhMzezAJx yRpRsep5eDJcP/ieouipXvckSY6JGRTz1VeXcLcBpZ9IRGFTZLqbbewfbYDP61xIXMSY 6cuToKORSuES6RfC33OMaS0MmyqjLwqRs64PMvgB0j/2k8exkzGxpLrNHaByQxnnFixF s9FEKlzsItqZgHIeX3mwY62m4IIyek5hEgtstackwQFlgrViGQ00EAx0MOTqiMrHvWbP l30g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@phytec.de header.s=a1 header.b=VISOOmQu; 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 v15si3303487eja.359.2021.01.19.09.16.55; Tue, 19 Jan 2021 09:17:20 -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; dkim=fail header.i=@phytec.de header.s=a1 header.b=VISOOmQu; 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 S2389681AbhASRNh (ORCPT + 99 others); Tue, 19 Jan 2021 12:13:37 -0500 Received: from mickerik.phytec.de ([195.145.39.210]:60038 "EHLO mickerik.phytec.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390961AbhASRNQ (ORCPT ); Tue, 19 Jan 2021 12:13:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; d=phytec.de; s=a1; c=relaxed/simple; q=dns/txt; i=@phytec.de; t=1611075410; x=1613667410; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=71NL4qRxuCfKGxdVRCYWEgQ0RQvvYiTQUe2PM7pdqG4=; b=VISOOmQu0zxUhdVN4y++vSb4maQiOseEQKt3HSOEPyExJnFk4E8OsDJ9qreg8XK6 WWCmIViH0bjUxDHrGzoSQpbwkTZXpGZpwfhXK3WBruWWXDFATbB52Ud7K43MLBXj po+WLbpqPw4EMk+Ol00z+VprBy/Ek8WkCsRxbL8tviI=; X-AuditID: c39127d2-0c7b670000001c86-e2-60070f520b77 Received: from Florix.phytec.de (florix.phytec.de [172.16.0.118]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mickerik.phytec.de (PHYTEC Mail Gateway) with SMTP id F9.90.07302.25F07006; Tue, 19 Jan 2021 17:56:50 +0100 (CET) Received: from [172.16.21.73] (172.16.0.116) by Florix.phytec.de (172.16.0.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Tue, 19 Jan 2021 17:56:49 +0100 Subject: Re: Splicing to/from a tty To: Greg Kroah-Hartman , Linus Torvalds CC: Christoph Hellwig , Oliver Giles , Linux Kernel Mailing List , Al Viro , Jiri Slaby References: <20210118081615.GA1397@lst.de> From: Robert Karszniewicz Message-ID: <9d3baff9-5d4a-4308-9556-8dd037c2fe4b@phytec.de> Date: Tue, 19 Jan 2021 17:56:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.0.116] X-ClientProxiedBy: Florix.phytec.de (172.16.0.118) To Florix.phytec.de (172.16.0.118) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkkeLIzCtJLcpLzFFi42JZI8BQphvEz55gcGw7v0Xz4vVsFitXH2Wy eDdXxuLyrjlsFr2rNrJaPOp7y25x/u9xVgd2j52z7rJ7bFrVyeZxYsZvFo/9c9ewe+y+2cDm 8XmTnMemJ2+ZAtijuGxSUnMyy1KL9O0SuDJaD99kLXjNUfFlknsDYy97FyMnh4SAicTee4+B bC4OIYFlTBIreo8wQjj3GSX27D0IViUsoCwxsXseSxcjB4eIQKrE/p3VIDXMAqcYJe43zWGG aLjDInHqwUZGkAY2oLG7m28xgzTwCthIrN5mBhJmEVCV+NHwFqxEVCBCorWvkxnE5hUQlDg5 8wkLiM0poClx4/h+RpBWZiB7/S59kDCzgLjErSfzmSBseYntb+eAtQoBjTzd9poJ4hkFibm/ JzJD2OES837PYp/AKDwLyYZZCFNnIZk6C8nUBYwsqxiFcjOTs1OLMrP1CjIqS1KT9VJSNzEC o+nwRPVLOxj75ngcYmTiYDzEKMHBrCTC2/SXLUGINyWxsiq1KD++qDQntfgQozQHi5I47wbe kjAhgfTEktTs1NSC1CKYLBMHp1QD48zkzMd/lWdessyepeJnpcnj+o5ponjq7cqK38d8I1pk p0iy6aTee1zE8lWaj2fC/gie9dmPtCROWs35eOPSS+l6voq9Qc4h0pMlNi7a7rh69dSr0a6x d1fdy8tRW7dV6JDMs95p+fIPD/3aN1tz+YpL9rKTkiY8YxRdcGL32dvOQpuVJO/uvKTEUpyR aKjFXFScCAAtX8R2lAIAAA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/19/21 12:53 PM, Greg Kroah-Hartman wrote: > This looks sane, but I'm still missing what the goal of this is here. > It's nice from a "don't make the ldisc do the userspace copy", point of > view, but what is the next step in order to tie that into splice? > > I ask as I also have reports that sysfs binary files are now failing for > this same reason, so I need to make the same change for them and it's > not excatly obvious what to do: > https://lore.kernel.org/r/1adf9aa4-ed7e-8f05-a354-57419d61ec18@codeaurora.org I would like to confirm this. We are using firmwared and it returns EINVAL on sendfile(), too. I have tried setting the .splice_write callback as in the linked thread, but it didn't help, it just EINVAL'd in a different place. I have bisected this issue down to this commit: 4d03e3cc5982 ("fs: don't allow kernel reads and writes without iter ops") Another case I've also noticed is writing to a serial connection: kernel write not supported for file /ttymxc0 (pid: 252 comm: cat) (Which still prints, though, because cat falls back to write(2), I suppose.) Thank you, Robert