[Bugme-new] [Bug 11318] New: /proc/self/maps doesn't display the real file offset

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Wed Aug 13 06:39:12 PDT 2008


http://bugzilla.kernel.org/show_bug.cgi?id=11318

           Summary: /proc/self/maps doesn't display the real file offset
           Product: Platform Specific/Hardware
           Version: 2.5
     KernelVersion: 2.6.26
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: i386
        AssignedTo: platform_i386 at kernel-bugs.osdl.org
        ReportedBy: cboulte at gmail.com


Latest working kernel version:
Earliest failing kernel version:
Distribution: Sles 10 SP 1
Hardware Environment: HP Proliant DL140
Software Environment:
Problem Description:

I wrote a simple test that use mmap64 to map a file (/dev/zero) with an offset
value of 0x100000000. When I check /proc/self/maps the offset value reported is
00000000. The issue is in fs/proc/task_mmu.c function 'show_map' where
'seq_printf' use the %lx converter to print a (long * PAGE_SIZE) value.
In my case the offset is 0x100000000 (long long) and the pgoffset is 0x100000
(long).

Steps to reproduce:

I will attach the test I wrote (compile line: $ gcc -O2 -g -Wall mmap64.c -o
mmap64) and a patch that seems to correct this issue.


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the Bugme-new mailing list