From: Arusekk <arek_koz@o2.pl>
To: Christoph Hellwig <hch@lst.de>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Alexey Dobriyan <adobriyan@gmail.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] proc: Use seq_read_iter where possible
Date: Wed, 28 Apr 2021 15:02:13 +0200 [thread overview]
Message-ID: <9905352.nUPlyArG6x@swift.dev.arusekk.pl> (raw)
In-Reply-To: <20210428061259.GA5084@lst.de>
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
next prev parent reply other threads:[~2021-04-28 13:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-27 18:34 [PATCH] proc: Use seq_read_iter where possible Arkadiusz Kozdra (Arusekk)
2021-04-28 6:12 ` Christoph Hellwig
2021-04-28 13:02 ` Arusekk [this message]
2021-04-28 13:03 ` Christoph Hellwig
2021-04-28 17:46 ` Linus Torvalds
2021-04-29 10:05 ` [PATCH v2] proc: Use seq_read_iter for /proc/*/maps Arkadiusz Kozdra (Arusekk)
2021-04-29 10:07 ` Greg Kroah-Hartman
2021-05-04 11:53 ` [PATCH v3] " Arkadiusz Kozdra (Arusekk)
2021-05-04 16:01 ` Linus Torvalds
2021-05-04 20:23 ` Arusekk
2021-05-04 20:24 ` Linus Torvalds
2021-04-29 16:36 ` [PATCH v2] " Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9905352.nUPlyArG6x@swift.dev.arusekk.pl \
--to=arek_koz@o2.pl \
--cc=adobriyan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.