From nobody@FreeBSD.org  Wed Sep  1 02:54:09 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C0E3416A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Sep 2004 02:54:09 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B67E243D4C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  1 Sep 2004 02:54:09 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i812s9SI091365
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 1 Sep 2004 02:54:09 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i812s9gp091353;
	Wed, 1 Sep 2004 02:54:09 GMT
	(envelope-from nobody)
Message-Id: <200409010254.i812s9gp091353@www.freebsd.org>
Date: Wed, 1 Sep 2004 02:54:09 GMT
From: KOIE Hidetaka <koie@suri.co.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /proc/*/map dont tell file offset
X-Send-Pr-Version: www-2.3

>Number:         71219
>Category:       kern
>Synopsis:       /proc/*/map dont tell file offset
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 01 03:00:42 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     KOIE Hidetaka
>Release:        6.0-CURRENT
>Organization:
SURI Giken
>Environment:
FreeBSD sakura.suri.co.jp 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Fri Aug 27 03:02:10 JST 2004     koie@sakura.suri.co.jp:/usr/obj/usr/src/sys/SAKURA  i386

>Description:
      A checkpointing library wants to know a file offset in a mmaped segment. 
>How-To-Repeat:
      
>Fix:
      like this:
--- procfs_map.c.org    Wed Sep  1 10:56:57 2004
+++ procfs_map.c        Wed Sep  1 11:50:32 2004
@@ -163,5 +163,5 @@ procfs_doprocmap(PFS_FILL_ARGS)
                 */
                snprintf(mebuffer, sizeof mebuffer,
-                   "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s\n",
+                   "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s %lld\n",
                        (u_long)entry->start, (u_long)entry->end,
                        resident, privateresident, obj,
@@ -172,5 +172,5 @@ procfs_doprocmap(PFS_FILL_ARGS)
                        (entry->eflags & MAP_ENTRY_COW)?"COW":"NCOW",
                        (entry->eflags & MAP_ENTRY_NEEDS_COPY)?"NC":"NNC",
-                       type, fullpath);
+                       type, fullpath, (long long)entry->offset);

                if (freepath != NULL)

>Release-Note:
>Audit-Trail:
>Unformatted:
