Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp608312pxy; Wed, 28 Apr 2021 10:22:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxB2SQHmtwMKjoUY9rx3Q3Xc1q1cCiUp324KPSdpcZ0KhRza8jeHmGL7ISEqslkL9+M5Ce X-Received: by 2002:aa7:db0c:: with SMTP id t12mr12683277eds.72.1619630569327; Wed, 28 Apr 2021 10:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619630569; cv=none; d=google.com; s=arc-20160816; b=ubU7VVS9GqAk2hI0bMunPutgzg+TVB5WhQbe4swSELRb3lScEIGQVgGN/kS3e2+CBc FfYtCoZDlnptJoR6yA7DcS8IedlOZHFPzIriKYgIIyqCbK1Z8SXScnIeQxxGpaYxXbI4 +f457YULOVRfsEyI65NCn2uzhKOOqSoTOf55V6cboWVOfKtlLEGQaLinT+OcLKfV2yOD y0i2+A83pmwRYr3WwAMUzDyH0xbGehrAbVXqKW2eIv6m3jyVLZEgKMXEJxmb80dSzK4h f/3Q/R1m4WcRLDXH8be9yDX8wWUO8gl4a4KZywVn1Jnuzg22K51AHvn/Ai2BPJdzybNe fHhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Zz3TREOjqI5+XfrrdtIuVmt3BaNOF56ovfMuOTA/nT8=; b=khJRZO9JIyNe4QkyAGLM8eL8KyxgQ9ZZvnF2lfrYIZvVyc88g+AxdXbmJ7UWuhfnQG cCEPVXa6GL52aIrWlqDY2SShtPFeZrW1XdRWtK/VyqNFo4m98V+KZ6JWxFkdZ2nGTYuq KWa6DL0Me29owdv8mwEGfYJEV1wLSYDin4/5NO459hQOZoHql/O9kTpOvTnQQ+7OOIcW 3cockgO62zF8CuIRBbQGXqsSp5yibvsAr+XFz6S9wDVJGkHd4KT2PEiL51zH3eNIJlcW PTvF4JnqiO9MfNVvEPdKgPkAra3WJSWfsYhKuv/Z73tw+PIbhxqnKQaB3Dm1CoF9zzYx ssiw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si611919ejz.474.2021.04.28.10.22.25; Wed, 28 Apr 2021 10:22:49 -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; 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 S239707AbhD1NE2 (ORCPT + 99 others); Wed, 28 Apr 2021 09:04:28 -0400 Received: from verein.lst.de ([213.95.11.211]:49158 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239201AbhD1NE2 (ORCPT ); Wed, 28 Apr 2021 09:04:28 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 1A80F68C7B; Wed, 28 Apr 2021 15:03:40 +0200 (CEST) Date: Wed, 28 Apr 2021 15:03:39 +0200 From: Christoph Hellwig To: Arusekk Cc: Christoph Hellwig , Linus Torvalds , 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 Message-ID: <20210428130339.GA30329@lst.de> References: <20210427183414.12499-1-arek_koz@o2.pl> <20210428061259.GA5084@lst.de> <9905352.nUPlyArG6x@swift.dev.arusekk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9905352.nUPlyArG6x@swift.dev.arusekk.pl> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 28, 2021 at 03:02:13PM +0200, Arusekk wrote: > 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 Oh, this patches just the userspace binarz, ok. > > 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. Unless Linus changed his mind just patching the file you care about for now seems like the best idea.