[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0904021938270.25731@blonde.anvils>
Date: Thu, 2 Apr 2009 20:10:55 +0100 (BST)
From: Hugh Dickins <hugh@...itas.com>
To: Chris Friesen <cfriesen@...tel.com>
cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Michael Ellerman <michael@...erman.id.au>,
linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
peterz@...radead.org, akpm@...ux-foundation.org
Subject: Re: Resend: /proc/<pid>/maps offset output broken in 2.6.29
On Thu, 2 Apr 2009, Chris Friesen wrote:
> Hugh Dickins wrote:
> > > > f7feb000-f7fec000 rw-p f7feb000 00:00 0
> > > > ffe6d000-ffe82000 rw-p ffffffeb000 00:00 0 [stack]
>
> > Chris isn't the first to be concerned by that: there's a patch in
> > -mm which just shows 0 instead of anon vm_pgoff in /proc/<pid>/maps
> > output. That patch is on akpm's list for 2.6.30 merge, but I think
> > hasn't gone to Linus yet: expect it in a later batch.
>
> Alternately, what about just making the offset for the stack match the
> starting address of the VMA?
The rmap code for locating anonymous pages, even after the vma has
been moved meanwhile, depends on vma->vm_pgoff. There is no point
in making that more complicated for this.
For display purposes only? Well, yes, we could have done that,
but why bother? It wouldn't be adding any information, and
might raise a question of identifying "the" stack to do that to.
> That way it would look the same as other anonymous areas,
The stack will be looking the same as other anonymous areas:
they'll all be showing 00000000 there.
This is a cosmetic matter, not worth more than a couple of lines of
code: I suggested masking off the high bits in the display, but when
KAMEZAWA-san suggested just showing 0, it was hard to argue against
his brutal simplicity.
> and as a bonus would look the same as previous releases.
> Arguably, /proc/<pid>/maps should count as userspace-visible API.
Consider this change a fix: it used to show 00000000 before 2.6.7.
See http://lkml.org/lkml/2009/1/13/331 for one of the threads
on the subject - but you've not tempted me to reopen it!
Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists