Who understands this code?
dss-lfs at cfl.rr.com
Thu Mar 13 20:53:53 PST 2003
Donald Smith wrote:
> Greg Schafer wrote:
>> main ()
>> sigemptyset (&unblock_sigsegv);
>> sigaddset (&unblock_sigsegv, SIGSEGV);
>> pg = getpagesize ();
> Hey Greg,
> 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.
P.S. Judging by the reported page addresses being 0x135000 apart, I
don't think the problem is either of those. mmap appears to just work
differently in the chroot environment. Bummer!!
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