> It may be noteworthy that the file being mapped is on a hugetlbfs.
> 
> Any guesses as to why this call is failing?  I was not readily able to
> extract an answer from do_mmap_pgoff in linux/mm/mmap.c.

Observe the Linux kernel code in fs/hugetlbfs/inode.c,
function hugetlbfs_file_mmap.  In [old] kernel-2.6.18, it was:
-----
         if (vma->vm_pgoff & (HPAGE_SIZE / PAGE_SIZE - 1))
                 return -EINVAL;

         if (vma->vm_start & ~HPAGE_MASK)
                 return -EINVAL;

         if (vma->vm_end & ~HPAGE_MASK)
                 return -EINVAL;

         if (vma->vm_end - vma->vm_start < HPAGE_SIZE)
                 return -EINVAL;
-----
HPAGE_SIZE is 4MB on i686, but 2MB on x86_64.
By the time execution reaches hugetlbfs_file_mmap,
then (.vm_end - .vm_start) must be at least 4MB on i686
in this version of Linux.

aspacemgr does not pay any attention to hugetlbfs, and so
could choose a starting address that fails the test for .vm_start.

-- 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to