Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp469630pxy; Wed, 28 Apr 2021 07:51:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY4RclgAPY3GyFU3YAv/lEt0XKTJOCMPk1w+xxRD5eHieApslL11bzLzWUfpehyJEE59Lv X-Received: by 2002:a17:907:2151:: with SMTP id rk17mr29529208ejb.203.1619621503178; Wed, 28 Apr 2021 07:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619621503; cv=none; d=google.com; s=arc-20160816; b=S2v+URZRs0dn2wuLwTMp69Pio+yd3PYYYzomJ87H/Ld58r5jIq50z7y1DfrnRlawQl kqpWH6UJwv+liP3XR1QUZf+YXrUvQPIV3TKbf6AXwOwu1ELOLwc9+pRKc6ZTNt/HwqcW TAhyk4pJc+LOi7nH23JhI8KzVtB9it4DrymfQhXg/FJKbd1AX/JAirEAglkWwHx2Y1CZ k2EZRWyIFSu0I5jgxG9Dq/T6mj+ZTKzZ8Br2lwZl6OKkGzm48h69kYQPfjylUaX+BdNC /21yYUaKVTS05EU/t9Yn8gRy3eEN1XSj8yh3cUBdNPJf0IlmX21NW4H7MgWvLTPnsAfy h8/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JxD4NCQWWsavhdqtqjcpxaRszwmY/ct3WAZ8qWDgcVE=; b=qBKvNZkiQc4EWPn2O2UC4v1xOFpFVxDLbpJkJU4QJKDDpC8IeBxf2m2chLse3VlNNm vqZbhDPNFXLoMD+3yyvvyD6XExy+Q9k3axYlGtjjmeRSCA+F+OzLTPmiLxZHZXT63MYi SNzYibDQ4afQ6/aYLHMvQincYug2edgRXVHl5dxh+iBaMSbvEktKuX5At7hS6Ab7t6o0 dtnHxT6teog5IhTjFJsOwdE/XzA1Cso41laxUZhR13/eFQbmg9xV0XIgTgZmv7/GaaUk k35Rk2jlXYBwiRcdHgfSp5NHqd1CMldRXvcWkOHbYu78DaEPaSkvHyVRsRnDFd1rke9p N51w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@o2.pl header.s=1024a header.b=YPSB3iPx; 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=o2.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si5833571edz.389.2021.04.28.07.51.19; Wed, 28 Apr 2021 07:51:43 -0700 (PDT) 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=pass (test mode) header.i=@o2.pl header.s=1024a header.b=YPSB3iPx; 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=o2.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239668AbhD1NBA (ORCPT + 99 others); Wed, 28 Apr 2021 09:01:00 -0400 Received: from mx-out.tlen.pl ([193.222.135.175]:29281 "EHLO mx-out.tlen.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239579AbhD1NA7 (ORCPT ); Wed, 28 Apr 2021 09:00:59 -0400 Received: (wp-smtpd smtp.tlen.pl 815 invoked from network); 28 Apr 2021 15:00:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1619614812; bh=JxD4NCQWWsavhdqtqjcpxaRszwmY/ct3WAZ8qWDgcVE=; h=From:To:Cc:Subject; b=YPSB3iPx7WqGxrqI0SNXEPsS3ljznp4+G32g+FACMHF2JkAVBYZ/xgThbpGDAU/C3 P9P91/EXDjeGJYPdxb5w+XJzoLgb2Gp4o/s48WRaM3Dk9aue1ihFAqXj+htQetokg+ +PdwSc4LmSAupZ6srMUSryA3yWjRiu9kLv8TYIWs= Received: from 89-64-46-199.dynamic.chello.pl (HELO swift.dev.arusekk.pl) (arek_koz@o2.pl@[89.64.46.199]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 28 Apr 2021 15:00:12 +0200 From: Arusekk To: Christoph Hellwig , Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Alexey Dobriyan , Al Viro , Greg Kroah-Hartman Subject: Re: [PATCH] proc: Use seq_read_iter where possible Date: Wed, 28 Apr 2021 15:02:13 +0200 Message-ID: <9905352.nUPlyArG6x@swift.dev.arusekk.pl> In-Reply-To: <20210428061259.GA5084@lst.de> References: <20210427183414.12499-1-arek_koz@o2.pl> <20210428061259.GA5084@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-WP-MailID: d5a3335d5a2651ffc3728d37fd384915 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [IcMh] Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 28, 2021 at 08:12:59 CEST, Christoph Hellwig wrote: > Patching what entry point? The instructions at the entry point of the executable being inspected. The flow of the tool: - parse ELF headers of the binary to be inspected, - locate its entry point position in the file, - write short code at the location (this short code has used sendfile so far), - execute the patched binary, - parse the output and extract information about the relevant mappings. This can be seen as equivalent to setting LD_TRACE_LOADED_OBJECTS, but also works for static binaries, and is a bit safer. The problem was reported at: https://github.com/Gallopsled/pwntools/issues/1871 > Linus did object to blindly switching over all instances. I know, I read that, but I thought that pointing a real use case, combined with the new interface being used all throughout the other code, might be convincing. I would be happy with only changing the f_ops of /proc/.../maps, even if only on MMU-enabled systems, but I thought that consistence would be better. This is my first time contributing to Linux, so I am very sorry for any wrong assumptions, and glad to learn more. -- Arusekk