From: "Serge E. Hallyn" <serge@hallyn.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>,
Andrew Morton <akpm@linux-foundation.org>,
Albert Cahalan <acahalan@gmail.com>,
lkml <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
ebiederm@xmission.com, torvalds@linux-foundation.org
Subject: Re: [RFC][PATCH] /proc/pid/maps doesn't match "ipcs -m" shmid
Date: Thu, 7 Jun 2007 17:08:20 -0500 [thread overview]
Message-ID: <20070607220820.GA1191@vino.hallyn.com> (raw)
In-Reply-To: <1181250968.9995.41.camel@dyn9047017100.beaverton.ibm.com>
Quoting Badari Pulavarty (pbadari@us.ibm.com):
> On Thu, 2007-06-07 at 15:37 -0500, Serge E. Hallyn wrote:
> > Quoting Badari Pulavarty (pbadari@us.ibm.com):
> > > On Thu, 2007-06-07 at 12:48 -0700, Andrew Morton wrote:
> > > > On Thu, 07 Jun 2007 10:06:37 -0700
> > > > Badari Pulavarty <pbadari@us.ibm.com> wrote:
> > > >
> > > > > On Thu, 2007-06-07 at 12:43 -0400, Albert Cahalan wrote:
> > > > > > On 6/7/07, Badari Pulavarty <pbadari@us.ibm.com> wrote:
> > > > > >
> > > > > > > BTW, I agree with Eric that its would be nice to use shmid as part
> > > > > > > of name instead of forcing to be as inode number. It should be
> > > > > > > possible for pmap to workout shmid from "key" or name. Isn't it ?
> > > > > >
> > > > > > It is not at all nice.
> > > > > >
> > > > > > 1. it's incompatible ABI breakage
> > > > > > 2. where will you put the key then, in the inode? :-)
> > > > >
> > > > > Nope. Currently "key" is part of the name (but its not unique).
> > > > >
> > > > > >
> > > > > > Changing to "SYSVID%d" is no good either. Look, people
> > > > > > are ***parsing*** this stuff in /proc. The /proc filesystem
> > > > > > is not some random sandbox to be playing in.
> > > > > >
> > > > > > Before you go messing with it, note that the device number
> > > > > > also matters. (it's per-boot dynamic, but that's OK)
> > > > > > That's how one knows that /SYSV00000000 is not just
> > > > > > a regular file; sadly these didn't get a non-/ prefix.
> > > > > > (and no you can't fix that now; it's way too late)
> > > > > >
> > > > > > Next time you feel like breaking an ABI, mind putting
> > > > > > "LET'S BREAK AN ABI!" in the subject of your email?
> > > > >
> > > > > I am not breaking ABI. Its already broken in the current
> > > > > mainline. I am trying to fix it by putting back the ino#
> > > > > as shmid. Eric had a suggestion that, instead of depending
> > > > > on the inode# to be shmid, we could embed shmid into name
> > > > > (instead of "key" which is currently not unique).
> > > > >
> > > > > > BTW, I suspect this kind of thing also breaks:
> > > > > > a. fuser, lsof, and other resource usage display tools
> > > > > > b. various obscure emulators (similar to valgrind)
> > > > >
> > > > > If you strongly feel that "old" behaviour needs to be retained,
> > > >
> > > > yup, we should put it back. The change was, afaik, accidental.
> > > >
> > > > > here is the patch I originally suggested.
> > > >
> > > > Confused. Will this one-liner fix all the userspace breakage to which
> > > > Albert refers?
> > >
> > > Yes. Albert, please correct me if I am wrong.
> >
> > It will, but could lead to two different inodes with the same i_ino,
> > right?
>
> Only if we generate same ID in two different namespaces. Is it currently
> possible ?
Should be nothing stopping it.
But like I say we never find the inode based on i_ino, and don't hash
the inode, so it might be ok.
-serge
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-06-07 22:08 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 3:27 Albert Cahalan
2007-06-07 3:44 ` Andrew Morton
2007-06-07 4:53 ` Albert Cahalan
2007-06-07 16:20 ` Serge E. Hallyn
2007-06-08 3:45 ` Eric W. Biederman
2007-06-08 4:41 ` Albert Cahalan
2007-06-08 5:55 ` Eric W. Biederman
2007-06-08 6:51 ` Albert Cahalan
2007-06-08 22:31 ` [PATCH] Restore shmid as inode# to fix /proc/pid/maps ABI breakage Badari Pulavarty
2007-06-08 16:07 ` [RFC][PATCH] /proc/pid/maps doesn't match "ipcs -m" shmid Badari Pulavarty
2007-06-08 23:43 ` [PATCH] shm: Fix the filename of hugetlb sysv shared memory Eric W. Biederman
2007-06-08 23:55 ` Andrew Morton
2007-06-09 4:32 ` Badari Pulavarty
2007-06-09 8:01 ` Eric W. Biederman
2007-06-11 18:11 ` Andrew Morton
2007-06-11 19:55 ` Badari Pulavarty
2007-06-11 19:00 ` Adam Litke
2007-06-11 20:53 ` Ken Chen
2007-06-07 16:23 ` [RFC][PATCH] /proc/pid/maps doesn't match "ipcs -m" shmid Badari Pulavarty
2007-06-07 16:43 ` Albert Cahalan
2007-06-07 17:06 ` Badari Pulavarty
2007-06-07 19:48 ` Andrew Morton
2007-06-07 19:59 ` Badari Pulavarty
2007-06-07 20:37 ` Serge E. Hallyn
2007-06-07 20:51 ` Serge E. Hallyn
2007-06-07 21:16 ` Badari Pulavarty
2007-06-07 22:08 ` Serge E. Hallyn [this message]
2007-06-07 22:21 ` Badari Pulavarty
2007-06-07 22:22 ` Serge E. Hallyn
2007-06-07 23:57 ` Badari Pulavarty
-- strict thread matches above, loose matches on Subject: below --
2007-06-06 16:07 Badari Pulavarty
2007-06-06 17:02 ` Eric W. Biederman
2007-06-06 17:37 ` Badari Pulavarty
2007-06-06 18:24 ` Eric W. Biederman
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=20070607220820.GA1191@vino.hallyn.com \
--to=serge@hallyn.com \
--cc=acahalan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pbadari@us.ibm.com \
--cc=torvalds@linux-foundation.org \
/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