From: John Richard Moser <nigelenki@comcast.net>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Prasanna Meda <pmeda@akamai.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: /proc/<pid>/maps API addition - seek to address
Date: Mon, 17 Jan 2005 00:29:04 -0500 [thread overview]
Message-ID: <41EB4D20.2010207@comcast.net> (raw)
In-Reply-To: <1105933726.31917.50.camel@localhost>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeremy Fitzhardinge wrote:
> It would be terribly useful to have some way of
> lseeking /proc/<pid>/maps to the entry of a particular address. So, if
> you want to find the information about a mapping containing address
> 0x12345678, it would set the file position to (say) the entry of
> 0x12000000-0x20000000.
>
> I haven't looked at how /proc/<pid>/maps is implemented these days; is
> this outright hard, or relatively straightforward? This wouldn't be
> very useful if it had to actually generate all the output up to the
> desired point, but it would be a boon if it could short-circuit that. I
> guess the interactions with normal lseek might be tricky (but perhaps
> that could be put off until you actually use lseek, if ever).
>
I'm fairly certain you can just return that the seek is done, and set
flags for the file descriptor, then on read() have it return the data
you want it to.
> Alternatively, any other API for finding the properties of page X would
> be useful, but this seemed like a nice incremental extension of the
> existing interface.
>
> J
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
- --
All content of all messages exchanged herein are left in the
Public Domain, unless otherwise explicitly stated.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB600dhDd4aOud5P8RAlvoAJsFi6ZUMTVhqQBWqZFkv8ubeJEyegCfYhhl
6Gy3TLn/ngSQDugT0CxOpnY=
=rR0f
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2005-01-17 5:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-17 3:48 /proc/<pid>/maps API addition - seek to address Jeremy Fitzhardinge
2005-01-17 5:29 ` John Richard Moser [this message]
2005-01-17 7:43 ` Prasanna Meda
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=41EB4D20.2010207@comcast.net \
--to=nigelenki@comcast.net \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeda@akamai.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox