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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 3F562C433DB for ; Thu, 21 Jan 2021 06:44:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA07A2396D for ; Thu, 21 Jan 2021 06:44:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726693AbhAUGoH (ORCPT ); Thu, 21 Jan 2021 01:44:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726131AbhATXla (ORCPT ); Wed, 20 Jan 2021 18:41:30 -0500 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D40E5C0613C1 for ; Wed, 20 Jan 2021 15:40:49 -0800 (PST) Received: by mail-lj1-x231.google.com with SMTP id i17so481660ljn.1 for ; Wed, 20 Jan 2021 15:40:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B0EKRpra5vnzlsqH1m61RjZinafDpDBSUNcZj2tUSZQ=; b=F9fdoDC9z6i3C7NWkauOjoq/M4vmZThwArdnXgPvBySNEv8Jst9vRqTbwdOQOEnAjc eZBSBZ4ouTsYIWAIdUidT+baAn/6s62LyePwXZmdBFmPKANnX1bMJ7sDUQMs0B6q0S4w LYEZVKl1qiT/ODWqFXNDHv7I5oaz/1MGUUAhI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B0EKRpra5vnzlsqH1m61RjZinafDpDBSUNcZj2tUSZQ=; b=UlUV2UguhyX4xWxTmaHADKscaczHhbKhq8OmTQtJSfGJJoHBemvbFthAbIfwHh1x1p UimIO+32JeZ95/JBgUtaLAHH7wSj12PEQOhyh2O/WRZKOcEvg99gbAEgcvt4cz/xcgzG rsxGW+0Or4SFI8OHcO6qya7i8DZN7Sg9+vRPeIXBO75thZNTfIhfd3hzblubCuMESKhQ R3u7likDZh5t35nU/hn6vS5acsGYUO5zuh3Kcw024LTDXVxGE1NRHdQwDer66x2gSxCa Ys0JWdGp29G49FEiDpcVr5fLy/g/r1x+R6uFNzbLbWyD8WX+ObRdoHQv2sRSmKtJ+ZdY 0p/Q== X-Gm-Message-State: AOAM530XgAuZyCEyfy6Eg9JGrO1lQGi3Ku0mSgfKePxqpl0xxsEOXJZi RGMBfJuhPlQe/9hBS8/hcBiPMAQHb1vtJg== X-Google-Smtp-Source: ABdhPJyqt0fE3VMufA7MX/8AnipNgp5FNnI9Q/Xy3IIxE20GPguLbOjfFw00imVnDeACq7YcxAWY8Q== X-Received: by 2002:a2e:8714:: with SMTP id m20mr5193292lji.320.1611186048005; Wed, 20 Jan 2021 15:40:48 -0800 (PST) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id d24sm326527lfc.225.2021.01.20.15.40.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Jan 2021 15:40:47 -0800 (PST) Received: by mail-lj1-f170.google.com with SMTP id p13so475378ljg.2 for ; Wed, 20 Jan 2021 15:40:46 -0800 (PST) X-Received: by 2002:a2e:9d89:: with SMTP id c9mr5862326ljj.220.1611186046375; Wed, 20 Jan 2021 15:40:46 -0800 (PST) MIME-Version: 1.0 References: <20210118085311.GA2735@lst.de> <20210118193457.GA736435@zeniv-ca> <20210118195400.GC736435@zeniv-ca> <20210120162608.GB740243@zeniv-ca> <20210120191116.GC740243@zeniv-ca> <20210120231439.GE740243@zeniv-ca> In-Reply-To: <20210120231439.GE740243@zeniv-ca> From: Linus Torvalds Date: Wed, 20 Jan 2021 15:40:29 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Splicing to/from a tty To: Al Viro Cc: Christoph Hellwig , Johannes Berg , Oliver Giles , Linux Kernel Mailing List , Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2021 at 3:14 PM Al Viro wrote: > > Umm... Why do we clear FMODE_PWRITE there [seq_open - ed], anyway? I think it's pointless and historical, and comes from "several /proc files supported the simple single-write model, nothing ever supported moving around and writing". The seq_file stuff was always about reading, and then the writing part was generally random special-case hacks on the side. So I think that "clear PWRITE" thing is to make sure we get sane error cases if somebody tries something funny, knowing that none of the hacky stuff support it. And then the very special kernfs thing adds it back in, because it does in fact allow seeking writes. Linus