From: Andrew Morton <akpm@osdl.org>
To: "Jeffrey E. Hundstad" <jeffrey.hundstad@mnsu.edu>
Cc: linux-kernel@vger.kernel.org,
"viro@parcelfarce.linux.theplanet.co.uk"
<viro@parcelfarce.linux.theplanet.co.uk>
Subject: Re: /proc/[0-9]*/maps where did the (deleted) status go?
Date: Sun, 2 Nov 2003 00:47:39 -0800 [thread overview]
Message-ID: <20031102004739.12a0004c.akpm@osdl.org> (raw)
In-Reply-To: <3FA4BDAB.9080805@mnsu.edu>
> I'm going to fine tune this report a little bit. The behavior change is
> more subtle than I at first thought.
>
> In 2.4: file that has been deleted, and is mapped will show as deleted
> in the maps file
> In 2.6: file that has been deleted, and is mapped will show as deleted
> in the maps file
>
> In 2.4: file that has been moved, and is mapped will show as deleted in
> the maps file
> In 2.6: file that has been moved, and is mapped will show the new name
> in the maps file
>
> While I don't see this as a bug in the kernel it certainly is a
> regression difference.
OK, it's a bugfix. The 2.6 behaviour is correct...
> ...and I'd still like a way of tracking when the
> filename changes.
You could copy the file and remove the original. That way it will show up
as (deleted).
> As a side note... this is the output of a file that has actually been
> deleted. It looks different from the 2.4 version (note the "\040" is
> something new):
>
> 40018000-40019000 rw-s 00000000 03:04 13355559
> /home/j3gum/src/mmap/testfile.old\040(deleted)
>
No, the \040 is present in current 2.4. Urgh, but it's not there in
2.4.20. We shouldn't have done that; we've gone and changed the format of
/proc/pid/maps in the stable kernel - your script will break on
2.4.23-pre9.
This patch (against 2.6) will restore the old 2.4 behaviour. I'll scoot
the 2.4 equiv over to Marcelo.
diff -puN fs/proc/task_mmu.c~proc-pid-maps-output-fix fs/proc/task_mmu.c
--- 25/fs/proc/task_mmu.c~proc-pid-maps-output-fix 2003-11-02 00:38:26.000000000 -0800
+++ 25-akpm/fs/proc/task_mmu.c 2003-11-02 00:38:30.000000000 -0800
@@ -106,7 +106,7 @@ static int show_map(struct seq_file *m,
if (len < 1)
len = 1;
seq_printf(m, "%*c", len, ' ');
- seq_path(m, file->f_vfsmnt, file->f_dentry, " \t\n\\");
+ seq_path(m, file->f_vfsmnt, file->f_dentry, "");
}
seq_putc(m, '\n');
return 0;
_
next prev parent reply other threads:[~2003-11-02 8:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-02 3:49 Jeffrey E. Hundstad
2003-11-02 7:52 ` Andrew Morton
2003-11-02 8:17 ` Jeffrey E. Hundstad
2003-11-02 8:47 ` Andrew Morton [this message]
2003-11-02 8:58 ` viro
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=20031102004739.12a0004c.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=jeffrey.hundstad@mnsu.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@parcelfarce.linux.theplanet.co.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®