]> git.michaelhowe.org Git - packages/o/openafs.git/commit
SOLARIS: support mmap() over 4GiB
authorMark Vitale <mvitale@sinenomine.net>
Thu, 26 May 2016 20:53:47 +0000 (16:53 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 3 Aug 2016 14:30:06 +0000 (10:30 -0400)
commit60e113d66d5c8d7b6b53055d541996550e3d29d4
treefa126bf730fa977d266bfdbee19aaf13c3ec3fd5
parent9b9c10c1914739d19908b9745b13d7ddcf3575ff
SOLARIS: support mmap() over 4GiB

When mmap() is issued for exactly 4GiB of a large AFS-resident file,
mmap() fails with ENOMEM.  This is because the AFS code is handling the
requested length as u_int instead of size_t, resulting in a 0 being
passed back to the caller.

When mmap() is issued for non-multiples of 4GiB, the subsequent mapping
will not contain all the requested pages, and for the same reason - the
mapped size has been truncated to 32 bits.  This results in SIGSEGV when
accessing the non-mapped page(s).

Fix the signature of afs_map() to specify the correct type for the length.

Thanks to Robert Milkowski for the report and diagnosis.

Reviewed-on: https://gerrit.openafs.org/12291
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 75325fc9ab1cec4a338e1aaf1b32de1922492b12)

Change-Id: I8677aebf3afa6a6c0596f7d9afc06fe36d728fd3
Reviewed-on: https://gerrit.openafs.org/12349
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/SOLARIS/osi_vnodeops.c