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, 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 9C648C43460 for ; Wed, 28 Apr 2021 06:13:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B3C36141E for ; Wed, 28 Apr 2021 06:13:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235939AbhD1GNr (ORCPT ); Wed, 28 Apr 2021 02:13:47 -0400 Received: from verein.lst.de ([213.95.11.211]:47955 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbhD1GNp (ORCPT ); Wed, 28 Apr 2021 02:13:45 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 638F468B05; Wed, 28 Apr 2021 08:12:59 +0200 (CEST) Date: Wed, 28 Apr 2021 08:12:59 +0200 From: Christoph Hellwig To: "Arkadiusz Kozdra (Arusekk)" Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Alexey Dobriyan , Al Viro , Greg Kroah-Hartman , Christoph Hellwig , Linus Torvalds Subject: Re: [PATCH] proc: Use seq_read_iter where possible Message-ID: <20210428061259.GA5084@lst.de> References: <20210427183414.12499-1-arek_koz@o2.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210427183414.12499-1-arek_koz@o2.pl> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 27, 2021 at 08:34:15PM +0200, Arkadiusz Kozdra (Arusekk) wrote: > Since seq_read_iter looks mature enough to be used for all procfs files, > re-allow applications to perform zero-copy data forwarding from them. > According to the sendfile(2) man-page, it is still enough for the file > being read to support mmap-like operations, and the proc files support > memory mapping, so returning -EINVAL was an inconsistency. Linus did object to blindly switching over all instances. > Some executable-inspecting tools rely on patching entry point > instructions with minimal machine code that uses sendfile to read > /proc/self/maps to stdout. The sendfile call allows them to do it > faster and without excessive allocations. Patching what entry point?