Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp446288pxb; Thu, 21 Jan 2021 10:47:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyO8stN0rc+HngDL3QdkcWSQ141SM+e+sAu7ornLx0+3zqSzPkRW+2jfOM6NOTHdtkw9PyP X-Received: by 2002:a05:6402:c9c:: with SMTP id cm28mr407318edb.281.1611254862978; Thu, 21 Jan 2021 10:47:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611254862; cv=none; d=google.com; s=arc-20160816; b=QBx9JLhhQEkDyXHkeDt2HZeRMwacr0TjAfqwfYQ/qXDKn5+O4avuVsQZDPG52m6owe oq8wbWjngryKILwcOgFIOW5wmgG3nHEDT4r3v4+mxbQ0rU47x8ZUtkYYJpGfDTQM9jKL 3wlyYuf0Ysd6RAO5MRgqfrfLEQVAE3WgT5FoMRDrKQYT/oa42iOxqNUk3/IHMwGZgQm7 N3qkxG9VgEcgQXdcQkW5kZqgbfYtScta4/DeX38280LGHG+cHU5u5u7YlUxljU8uih4X 8gf7cCWRHn38By2QC4xHVA7qRKUiKCBbV8prYUTfKYME6+dPpvB3o/hswGiYhtneODUT 4SvQ== 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; bh=yz6hsPQHJw9vP0UDQ81E3z6DsxAatSqY0B56w17zOO8=; b=f3lFV1TCtcwFdUr27fxsaEl05LnNS5Eu71bWib4lZQXwpOWpGIyd9BwF9qOrmxS64o fWQyBHDJpK8xbf4rU9/zaLWKinhBFYO267RU1/mVjI8RFENzPz1WJ9vClY8L7UO2TGNc tsYgcEV6flxDhQLj26/PS8sh5VrwG+p9mmDJ5BMzJIZyPGehDuK8VN1bvsazjoBR3wVr aAQ92lSafDKQMBLT1Y1r6XAowVOhSY0V6NTXH/Ev0gs/YlenwiaCtomexxTCZse+3upE 3kjWv2/ysBL9QaHfNKO/yKwrccOIuVToxc7dprOZDMZ5uMSRGU6qSYj28t/IqUfaSLVc 3unQ== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si2207691edr.423.2021.01.21.10.47.19; Thu, 21 Jan 2021 10:47:42 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728137AbhAUIwl (ORCPT + 99 others); Thu, 21 Jan 2021 03:52:41 -0500 Received: from mail-ed1-f46.google.com ([209.85.208.46]:39102 "EHLO mail-ed1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728071AbhAUIvX (ORCPT ); Thu, 21 Jan 2021 03:51:23 -0500 Received: by mail-ed1-f46.google.com with SMTP id b21so1483761edy.6 for ; Thu, 21 Jan 2021 00:51:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yz6hsPQHJw9vP0UDQ81E3z6DsxAatSqY0B56w17zOO8=; b=WeqSPricFocNocvp5HSgtK3QAVPJoL1Ii4zyW3JcrNjE8x7LR95lTw5WSTIU88vNjb S7jzLQpUNcfhur6kHHpgU3ejbVuZfHHJEM3SywFxG9AdF3HZbT6crGWRaamar3UTwY5/ /D8tWkgEKB4y9NdieVEk80Mb8J6fWtJFxJ+v2gsI3hcqS7gQNpd1f/xo5NMKtMIrQHCO gOTU2cCIVACfwDPaZyDVKQSDyIfiTHeEQjmL94wSPHfAXwN0hL+BWM1j5dc6yQLUWSqR zbxDHJEAnzSHKVfPkCwRT0Vwn/ctGD0i6JlSTKGEZpAXMDLseniMEbtQe0bDXtvZIRYy Chyw== X-Gm-Message-State: AOAM532W05GzK+QCsQ1LMACWVhsUgQmllFLdScHBoXulANaOaof46IgD sdt6cMd3o4UzGdUyUeQuIEWs4KIkHxc= X-Received: by 2002:a05:6402:14b:: with SMTP id s11mr9859555edu.214.1611219040931; Thu, 21 Jan 2021 00:50:40 -0800 (PST) Received: from ?IPv6:2a0b:e7c0:0:107::49? ([2a0b:e7c0:0:107::49]) by smtp.gmail.com with ESMTPSA id p27sm1934245ejd.72.2021.01.21.00.50.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Jan 2021 00:50:40 -0800 (PST) Subject: Re: tty splice branch (was "Re: Splicing to/from a tty") To: Linus Torvalds , Oliver Giles , Robert Karszniewicz , Greg Kroah-Hartman Cc: Christoph Hellwig , Linux Kernel Mailing List , Al Viro , Jiri Slaby References: From: Jiri Slaby Message-ID: Date: Thu, 21 Jan 2021 09:50:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21. 01. 21, 2:18, Linus Torvalds wrote: > On Tue, Jan 19, 2021 at 8:44 PM Linus Torvalds > wrote: >> >> I'll come back to this tomorrow and do the line-buffered icanon case >> too (unless pull requests pile up), and then I'll be happy with the >> tty changes, and I think I can submit this series for real to Greg. > > Greg, I don't know how you want to handle this. > > I have a branch with my tty splice patches at > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git tty-splice > > and that now includes doing that "cookie continuation" thing even for > the N_TTY icanon modes. > > It passes my local tests, and I did try a few rather odd things. And > Oliver tested an ealier version without that final commit on his load. > But... Hm, I would like to review this first. I noticed the changes only because a new branch appeared when I grabbed your tree and the branch has "tty" in its name. So for example: > @@ -1038,18 +1045,15 @@ static ssize_t tty_write(struct file *file, const char __user *buf, > if (tty->ops->write_room == NULL) > tty_err(tty, "missing write_room method\n"); > ld = tty_ldisc_ref_wait(tty); > - if (!ld) > - return hung_up_tty_write(file, buf, count, ppos); > - if (!ld->ops->write) > + if (!ld || !ld->ops->write) > ret = -EIO; > else > - ret = do_tty_write(ld->ops->write, tty, file, buf, count); > + ret = do_tty_write(ld->ops->write, tty, file, from); > tty_ldisc_deref(ld); if ld == NULL => crash here. So can you send the patches to the list and Cc me too? > return ret; > } thanks, -- js