Who understands this code?
dss-lfs at cfl.rr.com
Thu Mar 13 20:47:28 PST 2003
Greg Schafer wrote:
> main ()
> sigemptyset (&unblock_sigsegv);
> sigaddset (&unblock_sigsegv, SIGSEGV);
> pg = getpagesize ();
make sure this function (getpagesize()) returns the same value both
inside and outside the chroot environment.
My second theory is that an mmap call inside the chroot environment
causes an mmap call on the outside thus screwing the contiguousness of
the two mmap calls in this program (which is what it's testing for). The
reason for the contiguous mappings is only to check that both
individually mapped regions can be unmapped with a single call.
BTW, if the reported pagesizes differ, mmap rounds up to the next whole
page increment. So the one inside the chroot is actually mapping more
than the reported page size, and the actually contiguous pages would
appear to be discontiguous. This can be fixed by saving the actually
mapped sizes somewhere.
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message
More information about the lfs-dev