Subject: vm_mmap bug (more ideas)
To: None <firstname.lastname@example.org>
From: Gordon W. Ross <email@example.com>
Date: 11/29/1994 13:06:51
I just looked again at my POSIX 1003.1b and found:
NOTE: It is expected that a later amendment of this
standard will disallow the implementation from imposing
the restriction on the alignment of the off and addr
If that happens, the only thing required of the mmap parameters
is, when MAP_FIXED is specified, the ADDR and OFF parameters
must have the same remainder modulo the PAGESIZE.
So, if we plan ahead here, we could make the mmap call deal
with a non-aligned OFF and ADDR parameters. All it would
need to to is compute the page-offset part of OFF, create
the mapping (using page-aligned ADDR and OFF), and then
return the page-aligned map address plus the page-offset.
I think I'll take a whack at this since it would mean we
could guarantee page-aligned file-offsets in the VM system
without breaking the existing libc code.
Sorry I didn't think of this sooner...